From 6c801fc04888ec0a89229f9295d80968de1652f8 Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de> Date: Fri, 24 Feb 2023 09:32:47 +0100 Subject: [PATCH] Add automatically generated files. --- Makefile.in | 978 + aclocal.m4 | 1583 + app/Makefile.in | 844 + config/compile | 348 + config/config.guess | 1774 + config/config.sub | 1907 + config/depcomp | 791 + config/install-sh | 541 + config/ltmain.sh | 11267 +++++ config/missing | 215 + config/py-compile | 189 + config/test-driver | 153 + configure | 38139 ++++++++++++++ doc/cdi_cman.pdf | Bin 0 -> 326520 bytes doc/cdi_fman.pdf | Bin 0 -> 353000 bytes examples/Makefile.in | 1058 + examples/pio/Makefile.in | 896 + interfaces/Makefile.in | 1429 + interfaces/python/Cdi.py | 1379 + interfaces/python/cdi_wrapper.cpp | 29389 +++++++++++ interfaces/ruby/cdi_wrapper.cpp | 33805 +++++++++++++ m4/libtool.m4 | 8369 ++++ m4/ltoptions.m4 | 437 + m4/ltsugar.m4 | 124 + m4/ltversion.m4 | 23 + m4/lt~obsolete.m4 | 99 + src/Makefile.in | 1620 + src/cdi.inc | 2620 + src/cdiFortran.c | 812 + src/cdilib.c | 75025 ++++++++++++++++++++++++++++ src/cdipio.inc | 318 + src/cdipioFortran.c | 186 + src/config.h.in | 337 + src/mo_cdi.f90 | 6105 +++ tests/Makefile.in | 1680 + 35 files changed, 224440 insertions(+) create mode 100644 Makefile.in create mode 100644 aclocal.m4 create mode 100644 app/Makefile.in create mode 100755 config/compile create mode 100755 config/config.guess create mode 100755 config/config.sub create mode 100755 config/depcomp create mode 100755 config/install-sh create mode 100644 config/ltmain.sh create mode 100755 config/missing create mode 100755 config/py-compile create mode 100755 config/test-driver create mode 100755 configure create mode 100644 doc/cdi_cman.pdf create mode 100644 doc/cdi_fman.pdf create mode 100644 examples/Makefile.in create mode 100644 examples/pio/Makefile.in create mode 100644 interfaces/Makefile.in create mode 100644 interfaces/python/Cdi.py create mode 100644 interfaces/python/cdi_wrapper.cpp create mode 100644 interfaces/ruby/cdi_wrapper.cpp create mode 100644 m4/libtool.m4 create mode 100644 m4/ltoptions.m4 create mode 100644 m4/ltsugar.m4 create mode 100644 m4/ltversion.m4 create mode 100644 m4/lt~obsolete.m4 create mode 100644 src/Makefile.in create mode 100644 src/cdi.inc create mode 100644 src/cdiFortran.c create mode 100644 src/cdilib.c create mode 100644 src/cdipio.inc create mode 100644 src/cdipioFortran.c create mode 100644 src/config.h.in create mode 100644 src/mo_cdi.f90 create mode 100644 tests/Makefile.in diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..bc6140097 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,978 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + 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@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \ + $(top_srcdir)/m4/acx_c_package.m4 \ + $(top_srcdir)/m4/acx_cfortran_flags.m4 \ + $(top_srcdir)/m4/acx_check_cfortran.m4 \ + $(top_srcdir)/m4/acx_check_strptr_convert.m4 \ + $(top_srcdir)/m4/acx_execinfo.m4 \ + $(top_srcdir)/m4/acx_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_fortran_include_flag.m4 \ + $(top_srcdir)/m4/acx_fortran_package.m4 \ + $(top_srcdir)/m4/acx_lang_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_package.m4 \ + $(top_srcdir)/m4/acx_lt_problems.m4 \ + $(top_srcdir)/m4/acx_m4_list_to_quoted_strings.m4 \ + $(top_srcdir)/m4/acx_mpirun.m4 $(top_srcdir)/m4/acx_mv_obj.m4 \ + $(top_srcdir)/m4/acx_option_search_libs.m4 \ + $(top_srcdir)/m4/acx_options.m4 \ + $(top_srcdir)/m4/acx_prog_cc_posix.m4 \ + $(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \ + $(top_srcdir)/m4/acx_sl_mod_suffix.m4 \ + $(top_srcdir)/m4/acx_tls_xlc_retry.m4 \ + $(top_srcdir)/m4/acx_use_libtool_configuration.m4 \ + $(top_srcdir)/m4/acx_uuid.m4 $(top_srcdir)/m4/asx_tr_arg.m4 \ + $(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/kpse_libtool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/ac_lang_program_fortran.m4 \ + $(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_c_check_include.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = cdi.settings \ + src/cmake/cdi/cdi-config-version.cmake \ + src/cmake/cdi/cdi-config.cmake src/pkgconfig/cdi.pc \ + src/pkgconfig/cdi_f2003.pc src/pkgconfig/cdipio.pc \ + tables/gen_tableheaderfile +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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 = +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 \ + cscope distdir distdir-am dist dist-all distcheck +am__extra_recursive_targets = examples-recursive +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)` +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cdi.settings.in \ + $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \ + $(top_srcdir)/config/config.sub \ + $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ + $(top_srcdir)/config/missing \ + $(top_srcdir)/src/cmake/cdi/cdi-config-version.cmake.in \ + $(top_srcdir)/src/cmake/cdi/cdi-config.cmake.in \ + $(top_srcdir)/src/pkgconfig/cdi.pc.in \ + $(top_srcdir)/src/pkgconfig/cdi_f2003.pc.in \ + $(top_srcdir)/src/pkgconfig/cdipio.pc.in \ + $(top_srcdir)/tables/gen_tableheaderfile.in AUTHORS COPYING \ + ChangeLog INSTALL NEWS README config/compile \ + config/config.guess config/config.sub config/install-sh \ + config/ltmain.sh config/missing +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +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" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCE_UUIDROOT = @DCE_UUIDROOT@ +DCE_UUID_C_INCLUDE = @DCE_UUID_C_INCLUDE@ +DCE_UUID_C_LIB = @DCE_UUID_C_LIB@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECCODES_INCLUDE = @ECCODES_INCLUDE@ +ECCODES_LIBS = @ECCODES_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_ACROSS = @ENABLE_ACROSS@ +ENABLE_CDI_LIB = @ENABLE_CDI_LIB@ +ENABLE_CGRIBEX = @ENABLE_CGRIBEX@ +ENABLE_EXTRA = @ENABLE_EXTRA@ +ENABLE_GRIB = @ENABLE_GRIB@ +ENABLE_IEG = @ENABLE_IEG@ +ENABLE_MPI = @ENABLE_MPI@ +ENABLE_NC2 = @ENABLE_NC2@ +ENABLE_NC4 = @ENABLE_NC4@ +ENABLE_NC4HDF5 = @ENABLE_NC4HDF5@ +ENABLE_NC4SZLIB = @ENABLE_NC4SZLIB@ +ENABLE_NETCDF = @ENABLE_NETCDF@ +ENABLE_SERVICE = @ENABLE_SERVICE@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCMODCASE = @FCMODCASE@ +FCMODEXT = @FCMODEXT@ +FC_DEFINE = @FC_DEFINE@ +FC_MOD_FLAG = @FC_MOD_FLAG@ +FC_OPTINC = @FC_OPTINC@ +FDB5_INCLUDE = @FDB5_INCLUDE@ +FDB5_LIBS = @FDB5_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GRIB_API_INCLUDE = @GRIB_API_INCLUDE@ +GRIB_API_LIBS = @GRIB_API_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPIROOT = @MPIROOT@ +MPI_C_INCLUDE = @MPI_C_INCLUDE@ +MPI_C_LIB = @MPI_C_LIB@ +MPI_FC_LIB = @MPI_FC_LIB@ +MPI_FC_MOD = @MPI_FC_MOD@ +MPI_LAUNCH = @MPI_LAUNCH@ +NC_CONFIG = @NC_CONFIG@ +NETCDF_INCLUDE = @NETCDF_INCLUDE@ +NETCDF_LIBS = @NETCDF_LIBS@ +NETCDF_ROOT = @NETCDF_ROOT@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OSSP_UUIDROOT = @OSSP_UUIDROOT@ +OSSP_UUID_C_INCLUDE = @OSSP_UUID_C_INCLUDE@ +OSSP_UUID_C_LIB = @OSSP_UUID_C_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PPM_CORE_C_INCLUDE = @PPM_CORE_C_INCLUDE@ +PPM_CORE_C_LIB = @PPM_CORE_C_LIB@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PLATFORM_SITE_PKG = @PYTHON_PLATFORM_SITE_PKG@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SYSTEM_TYPE = @SYSTEM_TYPE@ +SZLIB_INCLUDE = @SZLIB_INCLUDE@ +SZLIB_LIBS = @SZLIB_LIBS@ +THREADS_INCLUDE = @THREADS_INCLUDE@ +THREADS_LIBS = @THREADS_LIBS@ +UTIL_LINUX_UUIDROOT = @UTIL_LINUX_UUIDROOT@ +UTIL_LINUX_UUID_C_INCLUDE = @UTIL_LINUX_UUID_C_INCLUDE@ +UTIL_LINUX_UUID_C_LIB = @UTIL_LINUX_UUID_C_LIB@ +UUID_C_INCLUDE = @UUID_C_INCLUDE@ +UUID_C_LIB = @UUID_C_LIB@ +VERSION = @VERSION@ +YAXT_C_INCLUDE = @YAXT_C_INCLUDE@ +YAXT_C_LIB = @YAXT_C_LIB@ +YAXT_FC_LIB = @YAXT_FC_LIB@ +YAXT_FC_MOD = @YAXT_FC_MOD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = src interfaces app examples tests +EXTRA_DIST = \ + LICENSE \ + config/interface.rb \ + doc/cdi_cman.pdf \ + doc/cdi_fman.pdf \ + src/cfortran.doc + +ACLOCAL_AMFLAGS = -I m4 +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +cdi.settings: $(top_builddir)/config.status $(srcdir)/cdi.settings.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/cmake/cdi/cdi-config-version.cmake: $(top_builddir)/config.status $(top_srcdir)/src/cmake/cdi/cdi-config-version.cmake.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/cmake/cdi/cdi-config.cmake: $(top_builddir)/config.status $(top_srcdir)/src/cmake/cdi/cdi-config.cmake.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/pkgconfig/cdi.pc: $(top_builddir)/config.status $(top_srcdir)/src/pkgconfig/cdi.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/pkgconfig/cdi_f2003.pc: $(top_builddir)/config.status $(top_srcdir)/src/pkgconfig/cdi_f2003.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/pkgconfig/cdipio.pc: $(top_builddir)/config.status $(top_srcdir)/src/pkgconfig/cdipio.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tables/gen_tableheaderfile: $(top_builddir)/config.status $(top_srcdir)/tables/gen_tableheaderfile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt + +# 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" +examples-local: + +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" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +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 + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || 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 + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-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-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +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-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +examples: examples-recursive + +examples-am: examples-local + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.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 \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am \ + examples-am examples-local 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 maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# The pdf files below cannot be created in parallel: +doc/cdi_cman.pdf: doc/cdi_fman.pdf + +doc/cdi_cman.pdf: + $(AM_V_GEN)$(am__cd) $(top_srcdir)/doc/tex && ./makepdf_c && mv cdi_cman.pdf .. && ./cleanup + +doc/cdi_fman.pdf: + $(AM_V_GEN)$(am__cd) $(top_srcdir)/doc/tex && ./makepdf_f && mv cdi_fman.pdf .. && ./cleanup + +# 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/aclocal.m4 b/aclocal.m4 new file mode 100644 index 000000000..685504289 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1583 @@ +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- + +# Copyright (C) 1996-2021 Free Software Foundation, Inc. + +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.16' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.16.5], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.16.5])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# +# 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. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# +# 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. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# +# 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. + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) + shift + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf + do + # Strip MF so we end up with the name of the file. + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? + done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) + +# AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*- + +# Copyright (C) 2012-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_EXTRA_RECURSIVE_TARGETS +# -------------------------- +# Define the list of user recursive targets. This macro exists only to +# be traced by Automake, which will ensure that a proper definition of +# user-defined recursive targets (and associated rules) is propagated +# into all the generated Makefiles. +# TODO: We should really reject non-literal arguments here... +AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], []) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# +# 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. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <https://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2021 Free Software Foundation, Inc. +# +# 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. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. +AC_DEFUN([AM_MAKE_INCLUDE], +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' +am__doit: + @echo this is the am__doit target >confinc.out +.PHONY: am__doit +END +am__include="#" +am__quote= +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# +# 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. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# +# 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. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# +# 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. + + +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------- +# Adds support for distributing Python modules and packages. To +# install modules, copy them to $(pythondir), using the python_PYTHON +# automake variable. To install a package with the same name as the +# automake package, install to $(pkgpythondir), or use the +# pkgpython_PYTHON automake variable. +# +# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as +# locations to install python extension modules (shared libraries). +# Another macro is required to find the appropriate flags to compile +# extension modules. +# +# If your package is configured with a different prefix to python, +# users will have to add the install directory to the PYTHONPATH +# environment variable, or create a .pth file (see the python +# documentation for details). +# +# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will +# cause an error if the version of python installed on the system +# doesn't meet the requirement. MINIMUM-VERSION should consist of +# numbers and dots only. +AC_DEFUN([AM_PATH_PYTHON], + [ + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], +[python python2 python3 dnl + python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl + python3.2 python3.1 python3.0 dnl + python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl + python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version is >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Python interpreter is too old])]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Although site.py simply uses + dnl sys.version[:3], printing that failed with Python 3.10, since the + dnl trailing zero was eliminated. So now we output just the major + dnl and minor version numbers, as numbers. Apparently the tertiary + dnl version is not of interest. + dnl + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl At times, e.g., when building shared libraries, you may want + dnl to know which OS platform Python thinks this is. + dnl + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + dnl emacs-page + dnl If --with-python-sys-prefix is given, use the values of sys.prefix + dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX + dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and + dnl ${exec_prefix} variables. + dnl + dnl The two are made distinct variables so they can be overridden if + dnl need be, although general consensus is that you shouldn't need + dnl this separation. + dnl + dnl Also allow directly setting the prefixes via configure options, + dnl overriding any default. + dnl + if test "x$prefix" = xNONE; then + am__usable_prefix=$ac_default_prefix + else + am__usable_prefix=$prefix + fi + + # Allow user to request using sys.* values from Python, + # instead of the GNU $prefix values. + AC_ARG_WITH([python-sys-prefix], + [AS_HELP_STRING([--with-python-sys-prefix], + [use Python's sys.prefix and sys.exec_prefix values])], + [am_use_python_sys=:], + [am_use_python_sys=false]) + + # Allow user to override whatever the default Python prefix is. + AC_ARG_WITH([python_prefix], + [AS_HELP_STRING([--with-python_prefix], + [override the default PYTHON_PREFIX])], + [am_python_prefix_subst=$withval + am_cv_python_prefix=$withval + AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix]) + AC_MSG_RESULT([$am_cv_python_prefix])], + [ + if $am_use_python_sys; then + # using python sys.prefix value, not GNU + AC_CACHE_CHECK([for python default $am_display_PYTHON prefix], + [am_cv_python_prefix], + [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`]) + + dnl If sys.prefix is a subdir of $prefix, replace the literal value of + dnl $prefix with a variable reference so it can be overridden. + case $am_cv_python_prefix in + $am__usable_prefix*) + am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'` + am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"` + ;; + *) + am_python_prefix_subst=$am_cv_python_prefix + ;; + esac + else # using GNU prefix value, not python sys.prefix + am_python_prefix_subst='${prefix}' + am_python_prefix=$am_python_prefix_subst + AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix]) + AC_MSG_RESULT([$am_python_prefix]) + fi]) + # Substituting python_prefix_subst value. + AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst]) + + # emacs-page Now do it all over again for Python exec_prefix, but with yet + # another conditional: fall back to regular prefix if that was specified. + AC_ARG_WITH([python_exec_prefix], + [AS_HELP_STRING([--with-python_exec_prefix], + [override the default PYTHON_EXEC_PREFIX])], + [am_python_exec_prefix_subst=$withval + am_cv_python_exec_prefix=$withval + AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix]) + AC_MSG_RESULT([$am_cv_python_exec_prefix])], + [ + # no explicit --with-python_exec_prefix, but if + # --with-python_prefix was given, use its value for python_exec_prefix too. + AS_IF([test -n "$with_python_prefix"], + [am_python_exec_prefix_subst=$with_python_prefix + am_cv_python_exec_prefix=$with_python_prefix + AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix]) + AC_MSG_RESULT([$am_cv_python_exec_prefix])], + [ + # Set am__usable_exec_prefix whether using GNU or Python values, + # since we use that variable for pyexecdir. + if test "x$exec_prefix" = xNONE; then + am__usable_exec_prefix=$am__usable_prefix + else + am__usable_exec_prefix=$exec_prefix + fi + # + if $am_use_python_sys; then # using python sys.exec_prefix, not GNU + AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix], + [am_cv_python_exec_prefix], + [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`]) + dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the + dnl literal value of $exec_prefix with a variable reference so it can + dnl be overridden. + case $am_cv_python_exec_prefix in + $am__usable_exec_prefix*) + am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'` + am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"` + ;; + *) + am_python_exec_prefix_subst=$am_cv_python_exec_prefix + ;; + esac + else # using GNU $exec_prefix, not python sys.exec_prefix + am_python_exec_prefix_subst='${exec_prefix}' + am_python_exec_prefix=$am_python_exec_prefix_subst + AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix]) + AC_MSG_RESULT([$am_python_exec_prefix]) + fi])]) + # Substituting python_exec_prefix_subst. + AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst]) + + # Factor out some code duplication into this shell variable. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# <https://github.com/pypa/virtualenv/issues/118> +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + dnl emacs-page Set up 4 directories: + + dnl 1. pythondir: where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. + dnl + AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)], + [am_cv_python_pythondir], + [if test "x$am_cv_python_prefix" = x; then + am_py_prefix=$am__usable_prefix + else + am_py_prefix=$am_cv_python_prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + # + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages" + ;; + esac + ;; + esac + ]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + dnl + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl 3. pyexecdir: directory for installing python extension modules + dnl (shared libraries). + dnl Query distutils for this directory. + dnl + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)], + [am_cv_python_pyexecdir], + [if test "x$am_cv_python_exec_prefix" = x; then + am_py_exec_prefix=$am__usable_exec_prefix + else + am_py_exec_prefix=$am_cv_python_exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') +sys.stdout.write(sitedir)"` + # + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages" + ;; + esac + ;; + esac + ]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE) + dnl + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi +]) + + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) + +# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2021 Free Software Foundation, Inc. +# +# 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. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2021 Free Software Foundation, Inc. +# +# 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. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + AM_RUN_LOG([cat conftest.dir/file]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/acx_assert_lang_is_fortran_variant.m4]) +m4_include([m4/acx_c_package.m4]) +m4_include([m4/acx_cfortran_flags.m4]) +m4_include([m4/acx_check_cfortran.m4]) +m4_include([m4/acx_check_strptr_convert.m4]) +m4_include([m4/acx_execinfo.m4]) +m4_include([m4/acx_fortran_check_include.m4]) +m4_include([m4/acx_fortran_include_flag.m4]) +m4_include([m4/acx_fortran_package.m4]) +m4_include([m4/acx_lang_check_include.m4]) +m4_include([m4/acx_lang_package.m4]) +m4_include([m4/acx_lt_problems.m4]) +m4_include([m4/acx_m4_list_to_quoted_strings.m4]) +m4_include([m4/acx_mpirun.m4]) +m4_include([m4/acx_mv_obj.m4]) +m4_include([m4/acx_option_search_libs.m4]) +m4_include([m4/acx_options.m4]) +m4_include([m4/acx_prog_cc_posix.m4]) +m4_include([m4/acx_sl_fc_mod_path_flag.m4]) +m4_include([m4/acx_sl_mod_suffix.m4]) +m4_include([m4/acx_tls_xlc_retry.m4]) +m4_include([m4/acx_use_libtool_configuration.m4]) +m4_include([m4/acx_uuid.m4]) +m4_include([m4/asx_tr_arg.m4]) +m4_include([m4/asx_unset.m4]) +m4_include([m4/ax_pthread.m4]) +m4_include([m4/ax_python_devel.m4]) +m4_include([m4/ax_tls.m4]) +m4_include([m4/kpse_libtool.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/pkg.m4]) +m4_include([acinclude.m4]) diff --git a/app/Makefile.in b/app/Makefile.in new file mode 100644 index 000000000..ac7819dc1 --- /dev/null +++ b/app/Makefile.in @@ -0,0 +1,844 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + 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@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = $(am__EXEEXT_1) +noinst_PROGRAMS = $(am__EXEEXT_3) $(am__EXEEXT_4) $(am__EXEEXT_5) +check_PROGRAMS = $(am__EXEEXT_2) +@ENABLE_CDI_APP_TRUE@@ENABLE_CDI_LIB_TRUE@am__append_1 = cdi +@ENABLE_CDI_APP_TRUE@@ENABLE_CDI_LIB_FALSE@am__append_2 = cdi +@ENABLE_CDI_APP_TRUE@am__append_3 = createtable +@ENABLE_CDI_APP_FALSE@@with_on_demand_check_programs_TRUE@am__append_4 = cdi +@ENABLE_CDI_APP_FALSE@@with_on_demand_check_programs_FALSE@am__append_5 = cdi +@ENABLE_ALL_STATIC_TRUE@am__append_6 = -all-static +subdir = app +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \ + $(top_srcdir)/m4/acx_c_package.m4 \ + $(top_srcdir)/m4/acx_cfortran_flags.m4 \ + $(top_srcdir)/m4/acx_check_cfortran.m4 \ + $(top_srcdir)/m4/acx_check_strptr_convert.m4 \ + $(top_srcdir)/m4/acx_execinfo.m4 \ + $(top_srcdir)/m4/acx_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_fortran_include_flag.m4 \ + $(top_srcdir)/m4/acx_fortran_package.m4 \ + $(top_srcdir)/m4/acx_lang_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_package.m4 \ + $(top_srcdir)/m4/acx_lt_problems.m4 \ + $(top_srcdir)/m4/acx_m4_list_to_quoted_strings.m4 \ + $(top_srcdir)/m4/acx_mpirun.m4 $(top_srcdir)/m4/acx_mv_obj.m4 \ + $(top_srcdir)/m4/acx_option_search_libs.m4 \ + $(top_srcdir)/m4/acx_options.m4 \ + $(top_srcdir)/m4/acx_prog_cc_posix.m4 \ + $(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \ + $(top_srcdir)/m4/acx_sl_mod_suffix.m4 \ + $(top_srcdir)/m4/acx_tls_xlc_retry.m4 \ + $(top_srcdir)/m4/acx_use_libtool_configuration.m4 \ + $(top_srcdir)/m4/acx_uuid.m4 $(top_srcdir)/m4/asx_tr_arg.m4 \ + $(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/kpse_libtool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/ac_lang_program_fortran.m4 \ + $(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_c_check_include.m4 \ + $(top_srcdir)/configure.ac +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)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@ENABLE_CDI_APP_TRUE@@ENABLE_CDI_LIB_TRUE@am__EXEEXT_1 = cdi$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" +@ENABLE_CDI_APP_FALSE@@with_on_demand_check_programs_TRUE@am__EXEEXT_2 = cdi$(EXEEXT) +@ENABLE_CDI_APP_TRUE@@ENABLE_CDI_LIB_FALSE@am__EXEEXT_3 = \ +@ENABLE_CDI_APP_TRUE@@ENABLE_CDI_LIB_FALSE@ cdi$(EXEEXT) +@ENABLE_CDI_APP_TRUE@am__EXEEXT_4 = createtable$(EXEEXT) +@ENABLE_CDI_APP_FALSE@@with_on_demand_check_programs_FALSE@am__EXEEXT_5 = cdi$(EXEEXT) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +am_cdi_OBJECTS = cdi.$(OBJEXT) printinfo.$(OBJEXT) +cdi_OBJECTS = $(am_cdi_OBJECTS) +cdi_LDADD = $(LDADD) +cdi_DEPENDENCIES = $(top_builddir)/src/libcdi.la +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 = +am_createtable_OBJECTS = createtable.$(OBJEXT) +createtable_OBJECTS = $(am_createtable_OBJECTS) +createtable_LDADD = $(LDADD) +createtable_DEPENDENCIES = $(top_builddir)/src/libcdi.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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)/src +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/cdi.Po ./$(DEPDIR)/createtable.Po \ + ./$(DEPDIR)/printinfo.Po +am__mv = mv -f +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(cdi_SOURCES) $(createtable_SOURCES) +DIST_SOURCES = $(cdi_SOURCES) $(createtable_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = examples-recursive +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)` +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCE_UUIDROOT = @DCE_UUIDROOT@ +DCE_UUID_C_INCLUDE = @DCE_UUID_C_INCLUDE@ +DCE_UUID_C_LIB = @DCE_UUID_C_LIB@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECCODES_INCLUDE = @ECCODES_INCLUDE@ +ECCODES_LIBS = @ECCODES_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_ACROSS = @ENABLE_ACROSS@ +ENABLE_CDI_LIB = @ENABLE_CDI_LIB@ +ENABLE_CGRIBEX = @ENABLE_CGRIBEX@ +ENABLE_EXTRA = @ENABLE_EXTRA@ +ENABLE_GRIB = @ENABLE_GRIB@ +ENABLE_IEG = @ENABLE_IEG@ +ENABLE_MPI = @ENABLE_MPI@ +ENABLE_NC2 = @ENABLE_NC2@ +ENABLE_NC4 = @ENABLE_NC4@ +ENABLE_NC4HDF5 = @ENABLE_NC4HDF5@ +ENABLE_NC4SZLIB = @ENABLE_NC4SZLIB@ +ENABLE_NETCDF = @ENABLE_NETCDF@ +ENABLE_SERVICE = @ENABLE_SERVICE@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCMODCASE = @FCMODCASE@ +FCMODEXT = @FCMODEXT@ +FC_DEFINE = @FC_DEFINE@ +FC_MOD_FLAG = @FC_MOD_FLAG@ +FC_OPTINC = @FC_OPTINC@ +FDB5_INCLUDE = @FDB5_INCLUDE@ +FDB5_LIBS = @FDB5_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GRIB_API_INCLUDE = @GRIB_API_INCLUDE@ +GRIB_API_LIBS = @GRIB_API_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPIROOT = @MPIROOT@ +MPI_C_INCLUDE = @MPI_C_INCLUDE@ +MPI_C_LIB = @MPI_C_LIB@ +MPI_FC_LIB = @MPI_FC_LIB@ +MPI_FC_MOD = @MPI_FC_MOD@ +MPI_LAUNCH = @MPI_LAUNCH@ +NC_CONFIG = @NC_CONFIG@ +NETCDF_INCLUDE = @NETCDF_INCLUDE@ +NETCDF_LIBS = @NETCDF_LIBS@ +NETCDF_ROOT = @NETCDF_ROOT@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OSSP_UUIDROOT = @OSSP_UUIDROOT@ +OSSP_UUID_C_INCLUDE = @OSSP_UUID_C_INCLUDE@ +OSSP_UUID_C_LIB = @OSSP_UUID_C_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PPM_CORE_C_INCLUDE = @PPM_CORE_C_INCLUDE@ +PPM_CORE_C_LIB = @PPM_CORE_C_LIB@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PLATFORM_SITE_PKG = @PYTHON_PLATFORM_SITE_PKG@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SYSTEM_TYPE = @SYSTEM_TYPE@ +SZLIB_INCLUDE = @SZLIB_INCLUDE@ +SZLIB_LIBS = @SZLIB_LIBS@ +THREADS_INCLUDE = @THREADS_INCLUDE@ +THREADS_LIBS = @THREADS_LIBS@ +UTIL_LINUX_UUIDROOT = @UTIL_LINUX_UUIDROOT@ +UTIL_LINUX_UUID_C_INCLUDE = @UTIL_LINUX_UUID_C_INCLUDE@ +UTIL_LINUX_UUID_C_LIB = @UTIL_LINUX_UUID_C_LIB@ +UUID_C_INCLUDE = @UUID_C_INCLUDE@ +UUID_C_LIB = @UUID_C_LIB@ +VERSION = @VERSION@ +YAXT_C_INCLUDE = @YAXT_C_INCLUDE@ +YAXT_C_LIB = @YAXT_C_LIB@ +YAXT_FC_LIB = @YAXT_FC_LIB@ +YAXT_FC_MOD = @YAXT_FC_MOD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_srcdir)/src +AM_LDFLAGS = $(am__append_6) +LDADD = $(top_builddir)/src/libcdi.la +cdi_SOURCES = \ + cdi.c \ + printinfo.c \ + printinfo.h + +createtable_SOURCES = createtable.c + +# Compile programs using Libtool: +COMPILE = $(LTCOMPILE) +FCCOMPILE = $(LTFCCOMPILE) +PPFCCOMPILE = $(LTPPFCCOMPILE) +CXXCOMPILE = $(LTCXXCOMPILE) + +# Compile *.F90 without CPPFLAGS, which are normally meant for the C compiler +# and might not be compatible with the Fortran compiler: +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) + + +# Avoid compiling twice by running Libtool with '-static' +# This is safe because all Libtool libraries in this directory are +# static-only and contain PIC objects: +AM_CFLAGS = -static +AM_FCFLAGS = -static +AM_CXXFLAGS = -static +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign app/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign app/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +cdi$(EXEEXT): $(cdi_OBJECTS) $(cdi_DEPENDENCIES) $(EXTRA_cdi_DEPENDENCIES) + @rm -f cdi$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_OBJECTS) $(cdi_LDADD) $(LIBS) + +createtable$(EXEEXT): $(createtable_OBJECTS) $(createtable_DEPENDENCIES) $(EXTRA_createtable_DEPENDENCIES) + @rm -f createtable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(createtable_OBJECTS) $(createtable_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/createtable.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printinfo.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +examples-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(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-am + +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-am + +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: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + 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-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +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-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool clean-local clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/cdi.Po + -rm -f ./$(DEPDIR)/createtable.Po + -rm -f ./$(DEPDIR)/printinfo.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +examples: examples-am + +examples-am: examples-local + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/cdi.Po + -rm -f ./$(DEPDIR)/createtable.Po + -rm -f ./$(DEPDIR)/printinfo.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am \ + examples-am examples-local html html-am info info-am install \ + install-am install-binPROGRAMS 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 maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +clean-local: + -rm -rf *.dSYM + +# 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/config/compile b/config/compile new file mode 100755 index 000000000..df363c8fb --- /dev/null +++ b/config/compile @@ -0,0 +1,348 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# This program 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, or (at your option) +# any later version. +# +# This program 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 <https://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/config/config.guess b/config/config.guess new file mode 100755 index 000000000..69188da73 --- /dev/null +++ b/config/config.guess @@ -0,0 +1,1774 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2023 Free Software Foundation, Inc. + +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-01-01' + +# This file 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 3 of the License, or +# (at your option) any later version. +# +# This program 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 <https://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# +# Please send patches to <config-patches@gnu.org>. + + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2023 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." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# Just in case it came from the environment. +GUESS= + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case $UNAME_SYSTEM in +Linux|GNU|GNU/*) + LIBC=unknown + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu + #else + #include <stdarg.h> + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif + EOF + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case $UNAME_MACHINE_ARCH in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case $UNAME_MACHINE_ARCH in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case $UNAME_VERSION in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + GUESS=$machine-${os}${release}${abi-} + ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; + *:MidnightBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; + *:ekkoBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; + *:SolidBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; + macppc:MirBSD:*:*) + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; + *:MirBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; + *:Sortix:*:*) + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; + *:Redox:*:*) + GUESS=$UNAME_MACHINE-unknown-redox + ;; + mips:OSF1:*.*) + GUESS=mips-dec-osf1 + ;; + alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case $ALPHA_CPU_TYPE in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; + Amiga*:UNIX_System_V:4.0:*) + GUESS=m68k-unknown-sysv4 + ;; + *:[Aa]miga[Oo][Ss]:*:*) + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; + *:[Mm]orph[Oo][Ss]:*:*) + GUESS=$UNAME_MACHINE-unknown-morphos + ;; + *:OS/390:*:*) + GUESS=i370-ibm-openedition + ;; + *:z/VM:*:*) + GUESS=s390-ibm-zvmoe + ;; + *:OS400:*:*) + GUESS=powerpc-ibm-os400 + ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + GUESS=arm-unknown-riscos + ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + GUESS=hppa1.1-hitachi-hiuxmpp + ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; + NILE*:*:*:dcosx) + GUESS=pyramid-pyramid-svr4 + ;; + DRS?6000:unix:4.0:6*) + GUESS=sparc-icl-nx6 + ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; + s390x:SunOS:*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; + sun4H:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; + sun4*:SunOS:*:*) + case `/usr/bin/arch -k` in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; + sun3*:SunOS:*:*) + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case `/bin/arch` in + sun3) + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; + sun4) + GUESS=sparc-sun-sunos$UNAME_RELEASE + ;; + esac + ;; + aushp:SunOS:*:*) + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; + m68k:machten:*:*) + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; + powerpc:machten:*:*) + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; + RISC*:Mach:*:*) + GUESS=mips-dec-mach_bsd4.3 + ;; + RISC*:ULTRIX:*:*) + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; + VAX*:ULTRIX*:*:*) + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; + Motorola:PowerMAX_OS:*:*) + GUESS=powerpc-motorola-powermax + ;; + Motorola:*:4.3:PL8-*) + GUESS=powerpc-harris-powermax + ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + GUESS=powerpc-harris-powermax + ;; + Night_Hawk:Power_UNIX:*:*) + GUESS=powerpc-harris-powerunix + ;; + m88k:CX/UX:7*:*) + GUESS=m88k-harris-cxux7 + ;; + m88k:*:4*:R4*) + GUESS=m88k-motorola-sysv4 + ;; + m88k:*:3*:R3*) + GUESS=m88k-motorola-sysv3 + ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + then + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x + then + GUESS=m88k-dg-dgux$UNAME_RELEASE + else + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE + fi + else + GUESS=i586-dg-dgux$UNAME_RELEASE + fi + ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + GUESS=m88k-dolphin-sysv3 + ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + GUESS=m88k-motorola-sysv3 + ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + GUESS=m88k-tektronix-sysv3 + ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + GUESS=m68k-tektronix-bsd + ;; + *:IRIX*:*:*) + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + GUESS=i386-ibm-aix + ;; + ia64:AIX:*:*) + if test -x /usr/bin/oslevel ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + fi + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + GUESS=$SYSTEM_NAME + else + GUESS=rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + GUESS=rs6000-ibm-aix3.2.4 + else + GUESS=rs6000-ibm-aix3.2 + fi + ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + fi + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; + *:AIX:*:*) + GUESS=rs6000-ibm-aix + ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + GUESS=romp-ibm-bsd4.4 + ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + GUESS=rs6000-bull-bosx + ;; + DPX/2?00:B.O.S.:*:*) + GUESS=m68k-bull-sysv3 + ;; + 9000/[34]??:4.3bsd:1.*:*) + GUESS=m68k-hp-bsd + ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + GUESS=m68k-hp-bsd4.4 + ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if test -x /usr/bin/getconf; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case $sc_cpu_version in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case $sc_kernel_bits in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if test "$HP_ARCH" = hppa2.0w + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + GUESS=unknown-hitachi-hiuxwe2 + ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + GUESS=hppa1.1-hp-bsd + ;; + 9000/8??:4.3bsd:*:*) + GUESS=hppa1.0-hp-bsd + ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + GUESS=hppa1.0-hp-mpeix + ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + GUESS=hppa1.1-hp-osf + ;; + hp8??:OSF1:*:*) + GUESS=hppa1.0-hp-osf + ;; + i*86:OSF1:*:*) + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk + else + GUESS=$UNAME_MACHINE-unknown-osf1 + fi + ;; + parisc*:Lites*:*:*) + GUESS=hppa1.1-hp-lites + ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + GUESS=c1-convex-bsd + ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + GUESS=c34-convex-bsd + ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + GUESS=c38-convex-bsd + ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + GUESS=c4-convex-bsd + ;; + CRAY*Y-MP:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; + CRAY*T3E:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; + CRAY*SV1:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; + *:UNICOS/mp:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; + sparc*:BSD/OS:*:*) + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; + *:BSD/OS:*:*) + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case $UNAME_PROCESSOR in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; + i*:CYGWIN*:*) + GUESS=$UNAME_MACHINE-pc-cygwin + ;; + *:MINGW64*:*) + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; + *:MINGW*:*) + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; + *:MSYS*:*) + GUESS=$UNAME_MACHINE-pc-msys + ;; + i*:PW*:*) + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; + *:Interix*:*) + case $UNAME_MACHINE in + x86) + GUESS=i586-pc-interix$UNAME_RELEASE + ;; + authenticamd | genuineintel | EM64T) + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; + IA64) + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; + esac ;; + i*:UWIN*:*) + GUESS=$UNAME_MACHINE-pc-uwin + ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + GUESS=x86_64-pc-cygwin + ;; + prep*:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; + *:GNU:*:*) + # the GNU system + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; + aarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + else + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + fi + fi + ;; + avr32*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + cris:Linux:*:*) + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + crisv32:Linux:*:*) + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + e2k:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + frv:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + hexagon:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:Linux:*:*) + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; + ia64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + k1om:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + m32r*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + m68*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + openrisc*:Linux:*:*) + GUESS=or1k-unknown-linux-$LIBC + ;; + or32:Linux:*:* | or1k*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + padre:Linux:*:*) + GUESS=sparc-unknown-linux-$LIBC + ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + GUESS=hppa64-unknown-linux-$LIBC + ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; + esac + ;; + ppc64:Linux:*:*) + GUESS=powerpc64-unknown-linux-$LIBC + ;; + ppc:Linux:*:*) + GUESS=powerpc-unknown-linux-$LIBC + ;; + ppc64le:Linux:*:*) + GUESS=powerpc64le-unknown-linux-$LIBC + ;; + ppcle:Linux:*:*) + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + s390:Linux:*:* | s390x:Linux:*:*) + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; + sh64*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sh*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + tile*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + vax:Linux:*:*) + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; + x86_64:Linux:*:*) + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac + fi + GUESS=$CPU-pc-linux-$LIBCABI + ;; + xtensa*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + GUESS=i386-sequent-sysv4 + ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; + i*86:XTS-300:*:STOP) + GUESS=$UNAME_MACHINE-unknown-stop + ;; + i*86:atheos:*:*) + GUESS=$UNAME_MACHINE-unknown-atheos + ;; + i*86:syllable:*:*) + GUESS=$UNAME_MACHINE-pc-syllable + ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; + i*86:*DOS:*:*) + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL + else + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL + fi + ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL + else + GUESS=$UNAME_MACHINE-pc-sysv32 + fi + ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + GUESS=i586-pc-msdosdjgpp + ;; + Intel:Mach:3*:*) + GUESS=i386-pc-mach3 + ;; + paragon:*:*:*) + GUESS=i860-intel-osf1 + ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 + fi + ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + GUESS=m68010-convergent-sysv + ;; + mc68k:UNIX:SYSTEM5:3.51m) + GUESS=m68k-convergent-sysv + ;; + M680?0:D-NIX:5.3:*) + GUESS=m68k-diab-dnix + ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; + mc68030:UNIX_System_V:4.*:*) + GUESS=m68k-atari-sysv4 + ;; + TSUNAMI:LynxOS:2.*:*) + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; + rs6000:LynxOS:2.*:*) + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; + SM[BE]S:UNIX_SV:*:*) + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; + RM*:ReliantUNIX-*:*:*) + GUESS=mips-sni-sysv4 + ;; + RM*:SINIX-*:*:*) + GUESS=mips-sni-sysv4 + ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + GUESS=$UNAME_MACHINE-sni-sysv4 + else + GUESS=ns32k-sni-sysv + fi + ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + GUESS=i586-unisys-sysv4 + ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + GUESS=hppa1.1-stratus-sysv4 + ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + GUESS=i860-stratus-sysv4 + ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + GUESS=$UNAME_MACHINE-stratus-vos + ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + GUESS=hppa1.1-stratus-vos + ;; + mc68*:A/UX:*:*) + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; + news*:NEWS-OS:6*:*) + GUESS=mips-sony-newsos6 + ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE + else + GUESS=mips-unknown-sysv$UNAME_RELEASE + fi + ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + GUESS=powerpc-be-beos + ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + GUESS=powerpc-apple-beos + ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + GUESS=i586-pc-beos + ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + GUESS=i586-pc-haiku + ;; + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku + ;; + SX-4:SUPER-UX:*:*) + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; + SX-5:SUPER-UX:*:*) + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; + SX-6:SUPER-UX:*:*) + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; + SX-7:SUPER-UX:*:*) + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; + SX-8:SUPER-UX:*:*) + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; + SX-8R:SUPER-UX:*:*) + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; + SX-ACE:SUPER-UX:*:*) + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; + Power*:Rhapsody:*:*) + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; + *:Rhapsody:*:*) + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; + *:QNX:*:4*) + GUESS=i386-pc-qnx + ;; + NEO-*:NONSTOP_KERNEL:*:*) + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; + NSE-*:NONSTOP_KERNEL:*:*) + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; + NSR-*:NONSTOP_KERNEL:*:*) + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; + NSV-*:NONSTOP_KERNEL:*:*) + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; + NSX-*:NONSTOP_KERNEL:*:*) + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; + *:NonStop-UX:*:*) + GUESS=mips-compaq-nonstopux + ;; + BS2000:POSIX*:*:*) + GUESS=bs2000-siemens-sysv + ;; + DS/*:UNIX_System_V:*:*) + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "${cputype-}" = 386; then + UNAME_MACHINE=i386 + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype + fi + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; + *:TOPS-10:*:*) + GUESS=pdp10-unknown-tops10 + ;; + *:TENEX:*:*) + GUESS=pdp10-unknown-tenex + ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + GUESS=pdp10-dec-tops20 + ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + GUESS=pdp10-xkl-tops20 + ;; + *:TOPS-20:*:*) + GUESS=pdp10-unknown-tops20 + ;; + *:ITS:*:*) + GUESS=pdp10-unknown-its + ;; + SEI:*:*:SEIUX) + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; + *:DragonFly:*:*) + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; + esac ;; + *:XENIX:*:SysV) + GUESS=i386-pc-xenix + ;; + i*86:skyos:*:*) + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; + i*86:rdos:*:*) + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; + x86_64:VMkernel:*:*) + GUESS=$UNAME_MACHINE-unknown-esx + ;; + amd64:Isilon\ OneFS:*:*) + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; +esac + +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" <<EOF +#ifdef _SEQUENT_ +#include <sys/types.h> +#include <sys/utsname.h> +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include <signal.h> +#if defined(_SIZE_T_) || defined(SIGLOST) +#include <sys/utsname.h> +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include <sys/param.h> +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case $UNAME_MACHINE:$UNAME_SYSTEM in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <<EOF + +NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize +the system type. Please install a C compiler and try again. +EOF + ;; +esac + +cat >&2 <<EOF + +This script (version $timestamp), has failed to recognize the +operating system you are using. If your script is old, overwrite *all* +copies of config.guess and config.sub with the latest versions from: + + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +and + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub +EOF + +our_year=`echo $timestamp | sed 's,-.*,,'` +thisyear=`date +%Y` +# shellcheck disable=SC2003 +script_age=`expr "$thisyear" - "$our_year"` +if test "$script_age" -lt 3 ; then + cat >&2 <<EOF + +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF +fi + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/config.sub b/config/config.sub new file mode 100755 index 000000000..de4259e40 --- /dev/null +++ b/config/config.sub @@ -0,0 +1,1907 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2023 Free Software Foundation, Inc. + +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-01-21' + +# This file 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 3 of the License, or +# (at your option) any later version. +# +# This program 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 <https://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to <config-patches@gnu.org>. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2023 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." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <<EOF +$1 +EOF +IFS=$saved_IFS + +# Separate into logical components for further validation +case $1 in + *-*-*-*-*) + echo Invalid configuration \`"$1"\': more than four components >&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + basic_os=nextstep2 + ;; + *) + basic_os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read cpu vendor <<EOF +$basic_machine +EOF + IFS=$saved_IFS + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + cpu=$basic_machine + vendor=pc + ;; + # These rules are duplicated from below for sake of the special case above; + # i.e. things that normalized to x86 arches should also default to "pc" + pc98) + cpu=i386 + vendor=pc + ;; + x64 | amd64) + cpu=x86_64 + vendor=pc + ;; + # Recognize the basic CPU types without company name. + *) + cpu=$basic_machine + vendor=unknown + ;; +esac + +unset -v basic_machine + +# Decode basic machines in the full and proper CPU-Company form. +case $cpu-$vendor in + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in + # some cases the only manufacturer, in others, it is the most popular. + craynv-unknown) + vendor=cray + basic_os=${basic_os:-unicosmp} + ;; + c90-unknown | c90-cray) + vendor=cray + basic_os=${Basic_os:-unicos} + ;; + fx80-unknown) + vendor=alliant + ;; + romp-unknown) + vendor=ibm + ;; + mmix-unknown) + vendor=knuth + ;; + microblaze-unknown | microblazeel-unknown) + vendor=xilinx + ;; + rs6000-unknown) + vendor=ibm + ;; + vax-unknown) + vendor=dec + ;; + pdp11-unknown) + vendor=dec + ;; + we32k-unknown) + vendor=att + ;; + cydra-unknown) + vendor=cydrome + ;; + i370-ibm*) + vendor=ibm + ;; + orion-unknown) + vendor=highlevel + ;; + xps-unknown | xps100-unknown) + cpu=xps100 + vendor=honeywell + ;; + + # Here we normalize CPU types with a missing or matching vendor + armh-unknown | armh-alt) + cpu=armv7l + vendor=alt + basic_os=${basic_os:-linux-gnueabihf} + ;; + dpx20-unknown | dpx20-bull) + cpu=rs6000 + vendor=bull + basic_os=${basic_os:-bosx} + ;; + + # Here we normalize CPU types irrespective of the vendor + amd64-*) + cpu=x86_64 + ;; + blackfin-*) + cpu=bfin + basic_os=linux + ;; + c54x-*) + cpu=tic54x + ;; + c55x-*) + cpu=tic55x + ;; + c6x-*) + cpu=tic6x + ;; + e500v[12]-*) + cpu=powerpc + basic_os=${basic_os}"spe" + ;; + mips3*-*) + cpu=mips64 + ;; + ms1-*) + cpu=mt + ;; + m68knommu-*) + cpu=m68k + basic_os=linux + ;; + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) + cpu=s12z + ;; + openrisc-*) + cpu=or32 + ;; + parisc-*) + cpu=hppa + basic_os=linux + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + cpu=i586 + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) + cpu=i686 + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + cpu=i686 + ;; + pentium4-*) + cpu=i786 + ;; + pc98-*) + cpu=i386 + ;; + ppc-* | ppcbe-*) + cpu=powerpc + ;; + ppcle-* | powerpclittle-*) + cpu=powerpcle + ;; + ppc64-*) + cpu=powerpc64 + ;; + ppc64le-* | powerpc64little-*) + cpu=powerpc64le + ;; + sb1-*) + cpu=mipsisa64sb1 + ;; + sb1el-*) + cpu=mipsisa64sb1el + ;; + sh5e[lb]-*) + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + ;; + spur-*) + cpu=spur + ;; + strongarm-* | thumb-*) + cpu=arm + ;; + tx39-*) + cpu=mipstx39 + ;; + tx39el-*) + cpu=mipstx39el + ;; + x64-*) + cpu=x86_64 + ;; + xscale-* | xscalee[bl]-*) + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + ;; + arm64-* | aarch64le-*) + cpu=aarch64 + ;; + + # Recognize the canonical CPU Types that limit and/or modify the + # company names they are paired with. + cr16-*) + basic_os=${basic_os:-elf} + ;; + crisv32-* | etraxfs*-*) + cpu=crisv32 + vendor=axis + ;; + cris-* | etrax*-*) + cpu=cris + vendor=axis + ;; + crx-*) + basic_os=${basic_os:-elf} + ;; + neo-tandem) + cpu=neo + vendor=tandem + ;; + nse-tandem) + cpu=nse + vendor=tandem + ;; + nsr-tandem) + cpu=nsr + vendor=tandem + ;; + nsv-tandem) + cpu=nsv + vendor=tandem + ;; + nsx-tandem) + cpu=nsx + vendor=tandem + ;; + mipsallegrexel-sony) + cpu=mipsallegrexel + vendor=sony + ;; + tile*-*) + basic_os=${basic_os:-linux-gnu} + ;; + + *) + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb | arc32 | arc64 \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bpf | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | loongarch32 | loongarch64 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64eb | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r3 | mipsisa32r3el \ + | mipsisa32r5 | mipsisa32r5el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r3 | mipsisa64r3el \ + | mipsisa64r5 | mipsisa64r5el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | picochip \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ + | rl78 | romp | rs6000 | rx \ + | s390 | s390x \ + | score \ + | sh | shl \ + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | thumbv7* \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | w65 \ + | wasm32 | wasm64 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if test x$basic_os != x +then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <<EOF +$basic_os +EOF + IFS=$saved_IFS + ;; + # Default OS when just kernel was specified + nto*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto|qnx|'` + ;; + linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|linux|gnu|'` + ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; + *) + kernel= + os=$basic_os + ;; +esac + +# Now, normalize the OS (knowing we just have one component, it's not a kernel, +# etc.) +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux + ;; + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) + os=`echo "$os" | sed -e 's|solaris1|sunos4|'` + ;; + solaris) + os=solaris2 + ;; + unixware*) + os=sysv4.2uw + ;; + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco*v* | scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + qnx*) + os=qnx + ;; + hiux*) + os=hiuxwe2 + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynxos*) + # don't get caught up in next wildcard + ;; + lynx*) + os=lynxos + ;; + mac[0-9]*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + opened*) + os=openedition + ;; + os400*) + os=os400 + ;; + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + wince*) + os=wince + ;; + utek*) + os=bsd + ;; + dynix*) + os=bsd + ;; + acis*) + os=aos + ;; + atheos*) + os=atheos + ;; + syllable*) + os=syllable + ;; + 386bsd) + os=bsd + ;; + ctix* | uts*) + os=sysv + ;; + nova*) + os=rtmk-nova + ;; + ns2) + os=nextstep2 + ;; + # Preserve the version number of sinix5. + sinix5.*) + os=`echo "$os" | sed -e 's|sinix|sysv|'` + ;; + sinix*) + os=sysv4 + ;; + tpf*) + os=tpf + ;; + triton*) + os=sysv3 + ;; + oss*) + os=sysv3 + ;; + svr4*) + os=sysv4 + ;; + svr3) + os=sysv3 + ;; + sysvr4) + os=sysv4 + ;; + ose*) + os=ose + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint + ;; + dicos*) + os=dicos + ;; + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + os=elf + ;; + esac + ;; + *) + # No normalization, but not necessarily accepted, that comes below. + ;; +esac + +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +kernel= +case $cpu-$vendor in + score-*) + os=elf + ;; + spu-*) + os=elf + ;; + *-acorn) + os=riscix1.2 + ;; + arm*-rebel) + kernel=linux + os=gnu + ;; + arm*-semi) + os=aout + ;; + c4x-* | tic4x-*) + os=coff + ;; + c8051-*) + os=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) + os=elf + ;; + tic54x-*) + os=coff + ;; + tic55x-*) + os=coff + ;; + tic6x-*) + os=coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=tops20 + ;; + pdp11-*) + os=none + ;; + *-dec | vax-*) + os=ultrix4.2 + ;; + m68*-apollo) + os=domain + ;; + i386-sun) + os=sunos4.0.2 + ;; + m68000-sun) + os=sunos3 + ;; + m68*-cisco) + os=aout + ;; + mep-*) + os=elf + ;; + mips*-cisco) + os=elf + ;; + mips*-*) + os=elf + ;; + or32-*) + os=coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=sysv3 + ;; + sparc-* | *-sun) + os=sunos4.1.1 + ;; + pru-*) + os=elf + ;; + *-be) + os=beos + ;; + *-ibm) + os=aix + ;; + *-knuth) + os=mmixware + ;; + *-wec) + os=proelf + ;; + *-winbond) + os=proelf + ;; + *-oki) + os=proelf + ;; + *-hp) + os=hpux + ;; + *-hitachi) + os=hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=sysv + ;; + *-cbm) + os=amigaos + ;; + *-dg) + os=dgux + ;; + *-dolphin) + os=sysv3 + ;; + m68k-ccur) + os=rtu + ;; + m88k-omron*) + os=luna + ;; + *-next) + os=nextstep + ;; + *-sequent) + os=ptx + ;; + *-crds) + os=unos + ;; + *-ns) + os=genix + ;; + i370-*) + os=mvs + ;; + *-gould) + os=sysv + ;; + *-highlevel) + os=bsd + ;; + *-encore) + os=bsd + ;; + *-sgi) + os=irix + ;; + *-siemens) + os=sysv4 + ;; + *-masscomp) + os=rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=uxpv + ;; + *-rom68k) + os=coff + ;; + *-*bug) + os=coff + ;; + *-apple) + os=macos + ;; + *-atari*) + os=mint + ;; + *-wrs) + os=vxworks + ;; + *) + os=none + ;; +esac + +fi + +# Now, validate our (potentially fixed-up) OS. +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* | mlibc* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + none) + ;; + kernel* ) + # Restricted further below + ;; + *) + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) + ;; + uclinux-uclibc* ) + ;; + managarm-mlibc* | managarm-kernel* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + -kernel* ) + echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel* ) + echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) + vendor=acorn + ;; + *-sunos*) + vendor=sun + ;; + *-cnk* | *-aix*) + vendor=ibm + ;; + *-beos*) + vendor=be + ;; + *-hpux*) + vendor=hp + ;; + *-mpeix*) + vendor=hp + ;; + *-hiux*) + vendor=hitachi + ;; + *-unos*) + vendor=crds + ;; + *-dgux*) + vendor=dg + ;; + *-luna*) + vendor=omron + ;; + *-genix*) + vendor=ns + ;; + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) + vendor=ibm + ;; + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) + vendor=sequent + ;; + *-tpf*) + vendor=ibm + ;; + *-vxsim* | *-vxworks* | *-windiss*) + vendor=wrs + ;; + *-aux*) + vendor=apple + ;; + *-hms*) + vendor=hitachi + ;; + *-mpw* | *-macos*) + vendor=apple + ;; + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + vendor=atari + ;; + *-vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-${kernel:+$kernel-}$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/depcomp b/config/depcomp new file mode 100755 index 000000000..715e34311 --- /dev/null +++ b/config/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2021 Free Software Foundation, Inc. + +# This program 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, or (at your option) +# any later version. + +# This program 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 <https://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/config/install-sh b/config/install-sh new file mode 100755 index 000000000..ec298b537 --- /dev/null +++ b/config/install-sh @@ -0,0 +1,541 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2020-11-14.01; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. + -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -p) cpprog="$cpprog -p";; + + -s) stripcmd=$stripprog;; + + -S) backupsuffix="$2" + shift;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/config/ltmain.sh b/config/ltmain.sh new file mode 100644 index 000000000..5f5e7a13c --- /dev/null +++ b/config/ltmain.sh @@ -0,0 +1,11267 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 + +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 + +# Copyright (C) 1996-2015 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 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/>. + + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4.6 +package_revision=2.4.6 + + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 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. + +# This program 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 3 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES 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/>. + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac +fi + +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" + fi" +done + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + +: ${CP="cp -f"} +# work around bug in libtool which raises an error when running in a +# parallel make that should have been handled in printf internally +printf() +{ + while ! builtin printf "$@" ; do + errcode=$? + # errcode might be EAGAIN=11 which means to simply try again + if [ $errcode != 11 ]; then + return $errcode + fi + done +} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} + + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' + +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: + +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 + +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` + +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac + + +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. + +opt_dry_run=false +opt_quiet=false +opt_verbose=false + +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='[0m' + tc_bold='[1m'; tc_standout='[7m' + tc_red='[31m'; tc_green='[32m' + tc_blue='[34m'; tc_cyan='[36m' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: +} + + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $debug_cmd + + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" + fi +} + + +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () +{ + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then + # Return a directory name, but don't create it in dry-run mode + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} + + +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () +{ + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; + esac + + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" + ;; + esac + + func_quote_for_expand_result=$_G_arg +} + + +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# 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). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 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. + +# This program 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 3 of the License, or +# (at your option) any later version. + +# This program 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/>. + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '<hooked_function_name>_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 +} + + +# func_missing_arg ARGNAME +# ------------------------ +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $debug_cmd + + func_error "Missing argument for '$1'." + exit_cmd=exit +} + + +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () +{ + $debug_cmd + + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} + + +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} + + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to <bug-libtool@gnu.org>. +GNU libtool home page: <http://www.gnu.org/software/libtool/>. +General help using GNU software: <http://www.gnu.org/gethelp/>." + exit 0 +} + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." +} + + +# func_config +# ----------- +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + + +# func_features +# ------------- +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test yes = "$build_libtool_libs"; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test yes = "$build_old_libs"; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + + +# func_enable_tag TAGNAME +# ----------------------- +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname=$1 + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + + +# func_check_version_match +# ------------------------ +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + + nonopt= + preserve_args= + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep + + +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options + + + +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result +} +func_add_hook func_validate_options libtool_validate_options + + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + + + +## ----------- ## +## Main. ## +## ----------- ## + +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if 'file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case $lalib_p_line in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test yes = "$lalib_p" +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $debug_cmd + + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# 'FILE.' does not work on cygwin managed mounts. +func_source () +{ + $debug_cmd + + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case $lt_sysroot:$1 in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result='='$func_stripname_result + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $debug_cmd + + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with '--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' + else + write_lobj=none + fi + + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <<EOF +# $write_libobj - a libtool object file +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object=$write_lobj + +# Name of the non-PIC object +non_pic_object=$write_oldobj + +EOF + $MV "${write_libobj}T" "$write_libobj" + } +} + + +################################################## +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # +################################################## + +# func_convert_core_file_wine_to_w32 ARG +# Helper function used by file name conversion functions when $build is *nix, +# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. +# +# ARG is the $build file name to be converted to w32 format. +# Result is available in $func_convert_core_file_wine_to_w32_result, and will +# be empty on error (or when ARG is empty) +func_convert_core_file_wine_to_w32 () +{ + $debug_cmd + + func_convert_core_file_wine_to_w32_result=$1 + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero error code, so we + # are forced to check the contents of stdout. On the other hand, if the + # command is not found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both error code of + # zero AND non-empty stdout, which explains the odd construction: + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $debug_cmd + + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result= + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result"; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $debug_cmd + + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $debug_cmd + + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $debug_cmd + + if test -z "$2" && test -n "$1"; then + func_error "Could not determine host file name corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result=$1 + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $debug_cmd + + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " '$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result=$3 + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $debug_cmd + + case $4 in + $1 ) func_to_host_path_result=$3$func_to_host_path_result + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via '$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $debug_cmd + + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $debug_cmd + + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result=$1 +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result=$func_convert_core_msys_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via '$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $debug_cmd + + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd=func_convert_path_$func_stripname_result + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $debug_cmd + + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result=$1 +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_msys_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + +func_add2xrpath () +{ + dir="$1" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac +} + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + +# func_mode_compile arg... +func_mode_compile () +{ + $debug_cmd + + # Get the compilation command and the source file. + base_compile= + srcfile=$nonopt # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg=$srcfile + srcfile=$arg + arg_mode=normal + ;; + + target ) + libobj=$arg + arg_mode=normal + continue + ;; + + skip ) + lastarg= + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify '-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xlinker | -XCClinker) + arg_mode=skip # the next one is ignored for compile mode + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs=$IFS; IFS=, + for arg in $args; do + IFS=$save_ifs + func_append_quoted lastarg "$arg" + done + IFS=$save_ifs + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg=$srcfile + srcfile=$arg + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with '-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj=$func_basename_result + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from '$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name '$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test yes = "$build_old_libs"; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test yes = "$need_locks"; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test warn = "$need_locks"; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test yes = "$build_libtool_libs"; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test no != "$pic_mode"; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test yes = "$suppress_opt"; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test yes = "$compiler_c_o"; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test no != "$need_locks"; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a 'standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to '-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the '--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the 'install' or 'cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with '-') are ignored. + +Every other argument is treated as a filename. Files ending in '.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. + +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode '$opt_mode'" + ;; + esac + + echo + $ECHO "Try '$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test : = "$opt_help"; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + $SED '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $debug_cmd + + # The first argument is the command name. + cmd=$nonopt + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "'$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "'$file' was not linked with '-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir=$func_dirname_result + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir=$func_dirname_result + ;; + + *) + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir=$absdir + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic=$magic + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file=$progdir/$program + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file=$progdir/$program + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd=\$cmd$args + fi +} + +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $debug_cmd + + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "'$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument '$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and '=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_quiet && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the '$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the '$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the '$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $debug_cmd + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac + then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=false + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=: ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the '$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir=$func_dirname_result + destname=$func_basename_result + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "'$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "'$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir=$func_dirname_result + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking '$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname=$1 + shift + + srcname=$realname + test -n "$relink_command" && srcname=${realname}T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme=$stripme + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try 'ln -sf' first, because the 'ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib=$destdir/$realname + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name=$func_basename_result + instname=$dir/${name}i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest=$destfile + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to '$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test yes = "$build_old_libs"; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext= + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=.exe + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script '$wrapper'" + + finalize=: + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test no = "$fast_install" && test -n "$relink_command"; then + $opt_dry_run || { + if $finalize; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file=$func_basename_result + outputname=$tmpdir/$file + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_quiet || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink '$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file=$outputname + else + func_warning "cannot relink '$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name=$func_basename_result + + # Set up the ranlib parameters. + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run '$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test install = "$opt_mode" && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms=${my_outputname}S.c + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist=$output_objdir/$my_outputname.nm + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* 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_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* External symbol declarations for the compiler. */\ +" + + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols=$output_objdir/$outputname.exp + $opt_dry_run || { + $RM $export_symbols + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from '$dlprefile'" + func_basename "$dlprefile" + name=$func_basename_result + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename= + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname"; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename=$func_basename_result + else + # no lafile. user explicitly requested -dlpreopen <import library>. + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename"; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 </dev/null >/dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + $my_pic_p && pic_flag_for_symtable=" $pic_flag" + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' + + # Transform the symbol file into the correct name. + symfileobj=$output_objdir/${my_outputname}S.$objext + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for '$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $debug_cmd + + win32_libid_type=unknown + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s|.*|import| + p + q + } + }'` + ;; + esac + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $debug_cmd + + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $debug_cmd + + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1"; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result= + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test yes = "$lock_old_archive_extraction"; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $debug_cmd + + my_gentop=$1; shift + my_oldlibs=${1+"$@"} + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib=$func_basename_result + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" + cd "$darwin_curdir" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result=$my_oldobjs +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory where it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# 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 + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test yes = "$fast_install"; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + \$ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat <<EOF + +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname + Generated by $PROGRAM (GNU $PACKAGE) $VERSION + + The $output program cannot be directly executed until all the libtool + libraries that it depends on are installed. + + This wrapper executable should never be moved out of the build directory. + If it is, it will not operate correctly. +*/ +EOF + cat <<"EOF" +#ifdef _MSC_VER +# define _CRT_SECURE_NO_DEPRECATE 1 +#endif +#include <stdio.h> +#include <stdlib.h> +#ifdef _MSC_VER +# include <direct.h> +# include <process.h> +# include <io.h> +#else +# include <unistd.h> +# include <stdint.h> +# ifdef __CYGWIN__ +# include <io.h> +# endif +#endif +#include <malloc.h> +#include <stdarg.h> +#include <assert.h> +#include <string.h> +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <sys/stat.h> + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* declarations of non-ANSI functions */ +#if defined __MINGW32__ +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined __CYGWIN__ +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined other_platform || defined ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined _MSC_VER +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +#elif defined __MINGW32__ +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined __CYGWIN__ +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined other platforms ... */ +#endif + +#if defined PATH_MAX +# define LT_PATHMAX PATH_MAX +#elif defined MAXPATHLEN +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free (stale); stale = 0; } \ +} while (0) + +#if defined LT_DEBUGWRAPPER +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <<EOF +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) +# define externally_visible volatile +#else +# define externally_visible __attribute__((externally_visible)) volatile +#endif +externally_visible const char * MAGIC_EXE = "$magic_exe"; +const char * LIB_PATH_VARNAME = "$shlibpath_var"; +EOF + + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + func_to_host_path "$temp_rpath" + cat <<EOF +const char * LIB_PATH_VALUE = "$func_to_host_path_result"; +EOF + else + cat <<"EOF" +const char * LIB_PATH_VALUE = ""; +EOF + fi + + if test -n "$dllsearchpath"; then + func_to_host_path "$dllsearchpath:" + cat <<EOF +const char * EXE_PATH_VARNAME = "PATH"; +const char * EXE_PATH_VALUE = "$func_to_host_path_result"; +EOF + else + cat <<"EOF" +const char * EXE_PATH_VARNAME = ""; +const char * EXE_PATH_VALUE = ""; +EOF + fi + + if test yes = "$fast_install"; then + cat <<EOF +const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */ +EOF + else + cat <<EOF +const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */ +EOF + fi + + + cat <<"EOF" + +#define LTWRAPPER_OPTION_PREFIX "--lt-" + +static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; +static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; +static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug"; + +int +main (int argc, char *argv[]) +{ + char **newargz; + int newargc; + char *tmp_pathspec; + char *actual_cwrapper_path; + char *actual_cwrapper_name; + char *target_name; + char *lt_argv_zero; + int rval = 127; + + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + newargz = XMALLOC (char *, (size_t) argc + 1); + + /* very simple arg parsing; don't want to rely on getopt + * also, copy all non cwrapper options to newargz, except + * argz[0], which is handled differently + */ + newargc=0; + for (i = 1; i < argc; i++) + { + if (STREQ (argv[i], dumpscript_opt)) + { +EOF + case $host in + *mingw* | *cygwin* ) + # make stdout use "unix" line endings + echo " setmode(1,_O_BINARY);" + ;; + esac + + cat <<"EOF" + lt_dump_script (stdout); + return 0; + } + if (STREQ (argv[i], debug_opt)) + { + lt_debug = 1; + continue; + } + if (STREQ (argv[i], ltwrapper_option_prefix)) + { + /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX + namespace, but it is not one of the ones we know about and + have already dealt with, above (inluding dump-script), then + report an error. Otherwise, targets might begin to believe + they are allowed to use options in the LTWRAPPER_OPTION_PREFIX + namespace. The first time any user complains about this, we'll + need to make LTWRAPPER_OPTION_PREFIX a configure-time option + or a configure.ac-settable value. + */ + lt_fatal (__FILE__, __LINE__, + "unrecognized %s option: '%s'", + ltwrapper_option_prefix, argv[i]); + } + /* otherwise ... */ + newargz[++newargc] = xstrdup (argv[i]); + } + newargz[++newargc] = NULL; + +EOF + cat <<EOF + /* The GNU banner must be the first non-error debug message */ + lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n"); +EOF + cat <<"EOF" + lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]); + lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name); + + tmp_pathspec = find_executable (argv[0]); + if (tmp_pathspec == NULL) + lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]); + lt_debugprintf (__FILE__, __LINE__, + "(main) found exe (before symlink chase) at: %s\n", + tmp_pathspec); + + actual_cwrapper_path = chase_symlinks (tmp_pathspec); + lt_debugprintf (__FILE__, __LINE__, + "(main) found exe (after symlink chase) at: %s\n", + actual_cwrapper_path); + XFREE (tmp_pathspec); + + actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path)); + strendzap (actual_cwrapper_path, actual_cwrapper_name); + + /* wrapper name transforms */ + strendzap (actual_cwrapper_name, ".exe"); + tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1); + XFREE (actual_cwrapper_name); + actual_cwrapper_name = tmp_pathspec; + tmp_pathspec = 0; + + /* target_name transforms -- use actual target program name; might have lt- prefix */ + target_name = xstrdup (base_name (TARGET_PROGRAM_NAME)); + strendzap (target_name, ".exe"); + tmp_pathspec = lt_extend_str (target_name, ".exe", 1); + XFREE (target_name); + target_name = tmp_pathspec; + tmp_pathspec = 0; + + lt_debugprintf (__FILE__, __LINE__, + "(main) libtool target name: %s\n", + target_name); +EOF + + cat <<EOF + newargz[0] = + XMALLOC (char, (strlen (actual_cwrapper_path) + + strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1)); + strcpy (newargz[0], actual_cwrapper_path); + strcat (newargz[0], "$objdir"); + strcat (newargz[0], "/"); +EOF + + cat <<"EOF" + /* stop here, and copy so we don't have to do this twice */ + tmp_pathspec = xstrdup (newargz[0]); + + /* do NOT want the lt- prefix here, so use actual_cwrapper_name */ + strcat (newargz[0], actual_cwrapper_name); + + /* DO want the lt- prefix here if it exists, so use target_name */ + lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1); + XFREE (tmp_pathspec); + tmp_pathspec = NULL; +EOF + + case $host_os in + mingw*) + cat <<"EOF" + { + char* p; + while ((p = strchr (newargz[0], '\\')) != NULL) + { + *p = '/'; + } + while ((p = strchr (lt_argv_zero, '\\')) != NULL) + { + *p = '/'; + } + } +EOF + ;; + esac + + cat <<"EOF" + XFREE (target_name); + XFREE (actual_cwrapper_path); + XFREE (actual_cwrapper_name); + + lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */ + lt_setenv ("DUALCASE", "1"); /* for MSK sh */ + /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must + be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath) + because on Windows, both *_VARNAMEs are PATH but uninstalled + libraries must come first. */ + lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE); + lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); + + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", + nonnull (lt_argv_zero)); + for (i = 0; i < newargc; i++) + { + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", + i, nonnull (newargz[i])); + } + +EOF + + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + newargz = prepare_spawn (newargz); + rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + lt_debugprintf (__FILE__, __LINE__, + "(main) failed to launch target \"%s\": %s\n", + lt_argv_zero, nonnull (strerror (errno))); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac + + cat <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal (__FILE__, __LINE__, "memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined HAVE_DOS_BASED_FILE_SYSTEM + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable (const char *path) +{ + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + size_t tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined HAVE_DOS_BASED_FILE_SYSTEM + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined HAVE_DOS_BASED_FILE_SYSTEM + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = (size_t) (q - p); + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (STREQ (str, pat)) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + size_t len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + size_t orig_value_len = strlen (orig_value); + size_t add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[--len] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $debug_cmd + + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $debug_cmd + + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # what system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll that has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + os2dllname= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=false + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module=$wl-single_module + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg=$1 + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir=$arg + prev= + continue + ;; + dlfiles|dlprefiles) + $preload || { + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=: + } + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test no = "$dlself"; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test dlprefiles = "$prev"; then + dlself=yes + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test dlfiles = "$prev"; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols=$arg + test -f "$arg" \ + || func_fatal_error "symbol file '$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex=$arg + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + if test none != "$pic_object"; then + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + fi + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file '$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; + precious_regex) + precious_files_regex=$arg + prev= + continue + ;; + release) + release=-$arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test rpath = "$prev"; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds=$arg + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg=$arg + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "'-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test X-export-symbols = "X$arg"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between '-L' and '$1'" + else + func_fatal_error "need path for '-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test X-lc = "X$arg" || test X-lm = "X$arg"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test X-lc = "X$arg" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc due to us having libc/libc_r. + test X-lc = "X$arg" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test X-lc = "X$arg" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test X-lc = "X$arg" && continue + ;; + esac + elif test X-lc_r = "X$arg"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -mllvm) + prev=mllvm + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module=$wl-multi_module + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -os2dllname) + prev=os2dllname + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + func_add2xrpath "$dir" + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,--start-group|-Wl,--end-group|-Wl,-\(|-Wl,-\)) + func_append deplibs " $arg" + continue + ;; + + -Wl,*) + wlprefix=`expr x"$wl" : '.*' - 1` + wlprefix=`expr x"$arg" : 'x\(.\{'"$wlprefix"'\}\)'` + if test x"$wlprefix" = x"$wl" -a x"$wl" != x"-Wl,"; then + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + if expr "x$arg" : '^x'"$wl"'-rpath,,' >/dev/null ; then + func_stripname "$wl"'-rpath,,' '' "$arg" + dir=$func_stripname_result + func_add2xrpath "$dir" + elif expr "x$arg" : '^x'"$wl"'-rpath$' >/dev/null ; then + func_stripname "$wl" '' "$1" + dir=$func_stripname_result + if ! expr "x$1" : '^x'"$wl" >/dev/null \ + || ! test -d "$dir" ; then + func_fatal_error "$wl"'-rpath must be followed by '"$wl"'-escaped directory' + fi + shift + func_add2xrpath "$dir" + continue + else + func_stripname "$wl" '' "$arg" + func_append new_inherited_linker_flags " -Wl,$func_stripname_result" + fi + continue + elif expr "x$arg" : '^x-Wl,-rpath,' >/dev/null ; then + func_stripname '-Wl,-rpath,' '' "$arg" + dir=$func_stripname_result + func_add2xrpath "$dir" + continue + elif expr "x$arg" : '^x-Wl,-rpath$' >/dev/null ; then + func_stripname '-Wl,' '' "$1" + dir=$func_stripname_result + if ! expr "x$1" : '^x-Wl,' >/dev/null \ + || ! test -d "$dir" ; then + func_fatal_error '-Wl,-rpath must be followed by -Wl-escaped directory' + fi + func_quote_for_eval "$1" + func_append libtool_args " $func_quote_for_eval_result" + shift + func_add2xrpath "$dir" + continue + fi + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + test none = "$pic_object" || { + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + } + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test dlfiles = "$prev"; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test dlprefiles = "$prev"; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the '$prevarg' option requires an argument" + + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname=$func_basename_result + libobjs_save=$libobjs + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + + func_dirname "$output" "/" "" + output_objdir=$func_dirname_result$objdir + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test lib = "$linkmode"; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=false + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test lib,link = "$linkmode,$pass"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs=$tmp_deplibs + fi + + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs + deplibs= + fi + if test prog = "$linkmode"; then + case $pass in + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test lib,dlpreopen = "$linkmode,$pass"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs=$dlprefiles + fi + if test dlopen = "$pass"; then + # Collect dlpreopened libraries + save_deplibs=$deplibs + deplibs= + fi + + for deplib in $libs; do + lib= + found=false + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test lib = "$linkmode"; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib=$searchdir/lib$name$search_ext + if test -f "$lib"; then + if test .la = "$search_ext"; then + found=: + else + found=false + fi + break 2 + fi + done + done + if $found; then + # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll=$l + done + if test "X$ll" = "X$old_library"; then # only static version available + found=false + func_dirname "$lib" "" "." + ladir=$func_dirname_result + lib=$ladir/$old_library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + *.ltframework) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test conv = "$pass" && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + if test scan = "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "'-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test link = "$pass"; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=false + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=: + fi + ;; + pass_all) + valid_a_lib=: + ;; + esac + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + fi + ;; + esac + continue + ;; + prog) + if test link != "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=: + continue + ;; + -Wl,--start-group|-Wl,--end-group|-Wl,-\(|-Wl,-\)) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + fi + continue + ;; + esac # case $deplib + + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "'$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir=$func_dirname_result + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + + # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor + if test yes = "$with_nagfor" ; then + tmp_inherited_linker_flags=`$ECHO " $tmp_inherited_linker_flags" | $SED 's/ -pthread\b/ -Wl,-pthread/g'` + fi + + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test conv = "$pass"; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib=$l + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + + # This library was specified with -dlopen. + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" + if test -z "$dlname" || + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of '$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir=$ladir + fi + ;; + esac + func_basename "$lib" + laname=$func_basename_result + + # Find the relevant object directory and library name. + if test yes = "$installed"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir + else + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir + fi + test yes = "$hardcode_automatic" && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir=$ladir + absdir=$abs_ladir + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" + fi + case $host in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test lib = "$linkmode"; then + deplibs="$dir/$old_library $deplibs" + elif test prog,link = "$linkmode,$pass"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test prog = "$linkmode" && test link != "$pass"; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if $linkalldeplibs; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test prog,link = "$linkmode,$pass"; then + if test -n "$library_names" && + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then + # Make sure the rpath contains only unique directories. + case $temp_rpath: in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test built = "$use_static_libs" && test yes = "$installed"; then + use_static_libs=no + fi + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc* | *os2*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test no = "$installed"; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule= + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule=$dlpremoduletest + break + fi + done + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then + echo + if test prog = "$linkmode"; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname=$1 + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname=$dlname + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc* | *os2*) + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + esac + eval soname=\"$soname_spec\" + else + soname=$realname + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot=$soname + func_basename "$soroot" + soname=$func_basename_result + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from '$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for '$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test prog = "$linkmode" || test relink != "$opt_mode"; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test no = "$hardcode_direct"; then + add=$dir/$linklib + case $host in + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir=-L$dir ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we cannot + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library"; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add=$dir/$old_library + fi + elif test -n "$old_library"; then + add=$dir/$old_library + fi + fi + esac + elif test no = "$hardcode_minus_L"; then + case $host in + *-*-sunos*) add_shlibpath=$dir ;; + esac + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + relink) + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test yes != "$lib_linked"; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test prog = "$linkmode"; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test prog = "$linkmode" || test relink = "$opt_mode"; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add=-l$name + elif test yes = "$hardcode_automatic"; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib + else + add=$libdir/$linklib + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir=-L$libdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + fi + + if test prog = "$linkmode"; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test prog = "$linkmode"; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test yes = "$build_libtool_libs"; then + # Not a shared library + if test pass_all != "$deplibs_check_method"; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system cannot link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test yes = "$module"; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test lib = "$linkmode"; then + if test -n "$dependency_libs" && + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs=$temp_deplibs + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test no != "$link_all_deplibs"; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path=$deplib ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" + path= + fi + fi + ;; + *) + path=-L$absdir/$objdir + ;; + esac + else + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "'$deplib' seems to be moved" + + path=-L$absdir + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test link = "$pass"; then + if test prog = "$linkmode"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test dlopen != "$pass"; then + test conv = "$pass" || { + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + } + + if test prog,link = "$linkmode,$pass"; then + vars="compile_deplibs finalize_deplibs" + else + vars=deplibs + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) + func_stripname '-R' '' "$deplib" + func_add2xrpath "$func_stripname_result" + ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i= + ;; + esac + if test -n "$i"; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test prog = "$linkmode"; then + dlfiles=$newdlfiles + fi + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "'-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "'-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs=$output + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form 'libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" + + if test no != "$need_lib_prefix"; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" + + install_libdir=$1 + + oldlibs= + if test -z "$rpath"; then + if test yes = "$build_libtool_libs"; then + # Building a libtool convenience library. + # Some compilers have problems with a '.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "'-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs=$IFS; IFS=: + set dummy $vinfo 0 0 0 + shift + IFS=$save_ifs + + test -n "$7" && \ + func_fatal_help "too many parameters to '-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major=$1 + number_minor=$2 + number_revision=$3 + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # that has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|freebsd-elf|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_revision + ;; + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_minor + lt_irix_increment=no + ;; + esac + ;; + no) + current=$1 + revision=$2 + age=$3 + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $with_nagfor in + yes) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac + ;; + + freebsd-aout) + major=.$current + versuffix=.$current.$revision + ;; + + freebsd-elf) + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + irix | nonstopux) + if test no = "$lt_irix_increment"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring=$verstring_prefix$major.$revision + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test 0 -ne "$loop"; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring_prefix$major.$iface:$verstring + done + + # Before this point, $major must not contain '.'. + major=.$major + versuffix=$major.$revision + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision + + # Add in all the interfaces that we are compatible with. + loop=$age + while test 0 -ne "$loop"; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring:$iface.0 + done + + # Make executables depend on our current version. + func_append verstring ":$current.0" + ;; + + qnx) + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current + ;; + + sunos) + major=.$current + versuffix=.$current.$revision + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 file systems. + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + + *) + func_fatal_configuration "unknown library version type '$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring=0.0 + ;; + esac + if test no = "$need_version"; then + versuffix= + else + versuffix=.0.0 + fi + fi + + # Remove version info from name if versioning should be avoided + if test yes,no = "$avoid_version,$need_version"; then + major= + versuffix= + verstring= + fi + + # Check to see if the archive will have undefined symbols. + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi + fi + else + # Don't allow undefined symbols. + allow_undefined_flag=$no_undefined_flag + fi + + fi + + func_generate_dlsyms "$libname" "$libname" : + func_append libobjs " $symfileobj" + test " " = "$libobjs" && libobjs= + + if test relink != "$opt_mode"; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles=$dlfiles + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles=$dlprefiles + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test yes = "$build_libtool_libs"; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test yes = "$build_libtool_need_lc"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release= + versuffix= + major= + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c <<EOF + int main() { return 0; } +EOF + $opt_dry_run || $RM conftest + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then + ldd_output=`ldd conftest` + for i in $deplibs; do + case $i in + -l*) + func_stripname -l '' "$i" + name=$func_stripname_result + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $i "*) + func_append newdeplibs " $i" + i= + ;; + esac + fi + if test -n "$i"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then + func_append newdeplibs " $i" + else + droppeddeps=yes + echo + $ECHO "*** Warning: dynamic linker does not accept needed library $i." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which I believe you do not have" + echo "*** because a test_compile did reveal that the linker did not use it for" + echo "*** its dynamic dependency list that programs get resolved with at runtime." + fi + fi + ;; + *) + func_append newdeplibs " $i" + ;; + esac + done + else + # Error occurred in the first compile. Let's try to salvage + # the situation: Compile a separate program for each library. + for i in $deplibs; do + case $i in + -l*) + func_stripname -l '' "$i" + name=$func_stripname_result + $opt_dry_run || $RM conftest + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then + ldd_output=`ldd conftest` + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $i "*) + func_append newdeplibs " $i" + i= + ;; + esac + fi + if test -n "$i"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then + func_append newdeplibs " $i" + else + droppeddeps=yes + echo + $ECHO "*** Warning: dynamic linker does not accept needed library $i." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because a test_compile did reveal that the linker did not use this one" + echo "*** as a dynamic dependency that programs can get resolved with at runtime." + fi + fi + else + droppeddeps=yes + echo + $ECHO "*** Warning! Library $i is needed by this library but I was not able to" + echo "*** make it link in! You will probably need to install it or some" + echo "*** library that it depends on before this library will be fully" + echo "*** functional. Installing it before continuing would be even better." + fi + ;; + *) + func_append newdeplibs " $i" + ;; + esac + done + fi + ;; + file_magic*) + set dummy $deplibs_check_method; shift + file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib= + ;; + esac + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else + libnameglob=$libname + fi + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + if test yes = "$want_nocaseglob"; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib=$potent_lib + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib= + ;; + esac + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib=$potent_lib # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs= + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test none = "$deplibs_check_method"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test yes = "$droppeddeps"; then + if test yes = "$module"; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test no = "$allow_undefined"; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # Time to revert the changes made for nagfor. This might be required if + # we need to make the output '*.la' file to be correctly interpreted for + # gcc (e.g. the output library that we are linking now with nagfor needs + # to be linked by gcc later). In this case, the libtool script of a + # package that will try to link our library will have to make similar + # non-standard nagfor-specific modifications of the '-pthread' flag. + # Thus, if we are creating a Fortran library for nagfor only, it is + # better not to revert the changes, otherwise, uncomment the following + # lines. + + if test yes = "$with_nagfor" ; then + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's/ -Wl,-pthread\b/ -pthread/g;s/^ *//'` + fi + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + -Wl,*) + func_stripname -Wl, '' "$deplib" + func_append new_libs " $wl$func_stripname_result" + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs=$new_libs + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname=$1 + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname=$realname + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib=$output_objdir/$realname + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + func_dll_def_p "$export_symbols" || { + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols=$export_symbols + export_symbols= + always_export_symbols=yes + } + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs=$IFS; IFS='~' + for cmd1 in $cmds; do + IFS=$save_ifs + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test yes = "$try_normal_branch" \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=$output_objdir/$output_la.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs=$tmp_deplibs + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test yes = "$compiler_needs_object" && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test : != "$skipped_export" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test yes = "$compiler_needs_object"; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-$k.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test -z "$objlist" || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test 1 -eq "$k"; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-$k.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-$k.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + } + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs=$IFS; IFS='~' + for cmd in $concat_cmds; do + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + ${skipped_export-false} && { + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + } + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs=$IFS; IFS='~' + for cmd in $cmds; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test yes = "$module" || test yes = "$export_dynamic"; then + # On all known operating systems, these are identical. + dlname=$soname + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "'-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object '$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj=$output + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags + else + gentop=$output_objdir/${obj}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects + + # Create the old-style object. + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs + + output=$obj + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + test yes = "$build_libtool_libs" || { + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + } + + if test -n "$pic_flag" || test default != "$pic_mode"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output=$libobj + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "'-release' is ignored for programs" + + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test CXX = "$tagname"; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + -Wl,-pthread) + func_append new_libs " $deplib" ;; + -Wl,*) + func_stripname -Wl, '' "$deplib" + func_append new_libs " $wl$func_stripname_result" + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs=$new_libs + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath=$rpath + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath=$rpath + + if test -n "$libobjs" && test yes = "$build_old_libs"; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" false + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=: + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false + ;; + *cygwin* | *mingw* ) + test yes = "$build_libtool_libs" || wrappers_required=false + ;; + *) + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false + fi + ;; + esac + $wrappers_required || { + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command=$compile_command$compile_rpath + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' + fi + + exit $exit_status + } + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test yes = "$no_install"; then + # We don't need to create a wrapper script. + link_command=$compile_var$compile_command$compile_rpath + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience + build_libtool_libs=no + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) + oldobjs="$old_deplibs $non_pic_objects" + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac + + if test -n "$addlibs"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase=$func_basename_result + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj"; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test -z "$oldobjs"; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test yes = "$build_old_libs" && old_library=$libname.$libext + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test yes = "$hardcode_automatic"; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test yes = "$installed"; then + if test -z "$install_libdir"; then + break + fi + output=$output_objdir/${outputname}i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs=$newdependency_libs + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles=$newdlprefiles + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles=$newdlprefiles + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result/$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test no,yes = "$installed,$need_relink"; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $debug_cmd + + RM=$nonopt + files= + rmforce=false + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=: ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir + else + odir=$dir/$objdir + fi + func_basename "$file" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir + + # Remember odir for removal later, being careful to avoid duplicates + if test clean = "$opt_mode"; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif $rmforce; then + continue + fi + + rmfiles=$file + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case $opt_mode in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && test none != "$pic_object"; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && test none != "$non_pic_object"; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test clean = "$opt_mode"; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the $objdir's in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi + +test -z "$opt_mode" && { + help=$generic_help + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode '$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# where we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/config/missing b/config/missing new file mode 100755 index 000000000..1fe1611f1 --- /dev/null +++ b/config/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. + +# This program 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, or (at your option) +# any later version. + +# This program 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 <https://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to <bug-automake@gnu.org>." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/config/py-compile b/config/py-compile new file mode 100755 index 000000000..81b122b0a --- /dev/null +++ b/config/py-compile @@ -0,0 +1,189 @@ +#!/bin/sh +# py-compile - Compile a Python program + +scriptversion=2021-02-27.01; # UTC + +# Copyright (C) 2000-2021 Free Software Foundation, Inc. + +# This program 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, or (at your option) +# any later version. + +# This program 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 <https://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +if test -z "$PYTHON"; then + PYTHON=python +fi + +me=py-compile + +usage_error () +{ + echo "$me: $*" >&2 + echo "Try '$me --help' for more information." >&2 + exit 1 +} + +basedir= +destdir= +while test $# -ne 0; do + case "$1" in + --basedir) + if test $# -lt 2; then + usage_error "option '--basedir' requires an argument" + else + basedir=$2 + fi + shift + ;; + --destdir) + if test $# -lt 2; then + usage_error "option '--destdir' requires an argument" + else + destdir=$2 + fi + shift + ;; + -h|--help) + cat <<\EOF +Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." + +Byte compile some python scripts FILES. Use --destdir to specify any +leading directory path to the FILES that you don't want to include in the +byte compiled file. Specify --basedir for any additional path information you +do want to be shown in the byte compiled file. + +Example: + py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v|--version) + echo "$me $scriptversion" + exit $? + ;; + --) + shift + break + ;; + -*) + usage_error "unrecognized option '$1'" + ;; + *) + break + ;; + esac + shift +done + +files=$* +if test -z "$files"; then + usage_error "no files given" +fi + +# if basedir was given, then it should be prepended to filenames before +# byte compilation. +if test -z "$basedir"; then + pathtrans="path = file" +else + pathtrans="path = os.path.join('$basedir', file)" +fi + +# if destdir was given, then it needs to be prepended to the filename to +# byte compile but not go into the compiled file. +if test -z "$destdir"; then + filetrans="filepath = path" +else + filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" +fi + +python_major=`$PYTHON -V 2>&1 | sed -e 's/.* //;s/\..*$//;1q'` +if test -z "$python_major"; then + echo "$me: could not determine $PYTHON major version, guessing 3" >&2 + python_major=3 +fi + +# The old way to import libraries was deprecated. +if test "$python_major" -le 2; then + import_lib=imp + import_test="hasattr(imp, 'get_tag')" + import_call=imp.cache_from_source + import_arg2=', False' # needed in one call and not the other +else + import_lib=importlib + import_test="hasattr(sys.implementation, 'cache_tag')" + import_call=importlib.util.cache_from_source + import_arg2= +fi + +$PYTHON -c " +import sys, os, py_compile, $import_lib + +files = '''$files''' + +sys.stdout.write('Byte-compiling python modules...\n') +for file in files.split(): + $pathtrans + $filetrans + if not os.path.exists(filepath) or not (len(filepath) >= 3 + and filepath[-3:] == '.py'): + continue + sys.stdout.write(file) + sys.stdout.flush() + if $import_test: + py_compile.compile(filepath, $import_call(filepath), path) + else: + py_compile.compile(filepath, filepath + 'c', path) +sys.stdout.write('\n')" || exit $? + +# this will fail for python < 1.5, but that doesn't matter ... +$PYTHON -O -c " +import sys, os, py_compile, $import_lib + +# pypy does not use .pyo optimization +if hasattr(sys, 'pypy_translation_info'): + sys.exit(0) + +files = '''$files''' +sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') +for file in files.split(): + $pathtrans + $filetrans + if not os.path.exists(filepath) or not (len(filepath) >= 3 + and filepath[-3:] == '.py'): + continue + sys.stdout.write(file) + sys.stdout.flush() + if $import_test: + py_compile.compile(filepath, $import_call(filepath$import_arg2), path) + else: + py_compile.compile(filepath, filepath + 'o', path) +sys.stdout.write('\n')" 2>/dev/null || exit $? + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/config/test-driver b/config/test-driver new file mode 100755 index 000000000..be73b80ad --- /dev/null +++ b/config/test-driver @@ -0,0 +1,153 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 2011-2021 Free Software Foundation, Inc. +# +# This program 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, or (at your option) +# any later version. +# +# This program 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 <https://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <<END +Usage: + test-driver --test-name NAME --log-file PATH --trs-file PATH + [--expect-failure {yes|no}] [--color-tests {yes|no}] + [--enable-hard-errors {yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] + +The '--test-name', '--log-file' and '--trs-file' options are mandatory. +See the GNU Automake documentation for information. +END +} + +test_name= # Used for reporting. +log_file= # Where to save the output of the test script. +trs_file= # Where to save the metadata of the test run. +expect_failure=no +color_tests=no +enable_hard_errors=yes +while test $# -gt 0; do + case $1 in + --help) print_usage; exit $?;; + --version) echo "test-driver $scriptversion"; exit $?;; + --test-name) test_name=$2; shift;; + --log-file) log_file=$2; shift;; + --trs-file) trs_file=$2; shift;; + --color-tests) color_tests=$2; shift;; + --expect-failure) expect_failure=$2; shift;; + --enable-hard-errors) enable_hard_errors=$2; shift;; + --) shift; break;; + -*) usage_error "invalid option: '$1'";; + *) break;; + esac + shift +done + +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + +if test $color_tests = yes; then + # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. + red='[0;31m' # Red. + grn='[0;32m' # Green. + lgn='[1;32m' # Light green. + blu='[1;34m' # Blue. + mgn='[0;35m' # Magenta. + std='[m' # No color. +else + red= grn= lgn= blu= mgn= std= +fi + +do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' +trap "st=129; $do_exit" 1 +trap "st=130; $do_exit" 2 +trap "st=141; $do_exit" 13 +trap "st=143; $do_exit" 15 + +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 +estatus=$? + +if test $enable_hard_errors = no && test $estatus -eq 99; then + tweaked_estatus=1 +else + tweaked_estatus=$estatus +fi + +case $tweaked_estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>"$log_file" + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/configure b/configure new file mode 100755 index 000000000..0f7feeeef --- /dev/null +++ b/configure @@ -0,0 +1,38139 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for cdi 2.2.0. +# +# Report bugs to <https://mpimet.mpg.de/cdi>. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + 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\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://mpimet.mpg.de/cdi about your system, including +$0: any error possibly output before this message. Then +$0: install a modern shell, or manually run the script +$0: under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' + +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='cdi' +PACKAGE_TARNAME='cdi' +PACKAGE_VERSION='2.2.0' +PACKAGE_STRING='cdi 2.2.0' +PACKAGE_BUGREPORT='https://mpimet.mpg.de/cdi' +PACKAGE_URL='' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif" + +ac_header_list= +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +ENABLE_PYTHON_INTERFACE +ENABLE_RUBY_INTERFACE +HAVE_PARALLEL_NC4 +ENABLE_MPI +BUILD_F77 +BUILD_FC +BUILD_CXX +BUILD_CC +BUILD_MPI_FC_LIB +BUILD_MPI_C_LIB +BUILD_LIBS +BUILD_LDFLAGS +BUILD_FCFLAGS +BUILD_CFLAGS +with_example_programs_FALSE +with_example_programs_TRUE +with_concurrent_mpi_checks_FALSE +with_concurrent_mpi_checks_TRUE +with_on_demand_check_programs_FALSE +with_on_demand_check_programs_TRUE +ENABLE_PYTHON_INTERFACE_FALSE +ENABLE_PYTHON_INTERFACE_TRUE +PYTHON_EXTRA_LDFLAGS +PYTHON_EXTRA_LIBS +PYTHON_PLATFORM_SITE_PKG +PYTHON_SITE_PKG +PYTHON_LIBS +PYTHON_CPPFLAGS +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_PLATFORM +PYTHON_VERSION +PYTHON +ENABLE_RUBY_INTERFACE_FALSE +ENABLE_RUBY_INTERFACE_TRUE +RUBY +SWIG +HAVE_PARALLEL_NC4_FALSE +HAVE_PARALLEL_NC4_TRUE +ENABLE_MPI_FALSE +ENABLE_MPI_TRUE +BUILD_PIO_FC_PROGRAMS_FALSE +BUILD_PIO_FC_PROGRAMS_TRUE +LIBRT +PPM_CORE_C_LIB +PPM_CORE_C_INCLUDE +YAXT_FC_LIB +YAXT_FC_MOD +YAXT_C_LIB +YAXT_C_INCLUDE +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG +MPI_FC_LIB +MPI_FC_MOD +MPI_LAUNCH +MPI_C_LIB +MPI_C_INCLUDE +MPIROOT +HAVE_PPM_DIST_ARRAY +SYSTEM_TYPE +ENABLE_NETCDF_FALSE +ENABLE_NETCDF_TRUE +ENABLE_CDI_APP_FALSE +ENABLE_CDI_APP_TRUE +ENABLE_HIRLAM_EXTENSIONS_FALSE +ENABLE_HIRLAM_EXTENSIONS_TRUE +ENABLE_ALL_STATIC_FALSE +ENABLE_ALL_STATIC_TRUE +ENABLE_CDI_LIB +ENABLE_CDI_LIB_FALSE +ENABLE_CDI_LIB_TRUE +ENABLE_IEG +ENABLE_EXTRA +ENABLE_SERVICE +ENABLE_CGRIBEX +ENABLE_ACROSS +ENABLE_GRIB +HAVE_LIBGRIB_API_FALSE +HAVE_LIBGRIB_API_TRUE +GRIB_API_LIBS +GRIB_API_INCLUDE +ECCODES_LIBS +ECCODES_INCLUDE +NETCDF_LIBS +NETCDF_INCLUDE +NETCDF_ROOT +ENABLE_NC4SZLIB +ENABLE_NC4HDF5 +ENABLE_NC4 +ENABLE_NC2 +ENABLE_NETCDF +NC_CONFIG +SZLIB_LIBS +SZLIB_INCLUDE +FDB5_LIBS +FDB5_INCLUDE +THREADS_LIBS +THREADS_INCLUDE +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +UUID_C_LIB +UUID_C_INCLUDE +DCE_UUID_C_LIB +DCE_UUID_C_INCLUDE +DCE_UUIDROOT +OSSP_UUID_C_LIB +OSSP_UUID_C_INCLUDE +OSSP_UUIDROOT +UTIL_LINUX_UUID_C_LIB +UTIL_LINUX_UUID_C_INCLUDE +UTIL_LINUX_UUIDROOT +LIBOBJS +CXXCPP +CPP +LT_SYS_LIBRARY_PATH +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +LIBTOOL +OPENMP_CFLAGS +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +ENABLE_CF_INTERFACE_FALSE +ENABLE_CF_INTERFACE_TRUE +ac_ct_F77 +FFLAGS +F77 +BUILD_FC_PROGRAMS_FALSE +BUILD_FC_PROGRAMS_TRUE +FC_MOD_UPPERCASE_FALSE +FC_MOD_UPPERCASE_TRUE +FC_DEFINE +FCMODCASE +FCMODEXT +FC_OPTINC +FC_MOD_FLAG +FCFLAGS_f90 +ac_ct_FC +FCFLAGS +FC +ENABLE_ISOC_INTERFACE_FALSE +ENABLE_ISOC_INTERFACE_TRUE +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +CSCOPE +ETAGS +CTAGS +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL +am__quote' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_maintainer_mode +enable_dependency_tracking +enable_mpi +enable_iso_c_interface +enable_cf_interface +enable_ruby_interface +enable_python_interface +enable_openmp +with_pic +enable_shared +enable_static +enable_fast_install +with_aix_soname +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_largefile +enable_util_linux_uuid +enable_ossp_uuid +enable_dce_uuid +with_util_linux_uuid +with_ossp_uuid +with_dce_uuid +with_util_linux_uuid_root +with_util_linux_uuid_include +with_util_linux_uuid_lib +with_ossp_uuid_root +with_ossp_uuid_include +with_ossp_uuid_lib +with_dce_uuid_root +with_dce_uuid_include +with_dce_uuid_lib +with_threads +with_fdb5 +with_szlib +with_netcdf +with_eccodes +with_grib_api +enable_grib +enable_across +enable_cgribex +enable_service +enable_extra +enable_ieg +enable_all_static +enable_hirlam_extensions +enable_cdi_app +enable_ppm_dist_array +with_mpi_root +with_mpi_include +with_mpi_lib +with_mpi_fc_mod +with_mpi_fc_lib +with_python_sys_prefix +with_python_prefix +with_python_exec_prefix +with_on_demand_check_programs +with_concurrent_mpi_checks +with_example_programs +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +FC +FCFLAGS +FCMODEXT +F77 +FFLAGS +CXX +CXXFLAGS +CCC +LT_SYS_LIBRARY_PATH +CPP +CXXCPP +UTIL_LINUX_UUID_C_INCLUDE +UTIL_LINUX_UUID_C_LIB +OSSP_UUID_C_INCLUDE +OSSP_UUID_C_LIB +DCE_UUID_C_INCLUDE +DCE_UUID_C_LIB +MPI_C_INCLUDE +MPI_C_LIB +MPI_LAUNCH +MPI_FC_MOD +MPI_FC_LIB +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +YAXT_C_INCLUDE +YAXT_C_LIB +YAXT_FC_MOD +YAXT_FC_LIB +PPM_CORE_C_INCLUDE +PPM_CORE_C_LIB +RUBY +PYTHON +PYTHON_VERSION +BUILD_CFLAGS +BUILD_FCFLAGS +BUILD_LDFLAGS +BUILD_LIBS +BUILD_MPI_C_LIB +BUILD_MPI_FC_LIB +BUILD_CC +BUILD_CXX +BUILD_FC +BUILD_F77' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures cdi 2.2.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/cdi] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of cdi 2.2.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --disable-maintainer-mode + disable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-mpi enable parallel I/O with MPI [default=no] + --enable-iso-c-interface + create Fortran 90 interface using Fortran 2003 + ISO_C_BINDING facility [default=no] + --enable-cf-interface create Fortran 77 interface using cfortran.h + [default=auto] + --enable-ruby-interface create Ruby language interface (EXPERIMENTAL) + [default=no] + --enable-python-interface + create Python language interface (EXPERIMENTAL) + [default=no] + --enable-openmp enable OpenMP support [default=no] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + --disable-util-linux-uuid + Do not test for the util-linux UUID library, use + OSSP or DCE versions instead + --disable-ossp-uuid Do not test for the OSSP UUID library, use + util-linux or DCE versions instead + --disable-dce-uuid Do not test for the DCE UUID library, use util-linux + or OSSP versions instead + --enable-grib GRIB support [default=yes] + --enable-across ACROSS support [default=yes] + --enable-cgribex Use the CGRIBEX library [default=yes] + --enable-service Use the service library [default=yes] + --enable-extra Use the extra library [default=yes] + --enable-ieg Use the ieg library [default=yes] + --enable-all-static build a completely statically linked CDO binary + [default=no] + --enable-hirlam-extensions + HIRLAM extensions [default=no] + --enable-cdi-app build and install CDI application [default=yes] + --enable-ppm-dist-array enable usage of the PPM distributed array + [default=auto] + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). + --with-util-linux-uuid[=yes|no|directory>] + Use util-linux UUID library, do not test for OSSP + UUID library. + --with-ossp-uuid[=yes|no|directory>] + Use OSSP UUID library, do not test for the + util-linux UUID library. + --with-dce-uuid[=yes|no|directory>] + Use DCE UUID library, do not test for the util-linux + UUID library. + --with-util-linux-uuid-root + set directory to search for util-linux-uuid headers + and library + --with-util-linux-uuid-include + specifically set directory to search for + util-linux-uuid headers, + [default=$with_util_linux_uuid_root/include] + --with-util-linux-uuid-lib + specifically set directory to search for + util-linux-uuid library, + [default=$with_util_linux_uuid_root/lib] + --with-ossp-uuid-root set directory to search for ossp-uuid headers and + library + --with-ossp-uuid-include + specifically set directory to search for ossp-uuid + headers, [default=$with_ossp_uuid_root/include] + --with-ossp-uuid-lib specifically set directory to search for ossp-uuid + library, [default=$with_ossp_uuid_root/lib] + --with-dce-uuid-root set directory to search for dce-uuid headers and + library + --with-dce-uuid-include specifically set directory to search for dce-uuid + headers, [default=$with_dce_uuid_root/include] + --with-dce-uuid-lib specifically set directory to search for dce-uuid + library, [default=$with_dce_uuid_root/lib] + --with-threads=<yes/no/directory> + Compile + link for multithreading [default=yes] + --with-fdb5=<yes|no|directory> (default=no) + location of fdb5 library (optional) + --with-szlib=<yes|no|directory> (default=no) + location of szlib library, optional for GRIB1 and + NETCDF4 compression + --with-netcdf=<yes|no|directory> (default=no) + location of NetCDF library (lib and include subdirs) + --with-eccodes=<yes|no|directory> + location of ECCODES library for grib2 + encoding/decoding (lib and include subdirs) + --with-grib_api=<yes|no|directory> + location of GRIB_API library for grib2 + encoding/decoding (lib and include subdirs) + --with-mpi-root set directory to search for MPI headers and library + --with-mpi-include specifically set directory to search for MPI + headers, [default=$with_mpi_root/include] + --with-mpi-lib specifically set directory to search for MPI + library, [default=$with_mpi_root/lib] + --with-mpi-fc-mod specifically set directory to search for MPI module, + [default=$with_mpi_root/include] + --with-mpi-fc-lib specifically set directory to search for MPI + library, [default=$with_mpi_root/lib] + --with-python-sys-prefix + use Python's sys.prefix and sys.exec_prefix values + --with-python_prefix override the default PYTHON_PREFIX + --with-python_exec_prefix + override the default PYTHON_EXEC_PREFIX + --with-on-demand-check-programs + only build test programs when calling 'make check' + [default: build during 'make all'] + --with-concurrent-mpi-checks + allow for simultaneous runs of MPI tests [default: + run MPI test programs one after another] + --without-example-programs + only build example programs when calling 'make + examples' [default: build during 'make all'] + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + LIBS libraries to pass to the linker, e.g. -l<library> + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> + FC Fortran compiler command + FCFLAGS Fortran compiler flags + FCMODEXT file extension of compiled Fortran module files + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + CXX C++ compiler command + CXXFLAGS C++ compiler flags + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. + CPP C preprocessor + CXXCPP C++ preprocessor + UTIL_LINUX_UUID_C_INCLUDE + specifically set flags to use when compiling sources using + util-linux-uuid includes. + UTIL_LINUX_UUID_C_LIB + specifically set flags to use when linking util-linux-uuid. + OSSP_UUID_C_INCLUDE + specifically set flags to use when compiling sources using + ossp-uuid includes. + OSSP_UUID_C_LIB + specifically set flags to use when linking ossp-uuid. + DCE_UUID_C_INCLUDE + specifically set flags to use when compiling sources using + dce-uuid includes. + DCE_UUID_C_LIB + specifically set flags to use when linking dce-uuid. + MPI_C_INCLUDE + specifically set flags to use when compiling sources using MPI + includes. + MPI_C_LIB specifically set flags to use when linking MPI. + MPI_LAUNCH absolute path to launcher for MPI programs, must be working + unless configuring in cross-compilation mode + MPI_FC_MOD flags to enable 'USE MPI' in Fortran program. + MPI_FC_LIB specifically set flags to use when linking MPI. + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + YAXT_C_INCLUDE + specifically set flags to use when compiling sources using YAXT + includes. + YAXT_C_LIB specifically set flags to use when linking YAXT. + YAXT_FC_MOD flags to enable 'USE YAXT' in Fortran program. + YAXT_FC_LIB specifically set flags to use when linking YAXT. + PPM_CORE_C_INCLUDE + specifically set flags to use when compiling sources using + PPM_CORE includes. + PPM_CORE_C_LIB + specifically set flags to use when linking PPM_CODE. + RUBY the Ruby interpreter + PYTHON the Python interpreter + PYTHON_VERSION + The installed Python version to use, for example '2.3'. This + string will be appended to the Python interpreter canonical + name. + BUILD_CFLAGS + append to CFLAGS during build but not in configure phase + BUILD_FCFLAGS + append to FCFLAGS during build but not in configure phase + BUILD_LDFLAGS + append to LDFLAGS during build but not in configure phase + BUILD_LIBS append to LIBS during build but not in configure phase + BUILD_MPI_C_LIB + append to MPI_C_LIB during build but not in configure phase + BUILD_MPI_FC_LIB + append to MPI_FC_LIB during build but not in configure phase + BUILD_CC replace CC with expansion of $BUILD_CC during build but not in + configure phase + BUILD_CXX replace CXX with expansion of $BUILD_CXX during build but not in + configure phase + BUILD_FC replace FC with expansion of $BUILD_FC during build but not in + configure phase + BUILD_F77 replace F77 with expansion of $BUILD_F77 during build but not in + configure phase + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to <https://mpimet.mpg.de/cdi>. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +cdi configure 2.2.0 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_compile + +# ac_fn_fc_try_run LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_fc_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_run + +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_link + +# ac_fn_f77_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_f77_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_f77_try_compile + +# ac_fn_f77_try_run LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_f77_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_f77_try_run + +# ac_fn_mv_obj LINENO FROM TO +# --------------------------- +# Rename FROM.$ac_ext to TO.$ac_ext, and return whether this succeeded. +acx_fn_mv_obj () +{ +as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + acx_path_from=`echo "$2" | sed -e 's!/\{0,1\}[^/]*$!!'` + test -z "$acx_path_from" && unset acx_path_from + acx_fn_from=`echo "$2" | sed -e 's@^.*/@@'` + acx_path_to=`echo "$3" | sed -e 's!/\{0,1\}[^/]*$!!'` + test -z "$acx_path_to" && unset acx_path_to + acx_fn_to=`echo "$3" | sed -e 's@^.*/@@'` + if expr "$ac_compile" : '.*/libtool --mode=compile' >/dev/null; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: Renaming object file $2.$ac_objext to $3.$ac_objext." >&5; } >&5 + (sed 's@\(pic_object='"'\)"'\(\(.libs/\)\{0,1\}\)'"$acx_fn_from"'\.o'"'"'@\1\2'"$acx_fn_to"'.o'"'"'@' "$2.$ac_objext" >"$3.$ac_objext" && rm "$2.$ac_objext" && if test -f "$2.$OBJEXT" ; then mv "$2.$OBJEXT" "$3.$OBJEXT" ; fi && if test -f "${acx_path_from+$acx_path_from/}.libs/$acx_fn_from.$OBJEXT" ; then as_dir="${acx_path_to-.}/.libs" as_fn_mkdir_p ; mv "${acx_path_from+$acx_path_from/}.libs/$acx_fn_from.$OBJEXT" "${acx_path_to+$acx_path_to/}.libs/$acx_fn_to.$OBJEXT" ; fi) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: Renaming object file $2.$ac_objext to $3.$ac_objext." >&5; } >&5 + (mv "$2.$ac_objext" "$3.$ac_objext") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_status +} # acx_fn_mv_obj + +# ac_fn_f77_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_f77_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_f77_try_link + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case <limits.h> declares $2. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 <conftest.val; ac_retval=0 +else + ac_retval=1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.val + + fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_compute_int +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by cdi $as_me 2.2.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +cat >>confdefs.h <<_ACEOF +#define CDI "$PACKAGE_VERSION" +_ACEOF + + +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + +am__api_version='1.16' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` + +if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='cdi' + VERSION='2.2.0' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <https://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +rm -rf conftest.dSYM # needed when configured on MacOS with CFLAGS='-g' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if ${ac_cv_prog_cc_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdbool.h> +#include <stdlib.h> +#include <wchar.h> +#include <stdio.h> + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c99" != xno; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C compiler does not support ISO C99 +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' +am__doit: + @echo this is the am__doit target >confinc.out +.PHONY: am__doit +END +am__include="#" +am__quote= +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : + ;; +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +acx_prog_cc_posix_version_value=200112 + acx_prog_cc_posix_version_print="POSIX.1-2001" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking For conformance to ${acx_prog_cc_posix_version_print}." >&5 +$as_echo_n "checking For conformance to ${acx_prog_cc_posix_version_print}.... " >&6; } +if ${acx_cv_cc_posix_support2001+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <unistd.h> +int +main () +{ + int n[(_POSIX_VERSION >= ${acx_prog_cc_posix_version_value}L) * 2 - 1]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + acx_cv_cc_posix_support2001=yes +else + acx_cv_cc_posix_support2001=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_posix_support2001" >&5 +$as_echo "$acx_cv_cc_posix_support2001" >&6; } + if test "x$acx_cv_cc_posix_support2001" = xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: It seems your system does not define _POSIX_VERSION to a value +greater-or-equal ${acx_prog_cc_posix_version_value}. This is typically the case when the +compiler is instructed to make ISO C features available only, +e.g. when using gcc -std=c99" >&5 +$as_echo "$as_me: It seems your system does not define _POSIX_VERSION to a value +greater-or-equal ${acx_prog_cc_posix_version_value}. This is typically the case when the +compiler is instructed to make ISO C features available only, +e.g. when using gcc -std=c99" >&6;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "${acx_prog_cc_posix_version_print} profile required +See \`config.log' for more details" "$LINENO" 5; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + +# Check whether --enable-mpi was given. +if test "${enable_mpi+set}" = set; then : + enableval=$enable_mpi; test "x$enableval" != xno && enable_mpi=yes +else + enable_mpi=no +fi + + +# Check whether --enable-iso-c-interface was given. +if test "${enable_iso_c_interface+set}" = set; then : + enableval=$enable_iso_c_interface; test "x$enableval" != xno && enable_iso_c_interface=yes +else + enable_iso_c_interface=no +fi + + if test "x$enable_iso_c_interface" = xyes; then + ENABLE_ISOC_INTERFACE_TRUE= + ENABLE_ISOC_INTERFACE_FALSE='#' +else + ENABLE_ISOC_INTERFACE_TRUE='#' + ENABLE_ISOC_INTERFACE_FALSE= +fi + + +# Check whether --enable-cf-interface was given. +if test "${enable_cf_interface+set}" = set; then : + enableval=$enable_cf_interface; if test "x$enableval" != xno && test "x$enableval" != xauto; then : + enable_cf_interface=yes +fi +else + enable_cf_interface=auto +fi + +if test "x${enable_mpi}${enable_cf_interface}" = xnoauto; then : + enable_cf_interface=no +fi + +if test "x$enable_iso_c_interface" = xyes || \ + test "x$enable_cf_interface" != xno; then + if test "x$FC" != xno; then + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$FC" && break + done +fi +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_FC" && break +done + + if test "x$ac_ct_FC" = x; then + FC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FC=$ac_ct_FC + fi +fi + + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program conftest +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_fc_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + FCFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF + program conftest + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_g=yes +else + ac_cv_prog_fc_g=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then + FCFLAGS=$ac_save_FCFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi +else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi +fi + +if test $ac_compiler_gnu = yes; then + GFC=yes +else + GFC= +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + test -z $FC 2>/dev/null && FC=no + +if test "x$FC" != xno; then : + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=f90 +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f90=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program conftest + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f90=$ac_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest.$ac_objext conftest.f90 +ac_fcflags_srcext=$ac_fcflags_srcext_save + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } +if test "x$ac_cv_fc_srcext_f90" = xunknown; then + FC=no +else + ac_fc_srcext=f90 + if test "x$ac_cv_fc_srcext_f90" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f90="" + else + ac_fcflags_srcext=$ac_cv_fc_srcext_f90 + FCFLAGS_f90=$ac_cv_fc_srcext_f90 + fi + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + if test "x$FC" != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran compiler works" >&5 +$as_echo_n "checking whether the Fortran compiler works... " >&6; } +if ${acx_cv_fc_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_fc_works=no + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$cross_compiling" = yes; then : + acx_cv_fc_works=yes +else + cat > conftest.$ac_ext <<_ACEOF + program conftest + + end +_ACEOF +if ac_fn_fc_try_run "$LINENO"; then : + acx_cv_fc_works=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_fc_works" >&5 +$as_echo "$acx_cv_fc_works" >&6; } + if test "x$acx_cv_fc_works" = xno; then : + FC=no +fi +fi + if test "x$FC" != xno; then : + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + + unset acx_sl_cv_fc_mod_path_flag_fc + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flag to alter module search path" >&5 +$as_echo_n "checking for flag to alter module search path... " >&6; } +if ${acx_sl_cv_fc_mod_path_flag_fc+:} false; then : + $as_echo_n "(cached) " >&6 +else + mkdir conftestdir + cd conftestdir + cat > conftest.$ac_ext <<_ACEOF + module cnftst + implicit none + integer, public :: i + end module cnftst +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + +else + as_fn_error $? "Cannot compile fortran modules" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cd .. + for i in -I -M -module -p; do + FCFLAGS_save=$FCFLAGS + FCFLAGS="$FCFLAGS ${i}conftestdir" + cat > conftest.$ac_ext <<_ACEOF + program conftest + use cnftst + implicit none + i = 0 + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + acx_sl_cv_fc_mod_path_flag_fc=$i ; FCFLAGS=$FCFLAGS_save ; break +else + : +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + FCFLAGS=$FCFLAGS_save + done + FCFLAGS=$FCFLAGS_save + rm -rf conftestdir + if ${acx_sl_cv_fc_mod_path_flag_fc+:} false; then : + : +else + FC_MOD_FLAG=-I +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_sl_cv_fc_mod_path_flag_fc" >&5 +$as_echo "$acx_sl_cv_fc_mod_path_flag_fc" >&6; } + FC_MOD_FLAG=$acx_sl_cv_fc_mod_path_flag_fc + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler flag needed to specify search paths for the \"INCLUDE\" statement" >&5 +$as_echo_n "checking for Fortran compiler flag needed to specify search paths for the \"INCLUDE\" statement... " >&6; } +if ${acx_cv_fc_ftn_include_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_fc_ftn_include_flag=unknown + as_dir=conftest.dir; as_fn_mkdir_p + cat > conftest.$ac_ext <<_ACEOF + program conftest + + end +_ACEOF + mv conftest.$ac_ext conftest.dir/conftest.inc + cat > conftest.$ac_ext <<_ACEOF + include "conftest.inc" +_ACEOF + acx_save_FCFLAGS=$FCFLAGS + for acx_flag in -I '-I '; do + FCFLAGS="$acx_save_FCFLAGS ${acx_flag}conftest.dir" + if ac_fn_fc_try_link "$LINENO"; then : + acx_cv_fc_ftn_include_flag=$acx_flag +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + test "x$acx_cv_fc_ftn_include_flag" != xunknown && break + done + FCFLAGS=$acx_save_FCFLAGS + rm -rf conftest.$ac_ext conftest.dir +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_fc_ftn_include_flag" >&5 +$as_echo "$acx_cv_fc_ftn_include_flag" >&6; } + if test "x$acx_cv_fc_ftn_include_flag" = xunknown; then : + FC_OPTINC=-I +else + FC_OPTINC=$acx_cv_fc_ftn_include_flag + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conftest_module module file name" >&5 +$as_echo_n "checking for conftest_module module file name... " >&6; } +if ${acx_cv_fc_mod_name+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + cat > conftest.$ac_ext <<_ACEOF + module conftest_module + implicit none + integer :: i + end module conftest_module +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + while :; do + acx_cv_fc_mod_name= + if test -n "conftest_module.$FCMODEXT" -a -f "conftest_module.$FCMODEXT"; then : + acx_cv_fc_mod_name="conftest_module.$FCMODEXT" ; break +fi + if test -n "conftest_module.mod" -a -f "conftest_module.mod"; then : + acx_cv_fc_mod_name="conftest_module.mod" ; break +fi + if test -n "conftest_module.MOD" -a -f "conftest_module.MOD"; then : + acx_cv_fc_mod_name="conftest_module.MOD" ; break +fi + if test -n "conftest_module.M" -a -f "conftest_module.M"; then : + acx_cv_fc_mod_name="conftest_module.M" ; break +fi + if test -n "CONFTEST_MODULE.MOD" -a -f "CONFTEST_MODULE.MOD"; then : + acx_cv_fc_mod_name="CONFTEST_MODULE.MOD" ; break +fi + if test -n "CONFTEST_MODULE.mod" -a -f "CONFTEST_MODULE.mod"; then : + acx_cv_fc_mod_name="CONFTEST_MODULE.mod" ; break +fi + + break + done + rm -f conftest_module* CONFTEST_MODULE* + if expr "$ac_compile" : '.*/libtool --mode=compile' >/dev/null; then : + if test -n "$objdir"; then : + rm -f "$objdir"/conftest_module* "$objdir"/CONFTEST_MODULE* +fi +fi + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_fc_mod_name" >&5 +$as_echo "$acx_cv_fc_mod_name" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of module files" >&5 +$as_echo_n "checking for suffix of module files... " >&6; } + ac_fc_mod_uppercase=no + case $acx_cv_fc_mod_name in #( + conftest_module.$FCMODEXT) : + : ;; #( + CONFTEST_MODULE.$FCMODEXT) : + ac_fc_mod_uppercase=yes ;; #( + conftest_module.mod) : + FCMODEXT=mod ;; #( + conftest_module.MOD) : + FCMODEXT=MOD ;; #( + conftest_module.M) : + FCMODEXT=M ;; #( + CONFTEST_MODULE.MOD) : + FCMODEXT=MOD ; ac_fc_mod_uppercase=yes ;; #( + CONFTEST_MODULE.mod) : + FCMODEXT=mod ; ac_fc_mod_uppercase=yes ;; #( + *) : + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FCMODEXT-not found}" >&5 +$as_echo "${FCMODEXT-not found}" >&6; } + ${FCMODEXT+:} false + if test $ac_fc_mod_uppercase = yes; then : + FCMODCASE=uc + { $as_echo "$as_me:${as_lineno-$LINENO}: Fortran module filenames are uppercase." >&5 +$as_echo "$as_me: Fortran module filenames are uppercase." >&6;} +else + FCMODCASE=lc +fi + + + + saved_ac_fc_srcext=$ac_fc_srcext + ac_fc_srcext='F90' + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_fc_pp_define_srcext_save=$ac_fc_srcext + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to define symbols for preprocessed Fortran" >&5 +$as_echo_n "checking how to define symbols for preprocessed Fortran... " >&6; } +if ${ac_cv_fc_pp_define+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fc_pp_define_srcext_save=$ac_fc_srcext +ac_cv_fc_pp_define=unknown +ac_fc_pp_define_FCFLAGS_save=$FCFLAGS +for ac_flag in -D -WF,-D -Wp,-D -Wc,-D +do + FCFLAGS="$ac_fc_pp_define_FCFLAGS_save ${ac_flag}FOOBAR ${ac_flag}ZORK=42" + cat > conftest.$ac_ext <<_ACEOF + program conftest + +#ifndef FOOBAR + choke me +#endif +#if ZORK != 42 + choke me +#endif + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_pp_define=$ac_flag +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test x"$ac_cv_fc_pp_define" != xunknown && break +done +FCFLAGS=$ac_fc_pp_define_FCFLAGS_save + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_pp_define" >&5 +$as_echo "$ac_cv_fc_pp_define" >&6; } +ac_fc_srcext=$ac_fc_pp_define_srcext_save +if test "x$ac_cv_fc_pp_define" = xunknown; then + FC_DEFINE= + FC_DEFINE=-D +else + FC_DEFINE=$ac_cv_fc_pp_define + +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ac_fc_srcext=$saved_ac_fc_srcext + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + fi +else + FC=no +fi + if test "x$FCMODCASE" = xuc; then + FC_MOD_UPPERCASE_TRUE= + FC_MOD_UPPERCASE_FALSE='#' +else + FC_MOD_UPPERCASE_TRUE='#' + FC_MOD_UPPERCASE_FALSE= +fi + +if test "x$enable_iso_c_interface" = xyes; then : + if test "x$FC" != xno; then : + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler can handle complex CHARACTER interoperability" >&5 +$as_echo_n "checking if Fortran compiler can handle complex CHARACTER interoperability... " >&6; } + cat > conftest.$ac_ext <<_ACEOF +module conftest_mod + use iso_c_binding + implicit none + private + public :: errstr +contains + function errstr(errno) + integer, intent(in) :: errno + interface + function strerror(errno) bind(c, name='strerror') + import :: c_int, c_ptr + integer(c_int), value, intent(in) :: errno + type(c_ptr) :: strerror + end function strerror + function strlen(s) bind(c, name='strlen') + import :: c_ptr, c_size_t + type(c_ptr), value, intent(in) :: s + integer(c_size_t) :: strlen + end function strlen + end interface + type(c_ptr) :: cptr + character(kind=c_char), dimension(:), pointer :: buf + character(len=:), pointer :: errstr + integer :: i, rv_shape(1) + + cptr = strerror(int(errno, c_int)) + rv_shape(1) = int(strlen(cptr)) + call c_f_pointer(cptr, buf, rv_shape) + allocate(character(rv_shape(1)) :: errstr) + do i = 1, rv_shape(1) + errstr(i:i) = buf(i) + end do + end function errstr +end module conftest_mod + +program conftest + use conftest_mod, only: errstr + implicit none + character(len=:), pointer :: msg + msg => errstr(42) + write (0, '(a)') msg +end program conftest +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +FC=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + rm -f conftest_mod* CONFTEST_MOD* + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + if test "x$FC" = xno; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "the Fortran 2003 interface is requested but the Fortran compiler is disabled, missing or lacks the required features +See \`config.log' for more details" "$LINENO" 5; } +fi +fi + if test "x$FC" != xno; then + BUILD_FC_PROGRAMS_TRUE= + BUILD_FC_PROGRAMS_FALSE='#' +else + BUILD_FC_PROGRAMS_TRUE='#' + BUILD_FC_PROGRAMS_FALSE= +fi + + +if test "x$enable_cf_interface" != xno; then + if test -n "$F77" && test "x$F77" != xno; then : + requested_F77=yes +else + requested_F77=no +fi + if test "x$FC" = xno || test "x$requested_F77" = xyes; then + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 +$as_echo "$F77" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 +$as_echo "$ac_ct_F77" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } +if ${ac_cv_f77_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +if ac_fn_f77_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 +$as_echo "$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 +$as_echo_n "checking whether $F77 accepts -g... " >&6; } +if ${ac_cv_prog_f77_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + FFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_f77_try_compile "$LINENO"; then : + ac_cv_prog_f77_g=yes +else + ac_cv_prog_f77_g=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 +$as_echo "$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +if test $ac_compiler_gnu = yes; then + G77=yes +else + G77= +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + test -z $F77 2>/dev/null && F77=no + +if test "x$F77" != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler works" >&5 +$as_echo_n "checking whether the Fortran 77 compiler works... " >&6; } +if ${acx_cv_f77_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_f77_works=no + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + if test "$cross_compiling" = yes; then : + acx_cv_f77_works=yes +else + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_f77_try_run "$LINENO"; then : + acx_cv_f77_works=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_f77_works" >&5 +$as_echo "$acx_cv_f77_works" >&6; } + if test "x$acx_cv_f77_works" = xno; then : + F77=no +fi +fi + else + F77=no + fi + if test "x$F77" = xno && test "x$requested_F77" = xyes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "the explicitly requested Fortran 77 compiler is missing or lacks the required features +See \`config.log' for more details" "$LINENO" 5; } +fi + { requested_F77=; unset requested_F77;} +else + F77=no +fi +if test "x$enable_cf_interface" != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C preprocessor flags for Fortran calling convention cfortran.h" >&5 +$as_echo_n "checking C preprocessor flags for Fortran calling convention cfortran.h... " >&6; } +if ${acx_cv_cf_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_cf_flag='' + for macro in pgiFortran NAGf90Fortran f2cFortran hpuxFortran apolloFortran sunFortran IBMR2Fortran CRAYFortran PATHSCALE_COMPILER gFortran mipsFortran DECFortran vmsFortran CONVEXFortran PowerStationFortran AbsoftUNIXFortran AbsoftProFortran SXFortran +do : + acx_temp=`echo "$CPPFLAGS $CFLAGS" | sed -n 's/^\(.* \)*-D\('"$macro"'\)\( .*\)*$/\2/;t print +b +: print +p'` + if test x"$acx_temp" != x; then : + if test x"$acx_cv_cf_flag" = x; then : + acx_cv_cf_flag="$acx_temp (user-specified)" +else + acx_failure_msg="multiple specification of cfortran.h flags: "`echo "$acx_cv_cf_flag" | sed 's/ (user-specified)$//'`" $acx_temp" + acx_cv_cf_flag='error' + break +fi +fi +done + if test x"$acx_cv_cf_flag" = x; then : + if test -n "$FC" -a X"$FC" != Xno; then : + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + + + case $host in #( + x86_64-*-linux-*|i*86-*-linux-*|*-apple-darwin*|ia64-*-linux-*|x86_64-*-freebsd*|i*86-*-freebsd*) : + acx_temp=`$FC -V 2>&1 | sed -n 1,5p` + if echo "$acx_temp" | grep '^Copyright.*\(The Portland Group\|NVIDIA CORPORATION\)' >/dev/null; then : + acx_cv_fc_cf_flag=-DgFortran +elif echo "$acx_temp" | grep '^NAG Fortran Compiler Release' >/dev/null; then : + acx_cv_fc_cf_flag=-DNAGf90Fortran +elif echo "$acx_temp" | grep '^Intel(R) Fortran.*Compiler' >/dev/null; then : + acx_cv_fc_cf_flag=-DgFortran +elif echo "$acx_temp" | grep '^Cray Fortran' >/dev/null; then : + acx_cv_fc_cf_flag=-DgFortran +elif acx_temp=`$FC --version 2>&1 | sed -n 1,5p` \ + && echo $acx_temp | grep '^GNU Fortran' >/dev/null; then : + if echo $acx_temp | grep g77 >/dev/null; then : + acx_cv_fc_cf_flag=-Dg77Fortran +else + if echo "$FCFLAGS" | grep '^\(.* \)*-ff2c\( .*\)*$' >/dev/null; then : + acx_cv_fc_cf_flag=-Df2cFortran +else + acx_cv_fc_cf_flag=-DgFortran +fi +fi +elif echo $acx_temp | grep '^G95' >/dev/null; then : + acx_cv_fc_cf_flag=-DNAGf90Fortran +elif $FC -v 2>&1 | sed -n 1,5p | grep '^f2c' >/dev/null; then : + acx_cv_fc_cf_flag=-Df2cFortran +fi ;; #( + powerpc64-*-linux-*|powerpc-*-linux-*) : + if $FC -qversion 2>&1 | sed -n 1,5p | grep '^IBM XL Fortran' >/dev/null; then : + acx_cv_fc_cf_flag=-DIBMR2Fortran +fi ;; #( + *-ibm-aix*) : + if $CC -qversion 2>&1 | grep '^IBM XL C' >/dev/null; then : + +else + acx_cv_fc_cf_flag=-DIBMR2Fortran +fi + ;; #( + *-*-hpux*) : + acx_cv_fc_cf_flag=-DhpuxFortran ;; #( + sx*-*-*|es*-*-*) : + acx_cv_fc_cf_flag=-DSXFortran ;; #( + *) : + ;; +esac + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + if test -n "$F77" -a X"$F77" != Xno; then : + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + + + + case $host in #( + x86_64-*-linux-*|i*86-*-linux-*|*-apple-darwin*|ia64-*-linux-*|x86_64-*-freebsd*|i*86-*-freebsd*) : + acx_temp=`$F77 -V 2>&1 | sed -n 1,5p` + if echo "$acx_temp" | grep '^Copyright.*\(The Portland Group\|NVIDIA CORPORATION\)' >/dev/null; then : + acx_cv_f77_cf_flag=-DgFortran +elif echo "$acx_temp" | grep '^NAG Fortran Compiler Release' >/dev/null; then : + acx_cv_f77_cf_flag=-DNAGf90Fortran +elif echo "$acx_temp" | grep '^Intel(R) Fortran.*Compiler' >/dev/null; then : + acx_cv_f77_cf_flag=-DgFortran +elif echo "$acx_temp" | grep '^Cray Fortran' >/dev/null; then : + acx_cv_f77_cf_flag=-DgFortran +elif acx_temp=`$F77 --version 2>&1 | sed -n 1,5p` \ + && echo $acx_temp | grep '^GNU Fortran' >/dev/null; then : + if echo $acx_temp | grep g77 >/dev/null; then : + acx_cv_f77_cf_flag=-Dg77Fortran +else + if echo "$FFLAGS" | grep '^\(.* \)*-ff2c\( .*\)*$' >/dev/null; then : + acx_cv_f77_cf_flag=-Df2cFortran +else + acx_cv_f77_cf_flag=-DgFortran +fi +fi +elif echo $acx_temp | grep '^G95' >/dev/null; then : + acx_cv_f77_cf_flag=-DNAGf90Fortran +elif $F77 -v 2>&1 | sed -n 1,5p | grep '^f2c' >/dev/null; then : + acx_cv_f77_cf_flag=-Df2cFortran +fi ;; #( + powerpc64-*-linux-*|powerpc-*-linux-*) : + if $F77 -qversion 2>&1 | sed -n 1,5p | grep '^IBM XL Fortran' >/dev/null; then : + acx_cv_f77_cf_flag=-DIBMR2Fortran +fi ;; #( + *-ibm-aix*) : + if $CC -qversion 2>&1 | grep '^IBM XL C' >/dev/null; then : + +else + acx_cv_f77_cf_flag=-DIBMR2Fortran +fi + ;; #( + *-*-hpux*) : + acx_cv_f77_cf_flag=-DhpuxFortran ;; #( + sx*-*-*|es*-*-*) : + acx_cv_f77_cf_flag=-DSXFortran ;; #( + *) : + ;; +esac + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + if test -z "$FC" -o X"$FC" != Xno; then : + acx_cv_cf_flag="$acx_cv_fc_cf_flag (probed)" +elif test -z "$F77" -o X"$F77" != Xno; then : + acx_cv_cf_flag="$acx_cv_f77_cf_flag (probed)" +else + if test x"$acx_cv_f77_cf_flag" = x"$acx_cv_fc_cf_flag"; then : + acx_cv_cf_flag="$acx_cv_f77_cf_flag (probed)" +else + acx_failure_msg="cfortran.h flag for $F77 does not match the flag for $FC. +Did you configure compatible compilers?" + acx_cv_cf_flag='error' +fi +fi +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cf_flag" >&5 +$as_echo "$acx_cv_cf_flag" >&6; } + if test x"$acx_cv_cf_flag" = xerror; then : + as_fn_error $? "$acx_failure_msg" "$LINENO" 5 +fi + if echo "$acx_cv_cf_flag" | grep ' (probed)$' >/dev/null; then : + CPPFLAGS="${CPPFLAGS+$CPPFLAGS }"`echo "$acx_cv_cf_flag" | sed 's/ (probed)$//'` +fi + + case $host in #( + *-ibm-aix*|powerpc64-*-linux-*|powerpc-*-linux-*) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Dappendus needs to be added to CPPFLAGS for cfortran.h" >&5 +$as_echo_n "checking if -Dappendus needs to be added to CPPFLAGS for cfortran.h... " >&6; } + if $CC -qversion 2>&1 | sed -n 1,5p | grep '^IBM XL C' >/dev/null; then : + acx_temp_qextname_f77flags=`echo "$FFLAGS" | sed -n '/-qextname/{ s/^\(.* \)*-qextname\( .*\)*$/-qextname/;p;}'` + acx_temp_qextname_fcflags=`echo "$FCFLAGS" | sed -n '/-qextname/{ s/^\(.* \)*-qextname\( .*\)*$/-qextname/;p;}'` + + if $FC -qversion 2>&1 | grep '^IBM XL Fortran' >/dev/null; then : + +else + acx_temp_qextname_fcflags=-qextname +fi + case x"$acx_temp_qextname_fcflags$acx_temp_qextname_f77flags" in #( + x-qextname) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 +$as_echo "error" >&6; } + acx_failure_msg="option -qextname must be provided consistently to F77 and FC" + as_fn_error $? "$acx_failure_msg" "$LINENO" 5 ;; #( + x-qextname-qextname) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CPPFLAGS="${CPPFLAGS+$CPPFLAGS }-Dappendus" ;; #( + *) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; +esac + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi ;; #( + *) : + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C externals constructed with cfortran.h work" >&5 +$as_echo_n "checking if C externals constructed with cfortran.h work... " >&6; } +if ${acx_cv_cfortran_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_cfortran_works=no + save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-I$srcdir/src $CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "cfortran.h" +#include <math.h> +#include <stdio.h> +#include <stdlib.h> + +PROTOCCALLSFFUN1(FLOAT,CFTSTF,cftstf,FLOAT) +#define conftest_F(v) \ + CCALLSFFUN1(CFTSTF,cftstf,FLOAT,(v)); + +static float +cftstC(int i, float v, int *p, float *q) +{ + float f; + *p = (int)roundf(v * i); + *q = f = conftest_F(v * i); + return f; +} + +FCALLSCFUN4(FLOAT,cftstC,CFTSTC,cftstc,INT,FLOAT,PINT,PFLOAT) + +/* test string returns */ +static const char * +conftest_str_C(void) +{ + static const char msg[100] = "AAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + return msg; +} + +FCALLSCFUN0(STRING,conftest_str_C,CHTST,chtst) + +/* This function is required simply because some Fortran compilers + * won't stop with exit code n when encountering STOP n */ +static void +errExit(void) +{ + exit(1); +} + +FCALLSCSUB0(errExit,ERR_EXIT,err_exit) + + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + acx_fn_mv_obj "$LINENO" conftest conftest_c + if test -n "$FC" -a X"$FC" != Xno; then : + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + cat > conftest.$ac_ext <<_ACEOF + MODULE conftest_data + IMPLICIT NONE + PRIVATE + REAL :: ri + PUBLIC :: ri + END MODULE conftest_data + + FUNCTION cftstf(v) RESULT(r) + USE conftest_data, ONLY: ri + REAL, INTENT(in) :: v + REAL :: r + r = v * 100.0 + ri = 1.0 / v + END FUNCTION cftstf +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + acx_fn_mv_obj "$LINENO" conftest conftest_f + save_LIBS=$LIBS + LIBS="conftest_c.$ac_objext conftest_f.$ac_objext $LIBS" + case $FC_FPP_FLAG in #( + -x\ f??-cpp-input) : + LIBS="-x none $LIBS" ;; #( + *) : + ;; +esac + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: Skipping run test for cfortran.h in cross-compilation mode," >&5 +$as_echo "$as_me: Skipping run test for cfortran.h in cross-compilation mode," >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: cfortran.h link test succeeded for $FC." >&5 +$as_echo "$as_me: cfortran.h link test succeeded for $FC." >&6;} + acx_cv_cfortran_works=yes +else + cat > conftest.$ac_ext <<_ACEOF + program conftest + USE conftest_data, ONLY: ri + IMPLICIT NONE + INTERFACE + FUNCTION cftstc(i, v, p, q) RESULT(f) + INTEGER, INTENT(in) :: i + REAL, INTENT(in) :: v + INTEGER, INTENT(out) :: p + REAL, INTENT(out) :: q + REAL :: f + END FUNCTION cftstc + FUNCTION chtst() result(s) + CHARACTER(99) :: s + END FUNCTION chtst + END INTERFACE + REAL, PARAMETER :: eps = 10e-6 + REAL :: foo, boo, too + INTEGER :: bar, baz, i + CHARACTER(99) :: aaaaaa + bar = 5 + foo = 0.3 + too = cftstc(bar, foo, baz, boo) + IF (ABS(baz - NINT(bar * foo)) /= 0) THEN + WRITE (0, '(2(a,i0))') "error checking, when baz, baz=", baz, & + ", NINT(bar * foo) =", NINT(bar * foo) + FLUSH(0) + CALL err_exit + END IF + IF (ABS((ri - 1.0 / (bar * foo)) / ABS(ri)) > eps) THEN + WRITE (0, '(2(a,g24.15))') "error checking ri, ri=", ri, ", 1.0 / & + &(bar * foo) = ", 1.0 / (bar * foo) + FLUSH(0) + CALL err_exit + END IF + IF (ABS((boo - (bar * foo * 100.0))/ABS(boo)) > eps) THEN + WRITE (0, '(2(a,g24.15))') "error checking boo, boo=", boo, & + ", bar * foo * 100.0 = ", bar * foo * 100.0 + FLUSH(0) + CALL err_exit + END IF + IF (too /= boo) THEN + WRITE (0, '(2(a,g24.15))') "error checking too vs. boo, too=", too, & + ", boo = ", boo + FLUSH(0) + CALL err_exit + END IF + aaaaaa = chtst() + DO i = 1, 99 + IF (aaaaaa(i:i) /= 'A') THEN + WRITE (0, '(a,i0,a)') "error checking aaaaaa(", i, ")=", & + aaaaaa(i:i) + FLUSH(0) + CALL err_exit + END IF + END DO + end +_ACEOF +if ac_fn_fc_try_run "$LINENO"; then : + acx_cv_cfortran_works=yes +else + acx_cv_cfortran_works="error" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm -f "conftest_f.$ac_objext" "conftest_f.$OBJEXT" + rm -f conftest_data* CONFTEST_DATA* 2>/dev/null + LIBS=$save_LIBS +else + acx_cv_cfortran_works="error compiling Fortran subroutine" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + acx_cv_cfortran_works=${acx_cv_cfortran_works-yes} +fi + if test -n "$F77" -a X"$F77" != Xno -a \( x"$acx_cv_cfortran_works" = xyes -o -z "$FC" -o X"$FC" = Xno \); then : + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + cat > conftest.$ac_ext <<_ACEOF + REAL FUNCTION CFTSTF(v) + REAL RI + COMMON /CFTSTD/ RI + REAL V + REAL R + CFTSTF = V * 100.0 + RI = 1.0 / V + END FUNCTION CFTSTF +_ACEOF +if ac_fn_f77_try_compile "$LINENO"; then : + acx_fn_mv_obj "$LINENO" conftest conftest_f + save_LIBS=$LIBS + LIBS="conftest_c.$ac_objext conftest_f.$ac_objext $LIBS" + case $FC_FPP_FLAG in #( + -x\ f??-cpp-input) : + LIBS="-x none $LIBS" ;; #( + *) : + ;; +esac + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: Skipping run test for cfortran.h in cross-compilation mode," >&5 +$as_echo "$as_me: Skipping run test for cfortran.h in cross-compilation mode," >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: cfortran.h link test succeeded for $F77." >&5 +$as_echo "$as_me: cfortran.h link test succeeded for $F77." >&6;} + acx_cv_cfortran_works=yes +else + cat > conftest.$ac_ext <<_ACEOF + program main + REAL RI + COMMON /CFTSTD/ RI + REAL EPS + PARAMETER(EPS=10E-6) + REAL FOO, BOO, TOO + INTEGER BAR, BAZ, I + CHARACTER(99) AAAAAA + EXTERNAL CFTSTC, CFTSTF, CHTST, ERR_EXIT + REAL CFTSTC, CFTSTF + CHARACTER(99) CHTST + BAR = 5 + FOO = 0.3 + TOO = CFTSTC(BAR, FOO, BAZ, BOO) + IF (ABS(BAZ - NINT(BAR * FOO)) /= 0) THEN + WRITE (0, '(2(A,I0))') "ERROR CHECKING, WHEN BAZ, BAZ=", BAZ, + & ", NINT(BAR * FOO) =", NINT(BAR * FOO) + CALL ERR_EXIT + END IF + IF (ABS((RI - 1.0 / (BAR * FOO)) / ABS(RI)) > EPS) THEN + WRITE (0, '(2(A,F24.15))') "ERROR CHECKING RI, RI=", RI, ", + & 1.0 / (BAR * FOO) = ", 1.0 / (BAR * FOO) + CALL err_exit + END IF + IF (ABS((BOO - (BAR * FOO * 100.0))/ABS(BOO)) > EPS) THEN + WRITE (0, '(2(A,F24.15))') "ERROR CHECKING BOO, BOO=", BOO, + & ", BAR * FOO * 100.0 = ", BAR * FOO * 100.0 + CALL ERR_EXIT + END IF + IF (TOO /= BOO) THEN + WRITE (0, '(2(A,F24.15))') "ERROR CHECKING TOO VS. BOO, TOO=", + & TOO, ", BOO = ", BOO + CALL ERR_EXIT + END IF + AAAAAA = CHTST() + DO i = 1, 99 + IF (AAAAAA(I:I) /= 'A') THEN + WRITE (0, '(A,I0,2A)') "ERROR CHECKING AAAAAA(", I, ")=", + & AAAAAA(I:I) + CALL ERR_EXIT + END IF + END DO + end +_ACEOF +if ac_fn_f77_try_run "$LINENO"; then : + acx_cv_cfortran_works=yes +else + acx_cv_cfortran_works="error" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm -f "conftest_f.$ac_objext" "conftest_f.$OBJEXT" + LIBS=$save_LIBS +else + acx_cv_cfortran_works="error compiling Fortran subroutine" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + rm -f "conftest_c.$ac_objext" "conftest_c.$OBJEXT" + +else + acx_cv_cfortran_works="compiling with cfortran.h failed" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + CPPFLAGS=$save_CPPFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cfortran_works" >&5 +$as_echo "$acx_cv_cfortran_works" >&6; } + case x"$acx_cv_cfortran_works" in #( + x"error") : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Linking/Running with C EXTERNAL built with cfortran.h does not work! +See \`config.log' for more details" "$LINENO" 5; } ;; #( + x"compiling with cfortran.h failed") : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Compilation with cfortran.h is not working! +See \`config.log' for more details" "$LINENO" 5; } ;; #( + x"error compiling Fortran subroutine") : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "compilation of simple Fortran source failed! +See \`config.log' for more details" "$LINENO" 5; } ;; #( + xyes) : + +$as_echo "#define HAVE_CF_INTERFACE 1" >>confdefs.h + ;; #( + *) : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Unexpected error when linking C and Fortran via cfortran.h! +See \`config.log' for more details" "$LINENO" 5; } ;; +esac + + if test "x$F77" != xno; then : + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler flag needed to specify search paths for the \"INCLUDE\" statement" >&5 +$as_echo_n "checking for Fortran 77 compiler flag needed to specify search paths for the \"INCLUDE\" statement... " >&6; } +if ${acx_cv_f77_ftn_include_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_f77_ftn_include_flag=unknown + as_dir=conftest.dir; as_fn_mkdir_p + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + mv conftest.$ac_ext conftest.dir/conftest.inc + cat > conftest.$ac_ext <<_ACEOF + include "conftest.inc" +_ACEOF + acx_save_FFLAGS=$FFLAGS + for acx_flag in -I '-I '; do + FFLAGS="$acx_save_FFLAGS ${acx_flag}conftest.dir" + if ac_fn_f77_try_link "$LINENO"; then : + acx_cv_f77_ftn_include_flag=$acx_flag +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + test "x$acx_cv_f77_ftn_include_flag" != xunknown && break + done + FFLAGS=$acx_save_FFLAGS + rm -rf conftest.$ac_ext conftest.dir +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_f77_ftn_include_flag" >&5 +$as_echo "$acx_cv_f77_ftn_include_flag" >&6; } + if test "x$acx_cv_f77_ftn_include_flag" = xunknown; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "unable to detect Fortran 77 compiler flag needed to specify search paths for the \"INCLUDE\" statement +See \`config.log' for more details" "$LINENO" 5; } +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "x$FC" != xno && test "x$acx_cv_f77_ftn_include_flag" != "x$FC_OPTINC"; then : + as_fn_error $? "Fortran and Fortran 77 compilers require different flags needed to specify search paths for the \"INCLUDE\" statements" "$LINENO" 5 +fi +fi + if test "x$FC" = xno && test "x$F77" = xno; then : + if test "x$enable_cf_interface" = xauto; then : + enable_cf_interface=no +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "the Fortran 77 interface is requested but both Fortran and Fortran 77 compilers are disabled, missing or lack the required features +See \`config.log' for more details" "$LINENO" 5; } +fi +fi +fi +if test "x$enable_cf_interface" = xauto; then : + enable_cf_interface=yes +fi + if test "x$enable_cf_interface" = xyes; then + ENABLE_CF_INTERFACE_TRUE= + ENABLE_CF_INTERFACE_FALSE='#' +else + ENABLE_CF_INTERFACE_TRUE='#' + ENABLE_CF_INTERFACE_FALSE= +fi + + +# Check whether --enable-ruby-interface was given. +if test "${enable_ruby_interface+set}" = set; then : + enableval=$enable_ruby_interface; test "x$enableval" != xno && enable_ruby_interface=yes +else + enable_ruby_interface=no +fi + + +# Check whether --enable-python-interface was given. +if test "${enable_python_interface+set}" = set; then : + enableval=$enable_python_interface; test "x$enableval" != xno && enable_python_interface=yes +else + enable_python_interface=no +fi + + +if test "x$enable_ruby_interface" = xyes || \ + test "x$enable_python_interface" = xyes; then + if test "x$CXX" != xno; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + test -z $CXX 2>/dev/null && CXX=no + +if test "x$CXX" != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 +$as_echo_n "checking whether the C++ compiler works... " >&6; } +if ${acx_cv_cxx_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_cxx_works=no + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + acx_cv_cxx_works=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cxx_works" >&5 +$as_echo "$acx_cv_cxx_works" >&6; } + if test "x$acx_cv_cxx_works" = xno; then : + CXX=no +fi +fi + fi + if test "x$CXX" = xno; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "either the Ruby or the Python interface is requested but the C++ compiler is disabled, missing or lacks the required features +See \`config.log' for more details" "$LINENO" 5; } +fi +else + CXX=no + if false; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + +fi + + + +# Check whether --enable-openmp was given. +if test "${enable_openmp+set}" = set; then : + enableval=$enable_openmp; test "x$enableval" != xno && enable_openmp=yes +else + enable_openmp=no +fi + + + OPENMP_CFLAGS= + + if test "$enable_openmp" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5 +$as_echo_n "checking for $CC option to support OpenMP... " >&6; } +if ${ac_cv_prog_c_openmp+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _OPENMP + choke me +#endif +#include <omp.h> +int main () { return omp_get_num_threads (); } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_c_openmp='none needed' +else + ac_cv_prog_c_openmp='unsupported' + for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ + -Popenmp --openmp; do + ac_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $ac_option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _OPENMP + choke me +#endif +#include <omp.h> +int main () { return omp_get_num_threads (); } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_c_openmp=$ac_option +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$ac_save_CFLAGS + if test "$ac_cv_prog_c_openmp" != unsupported; then + break + fi + done +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5 +$as_echo "$ac_cv_prog_c_openmp" >&6; } + case $ac_cv_prog_c_openmp in #( + "none needed" | unsupported) + ;; #( + *) + OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;; + esac + fi + + +if test "x$enable_openmp" = xno; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef _OPENMP + choke me +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + as_fn_error $? "OpenMP support is disabled but the compiler enables it by default: change CFLAGS to disable it" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +elif test "x$ac_cv_prog_c_openmp" = xunsupported; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot link C OpenMP programs +See \`config.log' for more details" "$LINENO" 5; } +elif test -n "$OPENMP_CFLAGS"; then : + as_fn_append CFLAGS " $OPENMP_CFLAGS" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: setting up libtool" >&5 +$as_echo "$as_me: setting up libtool" >&6;} +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.6' +macro_revision='2.4.6' + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# 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' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# 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*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 +fi + +LD=$lt_cv_path_LD +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # 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 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +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 + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 + +fi + +if test -n "$lt_cv_sys_max_cmd_len"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# 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 + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #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 + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +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 + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +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 + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# 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 + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && 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_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_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_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_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && 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" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + 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 + +fi + +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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +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|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +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 + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; 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-%%"` +} + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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 + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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" >&5 + $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 >&5 + # 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 >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $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 >&5 + 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 >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + 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 + +# 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$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + +func_stripname_cnf () +{ + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; + esac +} # func_stripname_cnf + + if test x"$enable_shared" != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking any compiler has problems building shared objects" >&5 +$as_echo_n "checking any compiler has problems building shared objects... " >&6; } +if ${acx_cv_disable_shared+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_disable_shared=no + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + $as_echo "$as_me:${as_lineno-$LINENO}: testing if $FC cannot build working shared objects" >&5 + case $host in #( + *-ibm-aix*) : + if $FC -G -v 2>&1 | grep ' -binitfini:poe_remote_main ' >/dev/null; then : + acx_cv_disable_shared=yes +fi ;; #( + x86_64-*-linux-*|i*86-*-linux-*|*-apple-darwin*|ia64-*-linux-*|x86_64-*-freebsd*|i*86-*-freebsd*) : + if $FC -V 2>&1 | grep '^Intel(R).*Fortran.*Compiler.*Version 15.0.[123]' >/dev/null; then : + case " $FCFLAGS $LDFLAGS " in #( + *\ -Qlocation,ld,*\ *) : + acx_cv_disable_shared=yes ;; #( + *) : + FCFLAGS="$FCFLAGS -Qlocation,ld,$ac_abs_confdir/util/icomp15" ;; +esac +fi ;; #( + *) : + ;; +esac + $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_disable_shared" >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + $as_echo "$as_me:${as_lineno-$LINENO}: testing if $F77 cannot build working shared objects" >&5 + case $host in #( + *-ibm-aix*) : + if $F77 -G -v 2>&1 | grep ' -binitfini:poe_remote_main ' >/dev/null; then : + acx_cv_disable_shared=yes +fi ;; #( + x86_64-*-linux-*|i*86-*-linux-*|*-apple-darwin*|ia64-*-linux-*|x86_64-*-freebsd*|i*86-*-freebsd*) : + if $F77 -V 2>&1 | grep '^Intel(R).*Fortran.*Compiler.*Version 15.0.[123]' >/dev/null; then : + case " $FFLAGS $LDFLAGS " in #( + *\ -Qlocation,ld,*\ *) : + acx_cv_disable_shared=yes ;; #( + *) : + FFLAGS="$FFLAGS -Qlocation,ld,$ac_abs_confdir/util/icomp15" ;; +esac +fi ;; #( + *) : + ;; +esac + $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_disable_shared" >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + $as_echo "$as_me:${as_lineno-$LINENO}: testing if $CC cannot build working shared objects" >&5 + case $host in #( + *-ibm-aix*) : + if $CC -G -v 2>&1 | grep ' -binitfini:poe_remote_main ' >/dev/null; then : + acx_cv_disable_shared=yes +fi ;; #( + x86_64-*-linux-*|i*86-*-linux-*|*-apple-darwin*|ia64-*-linux-*|x86_64-*-freebsd*|i*86-*-freebsd*) : + if $CC -V 2>&1 | grep '^Intel(R).*Fortran.*Compiler.*Version 15.0.[123]' >/dev/null; then : + case " $CFLAGS $LDFLAGS " in #( + *\ -Qlocation,ld,*\ *) : + acx_cv_disable_shared=yes ;; #( + *) : + CFLAGS="$CFLAGS -Qlocation,ld,$ac_abs_confdir/util/icomp15" ;; +esac +fi ;; #( + *) : + ;; +esac + $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_disable_shared" >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_disable_shared" >&5 +$as_echo "$acx_cv_disable_shared" >&6; } + if test x"$acx_cv_disable_shared" = xyes; then : + enable_shared=no +fi +fi + + + + +# Set options + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; 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 +else + pic_mode=yes +fi + + + + + + + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; 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 +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; 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 +else + enable_static=yes +fi + + + + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; 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 +else + enable_fast_install=yes +fi + + + + + + + + + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + 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 + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +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 + +func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + +# 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" + 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 +fi + +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" + 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 +fi + +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC=$CC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$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);}' + + + + + + + +# 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 + + + + + +# 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 +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* + +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* + + +## 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_prog_compiler_no_builtin_flag= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" ## 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\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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 + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test yes = "$GCC"; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + lt_prog_compiler_pic='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-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_prog_compiler_pic='-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 + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + 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_prog_compiler_pic='-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_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-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). + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-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_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed -n 1,5p` 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_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; #( + *NAG\ Fortran\ Compiler*) + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + *PGI\ Compilers\ and\ Tools*|*NVIDIA\ Compilers\ and\ Tools*|*Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## 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\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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 + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test yes = "$lt_cv_prog_compiler_pic_works"; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + 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>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test yes = "$lt_cv_prog_compiler_static_works"; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=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\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $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* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=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\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $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* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # 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'. + exclude_expsyms='_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. + 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 + + ld_shlibs=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 + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$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 + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec= + 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 + ld_shlibs=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 + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$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)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='$wl--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+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 + archive_cmds='$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... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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 + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$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' + archive_expsym_cmds='$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' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$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. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='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' + tmp_compiler_flags='$compiler_flags' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='$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 + whole_archive_flag_spec='$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 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' + tmp_compiler_flags='`echo $compiler_flags | sed -e '"'"'s/ -W[cl],-no-pie\b//g'"'"'`' ;; + 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 + whole_archive_flag_spec='$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' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed -n 1,5p` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='$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' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *NAG\ Fortran\ Compiler*) + tmp_sharedflag='-Wl,-shared' + tmp_compiler_flags='`echo $compiler_flags | sed -e '"'"'s/ -W[cl],-no-pie\b//g'"'"'`' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs '"$tmp_compiler_flags"' $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='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 '"$tmp_compiler_flags"' $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='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 + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$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 + ld_shlibs=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 + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=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 + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test no = "$ld_shlibs"; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$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. + hardcode_minus_L=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=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 + export_symbols_cmds='$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 + export_symbols_cmds='`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. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='$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. + hardcode_direct=no + hardcode_direct_absolute=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 + hardcode_direct=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 + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + 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 + + export_dynamic_flag_spec='$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. + always_export_symbols=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. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`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_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$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 + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$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. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`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_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='$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. + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + archive_expsym_cmds='$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. + archive_expsym_cmds="$archive_expsym_cmds"'~$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 + archive_expsym_cmds="$archive_expsym_cmds"'~$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 + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$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)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-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 + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # 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. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='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 + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=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. + archive_cmds='$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. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag=$_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 + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="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" + module_expsym_cmds="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" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=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*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test yes = "$GCC"; then + archive_cmds='$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 + archive_cmds='$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 + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$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*) + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # 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) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -b" + 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>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds='$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. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$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 + archive_cmds='$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' + archive_expsym_cmds='$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 + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + else + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$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' + archive_expsym_cmds='$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' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$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 + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$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 + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$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' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$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' + archive_expsym_cmds='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 + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='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='' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='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' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='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 + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=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 + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=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. + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='$wl-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$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. + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='$wl-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test no = "$ld_shlibs" && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds 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. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +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 + + + +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' + + 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`' + + 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. + hardcode_libdir_flag_spec='-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 + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +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 + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test yes = "$hardcode_automatic"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct" && + # 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, )" && + test no != "$hardcode_minus_L"; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; 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 + + + + + + + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else + + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + 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_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen=shl_load +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen=dlopen +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + 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" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self=cross +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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self_static=cross +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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + 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 + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +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" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +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" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report what library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is the NAG Fortran compiler" >&5 +$as_echo_n "checking whether this is the NAG Fortran compiler... " >&6; } + $CC -V 2>&1 | grep '^NAG Fortran Compiler Release' >/dev/null 2>&1 + _lt_result=$? + if test $_lt_result -eq 0; then : + _lt_result=yes +else + _lt_result=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_lt_result" >&5 +$as_echo "$_lt_result" >&6; } + acx_is_nagfor=$_lt_result + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC + + if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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. + + + + + + +# 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 + + + # save warnings/boilerplate of simple test code + 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* + + 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* + + + # 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 + compiler_CXX=$CC + func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + + 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_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test yes = "$GXX"; then + # Set up default GNU C++ configuration + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 +fi + +LD=$lt_cv_path_LD +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # 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 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_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 + archive_cmds_CXX='$CC $pic_flag -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$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 + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + 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. + archive_cmds_CXX='$CC -shared $libobjs $deplibs $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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=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. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='$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. + hardcode_direct_CXX=no + hardcode_direct_absolute_CXX=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 + hardcode_direct_CXX=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 + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + 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 + + export_dynamic_flag_spec_CXX='$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. + always_export_symbols_CXX=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. + no_undefined_flag_CXX='-bernotok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`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_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$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 + hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$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. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`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_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='$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. + no_undefined_flag_CXX=' $wl-bernotok' + allow_undefined_flag_CXX=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + archive_expsym_cmds_CXX='$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. + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$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 + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$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 + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=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. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # 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. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='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, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='$wl--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$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... + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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 + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX=$_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 + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_CXX="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" + module_expsym_cmds_CXX="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" + if test yes != "$lt_cv_apple_cc_single_mod"; then + archive_cmds_CXX="\$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" + archive_expsym_cmds_CXX="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 + ld_shlibs_CXX=no + fi + + ;; + + os2*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_minus_L_CXX=yes + allow_undefined_flag_CXX=unsupported + shrext_cmds=.dll + archive_cmds_CXX='$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' + archive_expsym_cmds_CXX='$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' + old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_CXX=yes + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='$wl-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=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 + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$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 + archive_cmds_CXX='$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 + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='$wl-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=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 + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$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*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$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 + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$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. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='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++ + archive_cmds_CXX='$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. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + archive_cmds_CXX='$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 + archive_cmds_CXX='$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 + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=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. + archive_cmds_CXX='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' + archive_expsym_cmds_CXX='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"' + + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$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."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$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 + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' + ;; + pgCC* | pgcpp* | pgc++* ) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='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`"' + old_archive_cmds_CXX='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' + archive_cmds_CXX='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' + archive_expsym_cmds_CXX='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 + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$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 + + hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$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++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$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 + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # 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 + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_CXX='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 -n 1,5p` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='$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' + compiler_needs_object_CXX=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. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=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*) + ld_shlibs_CXX=yes + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='$wl-E' + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=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. + archive_cmds_CXX='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' + + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' + archive_cmds_CXX='$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' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$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' + archive_expsym_cmds_CXX='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' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # 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 + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' + case $host in + osf3*) + archive_cmds_CXX='$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' + ;; + *) + archive_cmds_CXX='$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 + + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + hardcode_libdir_separator_CXX=: + + # 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 + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='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' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=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?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=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. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$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. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test yes,no = "$GXX,$with_gnu_ld"; then + no_undefined_flag_CXX=' $wl-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='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. + archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='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 + + hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='$wl-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$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. + no_undefined_flag_CXX='$wl-z,text' + allow_undefined_flag_CXX='$wl-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$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 + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test no = "$ld_shlibs_CXX" && can_build_shared=no + + GCC_CXX=$GXX + LD_CXX=$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... + { output_verbose_link_cmd=; unset output_verbose_link_cmd;} + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_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 + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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 = x"$p" || + test x-R = x"$p" || + test x-l = x"$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 "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX=$prev$p + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $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 "$postdeps_CXX"; then + postdeps_CXX=$prev$p + else + postdeps_CXX="${postdeps_CXX} $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 "$predep_objects_CXX"; then + predep_objects_CXX=$p + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX=$p + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +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. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + + + # C++ specific cases for pic, static, wl, etc. + if test yes = "$GXX"; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + lt_prog_compiler_pic_CXX='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-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_prog_compiler_pic_CXX='-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 + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_CXX='$wl-static' + ;; + esac + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; + 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_prog_compiler_pic_CXX=-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_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-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_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--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). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+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_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-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_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64, which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp* | pgc++* ) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-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_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed -n 1,5p` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## 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\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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 + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + 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>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=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\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $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* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=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\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $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* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_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 + export_symbols_cmds_CXX='$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 + export_symbols_cmds_CXX='`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*) + export_symbols_cmds_CXX=$ltdll_cmds + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test no = "$ld_shlibs_CXX" && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds_CXX 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. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +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 + + + +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' + + ;; + 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`' + + 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. + hardcode_libdir_flag_spec_CXX='-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 + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +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 + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test yes = "$hardcode_automatic_CXX"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct_CXX" && + # 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, CXX)" && + test no != "$hardcode_minus_L_CXX"; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test relink = "$hardcode_action_CXX" || + test yes = "$inherit_rpath_CXX"; 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 + + + + + + + + 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_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +if test -z "$F77" || test no = "$F77"; then + _lt_disable_F77=yes +fi + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_direct_absolute_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +inherit_rpath_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +reload_flag_F77=$reload_flag +reload_cmds_F77=$reload_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$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. + + + + + + +# 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 + + + + # save warnings/boilerplate of simple test code + 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* + + 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* + + + # 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 + compiler_F77=$CC + func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + GCC=$G77 + if test -n "$compiler"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + GCC_F77=$G77 + LD_F77=$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_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + + + if test yes = "$GCC"; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + lt_prog_compiler_pic_F77='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_F77='-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_prog_compiler_pic_F77='-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 + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_F77='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_F77= + ;; + + 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_prog_compiler_pic_F77='-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_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_F77='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_F77='-Xlinker ' + if test -n "$lt_prog_compiler_pic_F77"; then + lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-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). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_F77='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='--shared' + lt_prog_compiler_static_F77='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-qpic' + lt_prog_compiler_static_F77='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed -n 1,5p` 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_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' + ;; #( + *NAG\ Fortran\ Compiler*) + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + *PGI\ Compilers\ and\ Tools*|*NVIDIA\ Compilers\ and\ Tools*|*Portland\ Group*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_F77='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" ## 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\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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 + lt_cv_prog_compiler_pic_works_F77=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } + +if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_F77=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + 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>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_F77=yes + fi + else + lt_cv_prog_compiler_static_works_F77=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } + +if test yes = "$lt_cv_prog_compiler_static_works_F77"; then + : +else + lt_prog_compiler_static_F77= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_F77=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\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $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* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_F77=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\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $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* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } + + + + +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_F77" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag_F77= + always_export_symbols_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + compiler_needs_object_F77=no + enable_shared_with_static_runtimes_F77=no + export_dynamic_flag_spec_F77= + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic_F77=no + hardcode_direct_F77=no + hardcode_direct_absolute_F77=no + hardcode_libdir_flag_spec_F77= + hardcode_libdir_separator_F77= + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + inherit_rpath_F77=no + link_all_deplibs_F77=unknown + module_cmds_F77= + module_expsym_cmds_F77= + old_archive_from_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + thread_safe_flag_spec_F77= + whole_archive_flag_spec_F77= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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'. + exclude_expsyms_F77='_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. + 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 + + ld_shlibs_F77=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 + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_F77='$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 + whole_archive_flag_spec_F77=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec_F77= + 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 + ld_shlibs_F77=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 + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='' + ;; + m68k) + archive_cmds_F77='$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)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + export_dynamic_flag_spec_F77='$wl--export-all-symbols' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_F77='[_]+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 + archive_cmds_F77='$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... + archive_expsym_cmds_F77='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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 + ld_shlibs_F77=no + fi + ;; + + haiku*) + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs_F77=yes + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + shrext_cmds=.dll + archive_cmds_F77='$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' + archive_expsym_cmds_F77='$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' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_F77=yes + ;; + + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' + export_dynamic_flag_spec_F77='$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. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='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' + tmp_compiler_flags='$compiler_flags' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='$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 + whole_archive_flag_spec_F77='$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 + whole_archive_flag_spec_F77= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' + tmp_compiler_flags='`echo $compiler_flags | sed -e '"'"'s/ -W[cl],-no-pie\b//g'"'"'`' ;; + 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 + whole_archive_flag_spec_F77='$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' + compiler_needs_object_F77=yes + ;; + esac + case `$CC -V 2>&1 | sed -n 1,5p` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='$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' + compiler_needs_object_F77=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *NAG\ Fortran\ Compiler*) + tmp_sharedflag='-Wl,-shared' + tmp_compiler_flags='`echo $compiler_flags | sed -e '"'"'s/ -W[cl],-no-pie\b//g'"'"'`' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs '"$tmp_compiler_flags"' $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_F77='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 '"$tmp_compiler_flags"' $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + export_dynamic_flag_spec_F77='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_F77='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 + ld_shlibs_F77=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$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 + ld_shlibs_F77=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 + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test no = "$ld_shlibs_F77"; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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. + hardcode_minus_L_F77=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=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 + export_symbols_cmds_F77='$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 + export_symbols_cmds_F77='`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. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_direct_absolute_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + file_list_spec_F77='$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. + hardcode_direct_F77=no + hardcode_direct_absolute_F77=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 + hardcode_direct_F77=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 + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + 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 + + export_dynamic_flag_spec_F77='$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. + always_export_symbols_F77=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. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_f77_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`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_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi + + hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77='$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 + hardcode_libdir_flag_spec_F77='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$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. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_f77_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`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_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi + + hardcode_libdir_flag_spec_F77='$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. + no_undefined_flag_F77=' $wl-bernotok' + allow_undefined_flag_F77=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_F77='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + fi + archive_cmds_need_lc_F77=yes + archive_expsym_cmds_F77='$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. + archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$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 + archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$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 + archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='' + ;; + m68k) + archive_cmds_F77='$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)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-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 + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + file_list_spec_F77='@' + # 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. + archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_F77='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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, F77)='true' + enable_shared_with_static_runtimes_F77=yes + exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_F77='chmod 644 $oldlib' + postlink_cmds_F77='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 + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=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. + archive_cmds_F77='$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. + old_archive_from_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_F77=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + compiler_needs_object_F77=yes + else + whole_archive_flag_spec_F77='' + fi + link_all_deplibs_F77=yes + allow_undefined_flag_F77=$_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 + archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_F77="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" + module_expsym_cmds_F77="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" + + else + ld_shlibs_F77=no + fi + + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=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*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test yes = "$GCC"; then + archive_cmds_F77='$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 + archive_cmds_F77='$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 + hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + hardcode_direct_absolute_F77=yes + export_dynamic_flag_spec_F77='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$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*) + archive_cmds_F77='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$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 + hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + hardcode_direct_absolute_F77=yes + export_dynamic_flag_spec_F77='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds_F77='$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. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end +_ACEOF +if ac_fn_f77_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds_F77='$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 + archive_cmds_F77='$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' + archive_expsym_cmds_F77='$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 + archive_cmds_need_lc_F77='no' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + hardcode_libdir_separator_F77=: + inherit_rpath_F77=yes + link_all_deplibs_F77=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs_F77=yes + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + *nto* | *qnx*) + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + hardcode_direct_absolute_F77=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' + export_dynamic_flag_spec_F77='$wl-E' + else + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' + fi + else + ld_shlibs_F77=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + shrext_cmds=.dll + archive_cmds_F77='$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' + archive_expsym_cmds_F77='$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' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_F77=yes + ;; + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*' + archive_cmds_F77='$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 + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$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 + archive_cmds_need_lc_F77='no' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*' + archive_cmds_F77='$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' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$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' + archive_expsym_cmds_F77='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 + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + archive_cmds_need_lc_F77='no' + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds_F77='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='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='' + archive_cmds_F77='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='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' + archive_cmds_F77='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='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 + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=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 + whole_archive_flag_spec_F77='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_F77=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. + archive_cmds_F77='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='$wl-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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. + no_undefined_flag_F77='$wl-z,text' + allow_undefined_flag_F77='$wl-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='$wl-R,$libdir' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec_F77='$wl-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 +$as_echo "$ld_shlibs_F77" >&6; } +test no = "$ld_shlibs_F77" && can_build_shared=no + +with_gnu_ld_F77=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds_F77 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. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_F77=no + else + lt_cv_archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; } + archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +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 + + + +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' + + ;; + 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`' + + 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. + hardcode_libdir_flag_spec_F77='-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 + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_f77_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +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 + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || + test -n "$runpath_var_F77" || + test yes = "$hardcode_automatic_F77"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct_F77" && + # 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, F77)" && + test no != "$hardcode_minus_L_F77"; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 +$as_echo "$hardcode_action_F77" >&6; } + +if test relink = "$hardcode_action_F77" || + test yes = "$inherit_rpath_F77"; 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 + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is the NAG Fortran compiler" >&5 +$as_echo_n "checking whether this is the NAG Fortran compiler... " >&6; } + $CC -V 2>&1 | grep '^NAG Fortran Compiler Release' >/dev/null 2>&1 + _lt_result=$? + if test $_lt_result -eq 0; then : + _lt_result=yes +else + _lt_result=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_lt_result" >&5 +$as_echo "$_lt_result" >&6; } + acx_is_nagfor_F77=$_lt_result + + + + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + +if test -z "$FC" || test no = "$FC"; then + _lt_disable_FC=yes +fi + +archive_cmds_need_lc_FC=no +allow_undefined_flag_FC= +always_export_symbols_FC=no +archive_expsym_cmds_FC= +export_dynamic_flag_spec_FC= +hardcode_direct_FC=no +hardcode_direct_absolute_FC=no +hardcode_libdir_flag_spec_FC= +hardcode_libdir_separator_FC= +hardcode_minus_L_FC=no +hardcode_automatic_FC=no +inherit_rpath_FC=no +module_cmds_FC= +module_expsym_cmds_FC= +link_all_deplibs_FC=unknown +old_archive_cmds_FC=$old_archive_cmds +reload_flag_FC=$reload_flag +reload_cmds_FC=$reload_cmds +no_undefined_flag_FC= +whole_archive_flag_spec_FC= +enable_shared_with_static_runtimes_FC=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +objext_FC=$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. + + + + + + +# 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 + + + + # save warnings/boilerplate of simple test code + 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* + + 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* + + + # 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 + + compiler_FC=$CC + func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + + if test -n "$compiler"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + GCC_FC=$ac_cv_fc_compiler_gnu + LD_FC=$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... + { output_verbose_link_cmd=; unset output_verbose_link_cmd;} + # Dependencies to place before and after the object being linked: +predep_objects_FC= +postdep_objects_FC= +predeps_FC= +postdeps_FC= +compiler_lib_search_path_FC= + +cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_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 + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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 = x"$p" || + test x-R = x"$p" || + test x-l = x"$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 "$compiler_lib_search_path_FC"; then + compiler_lib_search_path_FC=$prev$p + else + compiler_lib_search_path_FC="${compiler_lib_search_path_FC} $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 "$postdeps_FC"; then + postdeps_FC=$prev$p + else + postdeps_FC="${postdeps_FC} $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 "$predep_objects_FC"; then + predep_objects_FC=$p + else + predep_objects_FC="$predep_objects_FC $p" + fi + else + if test -z "$postdep_objects_FC"; then + postdep_objects_FC=$p + else + postdep_objects_FC="$postdep_objects_FC $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling FC test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken + + +case " $postdeps_FC " in +*" -lc "*) archive_cmds_need_lc_FC=no ;; +esac + compiler_lib_search_dirs_FC= +if test -n "${compiler_lib_search_path_FC}"; then + compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | $SED -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + lt_prog_compiler_wl_FC= +lt_prog_compiler_pic_FC= +lt_prog_compiler_static_FC= + + + if test yes = "$GCC"; then + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_static_FC='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_FC='-Bstatic' + fi + lt_prog_compiler_pic_FC='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_FC='-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_prog_compiler_pic_FC='-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 + lt_prog_compiler_pic_FC='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_FC='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_FC='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_FC= + ;; + + 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_prog_compiler_pic_FC='-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_prog_compiler_can_build_shared_FC=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_FC='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_FC=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic_FC='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_FC='-Xlinker ' + if test -n "$lt_prog_compiler_pic_FC"; then + lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_FC='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_FC='-Bstatic' + else + lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_FC='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-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). + lt_prog_compiler_pic_FC='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_FC='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_FC='-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_prog_compiler_pic_FC='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_FC='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_FC='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_FC='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='--shared' + lt_prog_compiler_static_FC='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fpic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_FC='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_FC='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-qpic' + lt_prog_compiler_static_FC='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed -n 1,5p` 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_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; #( + *NAG\ Fortran\ Compiler*) + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + *PGI\ Compilers\ and\ Tools*|*NVIDIA\ Compilers\ and\ Tools*|*Portland\ Group*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fpic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_FC='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_FC='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_FC='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_FC='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl_FC='-Qoption ld ';; + *) + lt_prog_compiler_wl_FC='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_FC='-Qoption ld ' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_FC='-Kconform_pic' + lt_prog_compiler_static_FC='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_can_build_shared_FC=no + ;; + + uts4*) + lt_prog_compiler_pic_FC='-pic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_FC=no + ;; + esac + fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_FC= + ;; + *) + lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 +$as_echo "$lt_cv_prog_compiler_pic_FC" >&6; } +lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_FC=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_FC" ## 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\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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 + lt_cv_prog_compiler_pic_works_FC=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_FC" >&6; } + +if test yes = "$lt_cv_prog_compiler_pic_works_FC"; then + case $lt_prog_compiler_pic_FC in + "" | " "*) ;; + *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;; + esac +else + lt_prog_compiler_pic_FC= + lt_prog_compiler_can_build_shared_FC=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_FC=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + 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>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_FC=yes + fi + else + lt_cv_prog_compiler_static_works_FC=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_FC" >&6; } + +if test yes = "$lt_cv_prog_compiler_static_works_FC"; then + : +else + lt_prog_compiler_static_FC= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_FC=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\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_cv_prog_compiler_c_o_FC=yes + fi + fi + chmod u+w . 2>&5 + $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* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_FC=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\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_cv_prog_compiler_c_o_FC=yes + fi + fi + chmod u+w . 2>&5 + $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* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; } + + + + +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_FC" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag_FC= + always_export_symbols_FC=no + archive_cmds_FC= + archive_expsym_cmds_FC= + compiler_needs_object_FC=no + enable_shared_with_static_runtimes_FC=no + export_dynamic_flag_spec_FC= + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic_FC=no + hardcode_direct_FC=no + hardcode_direct_absolute_FC=no + hardcode_libdir_flag_spec_FC= + hardcode_libdir_separator_FC= + hardcode_minus_L_FC=no + hardcode_shlibpath_var_FC=unsupported + inherit_rpath_FC=no + link_all_deplibs_FC=unknown + module_cmds_FC= + module_expsym_cmds_FC= + old_archive_from_new_cmds_FC= + old_archive_from_expsyms_cmds_FC= + thread_safe_flag_spec_FC= + whole_archive_flag_spec_FC= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_FC= + # 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'. + exclude_expsyms_FC='_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. + 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 + + ld_shlibs_FC=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 + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_FC='$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 + whole_archive_flag_spec_FC=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec_FC= + 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 + ld_shlibs_FC=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 + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='' + ;; + m68k) + archive_cmds_FC='$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)' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_FC=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs_FC=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_FC='-L$libdir' + export_dynamic_flag_spec_FC='$wl--export-all-symbols' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=no + enable_shared_with_static_runtimes_FC=yes + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_FC='[_]+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 + archive_cmds_FC='$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... + archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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 + ld_shlibs_FC=no + fi + ;; + + haiku*) + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs_FC=yes + ;; + + os2*) + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + allow_undefined_flag_FC=unsupported + shrext_cmds=.dll + archive_cmds_FC='$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' + archive_expsym_cmds_FC='$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' + old_archive_From_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_FC=yes + ;; + + interix[3-9]*) + hardcode_direct_FC=no + hardcode_shlibpath_var_FC=no + hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' + export_dynamic_flag_spec_FC='$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. + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_FC='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' + tmp_compiler_flags='$compiler_flags' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_FC='$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 + whole_archive_flag_spec_FC='$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 + whole_archive_flag_spec_FC= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' + tmp_compiler_flags='`echo $compiler_flags | sed -e '"'"'s/ -W[cl],-no-pie\b//g'"'"'`' ;; + 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 + whole_archive_flag_spec_FC='$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' + compiler_needs_object_FC=yes + ;; + esac + case `$CC -V 2>&1 | sed -n 1,5p` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_FC='$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' + compiler_needs_object_FC=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *NAG\ Fortran\ Compiler*) + tmp_sharedflag='-Wl,-shared' + tmp_compiler_flags='`echo $compiler_flags | sed -e '"'"'s/ -W[cl],-no-pie\b//g'"'"'`' ;; + esac + archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs '"$tmp_compiler_flags"' $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_FC='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 '"$tmp_compiler_flags"' $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + export_dynamic_flag_spec_FC='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_FC='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 + ld_shlibs_FC=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$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 + ld_shlibs_FC=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 + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_FC=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 + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_FC='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi + ;; + esac + + if test no = "$ld_shlibs_FC"; then + runpath_var= + hardcode_libdir_flag_spec_FC= + export_dynamic_flag_spec_FC= + whole_archive_flag_spec_FC= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + archive_expsym_cmds_FC='$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. + hardcode_minus_L_FC=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_FC=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 + export_symbols_cmds_FC='$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 + export_symbols_cmds_FC='`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. + + archive_cmds_FC='' + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + hardcode_libdir_separator_FC=':' + link_all_deplibs_FC=yes + file_list_spec_FC='$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. + hardcode_direct_FC=no + hardcode_direct_absolute_FC=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 + hardcode_direct_FC=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 + hardcode_minus_L_FC=yes + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_libdir_separator_FC= + 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 + + export_dynamic_flag_spec_FC='$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. + always_export_symbols_FC=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. + allow_undefined_flag_FC='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program conftest + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`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_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi + + hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_FC='$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 + hardcode_libdir_flag_spec_FC='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag_FC="-z nodefs" + archive_expsym_cmds_FC="\$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. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program conftest + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`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_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi + + hardcode_libdir_flag_spec_FC='$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. + no_undefined_flag_FC=' $wl-bernotok' + allow_undefined_flag_FC=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_FC='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_FC='$convenience' + fi + archive_cmds_need_lc_FC=yes + archive_expsym_cmds_FC='$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. + archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$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 + archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$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 + archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='' + ;; + m68k) + archive_cmds_FC='$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)' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec_FC=-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 + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + file_list_spec_FC='@' + # 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. + archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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, FC)='true' + enable_shared_with_static_runtimes_FC=yes + exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_FC='chmod 644 $oldlib' + postlink_cmds_FC='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 + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=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. + archive_cmds_FC='$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. + old_archive_from_new_cmds_FC='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_FC=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes + hardcode_shlibpath_var_FC=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + compiler_needs_object_FC=yes + else + whole_archive_flag_spec_FC='' + fi + link_all_deplibs_FC=yes + allow_undefined_flag_FC=$_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 + archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_FC="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" + module_expsym_cmds_FC="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" + + else + ld_shlibs_FC=no + fi + + ;; + + dgux*) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_shlibpath_var_FC=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*) + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes + hardcode_minus_L_FC=yes + hardcode_shlibpath_var_FC=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; + + hpux9*) + if test yes = "$GCC"; then + archive_cmds_FC='$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 + archive_cmds_FC='$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 + hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' + hardcode_libdir_separator_FC=: + hardcode_direct_FC=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes + export_dynamic_flag_spec_FC='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' + hardcode_libdir_separator_FC=: + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + export_dynamic_flag_spec_FC='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds_FC='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_FC='$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*) + archive_cmds_FC='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_FC='$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 + hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' + hardcode_libdir_separator_FC=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_FC=no + hardcode_shlibpath_var_FC=no + ;; + *) + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + export_dynamic_flag_spec_FC='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds_FC='$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. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds_FC='$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 + archive_cmds_FC='$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' + archive_expsym_cmds_FC='$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 + archive_cmds_need_lc_FC='no' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + hardcode_libdir_separator_FC=: + inherit_rpath_FC=yes + link_all_deplibs_FC=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs_FC=yes + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; + + newsos6) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + hardcode_libdir_separator_FC=: + hardcode_shlibpath_var_FC=no + ;; + + *nto* | *qnx*) + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + hardcode_direct_absolute_FC=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' + export_dynamic_flag_spec_FC='$wl-E' + else + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' + fi + else + ld_shlibs_FC=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + allow_undefined_flag_FC=unsupported + shrext_cmds=.dll + archive_cmds_FC='$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' + archive_expsym_cmds_FC='$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' + old_archive_From_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_FC=yes + ;; + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*' + archive_cmds_FC='$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 + allow_undefined_flag_FC=' -expect_unresolved \*' + archive_cmds_FC='$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 + archive_cmds_need_lc_FC='no' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + hardcode_libdir_separator_FC=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*' + archive_cmds_FC='$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' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + else + allow_undefined_flag_FC=' -expect_unresolved \*' + archive_cmds_FC='$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' + archive_expsym_cmds_FC='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 + hardcode_libdir_flag_spec_FC='-rpath $libdir' + fi + archive_cmds_need_lc_FC='no' + hardcode_libdir_separator_FC=: + ;; + + solaris*) + no_undefined_flag_FC=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds_FC='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='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='' + archive_cmds_FC='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_FC='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' + archive_cmds_FC='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='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 + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_shlibpath_var_FC=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 + whole_archive_flag_spec_FC='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_FC=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. + archive_cmds_FC='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_direct_FC=yes + hardcode_minus_L_FC=yes + hardcode_shlibpath_var_FC=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_FC='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_FC='$CC -r -o $output$reload_objs' + hardcode_direct_FC=no + ;; + motorola) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_FC=no + ;; + + sysv4.3*) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_FC=no + export_dynamic_flag_spec_FC='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_FC=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_FC=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_FC='$wl-z,text' + archive_cmds_need_lc_FC=no + hardcode_shlibpath_var_FC=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$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. + no_undefined_flag_FC='$wl-z,text' + allow_undefined_flag_FC='$wl-z,nodefs' + archive_cmds_need_lc_FC=no + hardcode_shlibpath_var_FC=no + hardcode_libdir_flag_spec_FC='$wl-R,$libdir' + hardcode_libdir_separator_FC=':' + link_all_deplibs_FC=yes + export_dynamic_flag_spec_FC='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_shlibpath_var_FC=no + ;; + + *) + ld_shlibs_FC=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec_FC='$wl-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5 +$as_echo "$ld_shlibs_FC" >&6; } +test no = "$ld_shlibs_FC" && can_build_shared=no + +with_gnu_ld_FC=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_FC" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_FC=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds_FC 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. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_FC + pic_flag=$lt_prog_compiler_pic_FC + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_FC + allow_undefined_flag_FC= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_FC=no + else + lt_cv_archive_cmds_need_lc_FC=yes + fi + allow_undefined_flag_FC=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_FC" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_FC" >&6; } + archive_cmds_need_lc_FC=$lt_cv_archive_cmds_need_lc_FC + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +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 + + + +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' + + ;; + 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`' + + 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. + hardcode_libdir_flag_spec_FC='-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 + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\"" + cat > conftest.$ac_ext <<_ACEOF + program conftest + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +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 + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_FC= +if test -n "$hardcode_libdir_flag_spec_FC" || + test -n "$runpath_var_FC" || + test yes = "$hardcode_automatic_FC"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct_FC" && + # 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, FC)" && + test no != "$hardcode_minus_L_FC"; then + # Linking always hardcodes the temporary library directory. + hardcode_action_FC=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_FC=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_FC=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5 +$as_echo "$hardcode_action_FC" >&6; } + +if test relink = "$hardcode_action_FC" || + test yes = "$inherit_rpath_FC"; 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 + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is the NAG Fortran compiler" >&5 +$as_echo_n "checking whether this is the NAG Fortran compiler... " >&6; } + $CC -V 2>&1 | grep '^NAG Fortran Compiler Release' >/dev/null 2>&1 + _lt_result=$? + if test $_lt_result -eq 0; then : + _lt_result=yes +else + _lt_result=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_lt_result" >&5 +$as_echo "$_lt_result" >&6; } + acx_is_nagfor_FC=$_lt_result + + + + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_FC" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + ## _KPSE_USE_LIBTOOL: Generate a libtool script for use in configure tests +: ${CONFIG_LT=./config.lt} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5 +$as_echo "$as_me: creating $CONFIG_LT" >&6;} +as_write_fail=0 +cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## --------------------------------- ## +## Main body of "$CONFIG_LT" script. ## +## --------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x "$CONFIG_LT" + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 + +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="\ +cdi config.lt 2.2.0 +configured by $0, generated by GNU Autoconf 2.69. + +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=: ;; + + -*) as_fn_error $? "unrecognized option: $1 +Try '$0 --help' for more information." "$LINENO" 5 ;; + + *) as_fn_error $? "unrecognized argument: $1 +Try '$0 --help' for more information." "$LINENO" 5 ;; + esac + shift +done + +if $lt_cl_silent; then + exec 6>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF + + +# 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' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +acx_is_nagfor='`$ECHO "$acx_is_nagfor" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`' +LD_FC='`$ECHO "$LD_FC" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`' +reload_flag_FC='`$ECHO "$reload_flag_FC" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`' +reload_cmds_FC='`$ECHO "$reload_cmds_FC" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_FC='`$ECHO "$old_archive_cmds_FC" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' +compiler_FC='`$ECHO "$compiler_FC" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' +GCC_FC='`$ECHO "$GCC_FC" | $SED "$delay_single_quote_subst"`' +acx_is_nagfor_CXX='`$ECHO "$acx_is_nagfor_CXX" | $SED "$delay_single_quote_subst"`' +acx_is_nagfor_F77='`$ECHO "$acx_is_nagfor_F77" | $SED "$delay_single_quote_subst"`' +acx_is_nagfor_FC='`$ECHO "$acx_is_nagfor_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_FC='`$ECHO "$lt_cv_prog_compiler_c_o_FC" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_FC='`$ECHO "$archive_cmds_need_lc_FC" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_FC='`$ECHO "$enable_shared_with_static_runtimes_FC" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_FC='`$ECHO "$export_dynamic_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_FC='`$ECHO "$whole_archive_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_FC='`$ECHO "$compiler_needs_object_FC" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_FC='`$ECHO "$old_archive_from_new_cmds_FC" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_FC='`$ECHO "$old_archive_from_expsyms_cmds_FC" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_FC='`$ECHO "$archive_cmds_FC" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_FC='`$ECHO "$archive_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_cmds_FC='`$ECHO "$module_cmds_FC" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_FC='`$ECHO "$module_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_FC='`$ECHO "$with_gnu_ld_FC" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_FC='`$ECHO "$allow_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_FC='`$ECHO "$no_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_FC='`$ECHO "$hardcode_direct_FC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_FC='`$ECHO "$hardcode_direct_absolute_FC" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_FC='`$ECHO "$hardcode_minus_L_FC" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_FC='`$ECHO "$hardcode_shlibpath_var_FC" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_FC='`$ECHO "$hardcode_automatic_FC" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' +inherit_rpath_FC='`$ECHO "$inherit_rpath_FC" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' +always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_FC='`$ECHO "$export_symbols_cmds_FC" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_FC='`$ECHO "$exclude_expsyms_FC" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' +include_expsyms_FC='`$ECHO "$include_expsyms_FC" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' +prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' +file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' +hardcode_action_FC='`$ECHO "$hardcode_action_FC" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_FC='`$ECHO "$compiler_lib_search_dirs_FC" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`' +predep_objects_FC='`$ECHO "$predep_objects_FC" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`' +postdep_objects_FC='`$ECHO "$postdep_objects_FC" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`' +predeps_FC='`$ECHO "$predeps_FC" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`' +postdeps_FC='`$ECHO "$postdeps_FC" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_FC='`$ECHO "$compiler_lib_search_path_FC" | $SED "$delay_single_quote_subst"`' + +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 SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ +nm_file_list_spec \ +lt_cv_truncate_bin \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +LD_F77 \ +LD_FC \ +reload_flag_CXX \ +reload_flag_F77 \ +reload_flag_FC \ +compiler_CXX \ +compiler_F77 \ +compiler_FC \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_no_builtin_flag_F77 \ +lt_prog_compiler_no_builtin_flag_FC \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_pic_F77 \ +lt_prog_compiler_pic_FC \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_wl_F77 \ +lt_prog_compiler_wl_FC \ +lt_prog_compiler_static_CXX \ +lt_prog_compiler_static_F77 \ +lt_prog_compiler_static_FC \ +lt_cv_prog_compiler_c_o_CXX \ +lt_cv_prog_compiler_c_o_F77 \ +lt_cv_prog_compiler_c_o_FC \ +export_dynamic_flag_spec_CXX \ +export_dynamic_flag_spec_F77 \ +export_dynamic_flag_spec_FC \ +whole_archive_flag_spec_CXX \ +whole_archive_flag_spec_F77 \ +whole_archive_flag_spec_FC \ +compiler_needs_object_CXX \ +compiler_needs_object_F77 \ +compiler_needs_object_FC \ +with_gnu_ld_CXX \ +with_gnu_ld_F77 \ +with_gnu_ld_FC \ +allow_undefined_flag_CXX \ +allow_undefined_flag_F77 \ +allow_undefined_flag_FC \ +no_undefined_flag_CXX \ +no_undefined_flag_F77 \ +no_undefined_flag_FC \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_flag_spec_F77 \ +hardcode_libdir_flag_spec_FC \ +hardcode_libdir_separator_CXX \ +hardcode_libdir_separator_F77 \ +hardcode_libdir_separator_FC \ +exclude_expsyms_CXX \ +exclude_expsyms_F77 \ +exclude_expsyms_FC \ +include_expsyms_CXX \ +include_expsyms_F77 \ +include_expsyms_FC \ +file_list_spec_CXX \ +file_list_spec_F77 \ +file_list_spec_FC \ +compiler_lib_search_dirs_CXX \ +compiler_lib_search_dirs_F77 \ +compiler_lib_search_dirs_FC \ +predep_objects_CXX \ +predep_objects_F77 \ +predep_objects_FC \ +postdep_objects_CXX \ +postdep_objects_F77 \ +postdep_objects_FC \ +predeps_CXX \ +predeps_F77 \ +predeps_FC \ +postdeps_CXX \ +postdeps_F77 \ +postdeps_FC \ +compiler_lib_search_path_CXX \ +compiler_lib_search_path_F77 \ +compiler_lib_search_path_FC; 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 reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path \ +reload_cmds_CXX \ +reload_cmds_F77 \ +reload_cmds_FC \ +old_archive_cmds_CXX \ +old_archive_cmds_F77 \ +old_archive_cmds_FC \ +old_archive_from_new_cmds_CXX \ +old_archive_from_new_cmds_F77 \ +old_archive_from_new_cmds_FC \ +old_archive_from_expsyms_cmds_CXX \ +old_archive_from_expsyms_cmds_F77 \ +old_archive_from_expsyms_cmds_FC \ +archive_cmds_CXX \ +archive_cmds_F77 \ +archive_cmds_FC \ +archive_expsym_cmds_CXX \ +archive_expsym_cmds_F77 \ +archive_expsym_cmds_FC \ +module_cmds_CXX \ +module_cmds_F77 \ +module_cmds_FC \ +module_expsym_cmds_CXX \ +module_expsym_cmds_F77 \ +module_expsym_cmds_FC \ +export_symbols_cmds_CXX \ +export_symbols_cmds_F77 \ +export_symbols_cmds_FC \ +prelink_cmds_CXX \ +prelink_cmds_F77 \ +prelink_cmds_FC \ +postlink_cmds_CXX \ +postlink_cmds_F77 \ +postlink_cmds_FC; 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 + +ac_aux_dir='$ac_aux_dir' + +# 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 + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + RM='$RM' + ofile='$ofile' + + + + + + + + + +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5 +$as_echo "$as_me: creating $ofile" >&6;} + + + # 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 + +# 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/>. + + +# The names of the tagged configurations supported by this script. +available_tags='CXX F77 FC ' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and where our libraries should be installed. +lt_sysroot=$lt_sysroot + +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# 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 +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Is the compiler the NAG Fortran compiler? +with_nagfor=$acx_is_nagfor + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# 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. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# 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$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; 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-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_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 + + +ltmain=$ac_aux_dir/ltmain.sh + + + # 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" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Is the compiler the NAG Fortran compiler? +with_nagfor=$acx_is_nagfor_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# 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. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: F77 + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_F77 +reload_cmds=$lt_reload_cmds_F77 + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_F77 + +# A language specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU compiler? +with_gcc=$GCC_F77 + +# Is the compiler the NAG Fortran compiler? +with_nagfor=$acx_is_nagfor_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_F77 + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_F77 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# 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. +hardcode_direct_absolute=$hardcode_direct_absolute_F77 + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_F77 + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_F77 + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_F77 + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_F77 + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_F77 +postdep_objects=$lt_postdep_objects_F77 +predeps=$lt_predeps_F77 +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# ### END LIBTOOL TAG CONFIG: F77 +_LT_EOF + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: FC + +# The linker used to build libraries. +LD=$lt_LD_FC + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_FC +reload_cmds=$lt_reload_cmds_FC + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_FC + +# A language specific compiler. +CC=$lt_compiler_FC + +# Is the compiler the GNU compiler? +with_gcc=$GCC_FC + +# Is the compiler the NAG Fortran compiler? +with_nagfor=$acx_is_nagfor_FC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_FC + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_FC + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_FC + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_FC + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_FC + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_FC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_FC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_FC + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_FC + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_FC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_FC + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_FC +archive_expsym_cmds=$lt_archive_expsym_cmds_FC + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_FC +module_expsym_cmds=$lt_module_expsym_cmds_FC + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_FC + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_FC + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_FC + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_FC + +# 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. +hardcode_direct_absolute=$hardcode_direct_absolute_FC + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_FC + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_FC + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_FC + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_FC + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_FC + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_FC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_FC + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_FC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_FC + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_FC + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_FC + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_FC + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_FC + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_FC + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_FC +postdep_objects=$lt_postdep_objects_FC +predeps=$lt_predeps_FC +postdeps=$lt_postdeps_FC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_FC + +# ### END LIBTOOL TAG CONFIG: FC +_LT_EOF + + +as_fn_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 5>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec 5>>config.log +$lt_cl_success || as_fn_exit 1 + + +acx_lt_saved_ac_objext=$ac_objext +ac_objext=lo +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" +ac_clean_files_save="$ac_clean_files_save $ac_pwd/$objdir" +ac_clean_files="$ac_clean_files $ac_pwd/$objdir" + + for acx_flag_var_ in CFLAGS CXXFLAGS FCFLAGS F77FLAGS LDFLAGS FCLDFLAGS +do : + if eval test x\$\{$acx_flag_var_+set\} = xset; then : + eval acx_temp="\" \$$acx_flag_var_ \"" + case $acx_temp in #( + *\ -shared-intel\ *|*\ -static-intel\ *) : + acx_temp=`echo "$acx_temp" | sed -e 's/ \(-\(shared\|static\)-intel\)\b/ -Xcompiler \1 -XCClinker \1/'` ;; #( + *) : + ;; +esac + eval $acx_flag_var_=\"`echo "$acx_temp" | sed -e 's/ -\(align\|allow\|assume\|ccdefault\|check\|convert\|debug\|debug-parameters\|diag-type\|diag-enable\|diag-disable\|double-size\|dynamic-linker\|dyncom\|export-dir\|extend-source\|fp-model\|fpscomp\|gen-interfaces\|heap-arrays\|imacros\|integer-size\|iprefix\|iquote\|iwithprefixbefore\|module\|names\|opt-report\|opt-streaming-stores\|pch-dir\|pch-use\|prof-dir\|prof-file\|real-size\|reentrancy\|stand\|tcollect-filter\|tune\|warn\|watch\) \([^-][^ ]*\)\b/ -Xcompiler -\1 -Xcompiler \2/g' -e 's/^ //;s/ $//'`\" +fi +done + if test -n "$CC" -a X"$CC" != Xno; then : + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool can link C programs" >&5 +$as_echo_n "checking whether libtool can link C programs... " >&6; } +if ${acx_cv_libtool_c_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_libtool_c_works=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + acx_cv_libtool_c_works=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_libtool_c_works" >&5 +$as_echo "$acx_cv_libtool_c_works" >&6; } + if test "x$acx_cv_libtool_c_works" = xno; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "unable to link a C program using libtool +See \`config.log' for more details" "$LINENO" 5; } +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + +fi + if test -n "$FC" -a X"$FC" != Xno; then : + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=FC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=FC $ac_compile" + + + + acx_temp=`$FC -V 2>&1 | sed -n 1,5p` + case "$acx_temp" in #( + *NAG\ Fortran\ Compiler\ Release*) : + if test x${FCFLAGS+set} = xset; then : + FCFLAGS=`echo "$FCFLAGS" | tr ' ' '\n' | sed -e '/^-W[lc]/{' \ +-e 's/^\(-Wl\)/-XCClinker \1/;s/^\(-Wc,\)/-Xcompiler \1/' \ +-e 's/^\(-Wc=.*\)/-Xcompiler \1 -XCClinker \1/' -e '}' \ + | tr '\n' ' ' | sed -e 's/ $//'` +fi + if test x${FCLDFLAGS+set} = xset; then : + FCLDFLAGS=`echo "$FCLDFLAGS" | tr ' ' '\n' | sed -e '/^-W[lc]/{' \ +-e 's/^\(-Wl\)/-XCClinker \1/;s/^\(-Wc,\)/-Xcompiler \1/' \ +-e 's/^\(-Wc=.*\)/-Xcompiler \1 -XCClinker \1/' -e '}' \ + | tr '\n' ' ' | sed -e 's/ $//'` +fi ;; #( + *) : + ;; +esac + case "x${FC_MODOUT}x" in #( + x'-module 'x|x'-mod 'x) : + FC_MODOUT="-Xcompiler ${FC_MODOUT}-Xcompiler " ;; #( + *) : + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool can link Fortran programs" >&5 +$as_echo_n "checking whether libtool can link Fortran programs... " >&6; } +if ${acx_cv_libtool_fc_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_libtool_fc_works=no + cat > conftest.$ac_ext <<_ACEOF + program conftest + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_cv_libtool_fc_works=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_libtool_fc_works" >&5 +$as_echo "$acx_cv_libtool_fc_works" >&6; } + if test "x$acx_cv_libtool_fc_works" = xno; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "unable to link a Fortran program using libtool +See \`config.log' for more details" "$LINENO" 5; } +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + +fi + if test -n "$F77" -a X"$F77" != Xno; then : + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=F77 $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=F77 $ac_compile" + + + + acx_temp=`$F77 -V 2>&1 | sed -n 1,5p` + case "$acx_temp" in #( + *NAG\ Fortran\ Compiler\ Release*) : + if test x${FFLAGS+set} = xset; then : + FFLAGS=`echo "$FFLAGS" | tr ' ' '\n' | sed -e '/^-W[lc]/{' \ +-e 's/^\(-Wl\)/-XCClinker \1/;s/^\(-Wc,\)/-Xcompiler \1/' \ +-e 's/^\(-Wc=.*\)/-Xcompiler \1 -XCClinker \1/' -e '}' \ + | tr '\n' ' ' | sed -e 's/ $//'` +fi + if test x${F77LDFLAGS+set} = xset; then : + F77LDFLAGS=`echo "$F77LDFLAGS" | tr ' ' '\n' | sed -e '/^-W[lc]/{' \ +-e 's/^\(-Wl\)/-XCClinker \1/;s/^\(-Wc,\)/-Xcompiler \1/' \ +-e 's/^\(-Wc=.*\)/-Xcompiler \1 -XCClinker \1/' -e '}' \ + | tr '\n' ' ' | sed -e 's/ $//'` +fi ;; #( + *) : + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool can link Fortran 77 programs" >&5 +$as_echo_n "checking whether libtool can link Fortran 77 programs... " >&6; } +if ${acx_cv_libtool_f77_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_libtool_f77_works=no + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_f77_try_link "$LINENO"; then : + acx_cv_libtool_f77_works=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_libtool_f77_works" >&5 +$as_echo "$acx_cv_libtool_f77_works" >&6; } + if test "x$acx_cv_libtool_f77_works" = xno; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "unable to link a Fortran 77 program using libtool +See \`config.log' for more details" "$LINENO" 5; } +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + +fi + if test -n "$CXX" -a X"$CXX" != Xno; then : + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CXX $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CXX $ac_compile" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool can link C++ programs" >&5 +$as_echo_n "checking whether libtool can link C++ programs... " >&6; } +if ${acx_cv_libtool_cxx_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_libtool_cxx_works=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + acx_cv_libtool_cxx_works=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_libtool_cxx_works" >&5 +$as_echo "$acx_cv_libtool_cxx_works" >&6; } + if test "x$acx_cv_libtool_cxx_works" = xno; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "unable to link a C++ program using libtool +See \`config.log' for more details" "$LINENO" 5; } +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + #include <sys/param.h> + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + #include <sys/param.h> + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <limits.h> + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <limits.h> + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include <fcntl.h> +#include <sys/mman.h> + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + +ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF + + +fi + +for ac_header in malloc.h unistd.h sys/time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in execinfo.h +do : + ac_fn_c_check_header_compile "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default +" +if test "x$ac_cv_header_execinfo_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EXECINFO_H 1 +_ACEOF + +fi + +done + + if test x"$ac_cv_header_execinfo_h" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size parameter type for backtrace()" >&5 +$as_echo_n "checking size parameter type for backtrace()... " >&6; } +if ${ax_cv_proto_backtrace_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + for ax_cv_proto_backtrace_type in size_t int none; do + if test "${ax_cv_proto_backtrace_type}" = none; then : + ax_cv_proto_backtrace_type= ; break +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <execinfo.h> +extern +${ax_cv_proto_backtrace_type} backtrace(void **addrlist, ${ax_cv_proto_backtrace_type} len); +char **backtrace_symbols(void *const *buffer, ${ax_cv_proto_backtrace_type} size); + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_proto_backtrace_type" >&5 +$as_echo "$ax_cv_proto_backtrace_type" >&6; } +fi + if test x${ax_cv_proto_backtrace_type} != x; then : + +cat >>confdefs.h <<_ACEOF +#define backtrace_size_t $ax_cv_proto_backtrace_type +_ACEOF + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 +$as_echo_n "checking for library containing backtrace... " >&6; } +if ${ac_cv_search_backtrace+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char backtrace (); +int +main () +{ +return backtrace (); + ; + return 0; +} +_ACEOF +for ac_lib in '' execinfo; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_backtrace=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_backtrace+:} false; then : + break +fi +done +if ${ac_cv_search_backtrace+:} false; then : + +else + ac_cv_search_backtrace=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 +$as_echo "$ac_cv_search_backtrace" >&6; } +ac_res=$ac_cv_search_backtrace +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + if test x"${ax_cv_proto_backtrace_type}" != x -a x"$ac_cv_header_execinfo_h" = xyes -a x"$ac_cv_search_backtrace" != xno; then : + +$as_echo "#define HAVE_BACKTRACE 1" >>confdefs.h + + +fi +for ac_func in mallinfo pwrite +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" +if test "x$ac_cv_func_getline" = xyes; then : + $as_echo "#define HAVE_GETLINE 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" getline.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getline.$ac_objext" + ;; +esac + +fi + + +# Sed expression to map a string onto a valid argument string part. +asx_tr_arg="eval sed 'y%*+%pp%;s%[^-$as_cr_alnum]%-%g'" + +have_dce_uuid_c_bindings=no + have_util_linux_uuid_c_bindings=no + have_ossp_uuid_c_bindings=no + # Check whether --enable-util-linux-uuid was given. +if test "${enable_util_linux_uuid+set}" = set; then : + enableval=$enable_util_linux_uuid; +else + enable_util_linux_uuid=auto +fi + + # Check whether --enable-ossp-uuid was given. +if test "${enable_ossp_uuid+set}" = set; then : + enableval=$enable_ossp_uuid; +else + enable_ossp_uuid=auto +fi + + # Check whether --enable-dce-uuid was given. +if test "${enable_dce_uuid+set}" = set; then : + enableval=$enable_dce_uuid; +else + enable_dce_uuid=auto +fi + + + +# Check whether --with-util-linux-uuid was given. +if test "${with_util_linux_uuid+set}" = set; then : + withval=$with_util_linux_uuid; case $with_util_linux_uuid in #( + yes) : + enable_ossp_uuid=no enable_dce_uuid=no ;; #( + no) : + enable_util_linux_uuid=no ;; #( + /*) : + if test x${with_util_linux_uuid_root+set} != xset; then : + with_util_linux_uuid_root=$with_util_linux_uuid +elif test x"${with_util_linux_uuid_root}" != x"${with_util_linux_uuid}"; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "inconsistent directories specified for --with-util-linux-uuid and --with-util-linux-uuid-root +See \`config.log' for more details" "$LINENO" 5; } +fi + enable_ossp_uuid=no enable_dce_uuid=no ;; #( + *) : + ;; +esac +fi + + +# Check whether --with-ossp-uuid was given. +if test "${with_ossp_uuid+set}" = set; then : + withval=$with_ossp_uuid; case $with_ossp_uuid in #( + yes) : + enable_util_linux_uuid=no enable_dce_uuid=no ;; #( + no) : + enable_ossp_uuid=no ;; #( + /*) : + if test x${with_ossp_uuid_root+set} != xset; then : + with_ossp_uuid_root=$with_ossp_uuid +elif test x"${with_ossp_uuid_root}" != x"${with_ossp_uuid}"; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "inconsistent directories specified for --with-ossp-uuid and --with-ossp-uuid-root +See \`config.log' for more details" "$LINENO" 5; } +fi + enable_util_linux_uuid=no enable_dce_uuid=no ;; #( + *) : + ;; +esac +fi + + +# Check whether --with-dce-uuid was given. +if test "${with_dce_uuid+set}" = set; then : + withval=$with_dce_uuid; case $with_dce_uuid in #( + yes) : + enable_util_linux_uuid=no enable_ossp_uuid=no ;; #( + no) : + enable_dce_uuid=no ;; #( + /*) : + if test x${with_dce_uuid_root+set} != xset; then : + with_dce_uuid_root=$with_dce_uuid +elif test x"${with_dce_uuid_root}" != x"${with_dce_uuid}"; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "inconsistent directories specified for --with-dce-uuid and --with-dce-uuid-root +See \`config.log' for more details" "$LINENO" 5; } +fi + enable_util_linux_uuid=no enable_ossp_uuid=no ;; #( + *) : + ;; +esac +fi + + + if test x"$enable_util_linux_uuid" != xno; then : + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + + + + + + + have_util_linux_uuid_c_bindings=yes + + +# Check whether --with-util-linux-uuid-root was given. +if test "${with_util_linux_uuid_root+set}" = set; then : + withval=$with_util_linux_uuid_root; UTIL_LINUX_UUIDROOT=$withval +fi + + if ${UTIL_LINUX_UUIDROOT+:} false; then : + if ${UTIL_LINUX_UUID_C_LIB+:} false; then : + +else + UTIL_LINUX_UUID_C_LIB="-L$UTIL_LINUX_UUIDROOT/lib" +fi + if ${UTIL_LINUX_UUID_C_INCLUDE+:} false; then : + +else + UTIL_LINUX_UUID_C_INCLUDE="-I$UTIL_LINUX_UUIDROOT/include" +fi +fi + +# Check whether --with-util-linux-uuid-include was given. +if test "${with_util_linux_uuid_include+set}" = set; then : + withval=$with_util_linux_uuid_include; UTIL_LINUX_UUID_C_INCLUDE="-I$withval" +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid/uuid.h extra include path" >&5 +$as_echo_n "checking for uuid/uuid.h extra include path... " >&6; } + if ${acx_cv_c_include_uuid_uuid_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_include_search_uuid_uuid_h_SAVE="$CPPFLAGS" + while :; do + for ac_incdir in '' +do : + if test -z "$ac_incdir"; then : + ac_res="none required" + CPPFLAGS="$UTIL_LINUX_UUID_C_INCLUDE $ac_include_search_uuid_uuid_h_SAVE" +else + ac_res="-I$ac_incdir" + CPPFLAGS="$UTIL_LINUX_UUID_C_INCLUDE $ac_res $ac_include_search_uuid_uuid_h_SAVE" +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include <uuid/uuid.h> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + acx_cv_c_include_uuid_uuid_h=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if ${acx_cv_c_include_uuid_uuid_h+:} false; then : + if test -z "$ac_incdir"; then : + acx_cv_c_include_uuid_uuid_h="$UTIL_LINUX_UUID_C_INCLUDE" +else + acx_cv_c_include_uuid_uuid_h="$UTIL_LINUX_UUID_C_INCLUDE -I$ac_incdir" +fi +fi + if ${acx_cv_c_include_uuid_uuid_h+:} false; then : + break +fi +done + if ${acx_cv_c_include_uuid_uuid_h+:} false; then : + break +fi + + break + done + CPPFLAGS=$ac_include_search_uuid_uuid_h_SAVE +fi + + if ${acx_cv_c_include_uuid_uuid_h+:} false; then : + if test x"$acx_cv_c_include_uuid_uuid_h" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_c_include_uuid_uuid_h" >&5 +$as_echo "$acx_cv_c_include_uuid_uuid_h" >&6; } +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +fi + if ${acx_cv_c_include_uuid_uuid_h+:} false; then : + UTIL_LINUX_UUID_C_INCLUDE=`echo "$acx_cv_c_include_uuid_uuid_h" | sed -e 's/^ *//;s/ *$//'` +else + have_util_linux_uuid_c_bindings=no; +fi + + +# Check whether --with-util-linux-uuid-lib was given. +if test "${with_util_linux_uuid_lib+set}" = set; then : + withval=$with_util_linux_uuid_lib; UTIL_LINUX_UUID_C_LIB="-L$withval" +fi + + if test "x$have_util_linux_uuid_c_bindings" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5 +$as_echo_n "checking for library containing uuid_generate... " >&6; } + if ${acx_cv_option_search_uuid_generate_c+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_option_func_search_save_LIBS=$LIBS + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_generate (); +int +main () +{ +return uuid_generate (); + ; + return 0; +} +_ACEOF + for ac_lib in '' uuid +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$UTIL_LINUX_UUID_C_LIB $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$UTIL_LINUX_UUID_C_LIB $ac_res $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_uuid_generate_c="$UTIL_LINUX_UUID_C_LIB" +else + acx_cv_option_search_uuid_generate_c="$UTIL_LINUX_UUID_C_LIB -l$ac_lib" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_uuid_generate_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_uuid_generate_c+:} false; then : + break +fi + for acx_libset in "" +do : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_generate (); +int +main () +{ +return uuid_generate (); + ; + return 0; +} +_ACEOF + for ac_lib in '' uuid +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$UTIL_LINUX_UUID_C_LIB $acx_libset $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$UTIL_LINUX_UUID_C_LIB $ac_res $acx_libset $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_uuid_generate_c="$UTIL_LINUX_UUID_C_LIB $acx_libset" +else + acx_cv_option_search_uuid_generate_c="$UTIL_LINUX_UUID_C_LIB -l$ac_lib $acx_libset" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_uuid_generate_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_uuid_generate_c+:} false; then : + break +fi + +done + break + done + LIBS=$acx_option_func_search_save_LIBS +fi + + if ${acx_cv_option_search_uuid_generate_c+:} false; then : + if test x"$acx_cv_option_search_uuid_generate_c" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_option_search_uuid_generate_c" >&5 +$as_echo "$acx_cv_option_search_uuid_generate_c" >&6; } +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + have_util_linux_uuid_c_bindings=no + +fi + + UTIL_LINUX_UUID_C_LIB=`echo "$acx_cv_option_search_uuid_generate_c" | sed -e 's/^ *//;s/ *$//'` + +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + if test x"$have_util_linux_uuid_c_bindings" = xyes; then : + acx_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $UTIL_LINUX_UUID_C_INCLUDE" + for ac_header in uuid/uuid.h +do : + ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default +" +if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UUID_UUID_H 1 +_ACEOF + ac_fn_c_check_decl "$LINENO" "uuid_generate" "ac_cv_have_decl_uuid_generate" "$ac_includes_default +#include <uuid/uuid.h> +" +if test "x$ac_cv_have_decl_uuid_generate" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_UUID_GENERATE $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + have_util_linux_uuid_c_bindings=no +fi + +else + have_util_linux_uuid_c_bindings=no +fi + +done + + CPPFLAGS=$acx_save_CPPFLAGS +fi +else + have_util_linux_uuid_c_bindings=no +fi + if test x"$enable_ossp_uuid" != xno -a x"$have_util_linux_uuid_c_bindings" = xno; then : + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + + + + + + + have_ossp_uuid_c_bindings=yes + + +# Check whether --with-ossp-uuid-root was given. +if test "${with_ossp_uuid_root+set}" = set; then : + withval=$with_ossp_uuid_root; OSSP_UUIDROOT=$withval +fi + + if ${OSSP_UUIDROOT+:} false; then : + if ${OSSP_UUID_C_LIB+:} false; then : + +else + OSSP_UUID_C_LIB="-L$OSSP_UUIDROOT/lib" +fi + if ${OSSP_UUID_C_INCLUDE+:} false; then : + +else + OSSP_UUID_C_INCLUDE="-I$OSSP_UUIDROOT/include" +fi +fi + +# Check whether --with-ossp-uuid-include was given. +if test "${with_ossp_uuid_include+set}" = set; then : + withval=$with_ossp_uuid_include; OSSP_UUID_C_INCLUDE="-I$withval" +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid.h extra include path" >&5 +$as_echo_n "checking for uuid.h extra include path... " >&6; } + if ${acx_cv_c_include_uuid_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_include_search_uuid_h_SAVE="$CPPFLAGS" + while :; do + for ac_incdir in '' /usr/include/ossp +do : + if test -z "$ac_incdir"; then : + ac_res="none required" + CPPFLAGS="$OSSP_UUID_C_INCLUDE $ac_include_search_uuid_h_SAVE" +else + ac_res="-I$ac_incdir" + CPPFLAGS="$OSSP_UUID_C_INCLUDE $ac_res $ac_include_search_uuid_h_SAVE" +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <uuid.h> +$ac_includes_default + +#include <uuid.h> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + acx_cv_c_include_uuid_h=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if ${acx_cv_c_include_uuid_h+:} false; then : + if test -z "$ac_incdir"; then : + acx_cv_c_include_uuid_h="$OSSP_UUID_C_INCLUDE" +else + acx_cv_c_include_uuid_h="$OSSP_UUID_C_INCLUDE -I$ac_incdir" +fi +fi + if ${acx_cv_c_include_uuid_h+:} false; then : + break +fi +done + if ${acx_cv_c_include_uuid_h+:} false; then : + break +fi + + break + done + CPPFLAGS=$ac_include_search_uuid_h_SAVE +fi + + if ${acx_cv_c_include_uuid_h+:} false; then : + if test x"$acx_cv_c_include_uuid_h" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_c_include_uuid_h" >&5 +$as_echo "$acx_cv_c_include_uuid_h" >&6; } +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +fi + if ${acx_cv_c_include_uuid_h+:} false; then : + OSSP_UUID_C_INCLUDE=`echo "$acx_cv_c_include_uuid_h" | sed -e 's/^ *//;s/ *$//'` +else + have_ossp_uuid_c_bindings=no; +fi + + +# Check whether --with-ossp-uuid-lib was given. +if test "${with_ossp_uuid_lib+set}" = set; then : + withval=$with_ossp_uuid_lib; OSSP_UUID_C_LIB="-L$withval" +fi + + if test "x$have_ossp_uuid_c_bindings" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5 +$as_echo_n "checking for library containing uuid_create... " >&6; } + if ${acx_cv_option_search_uuid_create_c+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_option_func_search_save_LIBS=$LIBS + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_create (); +int +main () +{ +return uuid_create (); + ; + return 0; +} +_ACEOF + for ac_lib in '' ossp-uuid uuid +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$OSSP_UUID_C_LIB $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$OSSP_UUID_C_LIB $ac_res $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_uuid_create_c="$OSSP_UUID_C_LIB" +else + acx_cv_option_search_uuid_create_c="$OSSP_UUID_C_LIB -l$ac_lib" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_uuid_create_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_uuid_create_c+:} false; then : + break +fi + for acx_libset in "" +do : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_create (); +int +main () +{ +return uuid_create (); + ; + return 0; +} +_ACEOF + for ac_lib in '' ossp-uuid uuid +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$OSSP_UUID_C_LIB $acx_libset $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$OSSP_UUID_C_LIB $ac_res $acx_libset $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_uuid_create_c="$OSSP_UUID_C_LIB $acx_libset" +else + acx_cv_option_search_uuid_create_c="$OSSP_UUID_C_LIB -l$ac_lib $acx_libset" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_uuid_create_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_uuid_create_c+:} false; then : + break +fi + +done + break + done + LIBS=$acx_option_func_search_save_LIBS +fi + + if ${acx_cv_option_search_uuid_create_c+:} false; then : + if test x"$acx_cv_option_search_uuid_create_c" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_option_search_uuid_create_c" >&5 +$as_echo "$acx_cv_option_search_uuid_create_c" >&6; } +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + have_ossp_uuid_c_bindings=no + +fi + + OSSP_UUID_C_LIB=`echo "$acx_cv_option_search_uuid_create_c" | sed -e 's/^ *//;s/ *$//'` + +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + if test x"$have_ossp_uuid_c_bindings" = xyes; then : + acx_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="${CPPFLAGS+$CPPFLAGS }$OSSP_UUID_C_INCLUDE" + for ac_header in uuid.h +do : + ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "#include <uuid.h> +$ac_includes_default +" +if test "x$ac_cv_header_uuid_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UUID_H 1 +_ACEOF + ac_fn_c_check_decl "$LINENO" "uuid_create" "ac_cv_have_decl_uuid_create" "#include <uuid.h> +$ac_includes_default +" +if test "x$ac_cv_have_decl_uuid_create" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_UUID_CREATE $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + ac_fn_c_check_decl "$LINENO" "UUID_MAKE_V5" "ac_cv_have_decl_UUID_MAKE_V5" "#include <uuid.h> +$ac_includes_default +" +if test "x$ac_cv_have_decl_UUID_MAKE_V5" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_UUID_MAKE_V5 $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + have_ossp_uuid_c_bindings=no +fi + +else + have_ossp_uuid_c_bindings=no +fi + +else + have_ossp_uuid_c_bindings=no +fi + +done + + CPPFLAGS=$acx_save_CPPFLAGS +fi +else + have_ossp_uuid_c_bindings=no +fi + # check for DCE uuid_create if util-linux and OSSP variants cannot be found + if test x"$enable_dce_uuid" != xno -a x"$have_util_linux_uuid_c_bindings$have_ossp_uuid_c_bindings" = xnono; then : + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + + + + + + + have_dce_uuid_c_bindings=yes + + +# Check whether --with-dce-uuid-root was given. +if test "${with_dce_uuid_root+set}" = set; then : + withval=$with_dce_uuid_root; DCE_UUIDROOT=$withval +fi + + if ${DCE_UUIDROOT+:} false; then : + if ${DCE_UUID_C_LIB+:} false; then : + +else + DCE_UUID_C_LIB="-L$DCE_UUIDROOT/lib" +fi + if ${DCE_UUID_C_INCLUDE+:} false; then : + +else + DCE_UUID_C_INCLUDE="-I$DCE_UUIDROOT/include" +fi +fi + +# Check whether --with-dce-uuid-include was given. +if test "${with_dce_uuid_include+set}" = set; then : + withval=$with_dce_uuid_include; DCE_UUID_C_INCLUDE="-I$withval" +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid.h extra include path" >&5 +$as_echo_n "checking for uuid.h extra include path... " >&6; } + if ${acx_cv_c_include_uuid_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_include_search_uuid_h_SAVE="$CPPFLAGS" + while :; do + for ac_incdir in '' +do : + if test -z "$ac_incdir"; then : + ac_res="none required" + CPPFLAGS="$DCE_UUID_C_INCLUDE $ac_include_search_uuid_h_SAVE" +else + ac_res="-I$ac_incdir" + CPPFLAGS="$DCE_UUID_C_INCLUDE $ac_res $ac_include_search_uuid_h_SAVE" +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include <uuid.h> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + acx_cv_c_include_uuid_h=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if ${acx_cv_c_include_uuid_h+:} false; then : + if test -z "$ac_incdir"; then : + acx_cv_c_include_uuid_h="$DCE_UUID_C_INCLUDE" +else + acx_cv_c_include_uuid_h="$DCE_UUID_C_INCLUDE -I$ac_incdir" +fi +fi + if ${acx_cv_c_include_uuid_h+:} false; then : + break +fi +done + if ${acx_cv_c_include_uuid_h+:} false; then : + break +fi + + break + done + CPPFLAGS=$ac_include_search_uuid_h_SAVE +fi + + if ${acx_cv_c_include_uuid_h+:} false; then : + if test x"$acx_cv_c_include_uuid_h" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_c_include_uuid_h" >&5 +$as_echo "$acx_cv_c_include_uuid_h" >&6; } +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +fi + if ${acx_cv_c_include_uuid_h+:} false; then : + DCE_UUID_C_INCLUDE=`echo "$acx_cv_c_include_uuid_h" | sed -e 's/^ *//;s/ *$//'` +else + have_dce_uuid_c_bindings=no; +fi + + +# Check whether --with-dce-uuid-lib was given. +if test "${with_dce_uuid_lib+set}" = set; then : + withval=$with_dce_uuid_lib; DCE_UUID_C_LIB="-L$withval" +fi + + if test "x$have_dce_uuid_c_bindings" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5 +$as_echo_n "checking for library containing uuid_create... " >&6; } + if ${acx_cv_option_search_uuid_create_c+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_option_func_search_save_LIBS=$LIBS + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_create (); +int +main () +{ +return uuid_create (); + ; + return 0; +} +_ACEOF + for ac_lib in '' +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$DCE_UUID_C_LIB $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$DCE_UUID_C_LIB $ac_res $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_uuid_create_c="$DCE_UUID_C_LIB" +else + acx_cv_option_search_uuid_create_c="$DCE_UUID_C_LIB -l$ac_lib" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_uuid_create_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_uuid_create_c+:} false; then : + break +fi + for acx_libset in "" +do : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_create (); +int +main () +{ +return uuid_create (); + ; + return 0; +} +_ACEOF + for ac_lib in '' +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$DCE_UUID_C_LIB $acx_libset $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$DCE_UUID_C_LIB $ac_res $acx_libset $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_uuid_create_c="$DCE_UUID_C_LIB $acx_libset" +else + acx_cv_option_search_uuid_create_c="$DCE_UUID_C_LIB -l$ac_lib $acx_libset" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_uuid_create_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_uuid_create_c+:} false; then : + break +fi + +done + break + done + LIBS=$acx_option_func_search_save_LIBS +fi + + if ${acx_cv_option_search_uuid_create_c+:} false; then : + if test x"$acx_cv_option_search_uuid_create_c" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_option_search_uuid_create_c" >&5 +$as_echo "$acx_cv_option_search_uuid_create_c" >&6; } +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + have_dce_uuid_c_bindings=no + +fi + + DCE_UUID_C_LIB=`echo "$acx_cv_option_search_uuid_create_c" | sed -e 's/^ *//;s/ *$//'` + +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + if test x"$have_dce_uuid_c_bindings" = xyes; then : + acx_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $DCE_UUID_C_INCLUDE" + for ac_header in uuid.h +do : + ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default +" +if test "x$ac_cv_header_uuid_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UUID_H 1 +_ACEOF + ac_fn_c_check_decl "$LINENO" "uuid_create" "ac_cv_have_decl_uuid_create" "$ac_includes_default +#include <uuid.h> +" +if test "x$ac_cv_have_decl_uuid_create" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_UUID_CREATE $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + have_dce_uuid_c_bindings=yes +else + have_dce_uuid_c_bindings=no +fi + +else + have_dce_uuid_c_bindings=yes +fi + +done + + CPPFLAGS=$acx_save_CPPFLAGS +fi +fi + +if test x"$have_util_linux_uuid_c_bindings" = xyes; then : + UUID_C_INCLUDE=$UTIL_LINUX_UUID_C_INCLUDE + UUID_C_LIB=$UTIL_LINUX_UUID_C_LIB +elif test x"$have_ossp_uuid_c_bindings" = xyes; then : + UUID_C_INCLUDE=$OSSP_UUID_C_INCLUDE + UUID_C_LIB=$OSSP_UUID_C_LIB +elif test x"$have_dce_uuid_c_bindings" = xyes; then : + UUID_C_INCLUDE=$DCE_UUID_C_INCLUDE + UUID_C_LIB=$DCE_UUID_C_LIB +fi + + +as_fn_append CPPFLAGS " $UUID_C_INCLUDE" +LIBS="$UUID_C_LIB $LIBS" +ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "$ac_includes_default +#include <math.h> +" +if test "x$ac_cv_have_decl_isnan" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISNAN $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "_SC_LARGE_PAGESIZE" "ac_cv_have_decl__SC_LARGE_PAGESIZE" "$ac_includes_default +#include <limits.h> +#include <unistd.h> +" +if test "x$ac_cv_have_decl__SC_LARGE_PAGESIZE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SC_LARGE_PAGESIZE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PAGESIZE" "ac_cv_have_decl_PAGESIZE" "$ac_includes_default +#include <limits.h> +#include <unistd.h> +" +if test "x$ac_cv_have_decl_PAGESIZE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PAGESIZE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PAGE_SIZE" "ac_cv_have_decl_PAGE_SIZE" "$ac_includes_default +#include <limits.h> +#include <unistd.h> +" +if test "x$ac_cv_have_decl_PAGE_SIZE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PAGE_SIZE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "_SC_PAGE_SIZE" "ac_cv_have_decl__SC_PAGE_SIZE" "$ac_includes_default +#include <limits.h> +#include <unistd.h> +" +if test "x$ac_cv_have_decl__SC_PAGE_SIZE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SC_PAGE_SIZE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "_SC_PAGESIZE" "ac_cv_have_decl__SC_PAGESIZE" "$ac_includes_default +#include <limits.h> +#include <unistd.h> +" +if test "x$ac_cv_have_decl__SC_PAGESIZE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SC_PAGESIZE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "_PC_REC_XFER_ALIGN" "ac_cv_have_decl__PC_REC_XFER_ALIGN" "$ac_includes_default +#include <limits.h> +#include <unistd.h> +" +if test "x$ac_cv_have_decl__PC_REC_XFER_ALIGN" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__PC_REC_XFER_ALIGN $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "POSIX_REC_XFER_ALIGN" "ac_cv_have_decl_POSIX_REC_XFER_ALIGN" "$ac_includes_default +#include <limits.h> +#include <unistd.h> +" +if test "x$ac_cv_have_decl_POSIX_REC_XFER_ALIGN" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_POSIX_REC_XFER_ALIGN $ac_have_decl +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 +$as_echo_n "checking for library containing floor... " >&6; } +if ${ac_cv_search_floor+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char floor (); +int +main () +{ +return floor (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_floor=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_floor+:} false; then : + break +fi +done +if ${ac_cv_search_floor+:} false; then : + +else + ac_cv_search_floor=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 +$as_echo "$ac_cv_search_floor" >&6; } +ac_res=$ac_cv_search_floor +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +for builtin in __builtin_ctz +do : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_ctz is declared" >&5 +$as_echo_n "checking whether __builtin_ctz is declared... " >&6; } +if ${acx_cv_have_decl___builtin_ctz+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + unsigned lbz = __builtin_ctz(56U) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + acx_cv_have_decl___builtin_ctz=yes +else + acx_cv_have_decl___builtin_ctz=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_have_decl___builtin_ctz" >&5 +$as_echo "$acx_cv_have_decl___builtin_ctz" >&6; } + if test "x$acx_cv_have_decl___builtin_ctz" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___BUILTIN_CTZ 1 +_ACEOF + + break +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___BUILTIN_CTZ 0 +_ACEOF + +fi +done + + + +# ---------------------------------------------------------------------- +# Checks for multithreaded compiling + linking + +# Check whether --with-threads was given. +if test "${with_threads+set}" = set; then : + withval=$with_threads; +else + with_threads=yes +fi + +THREADS_INCLUDE='' +THREADS_LIBS='' +case $with_threads in #( + no) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking multithreading" >&5 +$as_echo_n "checking multithreading... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } ;; #( + yes) : + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + if test "x$PTHREAD_CC" != "x"; then : + CC="$PTHREAD_CC" +fi + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 +$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 +$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} +fi +rm -f conftest* + + ;; + + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" + ;; +esac + +# Are we compiling with Clang? + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 +$as_echo_n "checking whether $CC is Clang... " >&6; } +if ${ax_cv_PTHREAD_CLANG+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : + ax_cv_PTHREAD_CLANG=yes +fi +rm -f conftest* + + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 +$as_echo "$ax_cv_PTHREAD_CLANG" >&6; } +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +if test "x$GCC" = "xyes"; then : + ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags" +fi + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +if test "x$ax_pthread_clang" = "xyes"; then : + ax_pthread_flags="-pthread,-lpthread -pthread" +fi + + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +if test "x$ax_pthread_check_macro" = "x--"; then : + ax_pthread_check_cond=0 +else + ax_pthread_check_cond="!defined($ax_pthread_check_macro)" +fi + + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; + + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5 +$as_echo_n "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; } + ;; + + -*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 +$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ax_pthread_config+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ax_pthread_config="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$ax_pthread_config" = "xno"; then : + continue +fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 +$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <pthread.h> +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } + static void *start_routine(void *a) { return a; } +int +main () +{ +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xyes"; then : + break +fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 +$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } +if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + if test "x$ax_pthread_try" = "xunknown"; then : + break +fi + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_link="$ax_pthread_2step_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + if test "x$ax_pthread_try" = "x"; then : + ax_pthread_try=no +fi + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 +$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } +if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <pthread.h> +int +main () +{ +int attr = $ax_pthread_attr; return attr /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 +$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } + if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : + +cat >>confdefs.h <<_ACEOF +#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR +_ACEOF + + ax_pthread_joinable_attr_defined=yes + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 +$as_echo_n "checking whether more special flags are required for pthreads... " >&6; } +if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 +$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } + if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"; then : + PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <pthread.h> +int +main () +{ +int i = PTHREAD_PRIO_INHERIT; + return i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_PRIO_INHERIT=yes +else + ax_cv_PTHREAD_PRIO_INHERIT=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : + +$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + + ax_pthread_prio_inherit_defined=yes + +fi + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r; then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PTHREAD_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : + ;; +esac + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + +$as_echo "#define HAVE_LIBPTHREAD 1" >>confdefs.h + + : +else + ax_pthread_ok=no + as_fn_error $? "multithreaded settings NOT found" "$LINENO" 5 +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + CC="$PTHREAD_CC" + $as_echo "CC:$CC CFLAGS:$CFLAGS LIBS:$LIBS" >&6 ;; #( + *) : + THREADS_ROOT=$with_threads + LDFLAGS="-L$THREADS_ROOT/lib $LDFLAGS" + CPPFLAGS="-I$THREADS_ROOT/include $CPPFLAGS " + for ac_header in pthread.h +do : + ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default +" +if test "x$ac_cv_header_pthread_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREAD_H 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int +main () +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_create=yes +else + ac_cv_lib_pthread_pthread_create=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + + THREADS_LIBS=" -L$THREADS_ROOT/lib -lpthread" + THREADS_INCLUDE=" -I$THREADS_ROOT/include" ;; #( + *) : + ;; +esac + + +# ---------------------------------------------------------------------- +# Compile application with FDB5 library +FDB5_INCLUDE='' +FDB5_LIBS='' + +# Check whether --with-fdb5 was given. +if test "${with_fdb5+set}" = set; then : + withval=$with_fdb5; case "$with_fdb5" in #( + no) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdb5 library" >&5 +$as_echo_n "checking for fdb5 library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } ;; #( + yes) : + for ac_header in fdb5/api/fdb_c.h +do : + ac_fn_c_check_header_compile "$LINENO" "fdb5/api/fdb_c.h" "ac_cv_header_fdb5_api_fdb_c_h" "$ac_includes_default +" +if test "x$ac_cv_header_fdb5_api_fdb_c_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FDB5_API_FDB_C_H 1 +_ACEOF + +else + as_fn_error $? "Could not find fdb5/api/fdb_c.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdb_initialise" >&5 +$as_echo_n "checking for library containing fdb_initialise... " >&6; } +if ${ac_cv_search_fdb_initialise+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char fdb_initialise (); +int +main () +{ +return fdb_initialise (); + ; + return 0; +} +_ACEOF +for ac_lib in '' fdb5; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_fdb_initialise=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_fdb_initialise+:} false; then : + break +fi +done +if ${ac_cv_search_fdb_initialise+:} false; then : + +else + ac_cv_search_fdb_initialise=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdb_initialise" >&5 +$as_echo "$ac_cv_search_fdb_initialise" >&6; } +ac_res=$ac_cv_search_fdb_initialise +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBFDB5 1" >>confdefs.h + +else + as_fn_error $? "Could not link to fdb5" "$LINENO" 5 +fi + + FDB5_LIBS=" -lfdb5" ;; #( + *) : + FDB5_ROOT=$with_fdb5 + if test -d "$FDB5_ROOT"; then : + LDFLAGS="-L$FDB5_ROOT/lib $LDFLAGS" + CPPFLAGS="-I$FDB5_ROOT/include $CPPFLAGS" + for ac_header in fdb5/api/fdb_c.h +do : + ac_fn_c_check_header_compile "$LINENO" "fdb5/api/fdb_c.h" "ac_cv_header_fdb5_api_fdb_c_h" "$ac_includes_default +" +if test "x$ac_cv_header_fdb5_api_fdb_c_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FDB5_API_FDB_C_H 1 +_ACEOF + +else + as_fn_error $? "Could not find fdb5/api/fdb_c.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdb_initialise" >&5 +$as_echo_n "checking for library containing fdb_initialise... " >&6; } +if ${ac_cv_search_fdb_initialise+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char fdb_initialise (); +int +main () +{ +return fdb_initialise (); + ; + return 0; +} +_ACEOF +for ac_lib in '' fdb5; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_fdb_initialise=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_fdb_initialise+:} false; then : + break +fi +done +if ${ac_cv_search_fdb_initialise+:} false; then : + +else + ac_cv_search_fdb_initialise=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdb_initialise" >&5 +$as_echo "$ac_cv_search_fdb_initialise" >&6; } +ac_res=$ac_cv_search_fdb_initialise +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBFDB5 1" >>confdefs.h + +else + as_fn_error $? "Could not link to fdb5" "$LINENO" 5 +fi + + FDB5_LIBS=" -L$FDB5_ROOT/lib -lfdb5" + FDB5_INCLUDE=" -I$FDB5_ROOT/include" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: $FDB5_ROOT is not a directory! FDB5 suppressed" >&5 +$as_echo "$as_me: $FDB5_ROOT is not a directory! FDB5 suppressed" >&6;} +fi ;; #( + *) : + ;; +esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdb5 library" >&5 +$as_echo_n "checking for fdb5 library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } +fi + + + +# ---------------------------------------------------------------------- +# Compile application with SZLIB library, needed for GRIB1 +SZLIB_INCLUDE='' +SZLIB_LIBS='' + +# Check whether --with-szlib was given. +if test "${with_szlib+set}" = set; then : + withval=$with_szlib; case "$with_szlib" in #( + no) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib library" >&5 +$as_echo_n "checking for szlib library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } ;; #( + yes) : + for ac_header in szlib.h +do : + ac_fn_c_check_header_compile "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default +" +if test "x$ac_cv_header_szlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SZLIB_H 1 +_ACEOF + +else + as_fn_error $? "Could not find szlib.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SZ_BufftoBuffCompress" >&5 +$as_echo_n "checking for library containing SZ_BufftoBuffCompress... " >&6; } +if ${ac_cv_search_SZ_BufftoBuffCompress+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SZ_BufftoBuffCompress (); +int +main () +{ +return SZ_BufftoBuffCompress (); + ; + return 0; +} +_ACEOF +for ac_lib in '' sz; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_SZ_BufftoBuffCompress=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_SZ_BufftoBuffCompress+:} false; then : + break +fi +done +if ${ac_cv_search_SZ_BufftoBuffCompress+:} false; then : + +else + ac_cv_search_SZ_BufftoBuffCompress=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SZ_BufftoBuffCompress" >&5 +$as_echo "$ac_cv_search_SZ_BufftoBuffCompress" >&6; } +ac_res=$ac_cv_search_SZ_BufftoBuffCompress +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBSZ 1" >>confdefs.h + +else + as_fn_error $? "Could not link to szlib" "$LINENO" 5 +fi + + SZLIB_LIBS=" -lsz" ;; #( + *) : + SZLIB_ROOT=$with_szlib + if test -d "$SZLIB_ROOT"; then : + LDFLAGS="-L$SZLIB_ROOT/lib $LDFLAGS" + CPPFLAGS="-I$SZLIB_ROOT/include $CPPFLAGS" + for ac_header in szlib.h +do : + ac_fn_c_check_header_compile "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default +" +if test "x$ac_cv_header_szlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SZLIB_H 1 +_ACEOF + +else + as_fn_error $? "Could not find szlib.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SZ_BufftoBuffCompress" >&5 +$as_echo_n "checking for library containing SZ_BufftoBuffCompress... " >&6; } +if ${ac_cv_search_SZ_BufftoBuffCompress+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SZ_BufftoBuffCompress (); +int +main () +{ +return SZ_BufftoBuffCompress (); + ; + return 0; +} +_ACEOF +for ac_lib in '' sz; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_SZ_BufftoBuffCompress=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_SZ_BufftoBuffCompress+:} false; then : + break +fi +done +if ${ac_cv_search_SZ_BufftoBuffCompress+:} false; then : + +else + ac_cv_search_SZ_BufftoBuffCompress=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SZ_BufftoBuffCompress" >&5 +$as_echo "$ac_cv_search_SZ_BufftoBuffCompress" >&6; } +ac_res=$ac_cv_search_SZ_BufftoBuffCompress +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBSZ 1" >>confdefs.h + +else + as_fn_error $? "Could not link to szlib" "$LINENO" 5 +fi + + SZLIB_LIBS=" -L$SZLIB_ROOT/lib -lsz" + SZLIB_INCLUDE=" -I$SZLIB_ROOT/include" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: $SZLIB_ROOT is not a directory! SZLIB suppressed" >&5 +$as_echo "$as_me: $SZLIB_ROOT is not a directory! SZLIB suppressed" >&6;} +fi ;; #( + *) : + ;; +esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib library" >&5 +$as_echo_n "checking for szlib library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } +fi + + + +# ---------------------------------------------------------------------- +# Compile application with netcdf +NETCDF_ROOT='' +NETCDF_INCLUDE='' +NETCDF_LIBS='' +ENABLE_NETCDF=no +ENABLE_NC2=no +ENABLE_NC4=no +ENABLE_NC4HDF5=no +ENABLE_NC4SZLIB=no + +# Check whether --with-netcdf was given. +if test "${with_netcdf+set}" = set; then : + withval=$with_netcdf; case "$with_netcdf" in #( + no) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF library" >&5 +$as_echo_n "checking for NetCDF library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } ;; #( + yes) : + for ac_header in netcdf.h +do : + ac_fn_c_check_header_compile "$LINENO" "netcdf.h" "ac_cv_header_netcdf_h" "$ac_includes_default +" +if test "x$ac_cv_header_netcdf_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETCDF_H 1 +_ACEOF + +else + as_fn_error $? "Could not find netcdf.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nc_open" >&5 +$as_echo_n "checking for library containing nc_open... " >&6; } +if ${ac_cv_search_nc_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nc_open (); +int +main () +{ +return nc_open (); + ; + return 0; +} +_ACEOF +for ac_lib in '' netcdf; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_nc_open=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_nc_open+:} false; then : + break +fi +done +if ${ac_cv_search_nc_open+:} false; then : + +else + ac_cv_search_nc_open=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nc_open" >&5 +$as_echo "$ac_cv_search_nc_open" >&6; } +ac_res=$ac_cv_search_nc_open +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBNETCDF 1" >>confdefs.h + + ENABLE_NETCDF=yes +else + as_fn_error $? "Could not link to NetCDF library" "$LINENO" 5 +fi + + NETCDF_LIBS=" -lnetcdf" + # Extract the first word of "nc-config", so it can be a program name with args. +set dummy nc-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NC_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NC_CONFIG"; then + ac_cv_prog_NC_CONFIG="$NC_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NC_CONFIG="nc-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NC_CONFIG=$ac_cv_prog_NC_CONFIG +if test -n "$NC_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NC_CONFIG" >&5 +$as_echo "$NC_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + ;; #( + *) : + if test -d "$with_netcdf"; then : + NETCDF_ROOT=$with_netcdf + LDFLAGS="-L$NETCDF_ROOT/lib $LDFLAGS" + CPPFLAGS="-I$NETCDF_ROOT/include $CPPFLAGS" + for ac_header in netcdf.h +do : + ac_fn_c_check_header_compile "$LINENO" "netcdf.h" "ac_cv_header_netcdf_h" "$ac_includes_default +" +if test "x$ac_cv_header_netcdf_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETCDF_H 1 +_ACEOF + +else + as_fn_error $? "Could not find netcdf.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nc_open" >&5 +$as_echo_n "checking for library containing nc_open... " >&6; } +if ${ac_cv_search_nc_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nc_open (); +int +main () +{ +return nc_open (); + ; + return 0; +} +_ACEOF +for ac_lib in '' netcdf; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_nc_open=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_nc_open+:} false; then : + break +fi +done +if ${ac_cv_search_nc_open+:} false; then : + +else + ac_cv_search_nc_open=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nc_open" >&5 +$as_echo "$ac_cv_search_nc_open" >&6; } +ac_res=$ac_cv_search_nc_open +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBNETCDF 1" >>confdefs.h + + ENABLE_NETCDF=yes +else + as_fn_error $? "Could not link to NetCDF library" "$LINENO" 5 +fi + + NETCDF_LIBS=" -L$NETCDF_ROOT/lib -lnetcdf" + NETCDF_INCLUDE=" -I$NETCDF_ROOT/include" + # Extract the first word of "nc-config", so it can be a program name with args. +set dummy nc-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NC_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NC_CONFIG"; then + ac_cv_prog_NC_CONFIG="$NC_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in "$NETCDF_ROOT/bin" +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NC_CONFIG="$NETCDF_ROOT/bin/nc-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NC_CONFIG=$ac_cv_prog_NC_CONFIG +if test -n "$NC_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NC_CONFIG" >&5 +$as_echo "$NC_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: $with_netcdf is not a directory! NetCDF suppressed" >&5 +$as_echo "$as_me: $with_netcdf is not a directory! NetCDF suppressed" >&6;} +fi ;; #( + *) : + ;; +esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF library" >&5 +$as_echo_n "checking for NetCDF library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } +fi + + +if test "x$ENABLE_NETCDF" = xyes; then : + if ${NC_CONFIG:+false} :; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find nc-config! go on with default configuration" >&5 +$as_echo "$as_me: WARNING: Could not find nc-config! go on with default configuration" >&2;} +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking netcdf's OpenDAP support" >&5 +$as_echo_n "checking netcdf's OpenDAP support... " >&6; } +if ${acx_cv_have_libnc_dap+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_have_libnc_dap=no + test "x$NC_CONFIG" != "x" && \ + test "x$($NC_CONFIG --has-dap)" = "xyes" && \ + acx_cv_have_libnc_dap=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_have_libnc_dap" >&5 +$as_echo "$acx_cv_have_libnc_dap" >&6; } + if test "x$acx_cv_have_libnc_dap" = xyes; then : + +$as_echo "#define HAVE_LIBNC_DAP 1" >>confdefs.h + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking netcdf's Zarr support" >&5 +$as_echo_n "checking netcdf's Zarr support... " >&6; } +if ${acx_cv_have_nczarr+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_have_nczarr=no + test "x$NC_CONFIG" != "x" && \ + test "x$($NC_CONFIG --has-nczarr)" = "xyes" && \ + acx_cv_have_nczarr=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_have_nczarr" >&5 +$as_echo "$acx_cv_have_nczarr" >&6; } + if test "x$acx_cv_have_nczarr" = xyes; then : + +$as_echo "#define HAVE_NCZARR 1" >>confdefs.h + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking netcdf's nc2 support" >&5 +$as_echo_n "checking netcdf's nc2 support... " >&6; } +if ${acx_cv_have_netcdf2+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_have_netcdf2=no + test "x$NC_CONFIG" != "x" && \ + test "x$($NC_CONFIG --has-nc2)" = "xyes" && \ + acx_cv_have_netcdf2=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_have_netcdf2" >&5 +$as_echo "$acx_cv_have_netcdf2" >&6; } + if test "x$acx_cv_have_netcdf2" = xyes; then : + +$as_echo "#define HAVE_NETCDF2 1" >>confdefs.h + + ENABLE_NC2=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking netcdf's nc4 support" >&5 +$as_echo_n "checking netcdf's nc4 support... " >&6; } +if ${acx_cv_have_netcdf4+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_have_netcdf4=no + test "x$NC_CONFIG" != "x" && \ + test "x$($NC_CONFIG --has-nc4)" = "xyes" && \ + acx_cv_have_netcdf4=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_have_netcdf4" >&5 +$as_echo "$acx_cv_have_netcdf4" >&6; } + if test "x$acx_cv_have_netcdf4" = xyes; then : + +$as_echo "#define HAVE_NETCDF4 1" >>confdefs.h + + ENABLE_NC4=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking netcdf's nc4/hdf5 support" >&5 +$as_echo_n "checking netcdf's nc4/hdf5 support... " >&6; } +if ${acx_cv_have_nc4hdf5+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_have_nc4hdf5=no + test "x$NC_CONFIG" != "x" && \ + test "x$($NC_CONFIG --has-hdf5)" = "xyes" && \ + acx_cv_have_nc4hdf5=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_have_nc4hdf5" >&5 +$as_echo "$acx_cv_have_nc4hdf5" >&6; } + if test "x$acx_cv_have_nc4hdf5" = xyes; then : + +$as_echo "#define HAVE_NC4HDF5 1" >>confdefs.h + + ENABLE_NC4HDF5=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking netcdf's nc4/szlib support" >&5 +$as_echo_n "checking netcdf's nc4/szlib support... " >&6; } +if ${acx_cv_have_nc4szlib+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_have_nc4szlib=no + test "x$NC_CONFIG" != "x" && \ + test "x$($NC_CONFIG --has-szlib)" = "xyes" && \ + acx_cv_have_nc4szlib=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_have_nc4szlib" >&5 +$as_echo "$acx_cv_have_nc4szlib" >&6; } + if test "x$acx_cv_have_nc4szlib" = xyes; then : + +$as_echo "#define HAVE_NC4SZLIB 1" >>confdefs.h + + ENABLE_NC4SZLIB=yes +fi +fi + +if test "x$ENABLE_NC4SZLIB" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nc_def_var_szip" >&5 +$as_echo_n "checking for library containing nc_def_var_szip... " >&6; } +if ${ac_cv_search_nc_def_var_szip+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nc_def_var_szip (); +int +main () +{ +return nc_def_var_szip (); + ; + return 0; +} +_ACEOF +for ac_lib in '' netcdf; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_nc_def_var_szip=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_nc_def_var_szip+:} false; then : + break +fi +done +if ${ac_cv_search_nc_def_var_szip+:} false; then : + +else + ac_cv_search_nc_def_var_szip=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nc_def_var_szip" >&5 +$as_echo "$ac_cv_search_nc_def_var_szip" >&6; } +ac_res=$ac_cv_search_nc_def_var_szip +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_NC_DEF_VAR_SZIP 1" >>confdefs.h + +fi + +fi + +if test "x$ENABLE_NC4HDF5" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing H5TS_mutex_lock" >&5 +$as_echo_n "checking for library containing H5TS_mutex_lock... " >&6; } +if ${ac_cv_search_H5TS_mutex_lock+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char H5TS_mutex_lock (); +int +main () +{ +return H5TS_mutex_lock (); + ; + return 0; +} +_ACEOF +for ac_lib in '' netcdf; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib -lhdf5 $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_H5TS_mutex_lock=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_H5TS_mutex_lock+:} false; then : + break +fi +done +if ${ac_cv_search_H5TS_mutex_lock+:} false; then : + +else + ac_cv_search_H5TS_mutex_lock=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_H5TS_mutex_lock" >&5 +$as_echo "$ac_cv_search_H5TS_mutex_lock" >&6; } +ac_res=$ac_cv_search_H5TS_mutex_lock +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_NC4HDF5_THREADSAFE 1" >>confdefs.h + +fi + +fi + +if test "x$ENABLE_NC4HDF5" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing H5get_libversion" >&5 +$as_echo_n "checking for library containing H5get_libversion... " >&6; } +if ${ac_cv_search_H5get_libversion+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char H5get_libversion (); +int +main () +{ +return H5get_libversion (); + ; + return 0; +} +_ACEOF +for ac_lib in '' netcdf; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib -lhdf5 $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_H5get_libversion=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_H5get_libversion+:} false; then : + break +fi +done +if ${ac_cv_search_H5get_libversion+:} false; then : + +else + ac_cv_search_H5get_libversion=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_H5get_libversion" >&5 +$as_echo "$ac_cv_search_H5get_libversion" >&6; } +ac_res=$ac_cv_search_H5get_libversion +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_H5GET_LIBVERSION 1" >>confdefs.h + +fi + +fi + + + + + + + + + +# ---------------------------------------------------------------------- +# Compile application with ECCODES library (for GRIB2 support) +ECCODES_INCLUDE='' +ECCODES_LIBS='' + +# Check whether --with-eccodes was given. +if test "${with_eccodes+set}" = set; then : + withval=$with_eccodes; case "$with_eccodes" in #( + no) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECCODES library" >&5 +$as_echo_n "checking for ECCODES library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } ;; #( + yes) : + for ac_header in grib_api.h +do : + ac_fn_c_check_header_compile "$LINENO" "grib_api.h" "ac_cv_header_grib_api_h" "$ac_includes_default +" +if test "x$ac_cv_header_grib_api_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GRIB_API_H 1 +_ACEOF + +else + as_fn_error $? "Could not find grib_api.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing grib_get_message" >&5 +$as_echo_n "checking for library containing grib_get_message... " >&6; } +if ${ac_cv_search_grib_get_message+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char grib_get_message (); +int +main () +{ +return grib_get_message (); + ; + return 0; +} +_ACEOF +for ac_lib in '' eccodes; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_grib_get_message=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_grib_get_message+:} false; then : + break +fi +done +if ${ac_cv_search_grib_get_message+:} false; then : + +else + ac_cv_search_grib_get_message=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_grib_get_message" >&5 +$as_echo "$ac_cv_search_grib_get_message" >&6; } +ac_res=$ac_cv_search_grib_get_message +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBGRIB_API 1" >>confdefs.h + +else + as_fn_error $? "Could not link to eccodes library" "$LINENO" 5 +fi + ;; #( + *) : + ECCODES_ROOT=$with_eccodes + if test -d "$ECCODES_ROOT"; then : + LDFLAGS="-L$ECCODES_ROOT/lib $LDFLAGS" + CPPFLAGS="-I$ECCODES_ROOT/include $CPPFLAGS" + for ac_header in grib_api.h +do : + ac_fn_c_check_header_compile "$LINENO" "grib_api.h" "ac_cv_header_grib_api_h" "$ac_includes_default +" +if test "x$ac_cv_header_grib_api_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GRIB_API_H 1 +_ACEOF + +else + as_fn_error $? "Could not find grib_api.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing grib_get_message" >&5 +$as_echo_n "checking for library containing grib_get_message... " >&6; } +if ${ac_cv_search_grib_get_message+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char grib_get_message (); +int +main () +{ +return grib_get_message (); + ; + return 0; +} +_ACEOF +for ac_lib in '' eccodes; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_grib_get_message=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_grib_get_message+:} false; then : + break +fi +done +if ${ac_cv_search_grib_get_message+:} false; then : + +else + ac_cv_search_grib_get_message=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_grib_get_message" >&5 +$as_echo "$ac_cv_search_grib_get_message" >&6; } +ac_res=$ac_cv_search_grib_get_message +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBGRIB_API 1" >>confdefs.h + +else + as_fn_error $? "Could not link to eccodes library" "$LINENO" 5 +fi + + ECCODES_LIBS=" -L$ECCODES_ROOT/lib -leccodes" + ECCODES_INCLUDE=" -I$ECCODES_ROOT/include" +else + as_fn_error $? "$ECCODES_ROOT is not a directory! ECCODES suppressed" "$LINENO" 5 +fi ;; #( + *) : + ;; +esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ECCODES library" >&5 +$as_echo_n "checking for the ECCODES library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } +fi + + + +# AM_CONDITIONAL([HAVE_LIBGRIB_API],[test "x$with_eccodes" != 'x' -a "x$with_eccodes" != 'xno' ]) +# ---------------------------------------------------------------------- +# Compile application with GRIB_API library (for GRIB2 support) +GRIB_API_INCLUDE='' +GRIB_API_LIBS='' + +# Check whether --with-grib_api was given. +if test "${with_grib_api+set}" = set; then : + withval=$with_grib_api; case "$with_grib_api" in #( + no) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GRIB_API library" >&5 +$as_echo_n "checking for GRIB_API library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } ;; #( + yes) : + for ac_header in grib_api.h +do : + ac_fn_c_check_header_compile "$LINENO" "grib_api.h" "ac_cv_header_grib_api_h" "$ac_includes_default +" +if test "x$ac_cv_header_grib_api_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GRIB_API_H 1 +_ACEOF + +else + as_fn_error $? "Could not find grib_api.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing grib_get_message" >&5 +$as_echo_n "checking for library containing grib_get_message... " >&6; } +if ${ac_cv_search_grib_get_message+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char grib_get_message (); +int +main () +{ +return grib_get_message (); + ; + return 0; +} +_ACEOF +for ac_lib in '' grib_api; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_grib_get_message=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_grib_get_message+:} false; then : + break +fi +done +if ${ac_cv_search_grib_get_message+:} false; then : + +else + ac_cv_search_grib_get_message=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_grib_get_message" >&5 +$as_echo "$ac_cv_search_grib_get_message" >&6; } +ac_res=$ac_cv_search_grib_get_message +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBGRIB_API 1" >>confdefs.h + +else + as_fn_error $? "Could not link to grib_api library" "$LINENO" 5 +fi + ;; #( + *) : + GRIB_API_ROOT=$with_grib_api + if test -d "$GRIB_API_ROOT"; then : + LDFLAGS="-L$GRIB_API_ROOT/lib $LDFLAGS" + CPPFLAGS="-I$GRIB_API_ROOT/include $CPPFLAGS" + for ac_header in grib_api.h +do : + ac_fn_c_check_header_compile "$LINENO" "grib_api.h" "ac_cv_header_grib_api_h" "$ac_includes_default +" +if test "x$ac_cv_header_grib_api_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GRIB_API_H 1 +_ACEOF + +else + as_fn_error $? "Could not find grib_api.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing grib_get_message" >&5 +$as_echo_n "checking for library containing grib_get_message... " >&6; } +if ${ac_cv_search_grib_get_message+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char grib_get_message (); +int +main () +{ +return grib_get_message (); + ; + return 0; +} +_ACEOF +for ac_lib in '' grib_api; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_grib_get_message=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_grib_get_message+:} false; then : + break +fi +done +if ${ac_cv_search_grib_get_message+:} false; then : + +else + ac_cv_search_grib_get_message=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_grib_get_message" >&5 +$as_echo "$ac_cv_search_grib_get_message" >&6; } +ac_res=$ac_cv_search_grib_get_message +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_LIBGRIB_API 1" >>confdefs.h + +else + as_fn_error $? "Could not link to grib_api library" "$LINENO" 5 +fi + + GRIB_API_LIBS=" -L$GRIB_API_ROOT/lib -lgrib_api" + GRIB_API_INCLUDE=" -I$GRIB_API_ROOT/include" +else + as_fn_error $? "$GRIB_API_ROOT is not a directory! GRIB_API suppressed" "$LINENO" 5 +fi ;; #( + *) : + ;; +esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the GRIB_API library" >&5 +$as_echo_n "checking for the GRIB_API library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } +fi + + + + if test \( "x$with_grib_api" != 'x' -a "x$with_grib_api" != 'xno' \) -o \( "x$with_eccodes" != 'x' -a "x$with_eccodes" != 'xno' \) ; then + HAVE_LIBGRIB_API_TRUE= + HAVE_LIBGRIB_API_FALSE='#' +else + HAVE_LIBGRIB_API_TRUE='#' + HAVE_LIBGRIB_API_FALSE= +fi + +# ---------------------------------------------------------------------- +# Enable GRIB support +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GRIB support" >&5 +$as_echo_n "checking for GRIB support... " >&6; } +# Check whether --enable-grib was given. +if test "${enable_grib+set}" = set; then : + enableval=$enable_grib; if test "x$enable_grib" != 'xno'; then : + +$as_echo "#define HAVE_LIBGRIB 1" >>confdefs.h + + enable_grib=yes +fi +else + +$as_echo "#define HAVE_LIBGRIB 1" >>confdefs.h + + enable_grib=yes +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_grib" >&5 +$as_echo "$enable_grib" >&6; } +ENABLE_GRIB=$enable_grib + +# ---------------------------------------------------------------------- +# Enable ACROSS support +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACROSS support" >&5 +$as_echo_n "checking for ACROSS support... " >&6; } +# Check whether --enable-across was given. +if test "${enable_across+set}" = set; then : + enableval=$enable_across; if test "x$enable_across" != 'xno'; then : + +$as_echo "#define HAVE_ACROSS 1" >>confdefs.h + + enable_across=yes +fi +else + +$as_echo "#define HAVE_ACROSS 1" >>confdefs.h + + enable_across=yes +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_across" >&5 +$as_echo "$enable_across" >&6; } +ENABLE_ACROSS=$enable_across + +# ---------------------------------------------------------------------- +# Compile interface with internal CGRIBEX library +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CGRIBEX support" >&5 +$as_echo_n "checking for CGRIBEX support... " >&6; } +# Check whether --enable-cgribex was given. +if test "${enable_cgribex+set}" = set; then : + enableval=$enable_cgribex; if test "x$enable_cgribex" != 'xno'; then : + +$as_echo "#define HAVE_LIBCGRIBEX 1" >>confdefs.h + + enable_cgribex=yes +fi +else + +$as_echo "#define HAVE_LIBCGRIBEX 1" >>confdefs.h + + enable_cgribex=yes +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cgribex" >&5 +$as_echo "$enable_cgribex" >&6; } +ENABLE_CGRIBEX=$enable_cgribex + +# ---------------------------------------------------------------------- +# Compile interface with internal SERVICE library +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SERVICE support" >&5 +$as_echo_n "checking for SERVICE support... " >&6; } +# Check whether --enable-service was given. +if test "${enable_service+set}" = set; then : + enableval=$enable_service; if test "x$enable_service" != 'xno'; then : + +$as_echo "#define HAVE_LIBSERVICE 1" >>confdefs.h + + enable_service=yes +fi +else + +$as_echo "#define HAVE_LIBSERVICE 1" >>confdefs.h + + enable_service=yes +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_service" >&5 +$as_echo "$enable_service" >&6; } +ENABLE_SERVICE=$enable_service + +# ---------------------------------------------------------------------- +# Compile interface with internal EXTRA library +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXTRA support" >&5 +$as_echo_n "checking for EXTRA support... " >&6; } +# Check whether --enable-extra was given. +if test "${enable_extra+set}" = set; then : + enableval=$enable_extra; if test "x$enable_extra" != 'xno'; then : + +$as_echo "#define HAVE_LIBEXTRA 1" >>confdefs.h + + enable_extra=yes +fi +else + +$as_echo "#define HAVE_LIBEXTRA 1" >>confdefs.h + + enable_extra=yes +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_extra" >&5 +$as_echo "$enable_extra" >&6; } +ENABLE_EXTRA=$enable_extra + +# ---------------------------------------------------------------------- +# Compile interface with internal IEG library +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IEG support" >&5 +$as_echo_n "checking for IEG support... " >&6; } +# Check whether --enable-ieg was given. +if test "${enable_ieg+set}" = set; then : + enableval=$enable_ieg; if test "x$enable_ieg" != 'xno'; then : + +$as_echo "#define HAVE_LIBIEG 1" >>confdefs.h + + enable_ieg=yes +fi +else + +$as_echo "#define HAVE_LIBIEG 1" >>confdefs.h + + enable_ieg=yes +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ieg" >&5 +$as_echo "$enable_ieg" >&6; } +ENABLE_IEG=$enable_ieg + +# ---------------------------------------------------------------------- +# At the moment, there are two possible CDI bindings +# (default for CDO) linking directly to CDI convenience library with libtool +# (default for CDI) build and link to a shared CDI library +if test "x$CDO_DISABLE_CDILIB" = "x1"; then : + enable_cdi_lib=no +else + enable_cdi_lib=yes +fi +# save CDI binding mode for later automake use + if test x$enable_cdi_lib = 'xyes'; then + ENABLE_CDI_LIB_TRUE= + ENABLE_CDI_LIB_FALSE='#' +else + ENABLE_CDI_LIB_TRUE='#' + ENABLE_CDI_LIB_FALSE= +fi + +# create shell variables for the representation of configure results +if test x$enable_cdi_lib = 'xno'; then : + ENABLE_CDI_LIB=false + +else + ENABLE_CDI_LIB=true + +fi +# ---------------------------------------------------------------------- +# Build a static CDI +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for building an additional static CDI binary" >&5 +$as_echo_n "checking for building an additional static CDI binary... " >&6; } +# Check whether --enable-all-static was given. +if test "${enable_all_static+set}" = set; then : + enableval=$enable_all_static; if test "x$enable_all_static" != "xno"; then : + enable_all_static=yes +else + enable_all_static=no +fi +else + enable_all_static=no +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_all_static" >&5 +$as_echo "$enable_all_static" >&6; } + if test x$enable_all_static = 'xyes'; then + ENABLE_ALL_STATIC_TRUE= + ENABLE_ALL_STATIC_FALSE='#' +else + ENABLE_ALL_STATIC_TRUE='#' + ENABLE_ALL_STATIC_FALSE= +fi + +# ---------------------------------------------------------------------- +# Build CDO with HIRLAM extensions +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HIRLAM extensions" >&5 +$as_echo_n "checking for HIRLAM extensions... " >&6; } +# Check whether --enable-hirlam-extensions was given. +if test "${enable_hirlam_extensions+set}" = set; then : + enableval=$enable_hirlam_extensions; if test "x$enable_hirlam_extensions" != "xno"; then : + +$as_echo "#define HIRLAM_EXTENSIONS 1" >>confdefs.h + + enable_hirlam_extensions=yes +else + enable_hirlam_extensions=no +fi +else + enable_hirlam_extensions=no +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_hirlam_extensions" >&5 +$as_echo "$enable_hirlam_extensions" >&6; } + if test x$enable_hirlam_extensions = 'xyes'; then + ENABLE_HIRLAM_EXTENSIONS_TRUE= + ENABLE_HIRLAM_EXTENSIONS_FALSE='#' +else + ENABLE_HIRLAM_EXTENSIONS_TRUE='#' + ENABLE_HIRLAM_EXTENSIONS_FALSE= +fi + +# ---------------------------------------------------------------------- +# Build CDI application +# Check whether --enable-cdi-app was given. +if test "${enable_cdi_app+set}" = set; then : + enableval=$enable_cdi_app; +else + enable_cdi_app=yes +fi + + if test x$enable_cdi_app = 'xyes'; then + ENABLE_CDI_APP_TRUE= + ENABLE_CDI_APP_FALSE='#' +else + ENABLE_CDI_APP_TRUE='#' + ENABLE_CDI_APP_FALSE= +fi + +# + + if test "x$ENABLE_NETCDF" = xyes; then + ENABLE_NETCDF_TRUE= + ENABLE_NETCDF_FALSE='#' +else + ENABLE_NETCDF_TRUE='#' + ENABLE_NETCDF_FALSE= +fi + +for ac_func in grib_get_length +do : + ac_fn_c_check_func "$LINENO" "grib_get_length" "ac_cv_func_grib_get_length" +if test "x$ac_cv_func_grib_get_length" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GRIB_GET_LENGTH 1 +_ACEOF + +fi +done + + + +cat >>confdefs.h <<_ACEOF +#define COMPILER "$CC $CFLAGS" +_ACEOF + +COMP_VERSION= +case $CC in #( + pgcc*) : + COMP_VERSION=`$CC -V | head -2 | tail -n 1` ;; #( + *gcc*) : + COMP_VERSION=`$CC --version | head -n 1` ;; #( + g++*) : + COMP_VERSION=`$CC --version | head -n 1` ;; #( + clang*) : + COMP_VERSION=`$CC --version | head -n 1` ;; #( + sxc*) : + COMP_VERSION=`$CC -V 2>&1 | tail -n 1` ;; #( + xlc*) : + COMP_VERSION=`$CC -qversion 2>&1 | head -n 1` ;; #( + *) : + COMP_VERSION=`$CC -V 2>&1 | sed -n 1p` ;; +esac +test -z "$COMP_VERSION" && COMP_VERSION=unknown + +cat >>confdefs.h <<_ACEOF +#define COMP_VERSION "$COMP_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SYSTEM_TYPE "$ac_cv_build" +_ACEOF + +SYSTEM_TYPE="$ac_cv_build" + + +# Check whether --enable-ppm-dist-array was given. +if test "${enable_ppm_dist_array+set}" = set; then : + enableval=$enable_ppm_dist_array; case $enableval in #( + no|auto) : + ;; #( + *) : + if test "x$enable_mpi" = xno; then : + as_fn_error $? "usage of the PPM distributed array can be enabled (--enable-ppm-dist-array) only if the parallel I/O with MPI is enabled (--enable-mpi)" "$LINENO" 5 +fi + enable_ppm_dist_array=yes ;; +esac +else + enable_ppm_dist_array=auto +fi + + +build_pio_fc_programs=no +have_ppm=no +HAVE_PPM_DIST_ARRAY=no + + +have_parallel_nc4=no +if test "x$enable_mpi" = xyes; then : + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + + + + + + + have_MPI_c_bindings=yes + + +# Check whether --with-mpi-root was given. +if test "${with_mpi_root+set}" = set; then : + withval=$with_mpi_root; MPIROOT=$withval +fi + + if ${MPIROOT+:} false; then : + if ${MPI_C_LIB+:} false; then : + +else + MPI_C_LIB="-L$MPIROOT/lib" +fi + if ${MPI_C_INCLUDE+:} false; then : + +else + MPI_C_INCLUDE="-I$MPIROOT/include" +fi +fi + +# Check whether --with-mpi-include was given. +if test "${with_mpi_include+set}" = set; then : + withval=$with_mpi_include; MPI_C_INCLUDE="-I$withval" +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h extra include path" >&5 +$as_echo_n "checking for mpi.h extra include path... " >&6; } + if ${acx_cv_c_include_mpi_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_include_search_mpi_h_SAVE="$CPPFLAGS" + while :; do + for ac_incdir in '' +do : + if test -z "$ac_incdir"; then : + ac_res="none required" + CPPFLAGS="$MPI_C_INCLUDE $ac_include_search_mpi_h_SAVE" +else + ac_res="-I$ac_incdir" + CPPFLAGS="$MPI_C_INCLUDE $ac_res $ac_include_search_mpi_h_SAVE" +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include <mpi.h> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + acx_cv_c_include_mpi_h=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if ${acx_cv_c_include_mpi_h+:} false; then : + if test -z "$ac_incdir"; then : + acx_cv_c_include_mpi_h="$MPI_C_INCLUDE" +else + acx_cv_c_include_mpi_h="$MPI_C_INCLUDE -I$ac_incdir" +fi +fi + if ${acx_cv_c_include_mpi_h+:} false; then : + break +fi +done + if ${acx_cv_c_include_mpi_h+:} false; then : + break +fi + + break + done + CPPFLAGS=$ac_include_search_mpi_h_SAVE +fi + + if ${acx_cv_c_include_mpi_h+:} false; then : + if test x"$acx_cv_c_include_mpi_h" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_c_include_mpi_h" >&5 +$as_echo "$acx_cv_c_include_mpi_h" >&6; } +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +fi + if ${acx_cv_c_include_mpi_h+:} false; then : + MPI_C_INCLUDE=`echo "$acx_cv_c_include_mpi_h" | sed -e 's/^ *//;s/ *$//'` +else + have_MPI_c_bindings=no; { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "required header mpi.h not found or not compilable +See \`config.log' for more details" "$LINENO" 5; } +fi + + +# Check whether --with-mpi-lib was given. +if test "${with_mpi_lib+set}" = set; then : + withval=$with_mpi_lib; MPI_C_LIB="-L$withval" +fi + + if test "x$have_MPI_c_bindings" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MPI_Waitall" >&5 +$as_echo_n "checking for library containing MPI_Waitall... " >&6; } + if ${acx_cv_option_search_MPI_Waitall_c+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_option_func_search_save_LIBS=$LIBS + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char MPI_Waitall (); +int +main () +{ +return MPI_Waitall (); + ; + return 0; +} +_ACEOF + for ac_lib in '' mpi mpich +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$MPI_C_LIB $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$MPI_C_LIB $ac_res $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_MPI_Waitall_c="$MPI_C_LIB" +else + acx_cv_option_search_MPI_Waitall_c="$MPI_C_LIB -l$ac_lib" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_MPI_Waitall_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_MPI_Waitall_c+:} false; then : + break +fi + for acx_libset in "" +do : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char MPI_Waitall (); +int +main () +{ +return MPI_Waitall (); + ; + return 0; +} +_ACEOF + for ac_lib in '' mpi mpich +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$MPI_C_LIB $acx_libset $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$MPI_C_LIB $ac_res $acx_libset $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_MPI_Waitall_c="$MPI_C_LIB $acx_libset" +else + acx_cv_option_search_MPI_Waitall_c="$MPI_C_LIB -l$ac_lib $acx_libset" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_MPI_Waitall_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_MPI_Waitall_c+:} false; then : + break +fi + +done + break + done + LIBS=$acx_option_func_search_save_LIBS +fi + + if ${acx_cv_option_search_MPI_Waitall_c+:} false; then : + if test x"$acx_cv_option_search_MPI_Waitall_c" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_option_search_MPI_Waitall_c" >&5 +$as_echo "$acx_cv_option_search_MPI_Waitall_c" >&6; } +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + have_MPI_c_bindings=no + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot link C MPI programs +See \`config.log' for more details" "$LINENO" 5; } +fi + + MPI_C_LIB=`echo "$acx_cv_option_search_MPI_Waitall_c" | sed -e 's/^ *//;s/ *$//'` + +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + + saved_CPPFLAGS=$CPPFLAGS + saved_LIBS=$LIBS + as_fn_append CPPFLAGS " $MPI_C_INCLUDE" + LIBS="$MPI_C_LIB $LIBS" + for ac_prog in mpirun mpiexec +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MPI_LAUNCH+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MPI_LAUNCH in + [\\/]* | ?:[\\/]*) + ac_cv_path_MPI_LAUNCH="$MPI_LAUNCH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPI_LAUNCH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +MPI_LAUNCH=$ac_cv_path_MPI_LAUNCH +if test -n "$MPI_LAUNCH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPI_LAUNCH" >&5 +$as_echo "$MPI_LAUNCH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MPI_LAUNCH" && break +done +test -n "$MPI_LAUNCH" || MPI_LAUNCH="true" + + + if test x"$MPI_LAUNCH" = xtrue; then : + MPI_LAUNCH_failMsg="Failed to find MPI launcher" +else + if test x"$cross_compiling" = xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MPI_LAUNCH works" >&5 +$as_echo_n "checking if $MPI_LAUNCH works... " >&6; } + if test -x `echo "$MPI_LAUNCH" | sed -e 's/[ ].*//'`; then : + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <stdio.h> +#include <stdlib.h> + +#include <mpi.h> + +#define xmpi(ret) \\ + do { \\ + if (ret != MPI_SUCCESS) \\ + exit(EXIT_FAILURE); \\ + } while (0) + +int +main(int argc, char **argv) +{ + xmpi(MPI_Init(&argc, &argv)); + char *numarg = argv[1]; + int cmdnum = atoi(numarg); + int procnum = 1; + xmpi(MPI_Allreduce(MPI_IN_PLACE, &procnum, 1, MPI_INT, MPI_SUM, + MPI_COMM_WORLD)); + xmpi(MPI_Finalize()); + return (procnum == cmdnum)?EXIT_SUCCESS:EXIT_FAILURE; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + acx_mpirun_test="$MPI_LAUNCH -n 4 ./conftest$EXEEXT 4" + if expr "$ac_link" : '.*/libtool --mode=link' >/dev/null; then : + acx_mpirun_test=`echo "$ac_link" | sed -e 's@\(.*/libtool --mode=\)link.*@\1@'`"execute $acx_mpirun_test" +fi + { { echo "running $acx_mpirun_test"; } >&5 + (LIBC_FATAL_STDERR_=1 $acx_mpirun_test >&2) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test $ac_status -eq 0; then : + +else + MPI_LAUNCH=true ; MPI_LAUNCH_failMsg="Failed to run MPI programs" +fi +else + MPI_LAUNCH=true ; MPI_LAUNCH_failMsg="Cannot compile or link simple MPI program" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + +else + MPI_LAUNCH_failMsg="Cannot execute $MPI_LAUNCH" ; MPI_LAUNCH=true +fi + if test x"$MPI_LAUNCH" = xtrue; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +fi +fi + if test x"$MPI_LAUNCH" = xtrue; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPI launch command not found or not compilable" >&5 +$as_echo "$as_me: WARNING: MPI launch command not found or not compilable" >&2;} +else + : +fi + + CPPFLAGS=$saved_CPPFLAGS + LIBS=$saved_LIBS + + build_pio_fc_programs=$enable_cf_interface + test "x$FC" = xno && build_pio_fc_programs=no + if test "x$build_pio_fc_programs" = xyes; then : + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=FC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=FC $ac_compile" + have_MPI_fc_bindings=yes + +# Check whether --with-mpi-root was given. +if test "${with_mpi_root+set}" = set; then : + withval=$with_mpi_root; MPIROOT=$withval +fi + + if ${MPIROOT+:} false; then : + if ${MPI_FC_LIB+:} false; then : + +else + MPI_FC_LIB="-L$MPIROOT/lib" +fi + if ${MPI_FC_MOD+:} false; then : + +else + MPI_FC_MOD="$FC_MOD_FLAG$MPIROOT/include" +fi +fi + +# Check whether --with-mpi-fc-mod was given. +if test "${with_mpi_fc_mod+set}" = set; then : + withval=$with_mpi_fc_mod; MPI_FC_MOD="$FC_MOD_FLAG$withval" +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi extra module path" >&5 +$as_echo_n "checking for mpi extra module path... " >&6; } + if ${acx_cv_fortran_mod_mpi+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_mod_search_FCFLAGS_SAVE=$FCFLAGS + for ac_moddir in '' "$MPIROOT/include" "$MPIROOT/lib" +do : + if test -z "$ac_moddir"; then : + ac_res="none required" + FCFLAGS="$MPI_FC_MOD $ac_mod_search_FCFLAGS_SAVE" +else + ac_res="$FC_MOD_FLAG$ac_moddir" + FCFLAGS="$MPI_FC_MOD $ac_res $ac_mod_search_FCFLAGS_SAVE" +fi + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=FC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=FC $ac_compile" + + cat > conftest.$ac_ext <<_ACEOF + program conftest + use mpi + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + acx_cv_fortran_mod_mpi=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=FC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=FC $ac_compile" + + if ${acx_cv_fortran_mod_mpi+:} false; then : + if test -z "$ac_moddir"; then : + acx_cv_fortran_mod_mpi="$MPI_FC_MOD" +else + acx_cv_fortran_mod_mpi="$MPI_FC_MOD $FC_MOD_FLAG$ac_moddir" +fi + break +fi +done + FCFLAGS=$ac_mod_search_FCFLAGS_SAVE +fi + + if ${acx_cv_fortran_mod_mpi+:} false; then : + if test x"$acx_cv_fortran_mod_mpi" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_fortran_mod_mpi" >&5 +$as_echo "$acx_cv_fortran_mod_mpi" >&6; } +fi + MPI_FC_MOD=$acx_cv_fortran_mod_mpi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + have_MPI_fc_bindings=no; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: required Fortran module mpi not found or not compilable" >&5 +$as_echo "$as_me: WARNING: required Fortran module mpi not found or not compilable" >&2;} + build_pio_fc_programs=no +fi + + +# Check whether --with-mpi-fc-lib was given. +if test "${with_mpi_fc_lib+set}" = set; then : + withval=$with_mpi_fc_lib; MPI_FC_LIB="-L$withval" +fi + + if test "x$have_MPI_fc_bindings" = xyes; then : + acx_save_FCFLAGS=$FCFLAGS + FCFLAGS="$MPI_FC_MOD $FCFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mpi_waitall" >&5 +$as_echo_n "checking for library containing mpi_waitall... " >&6; } + if ${acx_cv_option_search_mpi_waitall_fc+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_option_func_search_save_LIBS=$LIBS + while :; do + cat > conftest.$ac_ext <<_ACEOF + program conftest + use mpi + INTEGER :: req(1), stat(mpi_status_size, 1), ierror + call mpi_waitall(1, req, stat, ierror) + end +_ACEOF + for ac_lib in '' mpi mpi_f90 mpi_f77 mpich +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$MPI_FC_LIB $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$MPI_FC_LIB $ac_res $acx_option_func_search_save_LIBS" +fi + if ac_fn_fc_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_mpi_waitall_fc="$MPI_FC_LIB" +else + acx_cv_option_search_mpi_waitall_fc="$MPI_FC_LIB -l$ac_lib" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_mpi_waitall_fc+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_mpi_waitall_fc+:} false; then : + break +fi + for acx_libset in "-lmpi_f77 -lmpi" "-lmpi" +do : + cat > conftest.$ac_ext <<_ACEOF + program conftest + use mpi + INTEGER :: req(1), stat(mpi_status_size, 1), ierror + call mpi_waitall(1, req, stat, ierror) + end +_ACEOF + for ac_lib in '' mpi mpi_f90 mpi_f77 mpich +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$MPI_FC_LIB $acx_libset $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$MPI_FC_LIB $ac_res $acx_libset $acx_option_func_search_save_LIBS" +fi + if ac_fn_fc_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_mpi_waitall_fc="$MPI_FC_LIB $acx_libset" +else + acx_cv_option_search_mpi_waitall_fc="$MPI_FC_LIB -l$ac_lib $acx_libset" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_mpi_waitall_fc+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_mpi_waitall_fc+:} false; then : + break +fi + +done + break + done + LIBS=$acx_option_func_search_save_LIBS +fi + + if ${acx_cv_option_search_mpi_waitall_fc+:} false; then : + if test x"$acx_cv_option_search_mpi_waitall_fc" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_option_search_mpi_waitall_fc" >&5 +$as_echo "$acx_cv_option_search_mpi_waitall_fc" >&6; } +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + have_MPI_fc_bindings=no ; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot link Fortran MPI programs" >&5 +$as_echo "$as_me: WARNING: cannot link Fortran MPI programs" >&2;} + build_pio_fc_programs=no +fi + + FCFLAGS=$acx_save_FCFLAGS + MPI_FC_LIB=`echo "$acx_cv_option_search_mpi_waitall_fc" | sed -e 's/^ *//;s/ *$//'` + +fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + +fi + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + yaxt_c_CFLAGS=$YAXT_C_INCLUDE + yaxt_c_LIBS=$YAXT_C_LIB + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaxt_c" >&5 +$as_echo_n "checking for yaxt_c... " >&6; } + +if test -n "$yaxt_c_CFLAGS"; then + pkg_cv_yaxt_c_CFLAGS="$yaxt_c_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"yaxt_c\""; } >&5 + ($PKG_CONFIG --exists --print-errors "yaxt_c") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_yaxt_c_CFLAGS=`$PKG_CONFIG --cflags "yaxt_c" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$yaxt_c_LIBS"; then + pkg_cv_yaxt_c_LIBS="$yaxt_c_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"yaxt_c\""; } >&5 + ($PKG_CONFIG --exists --print-errors "yaxt_c") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_yaxt_c_LIBS=`$PKG_CONFIG --libs "yaxt_c" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + yaxt_c_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "yaxt_c" 2>&1` + else + yaxt_c_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "yaxt_c" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$yaxt_c_PKG_ERRORS" >&5 + + yaxt_CFLAGS=$YAXT_C_INCLUDE + yaxt_LIBS=$YAXT_C_LIB + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaxt" >&5 +$as_echo_n "checking for yaxt... " >&6; } + +if test -n "$yaxt_CFLAGS"; then + pkg_cv_yaxt_CFLAGS="$yaxt_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"yaxt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "yaxt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_yaxt_CFLAGS=`$PKG_CONFIG --cflags "yaxt" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$yaxt_LIBS"; then + pkg_cv_yaxt_LIBS="$yaxt_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"yaxt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "yaxt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_yaxt_LIBS=`$PKG_CONFIG --libs "yaxt" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + yaxt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "yaxt" 2>&1` + else + yaxt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "yaxt" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$yaxt_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + yaxt_CFLAGS=$pkg_cv_yaxt_CFLAGS + yaxt_LIBS=$pkg_cv_yaxt_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + YAXT_VERSION=`$PKG_CONFIG --modversion yaxt` + YAXT_MAJOR_VERSION=`expr X"$YAXT_VERSION" : "X\([0-9]*\)"` + YAXT_MINOR_VERSION=`echo "$YAXT_VERSION" | sed -e 's/^[0-9]*\.\([0-9]*\).*/\1/'` + if test "$YAXT_MAJOR_VERSION" -gt 0 -o "$YAXT_MINOR_VERSION" -gt 4; then : + YAXT_C_INCLUDE=$yaxt_CFLAGS + YAXT_C_LIB=`echo "$yaxt_LIBS" | sed -e 's/-lyaxt *$/-lyaxt_c/'` +fi +fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + yaxt_CFLAGS=$YAXT_C_INCLUDE + yaxt_LIBS=$YAXT_C_LIB + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaxt" >&5 +$as_echo_n "checking for yaxt... " >&6; } + +if test -n "$yaxt_CFLAGS"; then + pkg_cv_yaxt_CFLAGS="$yaxt_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"yaxt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "yaxt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_yaxt_CFLAGS=`$PKG_CONFIG --cflags "yaxt" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$yaxt_LIBS"; then + pkg_cv_yaxt_LIBS="$yaxt_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"yaxt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "yaxt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_yaxt_LIBS=`$PKG_CONFIG --libs "yaxt" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + yaxt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "yaxt" 2>&1` + else + yaxt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "yaxt" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$yaxt_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + yaxt_CFLAGS=$pkg_cv_yaxt_CFLAGS + yaxt_LIBS=$pkg_cv_yaxt_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + YAXT_VERSION=`$PKG_CONFIG --modversion yaxt` + YAXT_MAJOR_VERSION=`expr X"$YAXT_VERSION" : "X\([0-9]*\)"` + YAXT_MINOR_VERSION=`echo "$YAXT_VERSION" | sed -e 's/^[0-9]*\.\([0-9]*\).*/\1/'` + if test "$YAXT_MAJOR_VERSION" -gt 0 -o "$YAXT_MINOR_VERSION" -gt 4; then : + YAXT_C_INCLUDE=$yaxt_CFLAGS + YAXT_C_LIB=`echo "$yaxt_LIBS" | sed -e 's/-lyaxt *$/-lyaxt_c/'` +fi +fi +else + yaxt_c_CFLAGS=$pkg_cv_yaxt_c_CFLAGS + yaxt_c_LIBS=$pkg_cv_yaxt_c_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + YAXT_C_INCLUDE=$yaxt_c_CFLAGS + YAXT_C_LIB=$yaxt_c_LIBS +fi + saved_CPPFLAGS=$CPPFLAGS + saved_LIBS=$LIBS + as_fn_append CPPFLAGS " $MPI_C_INCLUDE" + LIBS="$MPI_C_LIB $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaxt.h extra include path" >&5 +$as_echo_n "checking for yaxt.h extra include path... " >&6; } + if ${acx_cv_c_include_yaxt_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_include_search_yaxt_h_SAVE="$CPPFLAGS" + while :; do + for ac_incdir in '' +do : + if test -z "$ac_incdir"; then : + ac_res="none required" + CPPFLAGS="$YAXT_C_INCLUDE $ac_include_search_yaxt_h_SAVE" +else + ac_res="-I$ac_incdir" + CPPFLAGS="$YAXT_C_INCLUDE $ac_res $ac_include_search_yaxt_h_SAVE" +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include <yaxt.h> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + acx_cv_c_include_yaxt_h=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if ${acx_cv_c_include_yaxt_h+:} false; then : + if test -z "$ac_incdir"; then : + acx_cv_c_include_yaxt_h="$YAXT_C_INCLUDE" +else + acx_cv_c_include_yaxt_h="$YAXT_C_INCLUDE -I$ac_incdir" +fi +fi + if ${acx_cv_c_include_yaxt_h+:} false; then : + break +fi +done + if ${acx_cv_c_include_yaxt_h+:} false; then : + break +fi + + break + done + CPPFLAGS=$ac_include_search_yaxt_h_SAVE +fi + + if ${acx_cv_c_include_yaxt_h+:} false; then : + if test x"$acx_cv_c_include_yaxt_h" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_c_include_yaxt_h" >&5 +$as_echo "$acx_cv_c_include_yaxt_h" >&6; } +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +fi + if ${acx_cv_c_include_yaxt_h+:} false; then : + YAXT_C_INCLUDE=$acx_cv_c_include_yaxt_h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing xt_initialized" >&5 +$as_echo_n "checking for library containing xt_initialized... " >&6; } + if ${acx_cv_option_search_xt_initialized_c+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_option_func_search_save_LIBS=$LIBS + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xt_initialized (); +int +main () +{ +return xt_initialized (); + ; + return 0; +} +_ACEOF + for ac_lib in '' yaxt_c yaxt +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$YAXT_C_LIB $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$YAXT_C_LIB $ac_res $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_xt_initialized_c="$YAXT_C_LIB" +else + acx_cv_option_search_xt_initialized_c="$YAXT_C_LIB -l$ac_lib" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_xt_initialized_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_xt_initialized_c+:} false; then : + break +fi + for acx_libset in "" +do : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xt_initialized (); +int +main () +{ +return xt_initialized (); + ; + return 0; +} +_ACEOF + for ac_lib in '' yaxt_c yaxt +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$YAXT_C_LIB $acx_libset $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$YAXT_C_LIB $ac_res $acx_libset $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_xt_initialized_c="$YAXT_C_LIB $acx_libset" +else + acx_cv_option_search_xt_initialized_c="$YAXT_C_LIB -l$ac_lib $acx_libset" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_xt_initialized_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_xt_initialized_c+:} false; then : + break +fi + +done + break + done + LIBS=$acx_option_func_search_save_LIBS +fi + + if ${acx_cv_option_search_xt_initialized_c+:} false; then : + if test x"$acx_cv_option_search_xt_initialized_c" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_option_search_xt_initialized_c" >&5 +$as_echo "$acx_cv_option_search_xt_initialized_c" >&6; } +fi + YAXT_C_LIB=$acx_cv_option_search_xt_initialized_c +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot link C YAXT programs +See \`config.log' for more details" "$LINENO" 5; } +fi + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "required header yaxt.h not found or not compilable +See \`config.log' for more details" "$LINENO" 5; } +fi + + defined_Xt_uid=no + ac_fn_c_check_decl "$LINENO" "MPI_UINT64_T" "ac_cv_have_decl_MPI_UINT64_T" "$ac_includes_default +#include <mpi.h> +" +if test "x$ac_cv_have_decl_MPI_UINT64_T" = xyes; then : + $as_echo "#define YAXT_UID_DT MPI_UINT64_T" >>confdefs.h + + defined_Xt_uid=yes +else + as_fn_append CPPFLAGS " $YAXT_C_INCLUDE" + LIBS="$YAXT_C_LIB $LIBS" + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of Xt_uid" >&5 +$as_echo_n "checking size of Xt_uid... " >&6; } +if ${ac_cv_sizeof_Xt_uid+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (Xt_uid))" "ac_cv_sizeof_Xt_uid" "$ac_includes_default +#include <yaxt.h> +"; then : + +else + if test "$ac_cv_type_Xt_uid" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (Xt_uid) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_Xt_uid=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_Xt_uid" >&5 +$as_echo "$ac_cv_sizeof_Xt_uid" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_XT_UID $ac_cv_sizeof_Xt_uid +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 +$as_echo_n "checking size of unsigned long... " >&6; } +if ${ac_cv_sizeof_unsigned_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_unsigned_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (unsigned long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_unsigned_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 +$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long +_ACEOF + + + if test "$ac_cv_sizeof_unsigned_long" -eq "$ac_cv_sizeof_Xt_uid"; then : + $as_echo "#define YAXT_UID_DT MPI_UNSIGNED_LONG" >>confdefs.h + + defined_Xt_uid=yes +else + ac_fn_c_check_decl "$LINENO" "MPI_UNSIGNED_LONG_LONG" "ac_cv_have_decl_MPI_UNSIGNED_LONG_LONG" "$ac_includes_default +#include <mpi.h> +" +if test "x$ac_cv_have_decl_MPI_UNSIGNED_LONG_LONG" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MPI_UNSIGNED_LONG_LONG $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 +$as_echo_n "checking size of unsigned long long... " >&6; } +if ${ac_cv_sizeof_unsigned_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_unsigned_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (unsigned long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_unsigned_long_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 +$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long +_ACEOF + + + if test "$ac_cv_sizeof_unsigned_long_long" -eq "$ac_cv_sizeof_Xt_uid"; then : + $as_echo "#define YAXT_UID_DT MPI_UNSIGNED_LONG_LONG" >>confdefs.h + + defined_Xt_uid=yes +fi +fi + +fi +fi + + if test "x$defined_Xt_uid" = xno; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no way to communicate Xt_uid found +See \`config.log' for more details" "$LINENO" 5; } +fi + { defined_Xt_uid=; unset defined_Xt_uid;} + CPPFLAGS=$saved_CPPFLAGS + LIBS=$saved_LIBS + + if test "x$build_pio_fc_programs" = xyes; then : + yaxt_CFLAGS=$YAXT_FC_MOD + yaxt_LIBS=$YAXT_FC_LIB + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaxt" >&5 +$as_echo_n "checking for yaxt... " >&6; } + +if test -n "$yaxt_CFLAGS"; then + pkg_cv_yaxt_CFLAGS="$yaxt_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"yaxt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "yaxt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_yaxt_CFLAGS=`$PKG_CONFIG --cflags "yaxt" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$yaxt_LIBS"; then + pkg_cv_yaxt_LIBS="$yaxt_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"yaxt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "yaxt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_yaxt_LIBS=`$PKG_CONFIG --libs "yaxt" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + yaxt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "yaxt" 2>&1` + else + yaxt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "yaxt" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$yaxt_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + yaxt_CFLAGS=$pkg_cv_yaxt_CFLAGS + yaxt_LIBS=$pkg_cv_yaxt_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + YAXT_FC_MOD=$yaxt_CFLAGS + YAXT_FC_LIB=$yaxt_LIBS +fi + saved_FCFLAGS=$FCFLAGS + saved_LIBS=$LIBS + as_fn_append FCFLAGS " $MPI_FC_MOD" + LIBS="$MPI_FC_LIB $LIBS" + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=FC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=FC $ac_compile" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaxt extra module path" >&5 +$as_echo_n "checking for yaxt extra module path... " >&6; } + if ${acx_cv_fortran_mod_yaxt+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_mod_search_FCFLAGS_SAVE=$FCFLAGS + for ac_moddir in '' +do : + if test -z "$ac_moddir"; then : + ac_res="none required" + FCFLAGS="$YAXT_FC_MOD $ac_mod_search_FCFLAGS_SAVE" +else + ac_res="$FC_MOD_FLAG$ac_moddir" + FCFLAGS="$YAXT_FC_MOD $ac_res $ac_mod_search_FCFLAGS_SAVE" +fi + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=FC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=FC $ac_compile" + + cat > conftest.$ac_ext <<_ACEOF + program conftest + use yaxt + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + acx_cv_fortran_mod_yaxt=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=FC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=FC $ac_compile" + + if ${acx_cv_fortran_mod_yaxt+:} false; then : + if test -z "$ac_moddir"; then : + acx_cv_fortran_mod_yaxt="$YAXT_FC_MOD" +else + acx_cv_fortran_mod_yaxt="$YAXT_FC_MOD $FC_MOD_FLAG$ac_moddir" +fi + break +fi +done + FCFLAGS=$ac_mod_search_FCFLAGS_SAVE +fi + + if ${acx_cv_fortran_mod_yaxt+:} false; then : + if test x"$acx_cv_fortran_mod_yaxt" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_fortran_mod_yaxt" >&5 +$as_echo "$acx_cv_fortran_mod_yaxt" >&6; } +fi + YAXT_FC_MOD=$acx_cv_fortran_mod_yaxt + as_fn_append FCFLAGS " $YAXT_FC_MOD" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing xt_initialized" >&5 +$as_echo_n "checking for library containing xt_initialized... " >&6; } + if ${acx_cv_option_search_xt_initialized_fc+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_option_func_search_save_LIBS=$LIBS + while :; do + cat > conftest.$ac_ext <<_ACEOF + program conftest + use yaxt + logical is_initialized + is_initialized = xt_initialized() + call xt_finalize() + end +_ACEOF + for ac_lib in '' yaxt +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$YAXT_FC_LIB $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$YAXT_FC_LIB $ac_res $acx_option_func_search_save_LIBS" +fi + if ac_fn_fc_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_xt_initialized_fc="$YAXT_FC_LIB" +else + acx_cv_option_search_xt_initialized_fc="$YAXT_FC_LIB -l$ac_lib" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_xt_initialized_fc+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_xt_initialized_fc+:} false; then : + break +fi + for acx_libset in "-lyaxt_c" +do : + cat > conftest.$ac_ext <<_ACEOF + program conftest + use yaxt + logical is_initialized + is_initialized = xt_initialized() + call xt_finalize() + end +_ACEOF + for ac_lib in '' yaxt +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$YAXT_FC_LIB $acx_libset $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$YAXT_FC_LIB $ac_res $acx_libset $acx_option_func_search_save_LIBS" +fi + if ac_fn_fc_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_xt_initialized_fc="$YAXT_FC_LIB $acx_libset" +else + acx_cv_option_search_xt_initialized_fc="$YAXT_FC_LIB -l$ac_lib $acx_libset" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_xt_initialized_fc+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_xt_initialized_fc+:} false; then : + break +fi + +done + break + done + LIBS=$acx_option_func_search_save_LIBS +fi + + if ${acx_cv_option_search_xt_initialized_fc+:} false; then : + if test x"$acx_cv_option_search_xt_initialized_fc" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_option_search_xt_initialized_fc" >&5 +$as_echo "$acx_cv_option_search_xt_initialized_fc" >&6; } +fi + YAXT_FC_LIB=$acx_cv_option_search_xt_initialized_fc +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot link Fortran YAXT programs" >&5 +$as_echo "$as_me: WARNING: cannot link Fortran YAXT programs" >&2;} + build_pio_fc_programs=no +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: required Fortran module yaxt not found or not compilable" >&5 +$as_echo "$as_me: WARNING: required Fortran module yaxt not found or not compilable" >&2;} + build_pio_fc_programs=no +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + FCFLAGS=$saved_FCFLAGS + LIBS=$saved_LIBS +fi + + ppm_core_CFLAGS=$PPM_CORE_C_INCLUDE + ppm_core_LIBS=$PPM_CORE_C_LIB + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ppm_core" >&5 +$as_echo_n "checking for ppm_core... " >&6; } + +if test -n "$ppm_core_CFLAGS"; then + pkg_cv_ppm_core_CFLAGS="$ppm_core_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"scales-ppm-core\""; } >&5 + ($PKG_CONFIG --exists --print-errors "scales-ppm-core") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ppm_core_CFLAGS=`$PKG_CONFIG --cflags "scales-ppm-core" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$ppm_core_LIBS"; then + pkg_cv_ppm_core_LIBS="$ppm_core_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"scales-ppm-core\""; } >&5 + ($PKG_CONFIG --exists --print-errors "scales-ppm-core") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ppm_core_LIBS=`$PKG_CONFIG --libs "scales-ppm-core" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ppm_core_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "scales-ppm-core" 2>&1` + else + ppm_core_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "scales-ppm-core" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$ppm_core_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + ppm_core_CFLAGS=$pkg_cv_ppm_core_CFLAGS + ppm_core_LIBS=$pkg_cv_ppm_core_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + PPM_CORE_C_INCLUDE=$ppm_core_CFLAGS + PPM_CORE_C_LIB=$ppm_core_LIBS +fi + saved_CPPFLAGS=$CPPFLAGS + saved_LIBS=$LIBS + as_fn_append CPPFLAGS " $MPI_C_INCLUDE" + LIBS="$MPI_C_LIB $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ppm/ppm.h extra include path" >&5 +$as_echo_n "checking for ppm/ppm.h extra include path... " >&6; } + if ${acx_cv_c_include_ppm_ppm_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_include_search_ppm_ppm_h_SAVE="$CPPFLAGS" + while :; do + for ac_incdir in '' +do : + if test -z "$ac_incdir"; then : + ac_res="none required" + CPPFLAGS="$PPM_CORE_C_INCLUDE $ac_include_search_ppm_ppm_h_SAVE" +else + ac_res="-I$ac_incdir" + CPPFLAGS="$PPM_CORE_C_INCLUDE $ac_res $ac_include_search_ppm_ppm_h_SAVE" +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include <ppm/ppm.h> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + acx_cv_c_include_ppm_ppm_h=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if ${acx_cv_c_include_ppm_ppm_h+:} false; then : + if test -z "$ac_incdir"; then : + acx_cv_c_include_ppm_ppm_h="$PPM_CORE_C_INCLUDE" +else + acx_cv_c_include_ppm_ppm_h="$PPM_CORE_C_INCLUDE -I$ac_incdir" +fi +fi + if ${acx_cv_c_include_ppm_ppm_h+:} false; then : + break +fi +done + if ${acx_cv_c_include_ppm_ppm_h+:} false; then : + break +fi + + break + done + CPPFLAGS=$ac_include_search_ppm_ppm_h_SAVE +fi + + if ${acx_cv_c_include_ppm_ppm_h+:} false; then : + if test x"$acx_cv_c_include_ppm_ppm_h" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_c_include_ppm_ppm_h" >&5 +$as_echo "$acx_cv_c_include_ppm_ppm_h" >&6; } +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +fi + if ${acx_cv_c_include_ppm_ppm_h+:} false; then : + PPM_CORE_C_INCLUDE=$acx_cv_c_include_ppm_ppm_h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing PPM_initialize" >&5 +$as_echo_n "checking for library containing PPM_initialize... " >&6; } + if ${acx_cv_option_search_PPM_initialize_c+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_option_func_search_save_LIBS=$LIBS + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char PPM_initialize (); +int +main () +{ +return PPM_initialize (); + ; + return 0; +} +_ACEOF + for ac_lib in '' scalesppmcore +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$PPM_CORE_C_LIB $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$PPM_CORE_C_LIB $ac_res $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_PPM_initialize_c="$PPM_CORE_C_LIB" +else + acx_cv_option_search_PPM_initialize_c="$PPM_CORE_C_LIB -l$ac_lib" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_PPM_initialize_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_PPM_initialize_c+:} false; then : + break +fi + for acx_libset in "" +do : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char PPM_initialize (); +int +main () +{ +return PPM_initialize (); + ; + return 0; +} +_ACEOF + for ac_lib in '' scalesppmcore +do : + if test -z "$ac_lib"; then : + ac_res="none required" + LIBS="$PPM_CORE_C_LIB $acx_libset $acx_option_func_search_save_LIBS" +else + ac_res="-l$ac_lib" + LIBS="$PPM_CORE_C_LIB $ac_res $acx_libset $acx_option_func_search_save_LIBS" +fi + if ac_fn_c_try_link "$LINENO"; then : + if test x"$ac_res" = x"none required"; then : + acx_cv_option_search_PPM_initialize_c="$PPM_CORE_C_LIB $acx_libset" +else + acx_cv_option_search_PPM_initialize_c="$PPM_CORE_C_LIB -l$ac_lib $acx_libset" +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${acx_cv_option_search_PPM_initialize_c+:} false; then : + break +fi +done + rm conftest.$ac_ext + if ${acx_cv_option_search_PPM_initialize_c+:} false; then : + break +fi + +done + break + done + LIBS=$acx_option_func_search_save_LIBS +fi + + if ${acx_cv_option_search_PPM_initialize_c+:} false; then : + if test x"$acx_cv_option_search_PPM_initialize_c" = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none required)" >&5 +$as_echo "(none required)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_option_search_PPM_initialize_c" >&5 +$as_echo "$acx_cv_option_search_PPM_initialize_c" >&6; } +fi + PPM_CORE_C_LIB=$acx_cv_option_search_PPM_initialize_c + have_ppm=yes + +$as_echo "#define HAVE_PPM_CORE /**/" >>confdefs.h + + as_fn_append CPPFLAGS " $PPM_CORE_C_INCLUDE" + if test "x$enable_ppm_dist_array" != xno; then : + for ac_header in ppm/dist_array.h +do : + ac_fn_c_check_header_compile "$LINENO" "ppm/dist_array.h" "ac_cv_header_ppm_dist_array_h" "$ac_includes_default +" +if test "x$ac_cv_header_ppm_dist_array_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PPM_DIST_ARRAY_H 1 +_ACEOF + HAVE_PPM_DIST_ARRAY=yes +fi + +done + +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot link C SCALES-PPM-CORE programs" >&5 +$as_echo "$as_me: WARNING: cannot link C SCALES-PPM-CORE programs" >&2;} +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: required header ppm/ppm.h not found or not compilable" >&5 +$as_echo "$as_me: WARNING: required header ppm/ppm.h not found or not compilable" >&2;} +fi + + CPPFLAGS=$saved_CPPFLAGS + LIBS=$saved_LIBS + + if test "x$ENABLE_NETCDF" = xyes; then : + for ac_header in netcdf_meta.h +do : + ac_fn_c_check_header_compile "$LINENO" "netcdf_meta.h" "ac_cv_header_netcdf_meta_h" "$ac_includes_default +#include <netcdf.h> +" +if test "x$ac_cv_header_netcdf_meta_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETCDF_META_H 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking parallel netcdf's pnetcdf support" >&5 +$as_echo_n "checking parallel netcdf's pnetcdf support... " >&6; } +if ${acx_cv_have_pnetcdf+:} false; then : + $as_echo_n "(cached) " >&6 +else + acx_cv_have_pnetcdf=no + test "x$NC_CONFIG" != "x" && \ + test "x$($NC_CONFIG --has-pnetcdf)" = "xyes" && \ + acx_cv_have_pnetcdf=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_have_pnetcdf" >&5 +$as_echo "$acx_cv_have_pnetcdf" >&6; } + if test "x$acx_cv_have_pnetcdf" = xyes; then : + +$as_echo "#define HAVE_NETCDF_PAR_PNETCDF 1" >>confdefs.h + +fi +fi + + if test "x$ENABLE_NC4" = xyes && test "x$have_ppm" = xyes; then : + saved_CPPFLAGS=$CPPFLAGS + as_fn_append CPPFLAGS " $MPI_C_INCLUDE" + for ac_header in netcdf_par.h +do : + ac_fn_c_check_header_compile "$LINENO" "netcdf_par.h" "ac_cv_header_netcdf_par_h" "$ac_includes_default +#include <netcdf.h> +" +if test "x$ac_cv_header_netcdf_par_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETCDF_PAR_H 1 +_ACEOF + +fi + +done + + ac_fn_c_check_decl "$LINENO" "MPI_Bcast" "ac_cv_have_decl_MPI_Bcast" "$ac_includes_default +#include <netcdf.h> +#ifdef HAVE_NETCDF_PAR_H +#include <netcdf_par.h> +#endif +" +if test "x$ac_cv_have_decl_MPI_Bcast" = xyes; then : + have_parallel_nc4=yes + ac_fn_c_check_decl "$LINENO" "nc_inq_format_extended" "ac_cv_have_decl_nc_inq_format_extended" "$ac_includes_default +#include <netcdf.h> +" +if test "x$ac_cv_have_decl_nc_inq_format_extended" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NC_INQ_FORMAT_EXTENDED $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: The supplied netCDF library does not support nc_inq_format_extended." >&5 +$as_echo "$as_me: The supplied netCDF library does not support nc_inq_format_extended." >&6;} +fi + + +$as_echo "#define HAVE_PARALLEL_NC4 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the supplied netCDF library does not support MPI parallel invocations" >&5 +$as_echo "$as_me: WARNING: the supplied netCDF library does not support MPI parallel invocations" >&2;} +fi + + CPPFLAGS=$saved_CPPFLAGS + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 +$as_echo_n "checking for thread local storage (TLS) class... " >&6; } + if ${ac_cv_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do + case $ax_tls_keyword in #( + none) : + ac_cv_tls=none ; break ;; #( + *) : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +int +main () +{ +static $ax_tls_keyword int bar; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_tls=$ax_tls_keyword ; break +else + ac_cv_tls=none + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; +esac + done + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 +$as_echo "$ac_cv_tls" >&6; } + + if test "$ac_cv_tls" != "none"; then : + +cat >>confdefs.h <<_ACEOF +#define TLS $ac_cv_tls +_ACEOF + + : +else + ac_cv_tls=`$CC -qversion 2>&1 | sed -n '/^IBM XL C/{ +n +s/^Version: \([0-9]*\).*/\1/ +t print +b +: print +p +}'` + if test x"$ac_cv_tls" = x; then : + ac_cv_tls=`$CC -V | sed -n '/^pgcc /{ +s/^pgcc \(0-90-9.*\).*/\1/ +p +}'` +# pgcc 18.1 and newer support TLS if switched to C11 mode + as_arg_v1=$ac_cv_tls +as_arg_v2=18.9 +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + ac_cv_tls=none ;; #( + 0) : + ac_cv_tls=none ;; #( + 2) : + saved_CFLAGS=$CFLAGS + case " $CFLAGS " in #( + -c11 ) : + ;; #( + *) : + CFLAGS="$CFLAGS -c11" ;; +esac + if test x"$CFLAGS" = x"$saved_CFLAGS"; then : + ac_cv_tls=none +else + { $as_echo "$as_me:${as_lineno-$LINENO}: retrying with -c11 added to CFLAGS" >&5 +$as_echo "$as_me: retrying with -c11 added to CFLAGS" >&6;} + { ac_cv_tls=; unset ac_cv_tls;} + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 +$as_echo_n "checking for thread local storage (TLS) class... " >&6; } + if ${ac_cv_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do + case $ax_tls_keyword in #( + none) : + ac_cv_tls=none ; break ;; #( + *) : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +int +main () +{ +static $ax_tls_keyword int bar; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_tls=$ax_tls_keyword ; break +else + ac_cv_tls=none + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; +esac + done + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 +$as_echo "$ac_cv_tls" >&6; } + + if test "$ac_cv_tls" != "none"; then : + +cat >>confdefs.h <<_ACEOF +#define TLS $ac_cv_tls +_ACEOF + + : +else + CFLAGS=$saved_CFLAGS +fi + +fi ;; #( + *) : + ;; +esac +elif test "$ac_cv_tls" -gt 7; then : + # unless the user already set the -qtls option, add it and retry test + saved_CFLAGS=$CFLAGS + CFLAGS=`echo "$CFLAGS" | sed -n '/.*-qtls\(=[^ ]*\)\{0,1\}/{ +p +q +} +s/$/ -qtls=initial-exec/ +p +q +'` + if test x"$CFLAGS" = x"$saved_CFLAGS"; then : + ac_cv_tls=none +else + { $as_echo "$as_me:${as_lineno-$LINENO}: retrying with -qtls=initial-exec added to CFLAGS" >&5 +$as_echo "$as_me: retrying with -qtls=initial-exec added to CFLAGS" >&6;} + { ac_cv_tls=; unset ac_cv_tls;} + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 +$as_echo_n "checking for thread local storage (TLS) class... " >&6; } + if ${ac_cv_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do + case $ax_tls_keyword in #( + none) : + ac_cv_tls=none ; break ;; #( + *) : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +int +main () +{ +static $ax_tls_keyword int bar; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_tls=$ax_tls_keyword ; break +else + ac_cv_tls=none + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; +esac + done + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 +$as_echo "$ac_cv_tls" >&6; } + + if test "$ac_cv_tls" != "none"; then : + +cat >>confdefs.h <<_ACEOF +#define TLS $ac_cv_tls +_ACEOF + + : +else + CFLAGS=$saved_CFLAGS +fi + +fi + +else + ac_cv_tls=none +fi +fi + + + +fi + + LIBRT='' + + ac_fn_c_check_decl "$LINENO" "_POSIX_ASYNCHRONOUS_IO" "ac_cv_have_decl__POSIX_ASYNCHRONOUS_IO" "$ac_includes_default" +if test "x$ac_cv_have_decl__POSIX_ASYNCHRONOUS_IO" = xyes; then : + saved_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aio_suspend" >&5 +$as_echo_n "checking for library containing aio_suspend... " >&6; } +if ${ac_cv_search_aio_suspend+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char aio_suspend (); +int +main () +{ +return aio_suspend (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_aio_suspend=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_aio_suspend+:} false; then : + break +fi +done +if ${ac_cv_search_aio_suspend+:} false; then : + +else + ac_cv_search_aio_suspend=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aio_suspend" >&5 +$as_echo "$ac_cv_search_aio_suspend" >&6; } +ac_res=$ac_cv_search_aio_suspend +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_res" = "none required" || LIBRT=$ac_res +fi + + LIBS=$saved_LIBS +fi + +else + YAXT_C_INCLUDE=; YAXT_C_LIB= + MPI_C_INCLUDE=; MPI_C_LIB= +fi +case "$enable_ppm_dist_array$HAVE_PPM_DIST_ARRAY" in #( + yesyes|no*) : + ;; #( + auto*) : + enable_ppm_dist_array=$HAVE_PPM_DIST_ARRAY ;; #( + *) : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "usage of the PPM distributed array is requested but the required headers and libraries are not found +See \`config.log' for more details" "$LINENO" 5; } ;; +esac +if test "x$have_ppm" = xno; then : + PPM_CORE_C_INCLUDE=; PPM_CORE_C_LIB= +fi +if test "x$build_pio_fc_programs" = xno; then : + YAXT_FC_MOD=; YAXT_FC_LIB= + MPI_FC_MOD=; MPI_FC_LIB= +fi + if test "x$build_pio_fc_programs" = xyes; then + BUILD_PIO_FC_PROGRAMS_TRUE= + BUILD_PIO_FC_PROGRAMS_FALSE='#' +else + BUILD_PIO_FC_PROGRAMS_TRUE='#' + BUILD_PIO_FC_PROGRAMS_FALSE= +fi + + if test "x$enable_mpi" = xyes; then + ENABLE_MPI_TRUE= + ENABLE_MPI_FALSE='#' +else + ENABLE_MPI_TRUE='#' + ENABLE_MPI_FALSE= +fi + + if test "x$have_parallel_nc4" = xyes; then + HAVE_PARALLEL_NC4_TRUE= + HAVE_PARALLEL_NC4_FALSE='#' +else + HAVE_PARALLEL_NC4_TRUE='#' + HAVE_PARALLEL_NC4_FALSE= +fi + + + +SWIG=${SWIG-"${am_missing_run}swig"} + + +if test "x$enable_ruby_interface" = xyes; then : + + for ac_prog in ruby +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_RUBY+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $RUBY in + [\\/]* | ?:[\\/]*) + ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +RUBY=$ac_cv_path_RUBY +if test -n "$RUBY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5 +$as_echo "$RUBY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$RUBY" && break +done + + ruby_CPPFLAGS=`$RUBY $srcdir/config/interface.rb 2>/dev/null` + if test $? -ne 0; then : + as_fn_error $? "Ruby interface is requested but the Ruby interpreter is not found" "$LINENO" 5 +fi + saved_CPPFLAGS=$CPPFLAGS + as_fn_append CPPFLAGS " $ruby_CPPFLAGS" + ac_fn_c_check_header_compile "$LINENO" "ruby.h" "ac_cv_header_ruby_h" "$ac_includes_default +" +if test "x$ac_cv_header_ruby_h" = xyes; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Ruby interface is requested but the required header ruby.h not found or not compilable +See \`config.log' for more details" "$LINENO" 5; } +fi + + + CPPFLAGS=$saved_CPPFLAGS +else + +RUBY=${RUBY-"${am_missing_run}ruby"} + +fi + if test "x$enable_ruby_interface" = xyes; then + ENABLE_RUBY_INTERFACE_TRUE= + ENABLE_RUBY_INTERFACE_FALSE='#' +else + ENABLE_RUBY_INTERFACE_TRUE='#' + ENABLE_RUBY_INTERFACE_FALSE= +fi + + +if test "x$enable_python_interface" = xyes; then : + if ${PYTHON+:} false; then : + case $PYTHON in #( + [\\/]* | ?:[\\/]*) : + ;; #( + *) : + PYTHON= ;; +esac +fi + + + + + + + # Find any Python interpreter. + if test -z "$PYTHON"; then + for ac_prog in python python2 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PYTHON" && break +done +test -n "$PYTHON" || PYTHON=":" + + fi + am_display_PYTHON=python + + + if test "$PYTHON" = :; then + : + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[:2])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + if test "x$prefix" = xNONE; then + am__usable_prefix=$ac_default_prefix + else + am__usable_prefix=$prefix + fi + + # Allow user to request using sys.* values from Python, + # instead of the GNU $prefix values. + +# Check whether --with-python-sys-prefix was given. +if test "${with_python_sys_prefix+set}" = set; then : + withval=$with_python_sys_prefix; am_use_python_sys=: +else + am_use_python_sys=false +fi + + + # Allow user to override whatever the default Python prefix is. + +# Check whether --with-python_prefix was given. +if test "${with_python_prefix+set}" = set; then : + withval=$with_python_prefix; am_python_prefix_subst=$withval + am_cv_python_prefix=$withval + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit $am_display_PYTHON prefix" >&5 +$as_echo_n "checking for explicit $am_display_PYTHON prefix... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5 +$as_echo "$am_cv_python_prefix" >&6; } +else + + if $am_use_python_sys; then + # using python sys.prefix value, not GNU + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python default $am_display_PYTHON prefix" >&5 +$as_echo_n "checking for python default $am_display_PYTHON prefix... " >&6; } +if ${am_cv_python_prefix+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5 +$as_echo "$am_cv_python_prefix" >&6; } + + case $am_cv_python_prefix in + $am__usable_prefix*) + am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'` + am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"` + ;; + *) + am_python_prefix_subst=$am_cv_python_prefix + ;; + esac + else # using GNU prefix value, not python sys.prefix + am_python_prefix_subst='${prefix}' + am_python_prefix=$am_python_prefix_subst + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU default $am_display_PYTHON prefix" >&5 +$as_echo_n "checking for GNU default $am_display_PYTHON prefix... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_python_prefix" >&5 +$as_echo "$am_python_prefix" >&6; } + fi +fi + + # Substituting python_prefix_subst value. + PYTHON_PREFIX=$am_python_prefix_subst + + + # emacs-page Now do it all over again for Python exec_prefix, but with yet + # another conditional: fall back to regular prefix if that was specified. + +# Check whether --with-python_exec_prefix was given. +if test "${with_python_exec_prefix+set}" = set; then : + withval=$with_python_exec_prefix; am_python_exec_prefix_subst=$withval + am_cv_python_exec_prefix=$withval + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit $am_display_PYTHON exec_prefix" >&5 +$as_echo_n "checking for explicit $am_display_PYTHON exec_prefix... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5 +$as_echo "$am_cv_python_exec_prefix" >&6; } +else + + # no explicit --with-python_exec_prefix, but if + # --with-python_prefix was given, use its value for python_exec_prefix too. + if test -n "$with_python_prefix"; then : + am_python_exec_prefix_subst=$with_python_prefix + am_cv_python_exec_prefix=$with_python_prefix + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python_prefix-given $am_display_PYTHON exec_prefix" >&5 +$as_echo_n "checking for python_prefix-given $am_display_PYTHON exec_prefix... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5 +$as_echo "$am_cv_python_exec_prefix" >&6; } +else + + # Set am__usable_exec_prefix whether using GNU or Python values, + # since we use that variable for pyexecdir. + if test "x$exec_prefix" = xNONE; then + am__usable_exec_prefix=$am__usable_prefix + else + am__usable_exec_prefix=$exec_prefix + fi + # + if $am_use_python_sys; then # using python sys.exec_prefix, not GNU + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python default $am_display_PYTHON exec_prefix" >&5 +$as_echo_n "checking for python default $am_display_PYTHON exec_prefix... " >&6; } +if ${am_cv_python_exec_prefix+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5 +$as_echo "$am_cv_python_exec_prefix" >&6; } + case $am_cv_python_exec_prefix in + $am__usable_exec_prefix*) + am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'` + am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"` + ;; + *) + am_python_exec_prefix_subst=$am_cv_python_exec_prefix + ;; + esac + else # using GNU $exec_prefix, not python sys.exec_prefix + am_python_exec_prefix_subst='${exec_prefix}' + am_python_exec_prefix=$am_python_exec_prefix_subst + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU default $am_display_PYTHON exec_prefix" >&5 +$as_echo_n "checking for GNU default $am_display_PYTHON exec_prefix... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_python_exec_prefix" >&5 +$as_echo "$am_python_exec_prefix" >&6; } + fi +fi +fi + + # Substituting python_exec_prefix_subst. + PYTHON_EXEC_PREFIX=$am_python_exec_prefix_subst + + + # Factor out some code duplication into this shell variable. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# <https://github.com/pypa/virtualenv/issues/118> +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory (pythondir)" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory (pythondir)... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$am_cv_python_prefix" = x; then + am_py_prefix=$am__usable_prefix + else + am_py_prefix=$am_cv_python_prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + # + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages" + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory (pyexecdir)" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory (pyexecdir)... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$am_cv_python_exec_prefix" = x; then + am_py_exec_prefix=$am__usable_exec_prefix + else + am_py_exec_prefix=$am_cv_python_exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') +sys.stdout.write(sitedir)"` + # + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages" + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + fi + + if $PYTHON -c 'import sys' >/dev/null 2>&1; then : + +else + as_fn_error $? "Python interface is requested but the Python interpreter is not found" "$LINENO" 5 +fi + PYTHON_EXTRA_LDFLAGS=${PYTHON_EXTRA_LDFLAGS-' '} + PYTHON_EXTRA_LIBS=${PYTHON_EXTRA_LIBS-' '} + + # + # Allow the use of a (user set) custom python version + # + + + # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. +set dummy python$PYTHON_VERSION; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON"; then + as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for a version of Python >= 2.1.0 + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver >= '2.1.0')"` + if test "$ac_supports_python_ver" != "True"; then + if test -z "$PYTHON_NOVERSIONCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " +This version of the AC_PYTHON_DEVEL macro +doesn't work properly with versions of Python before +2.1.0. You may need to re-run configure, setting the +variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG, +PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. +Moreover, to disable this check, set PYTHON_NOVERSIONCHECK +to something else than an empty string. + +See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + # + # If the macro parameter ``version'' is set, honour it. + # A Python shim class, VPy, is used to implement correct version comparisons via + # string expressions, since e.g. a naive textual ">= 2.7.3" won't work for + # Python 2.7.10 (the ".1" being evaluated as less than ".3"). + # + if test -n ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5 +$as_echo_n "checking for a version of Python ... " >&6; } + cat << EOF > ax_python_devel_vpy.py +class VPy: + def vtup(self, s): + return tuple(map(int, s.strip().replace("rc", ".").split("."))) + def __init__(self): + import sys + self.vpy = tuple(sys.version_info) + def __eq__(self, s): + return self.vpy == self.vtup(s) + def __ne__(self, s): + return self.vpy != self.vtup(s) + def __lt__(self, s): + return self.vpy < self.vtup(s) + def __gt__(self, s): + return self.vpy > self.vtup(s) + def __le__(self, s): + return self.vpy <= self.vtup(s) + def __ge__(self, s): + return self.vpy >= self.vtup(s) +EOF + ac_supports_python_ver=`$PYTHON -c "import ax_python_devel_vpy; \ + ver = ax_python_devel_vpy.VPy(); \ + print (ver )"` + rm -rf ax_python_devel_vpy*.py* __pycache__/ax_python_devel_vpy*.py* + if test "$ac_supports_python_ver" = "True"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "this package requires Python . +If you have it installed, but it isn't the default Python +interpreter in your system path, please pass the PYTHON_VERSION +variable to configure. See \`\`configure --help'' for reference. +" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check if you have distutils, else fail + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the sysconfig Python package" >&5 +$as_echo_n "checking for the sysconfig Python package... " >&6; } + ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1` + if test $? -eq 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + IMPORT_SYSCONFIG="import sysconfig" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } + ac_sysconfig_result=`$PYTHON -c "from distutils import sysconfig" 2>&1` + if test $? -eq 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + IMPORT_SYSCONFIG="from distutils import sysconfig" + else + as_fn_error $? "cannot import Python module \"distutils\". +Please check your Python installation. The error was: +$ac_sysconfig_result" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check for Python include path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } + if test -z "$PYTHON_CPPFLAGS"; then + if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then + # sysconfig module has different functions + python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_path ('include'));"` + plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_path ('platinclude'));"` + else + # old distutils way + python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_python_inc (plat_specific=1));"` + fi + if test -n "${python_path}"; then + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi + fi + PYTHON_CPPFLAGS=$python_path + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } + + + # + # Check for Python library path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } + if test -z "$PYTHON_LIBS"; then + # (makes two attempts to ensure we've got a version number + # from the interpreter) + ac_python_version=`cat<<EOD | $PYTHON - + +# join all versioning strings, on some systems +# major/minor numbers could be in different list elements +from sysconfig import * +e = get_config_var('VERSION') +if e is not None: + print(e) +EOD` + + if test -z "$ac_python_version"; then + if test -n "$PYTHON_VERSION"; then + ac_python_version=$PYTHON_VERSION + else + ac_python_version=`$PYTHON -c "import sys; \ + print ("%d.%d" % sys.version_info[:2])"` + fi + fi + + # Make the versioning information available to the compiler + +cat >>confdefs.h <<_ACEOF +#define HAVE_PYTHON "$ac_python_version" +_ACEOF + + + # First, the library directory: + ac_python_libdir=`cat<<EOD | $PYTHON - + +# There should be only one +$IMPORT_SYSCONFIG +e = sysconfig.get_config_var('LIBDIR') +if e is not None: + print (e) +EOD` + + # Now, for the library: + ac_python_library=`cat<<EOD | $PYTHON - + +$IMPORT_SYSCONFIG +c = sysconfig.get_config_vars() +if 'LDVERSION' in c: + print ('python'+c['LDVERSION']) +else: + print ('python'+c['VERSION']) +EOD` + + # This small piece shamelessly adapted from PostgreSQL python macro; + # credits goes to momjian, I think. I'd like to put the right name + # in the credits, if someone can point me in the right direction... ? + # + if test -n "$ac_python_libdir" -a -n "$ac_python_library" + then + # use the official shared library + ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"` + PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library" + else + # old way: use libpython from python_configdir + ac_python_libdir=`$PYTHON -c \ + "from sysconfig import get_python_lib as f; \ + import os; \ + print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"` + PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version" + fi + + if test -z "PYTHON_LIBS"; then + as_fn_error $? " + Cannot determine location of your Python DSO. Please check it was installed with + dynamic libraries enabled, or try setting PYTHON_LIBS by hand. + " "$LINENO" 5 + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LIBS" >&5 +$as_echo "$PYTHON_LIBS" >&6; } + + + # + # Check for site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } + if test -z "$PYTHON_SITE_PKG"; then + if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then + PYTHON_SITE_PKG=`$PYTHON -c " +$IMPORT_SYSCONFIG; +if hasattr(sysconfig, 'get_default_scheme'): + scheme = sysconfig.get_default_scheme() +else: + scheme = sysconfig._get_default_scheme() +if scheme == 'posix_local': + # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/ + scheme = 'posix_prefix' +prefix = '$prefix' +if prefix == 'NONE': + prefix = '$ac_default_prefix' +sitedir = sysconfig.get_path('purelib', scheme, vars={'base': prefix}) +print(sitedir)"` + else + # distutils.sysconfig way + PYTHON_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_python_lib(0,0));"` + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } + + + # + # Check for platform-specific site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python platform specific site-packages path" >&5 +$as_echo_n "checking for Python platform specific site-packages path... " >&6; } + if test -z "$PYTHON_PLATFORM_SITE_PKG"; then + if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then + PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c " +$IMPORT_SYSCONFIG; +if hasattr(sysconfig, 'get_default_scheme'): + scheme = sysconfig.get_default_scheme() +else: + scheme = sysconfig._get_default_scheme() +if scheme == 'posix_local': + # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/ + scheme = 'posix_prefix' +prefix = '$prefix' +if prefix == 'NONE': + prefix = '$ac_default_prefix' +sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase': prefix}) +print(sitedir)"` + else + # distutils.sysconfig way + PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_python_lib(1,0));"` + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_PLATFORM_SITE_PKG" >&5 +$as_echo "$PYTHON_PLATFORM_SITE_PKG" >&6; } + + + # + # libraries which must be linked in when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } + if test -z "$PYTHON_EXTRA_LIBS"; then + PYTHON_EXTRA_LIBS=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + conf = sysconfig.get_config_var; \ + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } + + + # + # linking flags needed when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } + if test -z "$PYTHON_EXTRA_LDFLAGS"; then + PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + conf = sysconfig.get_config_var; \ + print (conf('LINKFORSHARED'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } + + + # + # final check to see if everything compiles alright + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_LDFLAGS="$LDFLAGS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS" + LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <Python.h> +int +main () +{ +Py_Initialize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pythonexists=yes +else + pythonexists=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="$ac_pwd/libtool --mode=link --tag=CC $ac_link" +ac_compile="$ac_pwd/libtool --mode=compile --tag=CC $ac_compile" + + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + LDFLAGS="$ac_save_LDFLAGS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } + + if test ! "x$pythonexists" = "xyes"; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LIBS environment variable. + Example: ./configure LIBS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + ERROR! + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + +See \`config.log' for more details" "$LINENO" 5; } + PYTHON_VERSION="" + fi + + # + # all done! + # + +fi + if test "x$enable_python_interface" = xyes; then + ENABLE_PYTHON_INTERFACE_TRUE= + ENABLE_PYTHON_INTERFACE_FALSE='#' +else + ENABLE_PYTHON_INTERFACE_TRUE='#' + ENABLE_PYTHON_INTERFACE_FALSE= +fi + + + +# Check whether --with-on-demand-check-programs was given. +if test "${with_on_demand_check_programs+set}" = set; then : + withval=$with_on_demand_check_programs; test "x$withval" != xno && with_on_demand_check_programs=yes +else + with_on_demand_check_programs=no +fi + + if test "x$with_on_demand_check_programs" = xyes; then + with_on_demand_check_programs_TRUE= + with_on_demand_check_programs_FALSE='#' +else + with_on_demand_check_programs_TRUE='#' + with_on_demand_check_programs_FALSE= +fi + + + +# Check whether --with-concurrent-mpi-checks was given. +if test "${with_concurrent_mpi_checks+set}" = set; then : + withval=$with_concurrent_mpi_checks; test "x$withval" != xno && with_concurrent_mpi_checks=yes +else + with_concurrent_mpi_checks=no +fi + + if test "x$with_concurrent_mpi_checks" = xyes; then + with_concurrent_mpi_checks_TRUE= + with_concurrent_mpi_checks_FALSE='#' +else + with_concurrent_mpi_checks_TRUE='#' + with_concurrent_mpi_checks_FALSE= +fi + + + +# Check whether --with-example-programs was given. +if test "${with_example_programs+set}" = set; then : + withval=$with_example_programs; test "x$withval" != xno && with_example_programs=yes +else + with_example_programs=yes +fi + + if test "x$with_example_programs" = xyes; then + with_example_programs_TRUE= + with_example_programs_FALSE='#' +else + with_example_programs_TRUE='#' + with_example_programs_FALSE= +fi + + + + +if test "x$enable_mpi" = xyes; then : + ENABLE_MPI=true +else + ENABLE_MPI=false +fi + + +if test "x$have_parallel_nc4" = xyes; then : + HAVE_PARALLEL_NC4=1 +else + HAVE_PARALLEL_NC4=0 +fi + + +if test "x$enable_ruby_interface" = xyes; then : + ENABLE_RUBY_INTERFACE=true +else + ENABLE_RUBY_INTERFACE=false +fi + + +if test "x$enable_python_interface" = xyes; then : + ENABLE_PYTHON_INTERFACE=true +else + ENABLE_PYTHON_INTERFACE=false +fi + + + +ac_config_headers="$ac_config_headers src/config.h" + +ac_config_files="$ac_config_files Makefile app/Makefile cdi.settings examples/Makefile examples/pio/Makefile interfaces/Makefile src/Makefile src/cmake/cdi/cdi-config-version.cmake src/cmake/cdi/cdi-config.cmake src/pkgconfig/cdi.pc src/pkgconfig/cdi_f2003.pc src/pkgconfig/cdipio.pc tests/Makefile tests/test_cksum_base" + +ac_config_files="$ac_config_files interfaces/test_cpp_nc.run interfaces/test_python_grb.run interfaces/test_python_nc.run interfaces/test_ruby_grb.run interfaces/test_ruby_nc.run tables/gen_tableheaderfile tests/pio_cksum_asynch.run tests/pio_cksum_fpguard.run tests/pio_cksum_grb2.run tests/pio_cksum_mpi_fw_at_all.run tests/pio_cksum_mpi_fw_at_reblock.run tests/pio_cksum_mpi_fw_ordered.run tests/pio_cksum_mpinonb.run tests/pio_cksum_nc.run tests/pio_cksum_nc2.run tests/pio_cksum_nc4.run tests/pio_cksum_writer.run tests/pio_write.parallel.run tests/pio_write.run tests/pio_write_deco2d.parallel.run tests/pio_write_deco2d.run tests/pio_write_dist_array.run tests/test_byteswap.run tests/test_cdf_const.run tests/test_cdf_transformation.run tests/test_cksum_ext.run tests/test_cksum_grb.run tests/test_cksum_grb2.run tests/test_cksum_ieg.run tests/test_cksum_nc.run tests/test_cksum_nc2.run tests/test_cksum_nc4.run tests/test_cksum_nc_chunk.run tests/test_cksum_srv.run tests/test_f2003.run tests/test_grib.run tests/test_resource_copy.parallel.run tests/test_resource_copy.run tests/test_table.run" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_ISOC_INTERFACE_TRUE}" && test -z "${ENABLE_ISOC_INTERFACE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_ISOC_INTERFACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FC_MOD_UPPERCASE_TRUE}" && test -z "${FC_MOD_UPPERCASE_FALSE}"; then + as_fn_error $? "conditional \"FC_MOD_UPPERCASE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_FC_PROGRAMS_TRUE}" && test -z "${BUILD_FC_PROGRAMS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_FC_PROGRAMS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_CF_INTERFACE_TRUE}" && test -z "${ENABLE_CF_INTERFACE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_CF_INTERFACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +ac_objext=${acx_lt_saved_ac_objext} + +if test -z "${HAVE_LIBGRIB_API_TRUE}" && test -z "${HAVE_LIBGRIB_API_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBGRIB_API\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_CDI_LIB_TRUE}" && test -z "${ENABLE_CDI_LIB_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_CDI_LIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_ALL_STATIC_TRUE}" && test -z "${ENABLE_ALL_STATIC_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_ALL_STATIC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_HIRLAM_EXTENSIONS_TRUE}" && test -z "${ENABLE_HIRLAM_EXTENSIONS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_HIRLAM_EXTENSIONS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_CDI_APP_TRUE}" && test -z "${ENABLE_CDI_APP_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_CDI_APP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_NETCDF_TRUE}" && test -z "${ENABLE_NETCDF_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_NETCDF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PIO_FC_PROGRAMS_TRUE}" && test -z "${BUILD_PIO_FC_PROGRAMS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PIO_FC_PROGRAMS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_MPI_TRUE}" && test -z "${ENABLE_MPI_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_MPI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_PARALLEL_NC4_TRUE}" && test -z "${HAVE_PARALLEL_NC4_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PARALLEL_NC4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_RUBY_INTERFACE_TRUE}" && test -z "${ENABLE_RUBY_INTERFACE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_RUBY_INTERFACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PYTHON_INTERFACE_TRUE}" && test -z "${ENABLE_PYTHON_INTERFACE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PYTHON_INTERFACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${with_on_demand_check_programs_TRUE}" && test -z "${with_on_demand_check_programs_FALSE}"; then + as_fn_error $? "conditional \"with_on_demand_check_programs\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${with_concurrent_mpi_checks_TRUE}" && test -z "${with_concurrent_mpi_checks_FALSE}"; then + as_fn_error $? "conditional \"with_concurrent_mpi_checks\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${with_example_programs_TRUE}" && test -z "${with_example_programs_FALSE}"; then + as_fn_error $? "conditional \"with_example_programs\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +CFLAGS="$CFLAGS${BUILD_CFLAGS:+ $BUILD_CFLAGS}" +FCFLAGS="$FCFLAGS${BUILD_FCFLAGS:+ $BUILD_FCFLAGS}" +LDFLAGS="$LDFLAGS${BUILD_LDFLAGS:+ $BUILD_LDFLAGS}" +LIBS="$LIBS${BUILD_LIBS:+ $BUILD_LIBS}" +MPI_C_LIB="$MPI_C_LIB${BUILD_MPI_C_LIB:+ $BUILD_MPI_C_LIB}" +MPI_FC_LIB="$MPI_FC_LIB${BUILD_MPI_FC_LIB:+ $BUILD_MPI_FC_LIB}" +CC="${BUILD_CC:-$CC}" +CXX="${BUILD_CXX:-$CXX}" +FC="${BUILD_FC:-$FC}" +F77="${BUILD_F77:-$F77}" + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by cdi $as_me 2.2.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to <https://mpimet.mpg.de/cdi>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +cdi config.status 2.2.0 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" + + +# 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' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +acx_is_nagfor='`$ECHO "$acx_is_nagfor" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`' +LD_FC='`$ECHO "$LD_FC" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`' +reload_flag_FC='`$ECHO "$reload_flag_FC" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`' +reload_cmds_FC='`$ECHO "$reload_cmds_FC" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_FC='`$ECHO "$old_archive_cmds_FC" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' +compiler_FC='`$ECHO "$compiler_FC" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' +GCC_FC='`$ECHO "$GCC_FC" | $SED "$delay_single_quote_subst"`' +acx_is_nagfor_CXX='`$ECHO "$acx_is_nagfor_CXX" | $SED "$delay_single_quote_subst"`' +acx_is_nagfor_F77='`$ECHO "$acx_is_nagfor_F77" | $SED "$delay_single_quote_subst"`' +acx_is_nagfor_FC='`$ECHO "$acx_is_nagfor_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_FC='`$ECHO "$lt_cv_prog_compiler_c_o_FC" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_FC='`$ECHO "$archive_cmds_need_lc_FC" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_FC='`$ECHO "$enable_shared_with_static_runtimes_FC" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_FC='`$ECHO "$export_dynamic_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_FC='`$ECHO "$whole_archive_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_FC='`$ECHO "$compiler_needs_object_FC" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_FC='`$ECHO "$old_archive_from_new_cmds_FC" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_FC='`$ECHO "$old_archive_from_expsyms_cmds_FC" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_FC='`$ECHO "$archive_cmds_FC" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_FC='`$ECHO "$archive_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_cmds_FC='`$ECHO "$module_cmds_FC" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_FC='`$ECHO "$module_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_FC='`$ECHO "$with_gnu_ld_FC" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_FC='`$ECHO "$allow_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_FC='`$ECHO "$no_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_FC='`$ECHO "$hardcode_direct_FC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_FC='`$ECHO "$hardcode_direct_absolute_FC" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_FC='`$ECHO "$hardcode_minus_L_FC" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_FC='`$ECHO "$hardcode_shlibpath_var_FC" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_FC='`$ECHO "$hardcode_automatic_FC" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' +inherit_rpath_FC='`$ECHO "$inherit_rpath_FC" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' +always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_FC='`$ECHO "$export_symbols_cmds_FC" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_FC='`$ECHO "$exclude_expsyms_FC" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' +include_expsyms_FC='`$ECHO "$include_expsyms_FC" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' +prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' +file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' +hardcode_action_FC='`$ECHO "$hardcode_action_FC" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_FC='`$ECHO "$compiler_lib_search_dirs_FC" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`' +predep_objects_FC='`$ECHO "$predep_objects_FC" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`' +postdep_objects_FC='`$ECHO "$postdep_objects_FC" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`' +predeps_FC='`$ECHO "$predeps_FC" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`' +postdeps_FC='`$ECHO "$postdeps_FC" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_FC='`$ECHO "$compiler_lib_search_path_FC" | $SED "$delay_single_quote_subst"`' + +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 SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ +nm_file_list_spec \ +lt_cv_truncate_bin \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +LD_F77 \ +LD_FC \ +reload_flag_CXX \ +reload_flag_F77 \ +reload_flag_FC \ +compiler_CXX \ +compiler_F77 \ +compiler_FC \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_no_builtin_flag_F77 \ +lt_prog_compiler_no_builtin_flag_FC \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_pic_F77 \ +lt_prog_compiler_pic_FC \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_wl_F77 \ +lt_prog_compiler_wl_FC \ +lt_prog_compiler_static_CXX \ +lt_prog_compiler_static_F77 \ +lt_prog_compiler_static_FC \ +lt_cv_prog_compiler_c_o_CXX \ +lt_cv_prog_compiler_c_o_F77 \ +lt_cv_prog_compiler_c_o_FC \ +export_dynamic_flag_spec_CXX \ +export_dynamic_flag_spec_F77 \ +export_dynamic_flag_spec_FC \ +whole_archive_flag_spec_CXX \ +whole_archive_flag_spec_F77 \ +whole_archive_flag_spec_FC \ +compiler_needs_object_CXX \ +compiler_needs_object_F77 \ +compiler_needs_object_FC \ +with_gnu_ld_CXX \ +with_gnu_ld_F77 \ +with_gnu_ld_FC \ +allow_undefined_flag_CXX \ +allow_undefined_flag_F77 \ +allow_undefined_flag_FC \ +no_undefined_flag_CXX \ +no_undefined_flag_F77 \ +no_undefined_flag_FC \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_flag_spec_F77 \ +hardcode_libdir_flag_spec_FC \ +hardcode_libdir_separator_CXX \ +hardcode_libdir_separator_F77 \ +hardcode_libdir_separator_FC \ +exclude_expsyms_CXX \ +exclude_expsyms_F77 \ +exclude_expsyms_FC \ +include_expsyms_CXX \ +include_expsyms_F77 \ +include_expsyms_FC \ +file_list_spec_CXX \ +file_list_spec_F77 \ +file_list_spec_FC \ +compiler_lib_search_dirs_CXX \ +compiler_lib_search_dirs_F77 \ +compiler_lib_search_dirs_FC \ +predep_objects_CXX \ +predep_objects_F77 \ +predep_objects_FC \ +postdep_objects_CXX \ +postdep_objects_F77 \ +postdep_objects_FC \ +predeps_CXX \ +predeps_F77 \ +predeps_FC \ +postdeps_CXX \ +postdeps_F77 \ +postdeps_FC \ +compiler_lib_search_path_CXX \ +compiler_lib_search_path_F77 \ +compiler_lib_search_path_FC; 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 reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path \ +reload_cmds_CXX \ +reload_cmds_F77 \ +reload_cmds_FC \ +old_archive_cmds_CXX \ +old_archive_cmds_F77 \ +old_archive_cmds_FC \ +old_archive_from_new_cmds_CXX \ +old_archive_from_new_cmds_F77 \ +old_archive_from_new_cmds_FC \ +old_archive_from_expsyms_cmds_CXX \ +old_archive_from_expsyms_cmds_F77 \ +old_archive_from_expsyms_cmds_FC \ +archive_cmds_CXX \ +archive_cmds_F77 \ +archive_cmds_FC \ +archive_expsym_cmds_CXX \ +archive_expsym_cmds_F77 \ +archive_expsym_cmds_FC \ +module_cmds_CXX \ +module_cmds_F77 \ +module_cmds_FC \ +module_expsym_cmds_CXX \ +module_expsym_cmds_F77 \ +module_expsym_cmds_FC \ +export_symbols_cmds_CXX \ +export_symbols_cmds_F77 \ +export_symbols_cmds_FC \ +prelink_cmds_CXX \ +prelink_cmds_F77 \ +prelink_cmds_FC \ +postlink_cmds_CXX \ +postlink_cmds_F77 \ +postlink_cmds_FC; 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 + +ac_aux_dir='$ac_aux_dir' + +# 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 + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + RM='$RM' + ofile='$ofile' + + + + + + + +ac_aux_dir='$ac_aux_dir' + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "app/Makefile") CONFIG_FILES="$CONFIG_FILES app/Makefile" ;; + "cdi.settings") CONFIG_FILES="$CONFIG_FILES cdi.settings" ;; + "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; + "examples/pio/Makefile") CONFIG_FILES="$CONFIG_FILES examples/pio/Makefile" ;; + "interfaces/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/cmake/cdi/cdi-config-version.cmake") CONFIG_FILES="$CONFIG_FILES src/cmake/cdi/cdi-config-version.cmake" ;; + "src/cmake/cdi/cdi-config.cmake") CONFIG_FILES="$CONFIG_FILES src/cmake/cdi/cdi-config.cmake" ;; + "src/pkgconfig/cdi.pc") CONFIG_FILES="$CONFIG_FILES src/pkgconfig/cdi.pc" ;; + "src/pkgconfig/cdi_f2003.pc") CONFIG_FILES="$CONFIG_FILES src/pkgconfig/cdi_f2003.pc" ;; + "src/pkgconfig/cdipio.pc") CONFIG_FILES="$CONFIG_FILES src/pkgconfig/cdipio.pc" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests/test_cksum_base") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_base" ;; + "interfaces/test_cpp_nc.run") CONFIG_FILES="$CONFIG_FILES interfaces/test_cpp_nc.run" ;; + "interfaces/test_python_grb.run") CONFIG_FILES="$CONFIG_FILES interfaces/test_python_grb.run" ;; + "interfaces/test_python_nc.run") CONFIG_FILES="$CONFIG_FILES interfaces/test_python_nc.run" ;; + "interfaces/test_ruby_grb.run") CONFIG_FILES="$CONFIG_FILES interfaces/test_ruby_grb.run" ;; + "interfaces/test_ruby_nc.run") CONFIG_FILES="$CONFIG_FILES interfaces/test_ruby_nc.run" ;; + "tables/gen_tableheaderfile") CONFIG_FILES="$CONFIG_FILES tables/gen_tableheaderfile" ;; + "tests/pio_cksum_asynch.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_asynch.run" ;; + "tests/pio_cksum_fpguard.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_fpguard.run" ;; + "tests/pio_cksum_grb2.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_grb2.run" ;; + "tests/pio_cksum_mpi_fw_at_all.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_mpi_fw_at_all.run" ;; + "tests/pio_cksum_mpi_fw_at_reblock.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_mpi_fw_at_reblock.run" ;; + "tests/pio_cksum_mpi_fw_ordered.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_mpi_fw_ordered.run" ;; + "tests/pio_cksum_mpinonb.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_mpinonb.run" ;; + "tests/pio_cksum_nc.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_nc.run" ;; + "tests/pio_cksum_nc2.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_nc2.run" ;; + "tests/pio_cksum_nc4.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_nc4.run" ;; + "tests/pio_cksum_writer.run") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_writer.run" ;; + "tests/pio_write.parallel.run") CONFIG_FILES="$CONFIG_FILES tests/pio_write.parallel.run" ;; + "tests/pio_write.run") CONFIG_FILES="$CONFIG_FILES tests/pio_write.run" ;; + "tests/pio_write_deco2d.parallel.run") CONFIG_FILES="$CONFIG_FILES tests/pio_write_deco2d.parallel.run" ;; + "tests/pio_write_deco2d.run") CONFIG_FILES="$CONFIG_FILES tests/pio_write_deco2d.run" ;; + "tests/pio_write_dist_array.run") CONFIG_FILES="$CONFIG_FILES tests/pio_write_dist_array.run" ;; + "tests/test_byteswap.run") CONFIG_FILES="$CONFIG_FILES tests/test_byteswap.run" ;; + "tests/test_cdf_const.run") CONFIG_FILES="$CONFIG_FILES tests/test_cdf_const.run" ;; + "tests/test_cdf_transformation.run") CONFIG_FILES="$CONFIG_FILES tests/test_cdf_transformation.run" ;; + "tests/test_cksum_ext.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_ext.run" ;; + "tests/test_cksum_grb.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_grb.run" ;; + "tests/test_cksum_grb2.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_grb2.run" ;; + "tests/test_cksum_ieg.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_ieg.run" ;; + "tests/test_cksum_nc.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_nc.run" ;; + "tests/test_cksum_nc2.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_nc2.run" ;; + "tests/test_cksum_nc4.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_nc4.run" ;; + "tests/test_cksum_nc_chunk.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_nc_chunk.run" ;; + "tests/test_cksum_srv.run") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_srv.run" ;; + "tests/test_f2003.run") CONFIG_FILES="$CONFIG_FILES tests/test_f2003.run" ;; + "tests/test_grib.run") CONFIG_FILES="$CONFIG_FILES tests/test_grib.run" ;; + "tests/test_resource_copy.parallel.run") CONFIG_FILES="$CONFIG_FILES tests/test_resource_copy.parallel.run" ;; + "tests/test_resource_copy.run") CONFIG_FILES="$CONFIG_FILES tests/test_resource_copy.run" ;; + "tests/test_table.run") CONFIG_FILES="$CONFIG_FILES tests/test_table.run" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' <confdefs.h | sed ' +s/'"$ac_delim"'/"\\\ +"/g' >>$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac + shift + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf + do + # Strip MF so we end up with the name of the file. + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? + done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk +} + ;; + "libtool":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 + +# 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/>. + + +# The names of the tagged configurations supported by this script. +available_tags='CXX F77 FC ' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and where our libraries should be installed. +lt_sysroot=$lt_sysroot + +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# 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 +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Is the compiler the NAG Fortran compiler? +with_nagfor=$acx_is_nagfor + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# 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. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# 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$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; 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-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_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 + + +ltmain=$ac_aux_dir/ltmain.sh + + + # 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" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Is the compiler the NAG Fortran compiler? +with_nagfor=$acx_is_nagfor_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# 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. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: F77 + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_F77 +reload_cmds=$lt_reload_cmds_F77 + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_F77 + +# A language specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU compiler? +with_gcc=$GCC_F77 + +# Is the compiler the NAG Fortran compiler? +with_nagfor=$acx_is_nagfor_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_F77 + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_F77 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# 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. +hardcode_direct_absolute=$hardcode_direct_absolute_F77 + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_F77 + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_F77 + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_F77 + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_F77 + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_F77 +postdep_objects=$lt_postdep_objects_F77 +predeps=$lt_predeps_F77 +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# ### END LIBTOOL TAG CONFIG: F77 +_LT_EOF + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: FC + +# The linker used to build libraries. +LD=$lt_LD_FC + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_FC +reload_cmds=$lt_reload_cmds_FC + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_FC + +# A language specific compiler. +CC=$lt_compiler_FC + +# Is the compiler the GNU compiler? +with_gcc=$GCC_FC + +# Is the compiler the NAG Fortran compiler? +with_nagfor=$acx_is_nagfor_FC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_FC + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_FC + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_FC + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_FC + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_FC + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_FC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_FC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_FC + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_FC + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_FC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_FC + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_FC +archive_expsym_cmds=$lt_archive_expsym_cmds_FC + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_FC +module_expsym_cmds=$lt_module_expsym_cmds_FC + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_FC + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_FC + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_FC + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_FC + +# 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. +hardcode_direct_absolute=$hardcode_direct_absolute_FC + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_FC + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_FC + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_FC + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_FC + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_FC + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_FC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_FC + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_FC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_FC + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_FC + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_FC + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_FC + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_FC + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_FC + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_FC +postdep_objects=$lt_postdep_objects_FC +predeps=$lt_predeps_FC +postdeps=$lt_postdeps_FC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_FC + +# ### END LIBTOOL TAG CONFIG: FC +_LT_EOF + + ;; + "interfaces/test_cpp_nc.run":F) chmod a+x "$ac_file" ;; + "interfaces/test_python_grb.run":F) chmod a+x "$ac_file" ;; + "interfaces/test_python_nc.run":F) chmod a+x "$ac_file" ;; + "interfaces/test_ruby_grb.run":F) chmod a+x "$ac_file" ;; + "interfaces/test_ruby_nc.run":F) chmod a+x "$ac_file" ;; + "tables/gen_tableheaderfile":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_asynch.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_fpguard.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_grb2.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_mpi_fw_at_all.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_mpi_fw_at_reblock.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_mpi_fw_ordered.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_mpinonb.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_nc.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_nc2.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_nc4.run":F) chmod a+x "$ac_file" ;; + "tests/pio_cksum_writer.run":F) chmod a+x "$ac_file" ;; + "tests/pio_write.parallel.run":F) chmod a+x "$ac_file" ;; + "tests/pio_write.run":F) chmod a+x "$ac_file" ;; + "tests/pio_write_deco2d.parallel.run":F) chmod a+x "$ac_file" ;; + "tests/pio_write_deco2d.run":F) chmod a+x "$ac_file" ;; + "tests/pio_write_dist_array.run":F) chmod a+x "$ac_file" ;; + "tests/test_byteswap.run":F) chmod a+x "$ac_file" ;; + "tests/test_cdf_const.run":F) chmod a+x "$ac_file" ;; + "tests/test_cdf_transformation.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_ext.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_grb.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_grb2.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_ieg.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_nc.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_nc2.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_nc4.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_nc_chunk.run":F) chmod a+x "$ac_file" ;; + "tests/test_cksum_srv.run":F) chmod a+x "$ac_file" ;; + "tests/test_f2003.run":F) chmod a+x "$ac_file" ;; + "tests/test_grib.run":F) chmod a+x "$ac_file" ;; + "tests/test_resource_copy.parallel.run":F) chmod a+x "$ac_file" ;; + "tests/test_resource_copy.run":F) chmod a+x "$ac_file" ;; + "tests/test_table.run":F) chmod a+x "$ac_file" ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: CDI is configured with the following options:" >&5 +$as_echo "$as_me: CDI is configured with the following options:" >&6;} +cat cdi.settings >&6 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: + + Configuration completed. + + You can now run 'make' to compile the CDI package and 'make install' to install it afterwards. +" >&5 +$as_echo "$as_me: + + Configuration completed. + + You can now run 'make' to compile the CDI package and 'make install' to install it afterwards. +" >&6;} diff --git a/doc/cdi_cman.pdf b/doc/cdi_cman.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3cdc1333f9f0ae2ef90d8edf4b44225715af6bb6 GIT binary patch literal 326520 zcma&NV~}P+vo6}UZQC}cIc?jvZQHhOThq2}P50ZjednCJBknn|zlgi*&&sG(8C9#Y zV&#)hW|1q1iqkVQu)~ngFORIluoE#6*&A8G@bSSg%9z@jyI2shGIJ39zYT^_+|tIy z)QN~u+{VzwRMgbi-oz9}Kmf+s#mUsr7RF=KHBnlAhzTj=<_+Cj20`;P=86_gA(18! zN(Tv&)>TS0D}oI@UOzs!BUP)iye4NObB+K6m&hSM;kB0`xtdol5L!h`k;<B?gRrmw z$CFEANZYGf!|dibSUm}qTnIpkBBnW;Dx=;u#U=aF22VR-o9RO?BoaVS6DfMeT5XFG zCpM4(1rCyF!o*dPTu!=2UH(#FQIh`VQpawUAXQvQLDDj_8fOQgxxO&F<V1qAqp&pz zPLlvps+6D{Cw}Vr#?DIOI#hSo?HOALnSB&GmX@p)h1J?5g03T2l*Z)eLqe1Ap$$Hs zgBzv8Iu4Fp;X3X0hR}`txPi-TkEU1qmHoqJ%}bvAu$=$d*t&!EmC4w>vmWy?6no(p zf#0$4B(nFMy(dksVCCca-UAkvH6=~{3F-kKstRLjXYya$_)q#@CSd;$wqWL9<NBZ4 z;wpQ}DO&<9?8OfztwEvuhOHS_|4503z0#3wR>iZaAET`@@s|)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{d{|0SEsP_N> literal 0 HcmV?d00001 diff --git a/doc/cdi_fman.pdf b/doc/cdi_fman.pdf new file mode 100644 index 0000000000000000000000000000000000000000..de920b695b8a71871ef949473ab806f7dd5cb0c3 GIT binary patch literal 353000 zcma&Mb8u$S(=Hm@n%K6JH=J-{XJXs7ZQHhO+qNgk8`~4z`OZC6_ni8ERrl+Ec31D! zwbt%lwfk95FA4=waRwGf4mgVW<&kwb4q|3vJ3~u2K0Y`m853JGXLDjUR#xKwSKye$ zEv%hQ9Eq94tqq(_L`{tBj7{JK1mK*U9Zd{u;M_M|5~geinNh@Ez9Kb3#Y%lgpIb{* zRD>;8l4VyyAYo&0!z}~<zW&{e5CV%x`SqOBVdhO^?LP=!aMsN*F(bpgkJhq)Fo_F? zDn*?xgvzvfo4O-=lJs)VLVcEzNQ#U}Al4L-qH*GN<C>&xp28qZqV8&MV@>%&@kXjB z8$cjiE{wUYriE5#GLRsJh}Q9EpRRo3A>uKcds^RIH69Yl00CEFGv9<0wQXkgX$6MW zr3bI-?dP&uuWJ>pQb1#Qb7(ef^J4VORJ-Kyi)<R_0d_x>2WtIF{%=+dhHSl&3L;7A z4sIW;B<jK6sH{Iy3z+d8B`I)|x^?@E?7)0rgWRz({Axb&^fFuUvd>B`<iD0Xcl19q z=G@+U&ydGrE@sORDtphp*IcvqtVozmMWTVM5V7LrRwN(b2|eM}a3;3K|2vrfwEs#3 z$A8EO3nvHj|1=|4SyPT#5*VQ`zHq7a`Acq@8!=3dG%1<O+_+|yd>Z=jRLc_i#M#Lw zXD1*r(fJ`i8;oe4N5SYbfxKnkPM`)CO(8W8WZSQNx%fReEQX5F#l?e}+nR*pQc_bz z5U{h=6U&{A@`>E=ht_A_ncX%q0S8PCi{4aw?c7XZ<k)ZPRB!R?jv2y)3CHFTfZC&N z!ZD3ZZbq`_$7{-{#C7iO5y)SO1FjB@r~J^B=T7zjnSjBVj$o3C4@=rNW4`q1J012c z@jJ70<ils1a}?f;G~THr#va%;yWLJlpFdmn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3($Q?|Rr4{fq8+*@pc{PS(+*OGYhH+WUAeFswrTu>{20gR>|to()BV8QFTgNKTfp zqd5;B^zNQx#v98BIbL0F$g+z$HoX{3FqR?uCX<WFC6kLDE1iqIEoFhCDrJFDD(SV} z)D6E`6g3!YlKr^xO~L|`OTq#@R@?%6TWk?URcsNXRCEyyPjnH_QDl+moA4qom+&HC ztdQ7l6KI6c&t=MeablxX;Jj+elxd@VY-HRrkRZ(>5KY%S5Rcp}5DQ_lpJd;pJ$MtE zUH18!j01L!S6p#T!%=pPRa|^c$x)c|`~M1mrRzCNp%wmXU1jcPNF#=h&60BHUq*(J ztT6J7E;mC|ZV*LzqzH_1qRV#*g%<R{Ig%HEYXYKmj(P-p;MwIeh3*Gp*o{JmkPvl& zvO*t2$P>F<#ZlRp$#WuwAe8VfpGFj_Wir!9ZU{vs(q2XtTc(`*Cqsqw&kS3ayEiKT zGDT~o*dgUYm)~y`hGm^>@eYUnUpI)0Ah#Jd;D4OYb@u?dd3YmTr|^V?#e^h;@K{+D Ifl7G)5AS?9CjbBd literal 0 HcmV?d00001 diff --git a/examples/Makefile.in b/examples/Makefile.in new file mode 100644 index 000000000..ec6bd387a --- /dev/null +++ b/examples/Makefile.in @@ -0,0 +1,1058 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + 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@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = $(am__EXEEXT_5) $(am__append_5) +check_PROGRAMS = $(am__EXEEXT_4) +EXTRA_PROGRAMS = cdi_append$(EXEEXT) cdi_copy$(EXEEXT) \ + cdi_read$(EXEEXT) cdi_write$(EXEEXT) cdi_write_ens$(EXEEXT) \ + cdi_write_hybrid$(EXEEXT) cdi_write_local$(EXEEXT) \ + cdi_write_relativ$(EXEEXT) +@ENABLE_NETCDF_TRUE@am__append_1 = cdi_write_const +@ENABLE_ISOC_INTERFACE_TRUE@am__append_2 = cdi_read_f2003 cdi_write_f2003 +@with_on_demand_check_programs_TRUE@am__append_3 = $(test_PROGRAMS_) +@with_on_demand_check_programs_FALSE@am__append_4 = $(test_PROGRAMS_) +@with_example_programs_TRUE@am__append_5 = $(EXTRA_PROGRAMS) +@with_example_programs_FALSE@am__append_6 = $(EXTRA_PROGRAMS) +@ENABLE_ISOC_INTERFACE_TRUE@am__append_7 = $(FC_MOD_FLAG)$(top_builddir)/src +@ENABLE_ALL_STATIC_TRUE@am__append_8 = -all-static +subdir = examples +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \ + $(top_srcdir)/m4/acx_c_package.m4 \ + $(top_srcdir)/m4/acx_cfortran_flags.m4 \ + $(top_srcdir)/m4/acx_check_cfortran.m4 \ + $(top_srcdir)/m4/acx_check_strptr_convert.m4 \ + $(top_srcdir)/m4/acx_execinfo.m4 \ + $(top_srcdir)/m4/acx_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_fortran_include_flag.m4 \ + $(top_srcdir)/m4/acx_fortran_package.m4 \ + $(top_srcdir)/m4/acx_lang_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_package.m4 \ + $(top_srcdir)/m4/acx_lt_problems.m4 \ + $(top_srcdir)/m4/acx_m4_list_to_quoted_strings.m4 \ + $(top_srcdir)/m4/acx_mpirun.m4 $(top_srcdir)/m4/acx_mv_obj.m4 \ + $(top_srcdir)/m4/acx_option_search_libs.m4 \ + $(top_srcdir)/m4/acx_options.m4 \ + $(top_srcdir)/m4/acx_prog_cc_posix.m4 \ + $(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \ + $(top_srcdir)/m4/acx_sl_mod_suffix.m4 \ + $(top_srcdir)/m4/acx_tls_xlc_retry.m4 \ + $(top_srcdir)/m4/acx_use_libtool_configuration.m4 \ + $(top_srcdir)/m4/acx_uuid.m4 $(top_srcdir)/m4/asx_tr_arg.m4 \ + $(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/kpse_libtool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/ac_lang_program_fortran.m4 \ + $(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_c_check_include.m4 \ + $(top_srcdir)/configure.ac +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)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@ENABLE_NETCDF_TRUE@am__EXEEXT_1 = cdi_write_const$(EXEEXT) +@ENABLE_ISOC_INTERFACE_TRUE@am__EXEEXT_2 = cdi_read_f2003$(EXEEXT) \ +@ENABLE_ISOC_INTERFACE_TRUE@ cdi_write_f2003$(EXEEXT) +am__EXEEXT_3 = $(am__EXEEXT_1) $(am__EXEEXT_2) +@with_on_demand_check_programs_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3) +@with_on_demand_check_programs_FALSE@am__EXEEXT_5 = $(am__EXEEXT_3) +PROGRAMS = $(noinst_PROGRAMS) +am_cdi_append_OBJECTS = cdi_append.$(OBJEXT) +cdi_append_OBJECTS = $(am_cdi_append_OBJECTS) +cdi_append_LDADD = $(LDADD) +cdi_append_DEPENDENCIES = $(top_builddir)/src/libcdi.la +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 = +am_cdi_copy_OBJECTS = cdi_copy.$(OBJEXT) +cdi_copy_OBJECTS = $(am_cdi_copy_OBJECTS) +cdi_copy_LDADD = $(LDADD) +cdi_copy_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cdi_read_OBJECTS = cdi_read.$(OBJEXT) +cdi_read_OBJECTS = $(am_cdi_read_OBJECTS) +cdi_read_LDADD = $(LDADD) +cdi_read_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cdi_read_f2003_OBJECTS = cdi_read_f2003.$(OBJEXT) +cdi_read_f2003_OBJECTS = $(am_cdi_read_f2003_OBJECTS) +cdi_read_f2003_DEPENDENCIES = $(top_builddir)/src/libcdi_f2003.la \ + $(LDADD) +am_cdi_write_OBJECTS = cdi_write.$(OBJEXT) +cdi_write_OBJECTS = $(am_cdi_write_OBJECTS) +cdi_write_LDADD = $(LDADD) +cdi_write_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cdi_write_const_OBJECTS = cdi_write_const.$(OBJEXT) +cdi_write_const_OBJECTS = $(am_cdi_write_const_OBJECTS) +cdi_write_const_LDADD = $(LDADD) +cdi_write_const_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cdi_write_ens_OBJECTS = cdi_write_ens.$(OBJEXT) +cdi_write_ens_OBJECTS = $(am_cdi_write_ens_OBJECTS) +cdi_write_ens_LDADD = $(LDADD) +cdi_write_ens_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cdi_write_f2003_OBJECTS = cdi_write_f2003.$(OBJEXT) +cdi_write_f2003_OBJECTS = $(am_cdi_write_f2003_OBJECTS) +cdi_write_f2003_DEPENDENCIES = $(top_builddir)/src/libcdi_f2003.la \ + $(LDADD) +am_cdi_write_hybrid_OBJECTS = cdi_write_hybrid.$(OBJEXT) +cdi_write_hybrid_OBJECTS = $(am_cdi_write_hybrid_OBJECTS) +cdi_write_hybrid_LDADD = $(LDADD) +cdi_write_hybrid_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cdi_write_local_OBJECTS = cdi_write_local.$(OBJEXT) +cdi_write_local_OBJECTS = $(am_cdi_write_local_OBJECTS) +cdi_write_local_LDADD = $(LDADD) +cdi_write_local_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cdi_write_relativ_OBJECTS = cdi_write_relativ.$(OBJEXT) +cdi_write_relativ_OBJECTS = $(am_cdi_write_relativ_OBJECTS) +cdi_write_relativ_LDADD = $(LDADD) +cdi_write_relativ_DEPENDENCIES = $(top_builddir)/src/libcdi.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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)/src +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/cdi_append.Po \ + ./$(DEPDIR)/cdi_copy.Po ./$(DEPDIR)/cdi_read.Po \ + ./$(DEPDIR)/cdi_write.Po ./$(DEPDIR)/cdi_write_const.Po \ + ./$(DEPDIR)/cdi_write_ens.Po ./$(DEPDIR)/cdi_write_hybrid.Po \ + ./$(DEPDIR)/cdi_write_local.Po \ + ./$(DEPDIR)/cdi_write_relativ.Po +am__mv = mv -f +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_FC = $(am__v_FC_@AM_V@) +am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) +am__v_FC_0 = @echo " FC " $@; +am__v_FC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(cdi_append_SOURCES) $(cdi_copy_SOURCES) \ + $(cdi_read_SOURCES) $(cdi_read_f2003_SOURCES) \ + $(cdi_write_SOURCES) $(cdi_write_const_SOURCES) \ + $(cdi_write_ens_SOURCES) $(cdi_write_f2003_SOURCES) \ + $(cdi_write_hybrid_SOURCES) $(cdi_write_local_SOURCES) \ + $(cdi_write_relativ_SOURCES) +DIST_SOURCES = $(cdi_append_SOURCES) $(cdi_copy_SOURCES) \ + $(cdi_read_SOURCES) $(cdi_read_f2003_SOURCES) \ + $(cdi_write_SOURCES) $(cdi_write_const_SOURCES) \ + $(cdi_write_ens_SOURCES) $(cdi_write_f2003_SOURCES) \ + $(cdi_write_hybrid_SOURCES) $(cdi_write_local_SOURCES) \ + $(cdi_write_relativ_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 distdir-am +am__extra_recursive_targets = examples-recursive +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)` +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + README +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@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCE_UUIDROOT = @DCE_UUIDROOT@ +DCE_UUID_C_INCLUDE = @DCE_UUID_C_INCLUDE@ +DCE_UUID_C_LIB = @DCE_UUID_C_LIB@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECCODES_INCLUDE = @ECCODES_INCLUDE@ +ECCODES_LIBS = @ECCODES_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_ACROSS = @ENABLE_ACROSS@ +ENABLE_CDI_LIB = @ENABLE_CDI_LIB@ +ENABLE_CGRIBEX = @ENABLE_CGRIBEX@ +ENABLE_EXTRA = @ENABLE_EXTRA@ +ENABLE_GRIB = @ENABLE_GRIB@ +ENABLE_IEG = @ENABLE_IEG@ +ENABLE_MPI = @ENABLE_MPI@ +ENABLE_NC2 = @ENABLE_NC2@ +ENABLE_NC4 = @ENABLE_NC4@ +ENABLE_NC4HDF5 = @ENABLE_NC4HDF5@ +ENABLE_NC4SZLIB = @ENABLE_NC4SZLIB@ +ENABLE_NETCDF = @ENABLE_NETCDF@ +ENABLE_SERVICE = @ENABLE_SERVICE@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCMODCASE = @FCMODCASE@ +FCMODEXT = @FCMODEXT@ +FC_DEFINE = @FC_DEFINE@ +FC_MOD_FLAG = @FC_MOD_FLAG@ +FC_OPTINC = @FC_OPTINC@ +FDB5_INCLUDE = @FDB5_INCLUDE@ +FDB5_LIBS = @FDB5_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GRIB_API_INCLUDE = @GRIB_API_INCLUDE@ +GRIB_API_LIBS = @GRIB_API_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPIROOT = @MPIROOT@ +MPI_C_INCLUDE = @MPI_C_INCLUDE@ +MPI_C_LIB = @MPI_C_LIB@ +MPI_FC_LIB = @MPI_FC_LIB@ +MPI_FC_MOD = @MPI_FC_MOD@ +MPI_LAUNCH = @MPI_LAUNCH@ +NC_CONFIG = @NC_CONFIG@ +NETCDF_INCLUDE = @NETCDF_INCLUDE@ +NETCDF_LIBS = @NETCDF_LIBS@ +NETCDF_ROOT = @NETCDF_ROOT@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OSSP_UUIDROOT = @OSSP_UUIDROOT@ +OSSP_UUID_C_INCLUDE = @OSSP_UUID_C_INCLUDE@ +OSSP_UUID_C_LIB = @OSSP_UUID_C_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PPM_CORE_C_INCLUDE = @PPM_CORE_C_INCLUDE@ +PPM_CORE_C_LIB = @PPM_CORE_C_LIB@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PLATFORM_SITE_PKG = @PYTHON_PLATFORM_SITE_PKG@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SYSTEM_TYPE = @SYSTEM_TYPE@ +SZLIB_INCLUDE = @SZLIB_INCLUDE@ +SZLIB_LIBS = @SZLIB_LIBS@ +THREADS_INCLUDE = @THREADS_INCLUDE@ +THREADS_LIBS = @THREADS_LIBS@ +UTIL_LINUX_UUIDROOT = @UTIL_LINUX_UUIDROOT@ +UTIL_LINUX_UUID_C_INCLUDE = @UTIL_LINUX_UUID_C_INCLUDE@ +UTIL_LINUX_UUID_C_LIB = @UTIL_LINUX_UUID_C_LIB@ +UUID_C_INCLUDE = @UUID_C_INCLUDE@ +UUID_C_LIB = @UUID_C_LIB@ +VERSION = @VERSION@ +YAXT_C_INCLUDE = @YAXT_C_INCLUDE@ +YAXT_C_LIB = @YAXT_C_LIB@ +YAXT_FC_LIB = @YAXT_FC_LIB@ +YAXT_FC_MOD = @YAXT_FC_MOD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = pio +CLEANFILES = $(am__append_6) + +# Examples that are part of the test suite: +test_PROGRAMS_ = $(am__append_1) $(am__append_2) +AM_CPPFLAGS = -I$(top_srcdir)/src +AM_FCFLAGS = $(am__append_7) -static +AM_LDFLAGS = $(am__append_8) +LDADD = $(top_builddir)/src/libcdi.la +cdi_append_SOURCES = cdi_append.c +cdi_copy_SOURCES = cdi_copy.c +cdi_read_SOURCES = cdi_read.c +cdi_write_SOURCES = cdi_write.c +cdi_write_ens_SOURCES = cdi_write_ens.c +cdi_write_hybrid_SOURCES = cdi_write_hybrid.c +cdi_write_local_SOURCES = cdi_write_local.c +cdi_write_relativ_SOURCES = cdi_write_relativ.c +cdi_write_const_SOURCES = cdi_write_const.c +cdi_read_f2003_SOURCES = cdi_read_f2003.f90 +cdi_read_f2003_LDADD = $(top_builddir)/src/libcdi_f2003.la $(LDADD) +cdi_write_f2003_SOURCES = cdi_write_f2003.f90 +cdi_write_f2003_LDADD = $(top_builddir)/src/libcdi_f2003.la $(LDADD) +@FC_MOD_UPPERCASE_FALSE@mo_cdi_mod = mo_cdi.$(FCMODEXT) +@FC_MOD_UPPERCASE_TRUE@mo_cdi_mod = MO_CDI.$(FCMODEXT) + +# Compile programs using Libtool: +COMPILE = $(LTCOMPILE) +FCCOMPILE = $(LTFCCOMPILE) +PPFCCOMPILE = $(LTPPFCCOMPILE) +CXXCOMPILE = $(LTCXXCOMPILE) + +# Compile *.F90 without CPPFLAGS, which are normally meant for the C compiler +# and might not be compatible with the Fortran compiler: +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) + + +# Avoid compiling twice by running Libtool with '-static' +# This is safe because all Libtool libraries in this directory are +# static-only and contain PIC objects: +AM_CFLAGS = -static +AM_CXXFLAGS = -static +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .f90 .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign examples/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +cdi_append$(EXEEXT): $(cdi_append_OBJECTS) $(cdi_append_DEPENDENCIES) $(EXTRA_cdi_append_DEPENDENCIES) + @rm -f cdi_append$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_append_OBJECTS) $(cdi_append_LDADD) $(LIBS) + +cdi_copy$(EXEEXT): $(cdi_copy_OBJECTS) $(cdi_copy_DEPENDENCIES) $(EXTRA_cdi_copy_DEPENDENCIES) + @rm -f cdi_copy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_copy_OBJECTS) $(cdi_copy_LDADD) $(LIBS) + +cdi_read$(EXEEXT): $(cdi_read_OBJECTS) $(cdi_read_DEPENDENCIES) $(EXTRA_cdi_read_DEPENDENCIES) + @rm -f cdi_read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_read_OBJECTS) $(cdi_read_LDADD) $(LIBS) + +cdi_read_f2003$(EXEEXT): $(cdi_read_f2003_OBJECTS) $(cdi_read_f2003_DEPENDENCIES) $(EXTRA_cdi_read_f2003_DEPENDENCIES) + @rm -f cdi_read_f2003$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(cdi_read_f2003_OBJECTS) $(cdi_read_f2003_LDADD) $(LIBS) + +cdi_write$(EXEEXT): $(cdi_write_OBJECTS) $(cdi_write_DEPENDENCIES) $(EXTRA_cdi_write_DEPENDENCIES) + @rm -f cdi_write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_write_OBJECTS) $(cdi_write_LDADD) $(LIBS) + +cdi_write_const$(EXEEXT): $(cdi_write_const_OBJECTS) $(cdi_write_const_DEPENDENCIES) $(EXTRA_cdi_write_const_DEPENDENCIES) + @rm -f cdi_write_const$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_write_const_OBJECTS) $(cdi_write_const_LDADD) $(LIBS) + +cdi_write_ens$(EXEEXT): $(cdi_write_ens_OBJECTS) $(cdi_write_ens_DEPENDENCIES) $(EXTRA_cdi_write_ens_DEPENDENCIES) + @rm -f cdi_write_ens$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_write_ens_OBJECTS) $(cdi_write_ens_LDADD) $(LIBS) + +cdi_write_f2003$(EXEEXT): $(cdi_write_f2003_OBJECTS) $(cdi_write_f2003_DEPENDENCIES) $(EXTRA_cdi_write_f2003_DEPENDENCIES) + @rm -f cdi_write_f2003$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(cdi_write_f2003_OBJECTS) $(cdi_write_f2003_LDADD) $(LIBS) + +cdi_write_hybrid$(EXEEXT): $(cdi_write_hybrid_OBJECTS) $(cdi_write_hybrid_DEPENDENCIES) $(EXTRA_cdi_write_hybrid_DEPENDENCIES) + @rm -f cdi_write_hybrid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_write_hybrid_OBJECTS) $(cdi_write_hybrid_LDADD) $(LIBS) + +cdi_write_local$(EXEEXT): $(cdi_write_local_OBJECTS) $(cdi_write_local_DEPENDENCIES) $(EXTRA_cdi_write_local_DEPENDENCIES) + @rm -f cdi_write_local$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_write_local_OBJECTS) $(cdi_write_local_LDADD) $(LIBS) + +cdi_write_relativ$(EXEEXT): $(cdi_write_relativ_OBJECTS) $(cdi_write_relativ_DEPENDENCIES) $(EXTRA_cdi_write_relativ_DEPENDENCIES) + @rm -f cdi_write_relativ$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cdi_write_relativ_OBJECTS) $(cdi_write_relativ_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_append.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_copy.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_read.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_write.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_write_const.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_write_ens.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_write_hybrid.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_write_local.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_write_relativ.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +.f90.o: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< + +.f90.obj: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` + +.f90.lo: + $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# 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" +examples-local: + +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: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || 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 + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-recursive +all-am: Makefile $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-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-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +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-recursive + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-recursive + -rm -f ./$(DEPDIR)/cdi_append.Po + -rm -f ./$(DEPDIR)/cdi_copy.Po + -rm -f ./$(DEPDIR)/cdi_read.Po + -rm -f ./$(DEPDIR)/cdi_write.Po + -rm -f ./$(DEPDIR)/cdi_write_const.Po + -rm -f ./$(DEPDIR)/cdi_write_ens.Po + -rm -f ./$(DEPDIR)/cdi_write_hybrid.Po + -rm -f ./$(DEPDIR)/cdi_write_local.Po + -rm -f ./$(DEPDIR)/cdi_write_relativ.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +examples: examples-recursive + +examples-am: examples-local + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f ./$(DEPDIR)/cdi_append.Po + -rm -f ./$(DEPDIR)/cdi_copy.Po + -rm -f ./$(DEPDIR)/cdi_read.Po + -rm -f ./$(DEPDIR)/cdi_write.Po + -rm -f ./$(DEPDIR)/cdi_write_const.Po + -rm -f ./$(DEPDIR)/cdi_write_ens.Po + -rm -f ./$(DEPDIR)/cdi_write_hybrid.Po + -rm -f ./$(DEPDIR)/cdi_write_local.Po + -rm -f ./$(DEPDIR)/cdi_write_relativ.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) check-am install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles check check-am clean clean-checkPROGRAMS \ + clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am examples-am examples-local 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 maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + +examples-local: $(test_PROGRAMS_) $(EXTRA_PROGRAMS) + +cdi_read_f2003.$(OBJEXT) cdi_write_f2003.$(OBJEXT): $(top_builddir)/src/$(mo_cdi_mod) + +clean-local: + -rm -f *.grb *.grb2 *.nc + -rm -rf *.dSYM + +# 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/examples/pio/Makefile.in b/examples/pio/Makefile.in new file mode 100644 index 000000000..4e805acd6 --- /dev/null +++ b/examples/pio/Makefile.in @@ -0,0 +1,896 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + 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@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +EXTRA_PROGRAMS = collectData$(EXEEXT) collectDataNStreams$(EXEEXT) \ + $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) +@ENABLE_MPI_TRUE@am__append_1 = \ +@ENABLE_MPI_TRUE@ collectData.parallel \ +@ENABLE_MPI_TRUE@ collectDataNStreams.parallel \ +@ENABLE_MPI_TRUE@ compareResourcesArray + +@BUILD_FC_PROGRAMS_TRUE@@ENABLE_CF_INTERFACE_TRUE@am__append_2 = collectData2003 +@BUILD_PIO_FC_PROGRAMS_TRUE@@ENABLE_CF_INTERFACE_TRUE@am__append_3 = collectData2003.parallel +@with_example_programs_TRUE@am__append_4 = $(EXTRA_PROGRAMS) +@with_example_programs_FALSE@am__append_5 = $(EXTRA_PROGRAMS) +@ENABLE_CF_INTERFACE_TRUE@am__append_6 = $(FC_OPTINC)$(top_builddir)/src $(FC_OPTINC)$(top_srcdir)/src +@ENABLE_ALL_STATIC_TRUE@am__append_7 = -all-static +subdir = examples/pio +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \ + $(top_srcdir)/m4/acx_c_package.m4 \ + $(top_srcdir)/m4/acx_cfortran_flags.m4 \ + $(top_srcdir)/m4/acx_check_cfortran.m4 \ + $(top_srcdir)/m4/acx_check_strptr_convert.m4 \ + $(top_srcdir)/m4/acx_execinfo.m4 \ + $(top_srcdir)/m4/acx_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_fortran_include_flag.m4 \ + $(top_srcdir)/m4/acx_fortran_package.m4 \ + $(top_srcdir)/m4/acx_lang_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_package.m4 \ + $(top_srcdir)/m4/acx_lt_problems.m4 \ + $(top_srcdir)/m4/acx_m4_list_to_quoted_strings.m4 \ + $(top_srcdir)/m4/acx_mpirun.m4 $(top_srcdir)/m4/acx_mv_obj.m4 \ + $(top_srcdir)/m4/acx_option_search_libs.m4 \ + $(top_srcdir)/m4/acx_options.m4 \ + $(top_srcdir)/m4/acx_prog_cc_posix.m4 \ + $(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \ + $(top_srcdir)/m4/acx_sl_mod_suffix.m4 \ + $(top_srcdir)/m4/acx_tls_xlc_retry.m4 \ + $(top_srcdir)/m4/acx_use_libtool_configuration.m4 \ + $(top_srcdir)/m4/acx_uuid.m4 $(top_srcdir)/m4/asx_tr_arg.m4 \ + $(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/kpse_libtool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/ac_lang_program_fortran.m4 \ + $(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_c_check_include.m4 \ + $(top_srcdir)/configure.ac +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)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@ENABLE_MPI_TRUE@am__EXEEXT_1 = collectData.parallel$(EXEEXT) \ +@ENABLE_MPI_TRUE@ collectDataNStreams.parallel$(EXEEXT) \ +@ENABLE_MPI_TRUE@ compareResourcesArray$(EXEEXT) +@BUILD_FC_PROGRAMS_TRUE@@ENABLE_CF_INTERFACE_TRUE@am__EXEEXT_2 = collectData2003$(EXEEXT) +@BUILD_PIO_FC_PROGRAMS_TRUE@@ENABLE_CF_INTERFACE_TRUE@am__EXEEXT_3 = collectData2003.parallel$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_collectData_OBJECTS = collectData.$(OBJEXT) +collectData_OBJECTS = $(am_collectData_OBJECTS) +collectData_LDADD = $(LDADD) +collectData_DEPENDENCIES = $(top_builddir)/src/libcdi.la +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 = +am__objects_1 = collectData.parallel.$(OBJEXT) +nodist_collectData_parallel_OBJECTS = $(am__objects_1) +collectData_parallel_OBJECTS = $(nodist_collectData_parallel_OBJECTS) +am__DEPENDENCIES_1 = +collectData_parallel_DEPENDENCIES = $(top_builddir)/src/libcdipio.la \ + $(am__DEPENDENCIES_1) $(LDADD) +am_collectData2003_OBJECTS = collectData2003.$(OBJEXT) +collectData2003_OBJECTS = $(am_collectData2003_OBJECTS) +collectData2003_LDADD = $(LDADD) +collectData2003_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am__objects_2 = collectData2003.parallel.$(OBJEXT) +nodist_collectData2003_parallel_OBJECTS = $(am__objects_2) +collectData2003_parallel_OBJECTS = \ + $(nodist_collectData2003_parallel_OBJECTS) +collectData2003_parallel_DEPENDENCIES = \ + $(top_builddir)/src/libcdipio.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(LDADD) +am_collectDataNStreams_OBJECTS = collectDataNStreams.$(OBJEXT) +collectDataNStreams_OBJECTS = $(am_collectDataNStreams_OBJECTS) +collectDataNStreams_LDADD = $(LDADD) +collectDataNStreams_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am__objects_3 = collectDataNStreams.parallel.$(OBJEXT) +nodist_collectDataNStreams_parallel_OBJECTS = $(am__objects_3) +collectDataNStreams_parallel_OBJECTS = \ + $(nodist_collectDataNStreams_parallel_OBJECTS) +collectDataNStreams_parallel_DEPENDENCIES = \ + $(top_builddir)/src/libcdipio.la $(am__DEPENDENCIES_1) \ + $(LDADD) +am_compareResourcesArray_OBJECTS = compareResourcesArray.$(OBJEXT) +compareResourcesArray_OBJECTS = $(am_compareResourcesArray_OBJECTS) +compareResourcesArray_DEPENDENCIES = $(top_builddir)/src/libcdipio.la \ + $(am__DEPENDENCIES_1) $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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)/src +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/collectData.Po \ + ./$(DEPDIR)/collectData.parallel.Po \ + ./$(DEPDIR)/collectDataNStreams.Po \ + ./$(DEPDIR)/collectDataNStreams.parallel.Po \ + ./$(DEPDIR)/compareResourcesArray.Po +am__mv = mv -f +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(collectData_SOURCES) \ + $(nodist_collectData_parallel_SOURCES) \ + $(collectData2003_SOURCES) \ + $(nodist_collectData2003_parallel_SOURCES) \ + $(collectDataNStreams_SOURCES) \ + $(nodist_collectDataNStreams_parallel_SOURCES) \ + $(compareResourcesArray_SOURCES) +DIST_SOURCES = $(collectData_SOURCES) $(collectData2003_SOURCES) \ + $(collectDataNStreams_SOURCES) \ + $(compareResourcesArray_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = examples-recursive +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)` +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCE_UUIDROOT = @DCE_UUIDROOT@ +DCE_UUID_C_INCLUDE = @DCE_UUID_C_INCLUDE@ +DCE_UUID_C_LIB = @DCE_UUID_C_LIB@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECCODES_INCLUDE = @ECCODES_INCLUDE@ +ECCODES_LIBS = @ECCODES_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_ACROSS = @ENABLE_ACROSS@ +ENABLE_CDI_LIB = @ENABLE_CDI_LIB@ +ENABLE_CGRIBEX = @ENABLE_CGRIBEX@ +ENABLE_EXTRA = @ENABLE_EXTRA@ +ENABLE_GRIB = @ENABLE_GRIB@ +ENABLE_IEG = @ENABLE_IEG@ +ENABLE_MPI = @ENABLE_MPI@ +ENABLE_NC2 = @ENABLE_NC2@ +ENABLE_NC4 = @ENABLE_NC4@ +ENABLE_NC4HDF5 = @ENABLE_NC4HDF5@ +ENABLE_NC4SZLIB = @ENABLE_NC4SZLIB@ +ENABLE_NETCDF = @ENABLE_NETCDF@ +ENABLE_SERVICE = @ENABLE_SERVICE@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCMODCASE = @FCMODCASE@ +FCMODEXT = @FCMODEXT@ +FC_DEFINE = @FC_DEFINE@ +FC_MOD_FLAG = @FC_MOD_FLAG@ +FC_OPTINC = @FC_OPTINC@ +FDB5_INCLUDE = @FDB5_INCLUDE@ +FDB5_LIBS = @FDB5_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GRIB_API_INCLUDE = @GRIB_API_INCLUDE@ +GRIB_API_LIBS = @GRIB_API_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPIROOT = @MPIROOT@ +MPI_C_INCLUDE = @MPI_C_INCLUDE@ +MPI_C_LIB = @MPI_C_LIB@ +MPI_FC_LIB = @MPI_FC_LIB@ +MPI_FC_MOD = @MPI_FC_MOD@ +MPI_LAUNCH = @MPI_LAUNCH@ +NC_CONFIG = @NC_CONFIG@ +NETCDF_INCLUDE = @NETCDF_INCLUDE@ +NETCDF_LIBS = @NETCDF_LIBS@ +NETCDF_ROOT = @NETCDF_ROOT@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OSSP_UUIDROOT = @OSSP_UUIDROOT@ +OSSP_UUID_C_INCLUDE = @OSSP_UUID_C_INCLUDE@ +OSSP_UUID_C_LIB = @OSSP_UUID_C_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PPM_CORE_C_INCLUDE = @PPM_CORE_C_INCLUDE@ +PPM_CORE_C_LIB = @PPM_CORE_C_LIB@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PLATFORM_SITE_PKG = @PYTHON_PLATFORM_SITE_PKG@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SYSTEM_TYPE = @SYSTEM_TYPE@ +SZLIB_INCLUDE = @SZLIB_INCLUDE@ +SZLIB_LIBS = @SZLIB_LIBS@ +THREADS_INCLUDE = @THREADS_INCLUDE@ +THREADS_LIBS = @THREADS_LIBS@ +UTIL_LINUX_UUIDROOT = @UTIL_LINUX_UUIDROOT@ +UTIL_LINUX_UUID_C_INCLUDE = @UTIL_LINUX_UUID_C_INCLUDE@ +UTIL_LINUX_UUID_C_LIB = @UTIL_LINUX_UUID_C_LIB@ +UUID_C_INCLUDE = @UUID_C_INCLUDE@ +UUID_C_LIB = @UUID_C_LIB@ +VERSION = @VERSION@ +YAXT_C_INCLUDE = @YAXT_C_INCLUDE@ +YAXT_C_LIB = @YAXT_C_LIB@ +YAXT_FC_LIB = @YAXT_FC_LIB@ +YAXT_FC_MOD = @YAXT_FC_MOD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_PROGRAMS = $(am__append_4) +CLEANFILES = $(am__append_5) +AM_CPPFLAGS = -I$(top_srcdir)/src $(YAXT_C_INCLUDE) $(MPI_C_INCLUDE) +AM_FCFLAGS = $(am__append_6) $(YAXT_FC_MOD) $(MPI_FC_MOD) -static +AM_LDFLAGS = $(am__append_7) +LDADD = $(top_builddir)/src/libcdi.la +collectData_SOURCES = collectData.c +nodist_collectData_parallel_SOURCES = $(collectData_SOURCES:.c=.parallel.c) +collectData_parallel_LDADD = $(top_builddir)/src/libcdipio.la $(YAXT_C_LIB) $(LDADD) +collectDataNStreams_SOURCES = collectDataNStreams.c +nodist_collectDataNStreams_parallel_SOURCES = $(collectDataNStreams_SOURCES:.c=.parallel.c) +collectDataNStreams_parallel_LDADD = $(top_builddir)/src/libcdipio.la $(YAXT_C_LIB) $(LDADD) +compareResourcesArray_SOURCES = compareResourcesArray.c +compareResourcesArray_LDADD = $(top_builddir)/src/libcdipio.la $(YAXT_C_LIB) $(LDADD) +collectData2003_SOURCES = collectData2003.F90 +nodist_collectData2003_parallel_SOURCES = $(collectData2003_SOURCES:.F90=.parallel.F90) +collectData2003_parallel_LDADD = $(top_builddir)/src/libcdipio.la $(YAXT_FC_LIB) $(MPI_FC_LIB) $(LDADD) + +# Compile programs using Libtool: +COMPILE = $(LTCOMPILE) +FCCOMPILE = $(LTFCCOMPILE) +PPFCCOMPILE = $(LTPPFCCOMPILE) +CXXCOMPILE = $(LTCXXCOMPILE) + +# Compile *.F90 without CPPFLAGS, which are normally meant for the C compiler +# and might not be compatible with the Fortran compiler: +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) + + +# Avoid compiling twice by running Libtool with '-static' +# This is safe because all Libtool libraries in this directory are +# static-only and contain PIC objects: +AM_CFLAGS = -static +AM_CXXFLAGS = -static + +# Generate source files for parallel versions of the programs. We do this to +# avoid target-specific flags, which result into rules that do not use the +# compilation commands above. +SUFFIXES = .parallel.c .parallel.F90 +all: all-am + +.SUFFIXES: +.SUFFIXES: .parallel.c .parallel.F90 .F90 .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/pio/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign examples/pio/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +collectData$(EXEEXT): $(collectData_OBJECTS) $(collectData_DEPENDENCIES) $(EXTRA_collectData_DEPENDENCIES) + @rm -f collectData$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(collectData_OBJECTS) $(collectData_LDADD) $(LIBS) + +collectData.parallel$(EXEEXT): $(collectData_parallel_OBJECTS) $(collectData_parallel_DEPENDENCIES) $(EXTRA_collectData_parallel_DEPENDENCIES) + @rm -f collectData.parallel$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(collectData_parallel_OBJECTS) $(collectData_parallel_LDADD) $(LIBS) + +collectData2003$(EXEEXT): $(collectData2003_OBJECTS) $(collectData2003_DEPENDENCIES) $(EXTRA_collectData2003_DEPENDENCIES) + @rm -f collectData2003$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(collectData2003_OBJECTS) $(collectData2003_LDADD) $(LIBS) + +collectData2003.parallel$(EXEEXT): $(collectData2003_parallel_OBJECTS) $(collectData2003_parallel_DEPENDENCIES) $(EXTRA_collectData2003_parallel_DEPENDENCIES) + @rm -f collectData2003.parallel$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(collectData2003_parallel_OBJECTS) $(collectData2003_parallel_LDADD) $(LIBS) + +collectDataNStreams$(EXEEXT): $(collectDataNStreams_OBJECTS) $(collectDataNStreams_DEPENDENCIES) $(EXTRA_collectDataNStreams_DEPENDENCIES) + @rm -f collectDataNStreams$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(collectDataNStreams_OBJECTS) $(collectDataNStreams_LDADD) $(LIBS) + +collectDataNStreams.parallel$(EXEEXT): $(collectDataNStreams_parallel_OBJECTS) $(collectDataNStreams_parallel_DEPENDENCIES) $(EXTRA_collectDataNStreams_parallel_DEPENDENCIES) + @rm -f collectDataNStreams.parallel$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(collectDataNStreams_parallel_OBJECTS) $(collectDataNStreams_parallel_LDADD) $(LIBS) + +compareResourcesArray$(EXEEXT): $(compareResourcesArray_OBJECTS) $(compareResourcesArray_DEPENDENCIES) $(EXTRA_compareResourcesArray_DEPENDENCIES) + @rm -f compareResourcesArray$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(compareResourcesArray_OBJECTS) $(compareResourcesArray_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collectData.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collectData.parallel.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collectDataNStreams.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collectDataNStreams.parallel.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compareResourcesArray.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +examples-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(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-am + +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-am + +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: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +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-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/collectData.Po + -rm -f ./$(DEPDIR)/collectData.parallel.Po + -rm -f ./$(DEPDIR)/collectDataNStreams.Po + -rm -f ./$(DEPDIR)/collectDataNStreams.parallel.Po + -rm -f ./$(DEPDIR)/compareResourcesArray.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +examples: examples-am + +examples-am: examples-local + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/collectData.Po + -rm -f ./$(DEPDIR)/collectData.parallel.Po + -rm -f ./$(DEPDIR)/collectDataNStreams.Po + -rm -f ./$(DEPDIR)/collectDataNStreams.parallel.Po + -rm -f ./$(DEPDIR)/compareResourcesArray.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am examples-am examples-local 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + +examples-local: $(EXTRA_PROGRAMS) + +clean-local: + -rm -f *.parallel.c *.parallel.F90 + -rm -f *.grb + -rm -rf *.dSYM + +.c.parallel.c: + $(AM_V_GEN):;{ \ + echo '#define USE_MPI 1'; \ + echo '#include "$<"'; \ + } >$@ + +.F90.parallel.F90: + $(AM_V_GEN):;{ \ + echo '#define USE_MPI 1'; \ + echo '#include "$<"'; \ + } >$@ + +# 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/interfaces/Makefile.in b/interfaces/Makefile.in new file mode 100644 index 000000000..84464c8ea --- /dev/null +++ b/interfaces/Makefile.in @@ -0,0 +1,1429 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + 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@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_RUBY_INTERFACE_TRUE@am__append_1 = ruby-binding +@ENABLE_RUBY_INTERFACE_TRUE@am__append_2 = ruby-install +@ENABLE_RUBY_INTERFACE_TRUE@am__append_3 = ruby-uninstall +# We call with distclean to remove the generated ruby/Makefile, which is +# generated by this makefile, and should, therefore, be deleted with +# 'make clean': +@ENABLE_RUBY_INTERFACE_TRUE@am__append_4 = ruby-clean +@ENABLE_PYTHON_INTERFACE_FALSE@@ENABLE_RUBY_INTERFACE_TRUE@@with_on_demand_check_programs_TRUE@check_PROGRAMS = $(am__EXEEXT_1) +@ENABLE_PYTHON_INTERFACE_TRUE@@with_on_demand_check_programs_TRUE@check_PROGRAMS = $(am__EXEEXT_1) +@ENABLE_PYTHON_INTERFACE_FALSE@@ENABLE_RUBY_INTERFACE_TRUE@@with_on_demand_check_programs_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) +@ENABLE_PYTHON_INTERFACE_TRUE@@with_on_demand_check_programs_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) +subdir = interfaces +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \ + $(top_srcdir)/m4/acx_c_package.m4 \ + $(top_srcdir)/m4/acx_cfortran_flags.m4 \ + $(top_srcdir)/m4/acx_check_cfortran.m4 \ + $(top_srcdir)/m4/acx_check_strptr_convert.m4 \ + $(top_srcdir)/m4/acx_execinfo.m4 \ + $(top_srcdir)/m4/acx_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_fortran_include_flag.m4 \ + $(top_srcdir)/m4/acx_fortran_package.m4 \ + $(top_srcdir)/m4/acx_lang_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_package.m4 \ + $(top_srcdir)/m4/acx_lt_problems.m4 \ + $(top_srcdir)/m4/acx_m4_list_to_quoted_strings.m4 \ + $(top_srcdir)/m4/acx_mpirun.m4 $(top_srcdir)/m4/acx_mv_obj.m4 \ + $(top_srcdir)/m4/acx_option_search_libs.m4 \ + $(top_srcdir)/m4/acx_options.m4 \ + $(top_srcdir)/m4/acx_prog_cc_posix.m4 \ + $(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \ + $(top_srcdir)/m4/acx_sl_mod_suffix.m4 \ + $(top_srcdir)/m4/acx_tls_xlc_retry.m4 \ + $(top_srcdir)/m4/acx_use_libtool_configuration.m4 \ + $(top_srcdir)/m4/acx_uuid.m4 $(top_srcdir)/m4/asx_tr_arg.m4 \ + $(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/kpse_libtool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/ac_lang_program_fortran.m4 \ + $(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_c_check_include.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__python_PYTHON_DIST) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = test_cpp_nc.run test_python_grb.run \ + test_python_nc.run test_ruby_grb.run test_ruby_nc.run +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = CdiInfo$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pythondir)" +LTLIBRARIES = $(pyexec_LTLIBRARIES) +libcdipp_la_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_libcdipp_la_OBJECTS = cdi.lo +libcdipp_la_OBJECTS = $(am_libcdipp_la_OBJECTS) +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 = +am__DEPENDENCIES_1 = +@ENABLE_PYTHON_INTERFACE_TRUE@python__Cdi_la_DEPENDENCIES = \ +@ENABLE_PYTHON_INTERFACE_TRUE@ libcdipp.la \ +@ENABLE_PYTHON_INTERFACE_TRUE@ $(am__DEPENDENCIES_1) +am__python__Cdi_la_SOURCES_DIST = python/cdi_wrapper.cpp +am__dirstamp = $(am__leading_dot)dirstamp +@ENABLE_PYTHON_INTERFACE_TRUE@am_python__Cdi_la_OBJECTS = \ +@ENABLE_PYTHON_INTERFACE_TRUE@ python/_Cdi_la-cdi_wrapper.lo +python__Cdi_la_OBJECTS = $(am_python__Cdi_la_OBJECTS) +python__Cdi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(python__Cdi_la_CXXFLAGS) $(CXXFLAGS) \ + $(python__Cdi_la_LDFLAGS) $(LDFLAGS) -o $@ +@ENABLE_PYTHON_INTERFACE_TRUE@am_python__Cdi_la_rpath = -rpath \ +@ENABLE_PYTHON_INTERFACE_TRUE@ $(pyexecdir) +am_CdiInfo_OBJECTS = CdiInfo.$(OBJEXT) +CdiInfo_OBJECTS = $(am_CdiInfo_OBJECTS) +CdiInfo_DEPENDENCIES = libcdipp.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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)/src +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/CdiInfo.Po ./$(DEPDIR)/cdi.Plo \ + python/$(DEPDIR)/_Cdi_la-cdi_wrapper.Plo +am__mv = mv -f +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libcdipp_la_SOURCES) $(python__Cdi_la_SOURCES) \ + $(CdiInfo_SOURCES) +DIST_SOURCES = $(libcdipp_la_SOURCES) \ + $(am__python__Cdi_la_SOURCES_DIST) $(CdiInfo_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__python_PYTHON_DIST = python/Cdi.py +am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) +am__pep3147_tweak = \ + sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc __pycache__/&.*.pyo|' +py_compile = $(top_srcdir)/config/py-compile +am__extra_recursive_targets = examples-recursive +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)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.run.log=.log) +RUN_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +RUN_LOG_COMPILE = $(RUN_LOG_COMPILER) $(AM_RUN_LOG_FLAGS) \ + $(RUN_LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/test_cpp_nc.run.in \ + $(srcdir)/test_python_grb.run.in \ + $(srcdir)/test_python_nc.run.in $(srcdir)/test_ruby_grb.run.in \ + $(srcdir)/test_ruby_nc.run.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/py-compile \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCE_UUIDROOT = @DCE_UUIDROOT@ +DCE_UUID_C_INCLUDE = @DCE_UUID_C_INCLUDE@ +DCE_UUID_C_LIB = @DCE_UUID_C_LIB@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECCODES_INCLUDE = @ECCODES_INCLUDE@ +ECCODES_LIBS = @ECCODES_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_ACROSS = @ENABLE_ACROSS@ +ENABLE_CDI_LIB = @ENABLE_CDI_LIB@ +ENABLE_CGRIBEX = @ENABLE_CGRIBEX@ +ENABLE_EXTRA = @ENABLE_EXTRA@ +ENABLE_GRIB = @ENABLE_GRIB@ +ENABLE_IEG = @ENABLE_IEG@ +ENABLE_MPI = @ENABLE_MPI@ +ENABLE_NC2 = @ENABLE_NC2@ +ENABLE_NC4 = @ENABLE_NC4@ +ENABLE_NC4HDF5 = @ENABLE_NC4HDF5@ +ENABLE_NC4SZLIB = @ENABLE_NC4SZLIB@ +ENABLE_NETCDF = @ENABLE_NETCDF@ +ENABLE_SERVICE = @ENABLE_SERVICE@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCMODCASE = @FCMODCASE@ +FCMODEXT = @FCMODEXT@ +FC_DEFINE = @FC_DEFINE@ +FC_MOD_FLAG = @FC_MOD_FLAG@ +FC_OPTINC = @FC_OPTINC@ +FDB5_INCLUDE = @FDB5_INCLUDE@ +FDB5_LIBS = @FDB5_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GRIB_API_INCLUDE = @GRIB_API_INCLUDE@ +GRIB_API_LIBS = @GRIB_API_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPIROOT = @MPIROOT@ +MPI_C_INCLUDE = @MPI_C_INCLUDE@ +MPI_C_LIB = @MPI_C_LIB@ +MPI_FC_LIB = @MPI_FC_LIB@ +MPI_FC_MOD = @MPI_FC_MOD@ +MPI_LAUNCH = @MPI_LAUNCH@ +NC_CONFIG = @NC_CONFIG@ +NETCDF_INCLUDE = @NETCDF_INCLUDE@ +NETCDF_LIBS = @NETCDF_LIBS@ +NETCDF_ROOT = @NETCDF_ROOT@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OSSP_UUIDROOT = @OSSP_UUIDROOT@ +OSSP_UUID_C_INCLUDE = @OSSP_UUID_C_INCLUDE@ +OSSP_UUID_C_LIB = @OSSP_UUID_C_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PPM_CORE_C_INCLUDE = @PPM_CORE_C_INCLUDE@ +PPM_CORE_C_LIB = @PPM_CORE_C_LIB@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PLATFORM_SITE_PKG = @PYTHON_PLATFORM_SITE_PKG@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SYSTEM_TYPE = @SYSTEM_TYPE@ +SZLIB_INCLUDE = @SZLIB_INCLUDE@ +SZLIB_LIBS = @SZLIB_LIBS@ +THREADS_INCLUDE = @THREADS_INCLUDE@ +THREADS_LIBS = @THREADS_LIBS@ +UTIL_LINUX_UUIDROOT = @UTIL_LINUX_UUIDROOT@ +UTIL_LINUX_UUID_C_INCLUDE = @UTIL_LINUX_UUID_C_INCLUDE@ +UTIL_LINUX_UUID_C_LIB = @UTIL_LINUX_UUID_C_LIB@ +UUID_C_INCLUDE = @UUID_C_INCLUDE@ +UUID_C_LIB = @UUID_C_LIB@ +VERSION = @VERSION@ +YAXT_C_INCLUDE = @YAXT_C_INCLUDE@ +YAXT_C_LIB = @YAXT_C_LIB@ +YAXT_FC_LIB = @YAXT_FC_LIB@ +YAXT_FC_MOD = @YAXT_FC_MOD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_LTLIBRARIES = libcdipp.la +libcdipp_la_SOURCES = cdi.cpp cdi.hpp +libcdipp_la_LIBADD = $(top_builddir)/src/libcdi.la +test_PROGRAMS_ = CdiInfo +CdiInfo_SOURCES = CdiInfo.cpp +CdiInfo_LDADD = libcdipp.la +AM_CPPFLAGS = -I$(abs_top_srcdir)/src +all_local = $(am__append_1) +install_exec_local = $(am__append_2) +uninstall_local = $(am__append_3) +clean_local = $(am__append_4) +@ENABLE_RUBY_INTERFACE_TRUE@V_MAKERUBY = $(v_MAKERUBY_@AM_V@) +@ENABLE_RUBY_INTERFACE_TRUE@v_MAKERUBY_ = $(v_MAKERUBY_@AM_DEFAULT_V@) +@ENABLE_RUBY_INTERFACE_TRUE@v_MAKERUBY_0 = 0 +@ENABLE_RUBY_INTERFACE_TRUE@v_MAKERUBY_1 = 1 +AUTOMAKE_OPTIONS = subdir-objects +@ENABLE_PYTHON_INTERFACE_TRUE@python_PYTHON = python/Cdi.py +@ENABLE_PYTHON_INTERFACE_TRUE@pyexec_LTLIBRARIES = python/_Cdi.la +@ENABLE_PYTHON_INTERFACE_TRUE@python__Cdi_la_SOURCES = python/cdi_wrapper.cpp +@ENABLE_PYTHON_INTERFACE_TRUE@python__Cdi_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) +@ENABLE_PYTHON_INTERFACE_TRUE@python__Cdi_la_CXXFLAGS = $(AM_CXXFLAGS) -shared +@ENABLE_PYTHON_INTERFACE_TRUE@python__Cdi_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version +@ENABLE_PYTHON_INTERFACE_TRUE@python__Cdi_la_LIBADD = libcdipp.la $(PYTHON_LIBS) +AM_TESTSUITE_SUMMARY_HEADER = ' for Ruby and Python interfaces of $(PACKAGE_STRING)' +TEST_EXTENSIONS = .run +TESTS = \ + test_cpp_nc.run \ + test_python_grb.run \ + test_python_nc.run \ + test_ruby_grb.run \ + test_ruby_nc.run + +MOSTLYCLEANFILES = $(EXTRA_LTLIBRARIES) +MAINTAINERCLEANFILES = \ + python/Cdi.py \ + python/cdi_wrapper.cpp \ + ruby/cdi_wrapper.cpp + +EXTRA_DIST = \ + cdi.i \ + f2003/bindGen.rb \ + python/test.py \ + ruby/cdi_wrapper.cpp \ + ruby/setup.rb \ + ruby/test.rb \ + testdata/mulval.grb \ + testdata/mulval.nc + + +# Compile programs using Libtool: +COMPILE = $(LTCOMPILE) +FCCOMPILE = $(LTFCCOMPILE) +PPFCCOMPILE = $(LTPPFCCOMPILE) +CXXCOMPILE = $(LTCXXCOMPILE) + +# Compile *.F90 without CPPFLAGS, which are normally meant for the C compiler +# and might not be compatible with the Fortran compiler: +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .log .o .obj .run .run$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign interfaces/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign interfaces/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +test_cpp_nc.run: $(top_builddir)/config.status $(srcdir)/test_cpp_nc.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_python_grb.run: $(top_builddir)/config.status $(srcdir)/test_python_grb.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_python_nc.run: $(top_builddir)/config.status $(srcdir)/test_python_nc.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_ruby_grb.run: $(top_builddir)/config.status $(srcdir)/test_ruby_grb.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_ruby_nc.run: $(top_builddir)/config.status $(srcdir)/test_ruby_nc.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ + } + +uninstall-pyexecLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ + done + +clean-pyexecLTLIBRARIES: + -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) + @list='$(pyexec_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libcdipp.la: $(libcdipp_la_OBJECTS) $(libcdipp_la_DEPENDENCIES) $(EXTRA_libcdipp_la_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) $(libcdipp_la_OBJECTS) $(libcdipp_la_LIBADD) $(LIBS) +python/$(am__dirstamp): + @$(MKDIR_P) python + @: > python/$(am__dirstamp) +python/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) python/$(DEPDIR) + @: > python/$(DEPDIR)/$(am__dirstamp) +python/_Cdi_la-cdi_wrapper.lo: python/$(am__dirstamp) \ + python/$(DEPDIR)/$(am__dirstamp) + +python/_Cdi.la: $(python__Cdi_la_OBJECTS) $(python__Cdi_la_DEPENDENCIES) $(EXTRA_python__Cdi_la_DEPENDENCIES) python/$(am__dirstamp) + $(AM_V_CXXLD)$(python__Cdi_la_LINK) $(am_python__Cdi_la_rpath) $(python__Cdi_la_OBJECTS) $(python__Cdi_la_LIBADD) $(LIBS) + +CdiInfo$(EXEEXT): $(CdiInfo_OBJECTS) $(CdiInfo_DEPENDENCIES) $(EXTRA_CdiInfo_DEPENDENCIES) + @rm -f CdiInfo$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(CdiInfo_OBJECTS) $(CdiInfo_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f python/*.$(OBJEXT) + -rm -f python/*.lo + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CdiInfo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/_Cdi_la-cdi_wrapper.Plo@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +python/_Cdi_la-cdi_wrapper.lo: python/cdi_wrapper.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python__Cdi_la_CPPFLAGS) $(CPPFLAGS) $(python__Cdi_la_CXXFLAGS) $(CXXFLAGS) -MT python/_Cdi_la-cdi_wrapper.lo -MD -MP -MF python/$(DEPDIR)/_Cdi_la-cdi_wrapper.Tpo -c -o python/_Cdi_la-cdi_wrapper.lo `test -f 'python/cdi_wrapper.cpp' || echo '$(srcdir)/'`python/cdi_wrapper.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/_Cdi_la-cdi_wrapper.Tpo python/$(DEPDIR)/_Cdi_la-cdi_wrapper.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='python/cdi_wrapper.cpp' object='python/_Cdi_la-cdi_wrapper.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python__Cdi_la_CPPFLAGS) $(CPPFLAGS) $(python__Cdi_la_CXXFLAGS) $(CXXFLAGS) -c -o python/_Cdi_la-cdi_wrapper.lo `test -f 'python/cdi_wrapper.cpp' || echo '$(srcdir)/'`python/cdi_wrapper.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf python/.libs python/_libs +install-pythonPYTHON: $(python_PYTHON) + @$(NORMAL_INSTALL) + @list='$(python_PYTHON)'; dlist=; list2=; test -n "$(pythondir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pythondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pythondir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythondir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pythondir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + $(am__py_compile) --destdir "$(DESTDIR)" \ + --basedir "$(pythondir)" $$dlist; \ + else :; fi + +uninstall-pythonPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(python_PYTHON)'; test -n "$(pythondir)" || list=; \ + py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$py_files" || exit 0; \ + dir='$(DESTDIR)$(pythondir)'; \ + pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ + pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ + st=0; \ + for files in "$$py_files" "$$pyc_files" "$$pyo_files"; do \ + $(am__uninstall_files_from_dir) || st=$$?; \ + done; \ + dir='$(DESTDIR)$(pythondir)'; \ + echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \ + while read files; do \ + $(am__uninstall_files_from_dir) || st=$$?; \ + done || exit $$?; \ + exit $$st +examples-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(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-am + +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-am + +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 + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +.run.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(RUN_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_RUN_LOG_DRIVER_FLAGS) $(RUN_LOG_DRIVER_FLAGS) -- $(RUN_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.run$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(RUN_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_RUN_LOG_DRIVER_FLAGS) $(RUN_LOG_DRIVER_FLAGS) -- $(RUN_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) all-local +installdirs: + for dir in "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pythondir)"; 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-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f python/$(DEPDIR)/$(am__dirstamp) + -rm -f python/$(am__dirstamp) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ + clean-noinstPROGRAMS clean-pyexecLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/CdiInfo.Po + -rm -f ./$(DEPDIR)/cdi.Plo + -rm -f python/$(DEPDIR)/_Cdi_la-cdi_wrapper.Plo + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +examples: examples-am + +examples-am: examples-local + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pythonPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-exec-local install-pyexecLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/CdiInfo.Po + -rm -f ./$(DEPDIR)/cdi.Plo + -rm -f python/$(DEPDIR)/_Cdi_la-cdi_wrapper.Plo + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local uninstall-pyexecLTLIBRARIES \ + uninstall-pythonPYTHON + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am all-local am--depfiles check \ + check-TESTS check-am clean clean-checkPROGRAMS clean-generic \ + clean-libtool clean-local clean-noinstPROGRAMS \ + clean-pyexecLTLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am examples-am examples-local \ + 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-exec-local install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-pyexecLTLIBRARIES install-pythonPYTHON install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am uninstall-local \ + uninstall-pyexecLTLIBRARIES uninstall-pythonPYTHON + +.PRECIOUS: Makefile + + +# For compatibility with older versions of Ruby, the recipes below redefine +# the following additional variables of the generated Makefile (this is known +# to be needed for Ruby 2.7.4 but not for Ruby 3.1.0): +# sitearchdir='$$(sitelibdir)/$$(sitearch)' +# sitedir='$$(rubylibprefix)/site_ruby' +# RM='$$(RM_RF)' + +@ENABLE_RUBY_INTERFACE_TRUE@.PHONY: ruby-binding +@ENABLE_RUBY_INTERFACE_TRUE@ruby-binding: ruby/Cdi.la +@ENABLE_RUBY_INTERFACE_TRUE@ruby/Cdi.la: ruby/cdi_wrapper.cpp ruby/Makefile libcdipp.la +@ENABLE_RUBY_INTERFACE_TRUE@ $(AM_V_CXXLD)$(am__cd) ruby && \ +@ENABLE_RUBY_INTERFACE_TRUE@ $(MAKE) $(AM_MAKEFLAGS) \ +@ENABLE_RUBY_INTERFACE_TRUE@ prefix='$(prefix)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ sitearchdir='$$(sitelibdir)/$$(sitearch)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ sitedir='$$(rubylibprefix)/site_ruby' \ +@ENABLE_RUBY_INTERFACE_TRUE@ TIMESTAMP_DIR='.dirstamp' \ +@ENABLE_RUBY_INTERFACE_TRUE@ CDI_INCFLAGS='-I$(abs_srcdir)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ CDI_CPPFLAGS='$(AM_CPPFLAGS) $(CPPFLAGS)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ CDI_CXXFLAGS='$(AM_CXXFLAGS) -shared $(CXXFLAGS)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ CDI_LDFLAGS='$(AM_LDFLAGS) -module -avoid-version $(LDFLAGS) -rpath $$(RUBYARCHDIR)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ CDI_LIBS='$(LIBS)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ CCDLFLAGS= \ +@ENABLE_RUBY_INTERFACE_TRUE@ CXX='$(SHELL) $(abs_top_builddir)/libtool $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ LDSHAREDXX='$(SHELL) $(abs_top_builddir)/libtool $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) $$(CDI_CXXFLAGS)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ DLLIB='$$(TARGET).la' \ +@ENABLE_RUBY_INTERFACE_TRUE@ V='$(V_MAKERUBY)' + +@ENABLE_RUBY_INTERFACE_TRUE@ruby/Makefile: $(abs_srcdir)/ruby/setup.rb Makefile +@ENABLE_RUBY_INTERFACE_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(@D) && $(am__cd) $(@D) && $(RUBY) $< && \ +@ENABLE_RUBY_INTERFACE_TRUE@ $(SED) -i~ -e '/^\.cpp\.o:/s/^\.cpp\.o/.cpp.lo/;/^.SUFFIXES:/s/$$/ .lo/' \ +@ENABLE_RUBY_INTERFACE_TRUE@ -e '$$auninstall:; $$(UNINSTALL_PROG) $$(RUBYARCHDIR)/$$(DLLIB)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ Makefile && rm -f Makefile~ + +@ENABLE_RUBY_INTERFACE_TRUE@.PHONY: ruby-install +@ENABLE_RUBY_INTERFACE_TRUE@ruby-install: ruby-binding +@ENABLE_RUBY_INTERFACE_TRUE@ $(am__cd) ruby && \ +@ENABLE_RUBY_INTERFACE_TRUE@ $(MAKE) $(AM_MAKEFLAGS) install \ +@ENABLE_RUBY_INTERFACE_TRUE@ prefix='$(DESTDIR)$(prefix)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ sitearchdir='$$(sitelibdir)/$$(sitearch)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ sitedir='$$(rubylibprefix)/site_ruby' \ +@ENABLE_RUBY_INTERFACE_TRUE@ TIMESTAMP_DIR='.dirstamp$(DESTDIR)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ INSTALL_PROG='$(SHELL) $(abs_top_builddir)/libtool $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ DLLIB='$$(TARGET).la' + +@ENABLE_RUBY_INTERFACE_TRUE@.PHONY: ruby-uninstall +@ENABLE_RUBY_INTERFACE_TRUE@ruby-uninstall: +@ENABLE_RUBY_INTERFACE_TRUE@ $(am__cd) ruby && \ +@ENABLE_RUBY_INTERFACE_TRUE@ $(MAKE) $(AM_MAKEFLAGS) uninstall \ +@ENABLE_RUBY_INTERFACE_TRUE@ prefix='$(DESTDIR)$(prefix)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ sitearchdir='$$(sitelibdir)/$$(sitearch)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ sitedir='$$(rubylibprefix)/site_ruby' \ +@ENABLE_RUBY_INTERFACE_TRUE@ UNINSTALL_PROG='$(SHELL) $(abs_top_builddir)/libtool $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f' \ +@ENABLE_RUBY_INTERFACE_TRUE@ DLLIB='$$(TARGET).la' + +@ENABLE_RUBY_INTERFACE_TRUE@.PHONY: ruby-clean +@ENABLE_RUBY_INTERFACE_TRUE@ruby-clean: +@ENABLE_RUBY_INTERFACE_TRUE@ if test -f ruby/Makefile; then \ +@ENABLE_RUBY_INTERFACE_TRUE@ $(am__cd) ruby && \ +@ENABLE_RUBY_INTERFACE_TRUE@ $(MAKE) $(AM_MAKEFLAGS) distclean \ +@ENABLE_RUBY_INTERFACE_TRUE@ RM='$$(RM_RF)' \ +@ENABLE_RUBY_INTERFACE_TRUE@ DLLIB='$$(TARGET).la' \ +@ENABLE_RUBY_INTERFACE_TRUE@ CLEANOBJS='*.lo .libs .dirstamp'; \ +@ENABLE_RUBY_INTERFACE_TRUE@ fi + +@MAINTAINER_MODE_TRUE@ruby/cdi_wrapper.cpp: cdi.i cdi.hpp +@MAINTAINER_MODE_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(@D) && $(SWIG) -ruby -c++ -globalmodule -o $@ $< + +@MAINTAINER_MODE_TRUE@python/Cdi.py: cdi.i cdi.hpp +@MAINTAINER_MODE_TRUE@ $(AM_V_GEN)$(SWIG) -python -c++ -o python/cdi_wrapper.cpp $< + +@MAINTAINER_MODE_TRUE@python/cdi_wrapper.cpp: python/Cdi.py +@MAINTAINER_MODE_TRUE@ $(AM_V_at)test -f $@ || rm -f $< +@MAINTAINER_MODE_TRUE@ $(AM_V_at)test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $< +@MAINTAINER_MODE_FALSE@ruby/cdi_wrapper.cpp python/Cdi.py python/cdi_wrapper.cpp: +@MAINTAINER_MODE_FALSE@ @:;{ \ +@MAINTAINER_MODE_FALSE@ echo "ERROR: cannot generate '$@' when the maintainer mode is disabled:"; \ +@MAINTAINER_MODE_FALSE@ echo " re-configure with the '--enable-maintainer-mode' option"; \ +@MAINTAINER_MODE_FALSE@ } >&2; exit 1 + +all-local: $(all_local) +install-exec-local: $(install_exec_local) +uninstall-local: $(uninstall_local) +clean-local: $(clean_local) + +# 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/interfaces/python/Cdi.py b/interfaces/python/Cdi.py new file mode 100644 index 000000000..b96ab677f --- /dev/null +++ b/interfaces/python/Cdi.py @@ -0,0 +1,1379 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _Cdi +else: + import _Cdi + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _Cdi.delete_SwigPyIterator + + def value(self): + return _Cdi.SwigPyIterator_value(self) + + def incr(self, n=1): + return _Cdi.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _Cdi.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _Cdi.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _Cdi.SwigPyIterator_equal(self, x) + + def copy(self): + return _Cdi.SwigPyIterator_copy(self) + + def next(self): + return _Cdi.SwigPyIterator_next(self) + + def __next__(self): + return _Cdi.SwigPyIterator___next__(self) + + def previous(self): + return _Cdi.SwigPyIterator_previous(self) + + def advance(self, n): + return _Cdi.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _Cdi.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _Cdi.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _Cdi.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _Cdi.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _Cdi.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _Cdi.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _Cdi: +_Cdi.SwigPyIterator_swigregister(SwigPyIterator) + +class IntVector(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.IntVector_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.IntVector___nonzero__(self) + + def __bool__(self): + return _Cdi.IntVector___bool__(self) + + def __len__(self): + return _Cdi.IntVector___len__(self) + + def __getslice__(self, i, j): + return _Cdi.IntVector___getslice__(self, i, j) + + def __setslice__(self, *args): + return _Cdi.IntVector___setslice__(self, *args) + + def __delslice__(self, i, j): + return _Cdi.IntVector___delslice__(self, i, j) + + def __delitem__(self, *args): + return _Cdi.IntVector___delitem__(self, *args) + + def __getitem__(self, *args): + return _Cdi.IntVector___getitem__(self, *args) + + def __setitem__(self, *args): + return _Cdi.IntVector___setitem__(self, *args) + + def pop(self): + return _Cdi.IntVector_pop(self) + + def append(self, x): + return _Cdi.IntVector_append(self, x) + + def empty(self): + return _Cdi.IntVector_empty(self) + + def size(self): + return _Cdi.IntVector_size(self) + + def swap(self, v): + return _Cdi.IntVector_swap(self, v) + + def begin(self): + return _Cdi.IntVector_begin(self) + + def end(self): + return _Cdi.IntVector_end(self) + + def rbegin(self): + return _Cdi.IntVector_rbegin(self) + + def rend(self): + return _Cdi.IntVector_rend(self) + + def clear(self): + return _Cdi.IntVector_clear(self) + + def get_allocator(self): + return _Cdi.IntVector_get_allocator(self) + + def pop_back(self): + return _Cdi.IntVector_pop_back(self) + + def erase(self, *args): + return _Cdi.IntVector_erase(self, *args) + + def __init__(self, *args): + _Cdi.IntVector_swiginit(self, _Cdi.new_IntVector(*args)) + + def push_back(self, x): + return _Cdi.IntVector_push_back(self, x) + + def front(self): + return _Cdi.IntVector_front(self) + + def back(self): + return _Cdi.IntVector_back(self) + + def assign(self, n, x): + return _Cdi.IntVector_assign(self, n, x) + + def resize(self, *args): + return _Cdi.IntVector_resize(self, *args) + + def insert(self, *args): + return _Cdi.IntVector_insert(self, *args) + + def reserve(self, n): + return _Cdi.IntVector_reserve(self, n) + + def capacity(self): + return _Cdi.IntVector_capacity(self) + __swig_destroy__ = _Cdi.delete_IntVector + +# Register IntVector in _Cdi: +_Cdi.IntVector_swigregister(IntVector) + +class DoubleVector(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.DoubleVector_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.DoubleVector___nonzero__(self) + + def __bool__(self): + return _Cdi.DoubleVector___bool__(self) + + def __len__(self): + return _Cdi.DoubleVector___len__(self) + + def __getslice__(self, i, j): + return _Cdi.DoubleVector___getslice__(self, i, j) + + def __setslice__(self, *args): + return _Cdi.DoubleVector___setslice__(self, *args) + + def __delslice__(self, i, j): + return _Cdi.DoubleVector___delslice__(self, i, j) + + def __delitem__(self, *args): + return _Cdi.DoubleVector___delitem__(self, *args) + + def __getitem__(self, *args): + return _Cdi.DoubleVector___getitem__(self, *args) + + def __setitem__(self, *args): + return _Cdi.DoubleVector___setitem__(self, *args) + + def pop(self): + return _Cdi.DoubleVector_pop(self) + + def append(self, x): + return _Cdi.DoubleVector_append(self, x) + + def empty(self): + return _Cdi.DoubleVector_empty(self) + + def size(self): + return _Cdi.DoubleVector_size(self) + + def swap(self, v): + return _Cdi.DoubleVector_swap(self, v) + + def begin(self): + return _Cdi.DoubleVector_begin(self) + + def end(self): + return _Cdi.DoubleVector_end(self) + + def rbegin(self): + return _Cdi.DoubleVector_rbegin(self) + + def rend(self): + return _Cdi.DoubleVector_rend(self) + + def clear(self): + return _Cdi.DoubleVector_clear(self) + + def get_allocator(self): + return _Cdi.DoubleVector_get_allocator(self) + + def pop_back(self): + return _Cdi.DoubleVector_pop_back(self) + + def erase(self, *args): + return _Cdi.DoubleVector_erase(self, *args) + + def __init__(self, *args): + _Cdi.DoubleVector_swiginit(self, _Cdi.new_DoubleVector(*args)) + + def push_back(self, x): + return _Cdi.DoubleVector_push_back(self, x) + + def front(self): + return _Cdi.DoubleVector_front(self) + + def back(self): + return _Cdi.DoubleVector_back(self) + + def assign(self, n, x): + return _Cdi.DoubleVector_assign(self, n, x) + + def resize(self, *args): + return _Cdi.DoubleVector_resize(self, *args) + + def insert(self, *args): + return _Cdi.DoubleVector_insert(self, *args) + + def reserve(self, n): + return _Cdi.DoubleVector_reserve(self, n) + + def capacity(self): + return _Cdi.DoubleVector_capacity(self) + __swig_destroy__ = _Cdi.delete_DoubleVector + +# Register DoubleVector in _Cdi: +_Cdi.DoubleVector_swigregister(DoubleVector) + +class DoubleDoubleVector(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.DoubleDoubleVector_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.DoubleDoubleVector___nonzero__(self) + + def __bool__(self): + return _Cdi.DoubleDoubleVector___bool__(self) + + def __len__(self): + return _Cdi.DoubleDoubleVector___len__(self) + + def __getslice__(self, i, j): + return _Cdi.DoubleDoubleVector___getslice__(self, i, j) + + def __setslice__(self, *args): + return _Cdi.DoubleDoubleVector___setslice__(self, *args) + + def __delslice__(self, i, j): + return _Cdi.DoubleDoubleVector___delslice__(self, i, j) + + def __delitem__(self, *args): + return _Cdi.DoubleDoubleVector___delitem__(self, *args) + + def __getitem__(self, *args): + return _Cdi.DoubleDoubleVector___getitem__(self, *args) + + def __setitem__(self, *args): + return _Cdi.DoubleDoubleVector___setitem__(self, *args) + + def pop(self): + return _Cdi.DoubleDoubleVector_pop(self) + + def append(self, x): + return _Cdi.DoubleDoubleVector_append(self, x) + + def empty(self): + return _Cdi.DoubleDoubleVector_empty(self) + + def size(self): + return _Cdi.DoubleDoubleVector_size(self) + + def swap(self, v): + return _Cdi.DoubleDoubleVector_swap(self, v) + + def begin(self): + return _Cdi.DoubleDoubleVector_begin(self) + + def end(self): + return _Cdi.DoubleDoubleVector_end(self) + + def rbegin(self): + return _Cdi.DoubleDoubleVector_rbegin(self) + + def rend(self): + return _Cdi.DoubleDoubleVector_rend(self) + + def clear(self): + return _Cdi.DoubleDoubleVector_clear(self) + + def get_allocator(self): + return _Cdi.DoubleDoubleVector_get_allocator(self) + + def pop_back(self): + return _Cdi.DoubleDoubleVector_pop_back(self) + + def erase(self, *args): + return _Cdi.DoubleDoubleVector_erase(self, *args) + + def __init__(self, *args): + _Cdi.DoubleDoubleVector_swiginit(self, _Cdi.new_DoubleDoubleVector(*args)) + + def push_back(self, x): + return _Cdi.DoubleDoubleVector_push_back(self, x) + + def front(self): + return _Cdi.DoubleDoubleVector_front(self) + + def back(self): + return _Cdi.DoubleDoubleVector_back(self) + + def assign(self, n, x): + return _Cdi.DoubleDoubleVector_assign(self, n, x) + + def resize(self, *args): + return _Cdi.DoubleDoubleVector_resize(self, *args) + + def insert(self, *args): + return _Cdi.DoubleDoubleVector_insert(self, *args) + + def reserve(self, n): + return _Cdi.DoubleDoubleVector_reserve(self, n) + + def capacity(self): + return _Cdi.DoubleDoubleVector_capacity(self) + __swig_destroy__ = _Cdi.delete_DoubleDoubleVector + +# Register DoubleDoubleVector in _Cdi: +_Cdi.DoubleDoubleVector_swigregister(DoubleDoubleVector) + +class StringVector(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.StringVector_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.StringVector___nonzero__(self) + + def __bool__(self): + return _Cdi.StringVector___bool__(self) + + def __len__(self): + return _Cdi.StringVector___len__(self) + + def __getslice__(self, i, j): + return _Cdi.StringVector___getslice__(self, i, j) + + def __setslice__(self, *args): + return _Cdi.StringVector___setslice__(self, *args) + + def __delslice__(self, i, j): + return _Cdi.StringVector___delslice__(self, i, j) + + def __delitem__(self, *args): + return _Cdi.StringVector___delitem__(self, *args) + + def __getitem__(self, *args): + return _Cdi.StringVector___getitem__(self, *args) + + def __setitem__(self, *args): + return _Cdi.StringVector___setitem__(self, *args) + + def pop(self): + return _Cdi.StringVector_pop(self) + + def append(self, x): + return _Cdi.StringVector_append(self, x) + + def empty(self): + return _Cdi.StringVector_empty(self) + + def size(self): + return _Cdi.StringVector_size(self) + + def swap(self, v): + return _Cdi.StringVector_swap(self, v) + + def begin(self): + return _Cdi.StringVector_begin(self) + + def end(self): + return _Cdi.StringVector_end(self) + + def rbegin(self): + return _Cdi.StringVector_rbegin(self) + + def rend(self): + return _Cdi.StringVector_rend(self) + + def clear(self): + return _Cdi.StringVector_clear(self) + + def get_allocator(self): + return _Cdi.StringVector_get_allocator(self) + + def pop_back(self): + return _Cdi.StringVector_pop_back(self) + + def erase(self, *args): + return _Cdi.StringVector_erase(self, *args) + + def __init__(self, *args): + _Cdi.StringVector_swiginit(self, _Cdi.new_StringVector(*args)) + + def push_back(self, x): + return _Cdi.StringVector_push_back(self, x) + + def front(self): + return _Cdi.StringVector_front(self) + + def back(self): + return _Cdi.StringVector_back(self) + + def assign(self, n, x): + return _Cdi.StringVector_assign(self, n, x) + + def resize(self, *args): + return _Cdi.StringVector_resize(self, *args) + + def insert(self, *args): + return _Cdi.StringVector_insert(self, *args) + + def reserve(self, n): + return _Cdi.StringVector_reserve(self, n) + + def capacity(self): + return _Cdi.StringVector_capacity(self) + __swig_destroy__ = _Cdi.delete_StringVector + +# Register StringVector in _Cdi: +_Cdi.StringVector_swigregister(StringVector) + +class VarsVector(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.VarsVector_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.VarsVector___nonzero__(self) + + def __bool__(self): + return _Cdi.VarsVector___bool__(self) + + def __len__(self): + return _Cdi.VarsVector___len__(self) + + def __getslice__(self, i, j): + return _Cdi.VarsVector___getslice__(self, i, j) + + def __setslice__(self, *args): + return _Cdi.VarsVector___setslice__(self, *args) + + def __delslice__(self, i, j): + return _Cdi.VarsVector___delslice__(self, i, j) + + def __delitem__(self, *args): + return _Cdi.VarsVector___delitem__(self, *args) + + def __getitem__(self, *args): + return _Cdi.VarsVector___getitem__(self, *args) + + def __setitem__(self, *args): + return _Cdi.VarsVector___setitem__(self, *args) + + def pop(self): + return _Cdi.VarsVector_pop(self) + + def append(self, x): + return _Cdi.VarsVector_append(self, x) + + def empty(self): + return _Cdi.VarsVector_empty(self) + + def size(self): + return _Cdi.VarsVector_size(self) + + def swap(self, v): + return _Cdi.VarsVector_swap(self, v) + + def begin(self): + return _Cdi.VarsVector_begin(self) + + def end(self): + return _Cdi.VarsVector_end(self) + + def rbegin(self): + return _Cdi.VarsVector_rbegin(self) + + def rend(self): + return _Cdi.VarsVector_rend(self) + + def clear(self): + return _Cdi.VarsVector_clear(self) + + def get_allocator(self): + return _Cdi.VarsVector_get_allocator(self) + + def pop_back(self): + return _Cdi.VarsVector_pop_back(self) + + def erase(self, *args): + return _Cdi.VarsVector_erase(self, *args) + + def __init__(self, *args): + _Cdi.VarsVector_swiginit(self, _Cdi.new_VarsVector(*args)) + + def push_back(self, x): + return _Cdi.VarsVector_push_back(self, x) + + def front(self): + return _Cdi.VarsVector_front(self) + + def back(self): + return _Cdi.VarsVector_back(self) + + def assign(self, n, x): + return _Cdi.VarsVector_assign(self, n, x) + + def resize(self, *args): + return _Cdi.VarsVector_resize(self, *args) + + def insert(self, *args): + return _Cdi.VarsVector_insert(self, *args) + + def reserve(self, n): + return _Cdi.VarsVector_reserve(self, n) + + def capacity(self): + return _Cdi.VarsVector_capacity(self) + __swig_destroy__ = _Cdi.delete_VarsVector + +# Register VarsVector in _Cdi: +_Cdi.VarsVector_swigregister(VarsVector) + +class VarsMap(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.VarsMap_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.VarsMap___nonzero__(self) + + def __bool__(self): + return _Cdi.VarsMap___bool__(self) + + def __len__(self): + return _Cdi.VarsMap___len__(self) + def __iter__(self): + return self.key_iterator() + def iterkeys(self): + return self.key_iterator() + def itervalues(self): + return self.value_iterator() + def iteritems(self): + return self.iterator() + + def __getitem__(self, key): + return _Cdi.VarsMap___getitem__(self, key) + + def __delitem__(self, key): + return _Cdi.VarsMap___delitem__(self, key) + + def has_key(self, key): + return _Cdi.VarsMap_has_key(self, key) + + def keys(self): + return _Cdi.VarsMap_keys(self) + + def values(self): + return _Cdi.VarsMap_values(self) + + def items(self): + return _Cdi.VarsMap_items(self) + + def __contains__(self, key): + return _Cdi.VarsMap___contains__(self, key) + + def key_iterator(self): + return _Cdi.VarsMap_key_iterator(self) + + def value_iterator(self): + return _Cdi.VarsMap_value_iterator(self) + + def __setitem__(self, *args): + return _Cdi.VarsMap___setitem__(self, *args) + + def asdict(self): + return _Cdi.VarsMap_asdict(self) + + def __init__(self, *args): + _Cdi.VarsMap_swiginit(self, _Cdi.new_VarsMap(*args)) + + def empty(self): + return _Cdi.VarsMap_empty(self) + + def size(self): + return _Cdi.VarsMap_size(self) + + def swap(self, v): + return _Cdi.VarsMap_swap(self, v) + + def begin(self): + return _Cdi.VarsMap_begin(self) + + def end(self): + return _Cdi.VarsMap_end(self) + + def rbegin(self): + return _Cdi.VarsMap_rbegin(self) + + def rend(self): + return _Cdi.VarsMap_rend(self) + + def clear(self): + return _Cdi.VarsMap_clear(self) + + def get_allocator(self): + return _Cdi.VarsMap_get_allocator(self) + + def count(self, x): + return _Cdi.VarsMap_count(self, x) + + def erase(self, *args): + return _Cdi.VarsMap_erase(self, *args) + + def find(self, x): + return _Cdi.VarsMap_find(self, x) + + def lower_bound(self, x): + return _Cdi.VarsMap_lower_bound(self, x) + + def upper_bound(self, x): + return _Cdi.VarsMap_upper_bound(self, x) + __swig_destroy__ = _Cdi.delete_VarsMap + +# Register VarsMap in _Cdi: +_Cdi.VarsMap_swigregister(VarsMap) + +class VarsByCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.VarsByCode_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.VarsByCode___nonzero__(self) + + def __bool__(self): + return _Cdi.VarsByCode___bool__(self) + + def __len__(self): + return _Cdi.VarsByCode___len__(self) + def __iter__(self): + return self.key_iterator() + def iterkeys(self): + return self.key_iterator() + def itervalues(self): + return self.value_iterator() + def iteritems(self): + return self.iterator() + + def __getitem__(self, key): + return _Cdi.VarsByCode___getitem__(self, key) + + def __delitem__(self, key): + return _Cdi.VarsByCode___delitem__(self, key) + + def has_key(self, key): + return _Cdi.VarsByCode_has_key(self, key) + + def keys(self): + return _Cdi.VarsByCode_keys(self) + + def values(self): + return _Cdi.VarsByCode_values(self) + + def items(self): + return _Cdi.VarsByCode_items(self) + + def __contains__(self, key): + return _Cdi.VarsByCode___contains__(self, key) + + def key_iterator(self): + return _Cdi.VarsByCode_key_iterator(self) + + def value_iterator(self): + return _Cdi.VarsByCode_value_iterator(self) + + def __setitem__(self, *args): + return _Cdi.VarsByCode___setitem__(self, *args) + + def asdict(self): + return _Cdi.VarsByCode_asdict(self) + + def __init__(self, *args): + _Cdi.VarsByCode_swiginit(self, _Cdi.new_VarsByCode(*args)) + + def empty(self): + return _Cdi.VarsByCode_empty(self) + + def size(self): + return _Cdi.VarsByCode_size(self) + + def swap(self, v): + return _Cdi.VarsByCode_swap(self, v) + + def begin(self): + return _Cdi.VarsByCode_begin(self) + + def end(self): + return _Cdi.VarsByCode_end(self) + + def rbegin(self): + return _Cdi.VarsByCode_rbegin(self) + + def rend(self): + return _Cdi.VarsByCode_rend(self) + + def clear(self): + return _Cdi.VarsByCode_clear(self) + + def get_allocator(self): + return _Cdi.VarsByCode_get_allocator(self) + + def count(self, x): + return _Cdi.VarsByCode_count(self, x) + + def erase(self, *args): + return _Cdi.VarsByCode_erase(self, *args) + + def find(self, x): + return _Cdi.VarsByCode_find(self, x) + + def lower_bound(self, x): + return _Cdi.VarsByCode_lower_bound(self, x) + + def upper_bound(self, x): + return _Cdi.VarsByCode_upper_bound(self, x) + __swig_destroy__ = _Cdi.delete_VarsByCode + +# Register VarsByCode in _Cdi: +_Cdi.VarsByCode_swigregister(VarsByCode) + +class TaxesMap(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.TaxesMap_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.TaxesMap___nonzero__(self) + + def __bool__(self): + return _Cdi.TaxesMap___bool__(self) + + def __len__(self): + return _Cdi.TaxesMap___len__(self) + def __iter__(self): + return self.key_iterator() + def iterkeys(self): + return self.key_iterator() + def itervalues(self): + return self.value_iterator() + def iteritems(self): + return self.iterator() + + def __getitem__(self, key): + return _Cdi.TaxesMap___getitem__(self, key) + + def __delitem__(self, key): + return _Cdi.TaxesMap___delitem__(self, key) + + def has_key(self, key): + return _Cdi.TaxesMap_has_key(self, key) + + def keys(self): + return _Cdi.TaxesMap_keys(self) + + def values(self): + return _Cdi.TaxesMap_values(self) + + def items(self): + return _Cdi.TaxesMap_items(self) + + def __contains__(self, key): + return _Cdi.TaxesMap___contains__(self, key) + + def key_iterator(self): + return _Cdi.TaxesMap_key_iterator(self) + + def value_iterator(self): + return _Cdi.TaxesMap_value_iterator(self) + + def __setitem__(self, *args): + return _Cdi.TaxesMap___setitem__(self, *args) + + def asdict(self): + return _Cdi.TaxesMap_asdict(self) + + def __init__(self, *args): + _Cdi.TaxesMap_swiginit(self, _Cdi.new_TaxesMap(*args)) + + def empty(self): + return _Cdi.TaxesMap_empty(self) + + def size(self): + return _Cdi.TaxesMap_size(self) + + def swap(self, v): + return _Cdi.TaxesMap_swap(self, v) + + def begin(self): + return _Cdi.TaxesMap_begin(self) + + def end(self): + return _Cdi.TaxesMap_end(self) + + def rbegin(self): + return _Cdi.TaxesMap_rbegin(self) + + def rend(self): + return _Cdi.TaxesMap_rend(self) + + def clear(self): + return _Cdi.TaxesMap_clear(self) + + def get_allocator(self): + return _Cdi.TaxesMap_get_allocator(self) + + def count(self, x): + return _Cdi.TaxesMap_count(self, x) + + def erase(self, *args): + return _Cdi.TaxesMap_erase(self, *args) + + def find(self, x): + return _Cdi.TaxesMap_find(self, x) + + def lower_bound(self, x): + return _Cdi.TaxesMap_lower_bound(self, x) + + def upper_bound(self, x): + return _Cdi.TaxesMap_upper_bound(self, x) + __swig_destroy__ = _Cdi.delete_TaxesMap + +# Register TaxesMap in _Cdi: +_Cdi.TaxesMap_swigregister(TaxesMap) + +class ZaxesMap(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.ZaxesMap_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.ZaxesMap___nonzero__(self) + + def __bool__(self): + return _Cdi.ZaxesMap___bool__(self) + + def __len__(self): + return _Cdi.ZaxesMap___len__(self) + def __iter__(self): + return self.key_iterator() + def iterkeys(self): + return self.key_iterator() + def itervalues(self): + return self.value_iterator() + def iteritems(self): + return self.iterator() + + def __getitem__(self, key): + return _Cdi.ZaxesMap___getitem__(self, key) + + def __delitem__(self, key): + return _Cdi.ZaxesMap___delitem__(self, key) + + def has_key(self, key): + return _Cdi.ZaxesMap_has_key(self, key) + + def keys(self): + return _Cdi.ZaxesMap_keys(self) + + def values(self): + return _Cdi.ZaxesMap_values(self) + + def items(self): + return _Cdi.ZaxesMap_items(self) + + def __contains__(self, key): + return _Cdi.ZaxesMap___contains__(self, key) + + def key_iterator(self): + return _Cdi.ZaxesMap_key_iterator(self) + + def value_iterator(self): + return _Cdi.ZaxesMap_value_iterator(self) + + def __setitem__(self, *args): + return _Cdi.ZaxesMap___setitem__(self, *args) + + def asdict(self): + return _Cdi.ZaxesMap_asdict(self) + + def __init__(self, *args): + _Cdi.ZaxesMap_swiginit(self, _Cdi.new_ZaxesMap(*args)) + + def empty(self): + return _Cdi.ZaxesMap_empty(self) + + def size(self): + return _Cdi.ZaxesMap_size(self) + + def swap(self, v): + return _Cdi.ZaxesMap_swap(self, v) + + def begin(self): + return _Cdi.ZaxesMap_begin(self) + + def end(self): + return _Cdi.ZaxesMap_end(self) + + def rbegin(self): + return _Cdi.ZaxesMap_rbegin(self) + + def rend(self): + return _Cdi.ZaxesMap_rend(self) + + def clear(self): + return _Cdi.ZaxesMap_clear(self) + + def get_allocator(self): + return _Cdi.ZaxesMap_get_allocator(self) + + def count(self, x): + return _Cdi.ZaxesMap_count(self, x) + + def erase(self, *args): + return _Cdi.ZaxesMap_erase(self, *args) + + def find(self, x): + return _Cdi.ZaxesMap_find(self, x) + + def lower_bound(self, x): + return _Cdi.ZaxesMap_lower_bound(self, x) + + def upper_bound(self, x): + return _Cdi.ZaxesMap_upper_bound(self, x) + __swig_destroy__ = _Cdi.delete_ZaxesMap + +# Register ZaxesMap in _Cdi: +_Cdi.ZaxesMap_swigregister(ZaxesMap) + +class GridsMap(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _Cdi.GridsMap_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _Cdi.GridsMap___nonzero__(self) + + def __bool__(self): + return _Cdi.GridsMap___bool__(self) + + def __len__(self): + return _Cdi.GridsMap___len__(self) + def __iter__(self): + return self.key_iterator() + def iterkeys(self): + return self.key_iterator() + def itervalues(self): + return self.value_iterator() + def iteritems(self): + return self.iterator() + + def __getitem__(self, key): + return _Cdi.GridsMap___getitem__(self, key) + + def __delitem__(self, key): + return _Cdi.GridsMap___delitem__(self, key) + + def has_key(self, key): + return _Cdi.GridsMap_has_key(self, key) + + def keys(self): + return _Cdi.GridsMap_keys(self) + + def values(self): + return _Cdi.GridsMap_values(self) + + def items(self): + return _Cdi.GridsMap_items(self) + + def __contains__(self, key): + return _Cdi.GridsMap___contains__(self, key) + + def key_iterator(self): + return _Cdi.GridsMap_key_iterator(self) + + def value_iterator(self): + return _Cdi.GridsMap_value_iterator(self) + + def __setitem__(self, *args): + return _Cdi.GridsMap___setitem__(self, *args) + + def asdict(self): + return _Cdi.GridsMap_asdict(self) + + def __init__(self, *args): + _Cdi.GridsMap_swiginit(self, _Cdi.new_GridsMap(*args)) + + def empty(self): + return _Cdi.GridsMap_empty(self) + + def size(self): + return _Cdi.GridsMap_size(self) + + def swap(self, v): + return _Cdi.GridsMap_swap(self, v) + + def begin(self): + return _Cdi.GridsMap_begin(self) + + def end(self): + return _Cdi.GridsMap_end(self) + + def rbegin(self): + return _Cdi.GridsMap_rbegin(self) + + def rend(self): + return _Cdi.GridsMap_rend(self) + + def clear(self): + return _Cdi.GridsMap_clear(self) + + def get_allocator(self): + return _Cdi.GridsMap_get_allocator(self) + + def count(self, x): + return _Cdi.GridsMap_count(self, x) + + def erase(self, *args): + return _Cdi.GridsMap_erase(self, *args) + + def find(self, x): + return _Cdi.GridsMap_find(self, x) + + def lower_bound(self, x): + return _Cdi.GridsMap_lower_bound(self, x) + + def upper_bound(self, x): + return _Cdi.GridsMap_upper_bound(self, x) + __swig_destroy__ = _Cdi.delete_GridsMap + +# Register GridsMap in _Cdi: +_Cdi.GridsMap_swigregister(GridsMap) + +class CdiGrid(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _Cdi.CdiGrid_swiginit(self, _Cdi.new_CdiGrid(*args)) + __swig_destroy__ = _Cdi.delete_CdiGrid + gridID = property(_Cdi.CdiGrid_gridID_get, _Cdi.CdiGrid_gridID_set) + type = property(_Cdi.CdiGrid_type_get, _Cdi.CdiGrid_type_set) + size = property(_Cdi.CdiGrid_size_get, _Cdi.CdiGrid_size_set) + xsize = property(_Cdi.CdiGrid_xsize_get, _Cdi.CdiGrid_xsize_set) + ysize = property(_Cdi.CdiGrid_ysize_get, _Cdi.CdiGrid_ysize_set) + prec = property(_Cdi.CdiGrid_prec_get, _Cdi.CdiGrid_prec_set) + ncorner = property(_Cdi.CdiGrid_ncorner_get, _Cdi.CdiGrid_ncorner_set) + hasXValues = property(_Cdi.CdiGrid_hasXValues_get, _Cdi.CdiGrid_hasXValues_set) + hasYValues = property(_Cdi.CdiGrid_hasYValues_get, _Cdi.CdiGrid_hasYValues_set) + hasBounds = property(_Cdi.CdiGrid_hasBounds_get, _Cdi.CdiGrid_hasBounds_set) + xvalues = property(_Cdi.CdiGrid_xvalues_get, _Cdi.CdiGrid_xvalues_set) + yvalues = property(_Cdi.CdiGrid_yvalues_get, _Cdi.CdiGrid_yvalues_set) + xbounds = property(_Cdi.CdiGrid_xbounds_get, _Cdi.CdiGrid_xbounds_set) + ybounds = property(_Cdi.CdiGrid_ybounds_get, _Cdi.CdiGrid_ybounds_set) + xname = property(_Cdi.CdiGrid_xname_get, _Cdi.CdiGrid_xname_set) + xlongname = property(_Cdi.CdiGrid_xlongname_get, _Cdi.CdiGrid_xlongname_set) + xstdname = property(_Cdi.CdiGrid_xstdname_get, _Cdi.CdiGrid_xstdname_set) + xunits = property(_Cdi.CdiGrid_xunits_get, _Cdi.CdiGrid_xunits_set) + yname = property(_Cdi.CdiGrid_yname_get, _Cdi.CdiGrid_yname_set) + ylongname = property(_Cdi.CdiGrid_ylongname_get, _Cdi.CdiGrid_ylongname_set) + ystdname = property(_Cdi.CdiGrid_ystdname_get, _Cdi.CdiGrid_ystdname_set) + yunits = property(_Cdi.CdiGrid_yunits_get, _Cdi.CdiGrid_yunits_set) + name = property(_Cdi.CdiGrid_name_get, _Cdi.CdiGrid_name_set) + + def getValues(self): + return _Cdi.CdiGrid_getValues(self) + + def getBounds(self): + return _Cdi.CdiGrid_getBounds(self) + + def getValuesAsPointer(self, xvals, yvals): + return _Cdi.CdiGrid_getValuesAsPointer(self, xvals, yvals) + + def getBoundsAsPointer(self, xbnds, ybnds): + return _Cdi.CdiGrid_getBoundsAsPointer(self, xbnds, ybnds) + + def getFloatVals(self, xvals, yvals): + return _Cdi.CdiGrid_getFloatVals(self, xvals, yvals) + + def getFloatBounds(self, xbnds, ybnds): + return _Cdi.CdiGrid_getFloatBounds(self, xbnds, ybnds) + +# Register CdiGrid in _Cdi: +_Cdi.CdiGrid_swigregister(CdiGrid) + +class CdiTaxis(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _Cdi.CdiTaxis_swiginit(self, _Cdi.new_CdiTaxis(*args)) + __swig_destroy__ = _Cdi.delete_CdiTaxis + taxisID = property(_Cdi.CdiTaxis_taxisID_get, _Cdi.CdiTaxis_taxisID_set) + ntsteps = property(_Cdi.CdiTaxis_ntsteps_get, _Cdi.CdiTaxis_ntsteps_set) + unit = property(_Cdi.CdiTaxis_unit_get, _Cdi.CdiTaxis_unit_set) + rdate = property(_Cdi.CdiTaxis_rdate_get, _Cdi.CdiTaxis_rdate_set) + rtime = property(_Cdi.CdiTaxis_rtime_get, _Cdi.CdiTaxis_rtime_set) + vdate = property(_Cdi.CdiTaxis_vdate_get, _Cdi.CdiTaxis_vdate_set) + vtime = property(_Cdi.CdiTaxis_vtime_get, _Cdi.CdiTaxis_vtime_set) + type = property(_Cdi.CdiTaxis_type_get, _Cdi.CdiTaxis_type_set) + calendar = property(_Cdi.CdiTaxis_calendar_get, _Cdi.CdiTaxis_calendar_set) + hasBounds = property(_Cdi.CdiTaxis_hasBounds_get, _Cdi.CdiTaxis_hasBounds_set) + name = property(_Cdi.CdiTaxis_name_get, _Cdi.CdiTaxis_name_set) + unitname = property(_Cdi.CdiTaxis_unitname_get, _Cdi.CdiTaxis_unitname_set) + +# Register CdiTaxis in _Cdi: +_Cdi.CdiTaxis_swigregister(CdiTaxis) + +class CdiZaxis(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _Cdi.CdiZaxis_swiginit(self, _Cdi.new_CdiZaxis(*args)) + __swig_destroy__ = _Cdi.delete_CdiZaxis + zaxisID = property(_Cdi.CdiZaxis_zaxisID_get, _Cdi.CdiZaxis_zaxisID_set) + type = property(_Cdi.CdiZaxis_type_get, _Cdi.CdiZaxis_type_set) + ltype = property(_Cdi.CdiZaxis_ltype_get, _Cdi.CdiZaxis_ltype_set) + size = property(_Cdi.CdiZaxis_size_get, _Cdi.CdiZaxis_size_set) + prec = property(_Cdi.CdiZaxis_prec_get, _Cdi.CdiZaxis_prec_set) + plevels = property(_Cdi.CdiZaxis_plevels_get, _Cdi.CdiZaxis_plevels_set) + plbounds = property(_Cdi.CdiZaxis_plbounds_get, _Cdi.CdiZaxis_plbounds_set) + pubounds = property(_Cdi.CdiZaxis_pubounds_get, _Cdi.CdiZaxis_pubounds_set) + pweights = property(_Cdi.CdiZaxis_pweights_get, _Cdi.CdiZaxis_pweights_set) + levels = property(_Cdi.CdiZaxis_levels_get, _Cdi.CdiZaxis_levels_set) + lbounds = property(_Cdi.CdiZaxis_lbounds_get, _Cdi.CdiZaxis_lbounds_set) + ubounds = property(_Cdi.CdiZaxis_ubounds_get, _Cdi.CdiZaxis_ubounds_set) + weights = property(_Cdi.CdiZaxis_weights_get, _Cdi.CdiZaxis_weights_set) + name = property(_Cdi.CdiZaxis_name_get, _Cdi.CdiZaxis_name_set) + longname = property(_Cdi.CdiZaxis_longname_get, _Cdi.CdiZaxis_longname_set) + units = property(_Cdi.CdiZaxis_units_get, _Cdi.CdiZaxis_units_set) + +# Register CdiZaxis in _Cdi: +_Cdi.CdiZaxis_swigregister(CdiZaxis) + +class CdiVariable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _Cdi.CdiVariable_swiginit(self, _Cdi.new_CdiVariable(*args)) + __swig_destroy__ = _Cdi.delete_CdiVariable + varID = property(_Cdi.CdiVariable_varID_get, _Cdi.CdiVariable_varID_set) + zaxisID = property(_Cdi.CdiVariable_zaxisID_get, _Cdi.CdiVariable_zaxisID_set) + gridID = property(_Cdi.CdiVariable_gridID_get, _Cdi.CdiVariable_gridID_set) + taxisID = property(_Cdi.CdiVariable_taxisID_get, _Cdi.CdiVariable_taxisID_set) + timeID = property(_Cdi.CdiVariable_timeID_get, _Cdi.CdiVariable_timeID_set) + vlistID = property(_Cdi.CdiVariable_vlistID_get, _Cdi.CdiVariable_vlistID_set) + size = property(_Cdi.CdiVariable_size_get, _Cdi.CdiVariable_size_set) + code = property(_Cdi.CdiVariable_code_get, _Cdi.CdiVariable_code_set) + datatype = property(_Cdi.CdiVariable_datatype_get, _Cdi.CdiVariable_datatype_set) + streamID = property(_Cdi.CdiVariable_streamID_get, _Cdi.CdiVariable_streamID_set) + name = property(_Cdi.CdiVariable_name_get, _Cdi.CdiVariable_name_set) + longname = property(_Cdi.CdiVariable_longname_get, _Cdi.CdiVariable_longname_set) + units = property(_Cdi.CdiVariable_units_get, _Cdi.CdiVariable_units_set) + stdname = property(_Cdi.CdiVariable_stdname_get, _Cdi.CdiVariable_stdname_set) + missval = property(_Cdi.CdiVariable_missval_get, _Cdi.CdiVariable_missval_set) + values = property(_Cdi.CdiVariable_values_get, _Cdi.CdiVariable_values_set) + valuesWithLevel = property(_Cdi.CdiVariable_valuesWithLevel_get, _Cdi.CdiVariable_valuesWithLevel_set) + grid = property(_Cdi.CdiVariable_grid_get, _Cdi.CdiVariable_grid_set) + zaxis = property(_Cdi.CdiVariable_zaxis_get, _Cdi.CdiVariable_zaxis_set) + taxis = property(_Cdi.CdiVariable_taxis_get, _Cdi.CdiVariable_taxis_set) + + def sinfo(self): + return _Cdi.CdiVariable_sinfo(self) + + def getValues(self): + return _Cdi.CdiVariable_getValues(self) + + def getValuesWithLevel(self, tsID=0): + return _Cdi.CdiVariable_getValuesWithLevel(self, tsID) + + def getFValues(self): + return _Cdi.CdiVariable_getFValues(self) + + def getFValuesWithLevel(self, tsID=0): + return _Cdi.CdiVariable_getFValuesWithLevel(self, tsID) + + def getValuesAsPointer(self): + return _Cdi.CdiVariable_getValuesAsPointer(self) + + def getValuesWithLevelAsPointer(self, tsID=0): + return _Cdi.CdiVariable_getValuesWithLevelAsPointer(self, tsID) + +# Register CdiVariable in _Cdi: +_Cdi.CdiVariable_swigregister(CdiVariable) + +class Cdi(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, path): + _Cdi.Cdi_swiginit(self, _Cdi.new_Cdi(path)) + __swig_destroy__ = _Cdi.delete_Cdi + streamID = property(_Cdi.Cdi_streamID_get, _Cdi.Cdi_streamID_set) + vlistID = property(_Cdi.Cdi_vlistID_get, _Cdi.Cdi_vlistID_set) + nvars = property(_Cdi.Cdi_nvars_get, _Cdi.Cdi_nvars_set) + nzaxes = property(_Cdi.Cdi_nzaxes_get, _Cdi.Cdi_nzaxes_set) + ngrids = property(_Cdi.Cdi_ngrids_get, _Cdi.Cdi_ngrids_set) + ntaxes = property(_Cdi.Cdi_ntaxes_get, _Cdi.Cdi_ntaxes_set) + taxisID = property(_Cdi.Cdi_taxisID_get, _Cdi.Cdi_taxisID_set) + varnames = property(_Cdi.Cdi_varnames_get, _Cdi.Cdi_varnames_set) + codes = property(_Cdi.Cdi_codes_get, _Cdi.Cdi_codes_set) + variables = property(_Cdi.Cdi_variables_get, _Cdi.Cdi_variables_set) + var = property(_Cdi.Cdi_var_get, _Cdi.Cdi_var_set) + varByCode = property(_Cdi.Cdi_varByCode_get, _Cdi.Cdi_varByCode_set) + taxes = property(_Cdi.Cdi_taxes_get, _Cdi.Cdi_taxes_set) + zaxes = property(_Cdi.Cdi_zaxes_get, _Cdi.Cdi_zaxes_set) + grids = property(_Cdi.Cdi_grids_get, _Cdi.Cdi_grids_set) + + def griddes(self): + return _Cdi.Cdi_griddes(self) + +# Register Cdi in _Cdi: +_Cdi.Cdi_swigregister(Cdi) + + + diff --git a/interfaces/python/cdi_wrapper.cpp b/interfaces/python/cdi_wrapper.cpp new file mode 100644 index 000000000..06e0159f1 --- /dev/null +++ b/interfaces/python/cdi_wrapper.cpp @@ -0,0 +1,29389 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.2 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + + +#ifndef SWIGPYTHON +#define SWIGPYTHON +#endif + +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE + + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template<typename T> class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); + SwigValueWrapper(const SwigValueWrapper<T>& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template <typename T> T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + + +#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) +/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */ +# include <math.h> +#endif + +#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) +/* Use debug wrappers with the Python release dll */ +# undef _DEBUG +# include <Python.h> +# define _DEBUG 1 +#else +# include <Python.h> +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 +#define SWIG_POINTER_NO_NULL 0x4 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if (<obj is ok>) { + if (<need new object>) { + *ptr = <ptr to new allocated object>; + return SWIG_NEWOBJ; + } else { + *ptr = <ptr to old object>; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include <string.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class<int>" == "Class<int >", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* Compatibility macros for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) +#define PyString_Check(name) PyBytes_Check(name) +#define PyString_FromString(x) PyUnicode_FromString(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) +#define PyString_AsString(str) PyBytes_AsString(str) +#define PyString_Size(str) PyBytes_Size(str) +#define PyString_InternFromString(key) PyUnicode_InternFromString(key) +#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE +#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) +#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + + +/* Warning: This function will allocate a new string in Python 3, + * so please call SWIG_Python_str_DelForPy3(x) to free the space. + */ +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03030000 + return (char *)PyUnicode_AsUTF8(str); +#elif PY_VERSION_HEX >= 0x03000000 + char *newstr = 0; + str = PyUnicode_AsUTF8String(str); + if (str) { + char *cstr; + Py_ssize_t len; + if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) { + newstr = (char *) malloc(len+1); + if (newstr) + memcpy(newstr, cstr, len+1); + } + Py_XDECREF(str); + } + return newstr; +#else + return PyString_AsString(str); +#endif +} + +#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000 +# define SWIG_Python_str_DelForPy3(x) +#else +# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#endif + + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +// SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user +// interface files check for it. +# define SWIGPY_USE_CAPSULE +# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) + +#if PY_VERSION_HEX < 0x03020000 +#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) +#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) +#define Py_hash_t long +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + const char *tmp = SWIG_Python_str_AsChar(old_str); + PyErr_Clear(); + Py_XINCREF(type); + if (tmp) + PyErr_Format(type, "%s %s", tmp, mesg); + else + PyErr_Format(type, "%s", mesg); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +SWIGRUNTIME int +SWIG_Python_TypeErrorOccurred(PyObject *obj) +{ + PyObject *error; + if (obj) + return 0; + error = PyErr_Occurred(); + return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError); +} + +SWIGRUNTIME void +SWIG_Python_RaiseOrModifyTypeError(const char *message) +{ + if (SWIG_Python_TypeErrorOccurred(NULL)) { + /* Use existing TypeError to preserve stacktrace and enhance with given message */ + PyObject *newvalue; + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); +#if PY_VERSION_HEX >= 0x03000000 + newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message); +#else + newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); +#endif + Py_XDECREF(value); + PyErr_Restore(type, newvalue, traceback); + } else { + /* Raise TypeError using given message */ + PyErr_SetString(PyExc_TypeError, message); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# define SWIG_PYTHON_USE_GIL +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + const char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */ +# error "This version of SWIG only supports Python >= 2.7" +#endif + +#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000 +# error "This version of SWIG only supports Python 3 >= 3.2" +#endif + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) + +#ifdef SWIGPYTHON_BUILTIN +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) +#else +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) +#endif + +#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) + +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +#if defined(SWIGPYTHON_BUILTIN) + +SWIGINTERN void +SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { + PyObject *s = PyString_InternFromString(key); + PyList_Append(seq, s); + Py_DECREF(s); +} + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { + PyDict_SetItemString(d, name, obj); + Py_DECREF(obj); + if (public_interface) + SwigPyBuiltin_AddPublicSymbol(public_interface, name); +} + +#else + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, name, obj); + Py_DECREF(obj); +} + +#endif + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +} + +/* Unpack the argument tuple */ + +SWIGINTERN Py_ssize_t +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + if (min <= 1 && max >= 1) { + Py_ssize_t i; + objs[0] = args; + for (i = 1; i < max; ++i) { + objs[i] = 0; + } + return 2; + } + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + Py_ssize_t i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +SWIGINTERN int +SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { + int no_kwargs = 1; + if (kwargs) { + assert(PyDict_Check(kwargs)); + if (PyDict_Size(kwargs) > 0) { + PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name); + no_kwargs = 0; + } + } + return no_kwargs; +} + +/* A functor is a function object with one single object argument */ +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) +#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) + +#ifdef __cplusplus +extern "C" { +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; + PyTypeObject *pytype; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + int fail = data ? data->implicitconv : 0; + if (fail) + PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors."); + return fail; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { + data->newraw = PyObject_GetAttrString(data->klass, "__new__"); + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); + data->delargs = !(flags & (METH_O)); + } else { + data->delargs = 0; + } + data->implicitconv = 0; + data->pytype = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData *data) { + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +#ifdef SWIGPYTHON_BUILTIN + PyObject *dict; +#endif +} SwigPyObject; + + +#ifdef SWIGPYTHON_BUILTIN + +SWIGRUNTIME PyObject * +SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + + if (!sobj->dict) + sobj->dict = PyDict_New(); + + Py_INCREF(sobj->dict); + return sobj->dict; +} + +#endif + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_repr(SwigPyObject *v) +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v); + if (v->next) { + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +# if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +# else + PyString_ConcatAndDel(&repr,nrep); +# endif + } + return repr; +} + +/* We need a version taking two PyObject* parameters so it's a valid + * PyCFunction to use in swigobject_methods[]. */ +SWIGRUNTIME PyObject * +SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + return SwigPyObject_repr((SwigPyObject*)v); +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, would it also be useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); + return res; +} + + +SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); + +#ifdef SWIGPYTHON_BUILTIN +static swig_type_info *SwigPyObject_stype = 0; +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + SwigPyClientData *cd; + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + assert(cd); + assert(cd->pytype); + return cd->pytype; +} +#else +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); + return type; +} +#endif + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { +#ifdef SWIGPYTHON_BUILTIN + PyTypeObject *target_tp = SwigPyObject_type(); + if (PyType_IsSubtype(op->ob_type, target_tp)) + return 1; + return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); +#else + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +#endif +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + + /* PyObject_CallFunction() has the potential to silently drop + the active exception. In cases of unnamed temporary + variable or where we just finished iterating over a generator + StopIteration will be active right now, and this needs to + remain true upon return from SwigPyObject_dealloc. So save + and restore. */ + + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); + + if (data->delargs) { + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + if (!res) + PyErr_WriteUnraisable(destroy); + + PyErr_Restore(type, value, traceback); + + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) { + return NULL; + } else { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } + } + return obj; + } +} + +static PyMethodDef +swigobject_methods[] = { + {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"}, + {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"}, + {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"}, + {"append", SwigPyObject_append, METH_O, "appends another 'this' object"}, + {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"}, + {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"}, + {0, 0, 0, 0} +}; + +SWIGRUNTIME PyTypeObject* +SwigPyObject_TypeOnce(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_long, /*nb_long*/ +#else + 0, /*nb_reserved*/ +#endif + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ +#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#else + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ +#else + (cmpfunc)SwigPyObject_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + 0, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + swigpyobject_type = tmp; + type_init = 1; + if (PyType_Ready(&swigpyobject_type) < 0) + return NULL; + } + return &swigpyobject_type; +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == SwigPyPacked_TypeOnce()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_TypeOnce(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX>=0x03000000 + 0, /* tp_reserved in 3.0.1 */ +#else + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + swigpypacked_type = tmp; + type_init = 1; + if (PyType_Ready(&swigpypacked_type) < 0) + return NULL; + } + return &swigpypacked_type; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +static PyObject *Swig_This_global = NULL; + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + if (Swig_This_global == NULL) + Swig_This_global = SWIG_Python_str_FromChar("this"); + return Swig_This_global; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + PyObject *obj; + + if (SwigPyObject_Check(pyobj)) + return (SwigPyObject *) pyobj; + +#ifdef SWIGPYTHON_BUILTIN + (void)obj; +# ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + pyobj = PyWeakref_GET_OBJECT(pyobj); + if (pyobj && SwigPyObject_Check(pyobj)) + return (SwigPyObject*) pyobj; + } +# endif + return NULL; +#else + + obj = 0; + +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; +#endif +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + int res; + SwigPyObject *sobj; + int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; + + if (!obj) + return SWIG_ERROR; + if (obj == Py_None && !implicit_conv) { + if (ptr) + *ptr = 0; + return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; + } + + res = SWIG_ERROR; + + sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + res = SWIG_OK; + } else { + if (implicit_conv) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } + } + } + return res; +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + swig_cast_info *tc; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) + return SWIG_ERROR; + tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + return SWIG_OK; + } +} + +/* Convert a packed pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, without calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *empty_args = PyTuple_New(0); + if (empty_args) { + PyObject *empty_kwargs = PyDict_New(); + if (empty_kwargs) { + inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs); + Py_DECREF(empty_kwargs); + if (inst) { + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } else { + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + } + } + } + Py_DECREF(empty_args); + } +#else + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } +#endif + } + return inst; +} + +SWIGRUNTIME int +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + return PyDict_SetItem(dict, SWIG_This(), swig_this); + } +#endif + return PyObject_SetAttr(inst, SWIG_This(), swig_this); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) + return NULL; + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { + SwigPyClientData *clientdata; + PyObject * robj; + int own; + + if (!ptr) + return SWIG_Py_Void(); + + clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + if (clientdata && clientdata->pytype) { + SwigPyObject *newobj; + if (flags & SWIG_BUILTIN_TP_INIT) { + newobj = (SwigPyObject*) self; + if (newobj->ptr) { + PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); + while (newobj->next) + newobj = (SwigPyObject *) newobj->next; + newobj->next = next_self; + newobj = (SwigPyObject *)next_self; +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + } else { + newobj = PyObject_New(SwigPyObject, clientdata->pytype); +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + if (newobj) { + newobj->ptr = ptr; + newobj->ty = type; + newobj->own = own; + newobj->next = 0; + return (PyObject*) newobj; + } + return SWIG_Py_Void(); + } + + assert(!(flags & SWIG_BUILTIN_TP_INIT)); + + robj = SwigPyObject_New(ptr, type, own); + if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + Py_DECREF(robj); + robj = inst; + } + return robj; +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else + type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +SWIGRUNTIME void +SWIG_Python_DestroyModule(PyObject *obj) +{ + swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); + Swig_This_global = NULL; +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ + PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); +#endif + PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); + } else { + swig_module_info *swig_module = SWIG_GetModule(0); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCapsule_New((void*) descriptor, NULL, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + const char *tmp = SWIG_Python_str_AsChar(old_str); + const char *errmesg = tmp ? tmp : "Invalid error message"; + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, errmesg); + } else { + PyErr_Format(type, "%s %s", errmesg, mesg); + } + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : ""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + SWIG_Python_str_DelForPy3(cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); +#if SWIG_POINTER_EXCEPTION + if (flags) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } +#endif + } + return result; +} + +#ifdef SWIGPYTHON_BUILTIN +SWIGRUNTIME int +SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { + PyTypeObject *tp = obj->ob_type; + PyObject *descr; + PyObject *encoded_name; + descrsetfunc f; + int res = -1; + +# ifdef Py_USING_UNICODE + if (PyString_Check(name)) { + name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); + if (!name) + return -1; + } else if (!PyUnicode_Check(name)) +# else + if (!PyString_Check(name)) +# endif + { + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); + return -1; + } else { + Py_INCREF(name); + } + + if (!tp->tp_dict) { + if (PyType_Ready(tp) < 0) + goto done; + } + + descr = _PyType_Lookup(tp, name); + f = NULL; + if (descr != NULL) + f = descr->ob_type->tp_descr_set; + if (!f) { + if (PyString_Check(name)) { + encoded_name = name; + Py_INCREF(name); + } else { + encoded_name = PyUnicode_AsUTF8String(name); + if (!encoded_name) + return -1; + } + PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); + Py_DECREF(encoded_name); + } else { + res = f(descr, obj, value); + } + + done: + Py_DECREF(name); + return res; +} +#endif + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Method creation and docstring support functions */ + +SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name); +SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); +SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); + +#ifdef __cplusplus +} +#endif + + + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_Cdi swig_types[0] +#define SWIGTYPE_p_CdiGrid swig_types[1] +#define SWIGTYPE_p_CdiTaxis swig_types[2] +#define SWIGTYPE_p_CdiVariable swig_types[3] +#define SWIGTYPE_p_CdiZaxis swig_types[4] +#define SWIGTYPE_p_allocator_type swig_types[5] +#define SWIGTYPE_p_char swig_types[6] +#define SWIGTYPE_p_difference_type swig_types[7] +#define SWIGTYPE_p_double swig_types[8] +#define SWIGTYPE_p_float swig_types[9] +#define SWIGTYPE_p_key_type swig_types[10] +#define SWIGTYPE_p_mapped_type swig_types[11] +#define SWIGTYPE_p_p_PyObject swig_types[12] +#define SWIGTYPE_p_p_double swig_types[13] +#define SWIGTYPE_p_size_type swig_types[14] +#define SWIGTYPE_p_std__allocatorT_CdiVariable_t swig_types[15] +#define SWIGTYPE_p_std__allocatorT_double_t swig_types[16] +#define SWIGTYPE_p_std__allocatorT_int_t swig_types[17] +#define SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t swig_types[18] +#define SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t swig_types[19] +#define SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t swig_types[20] +#define SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t swig_types[21] +#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t swig_types[22] +#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[23] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[24] +#define SWIGTYPE_p_std__invalid_argument swig_types[25] +#define SWIGTYPE_p_std__lessT_int_t swig_types[26] +#define SWIGTYPE_p_std__lessT_std__string_t swig_types[27] +#define SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t swig_types[28] +#define SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t swig_types[29] +#define SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t swig_types[30] +#define SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t swig_types[31] +#define SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t swig_types[32] +#define SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t swig_types[33] +#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[34] +#define SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t swig_types[35] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[36] +#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[37] +#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[38] +#define SWIGTYPE_p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t swig_types[39] +#define SWIGTYPE_p_swig__SwigPyIterator swig_types[40] +#define SWIGTYPE_p_value_type swig_types[41] +static swig_type_info *swig_types[43]; +static swig_module_info swig_module = {swig_types, 42, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#ifdef SWIG_TypeQuery +# undef SWIG_TypeQuery +#endif +#define SWIG_TypeQuery SWIG_Python_TypeQuery + +/*----------------------------------------------- + @(target):= _Cdi.so + ------------------------------------------------*/ +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_init PyInit__Cdi + +#else +# define SWIG_init init_Cdi + +#endif +#define SWIG_name "_Cdi" + +#define SWIGVERSION 0x040002 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) + + +#include <stdexcept> + + +namespace swig { + class SwigPtr_PyObject { + protected: + PyObject *_obj; + + public: + SwigPtr_PyObject() :_obj(0) + { + } + + SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_XINCREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + + SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) + { + if (initial_ref) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_XINCREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + } + + SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_XINCREF(item._obj); + Py_XDECREF(_obj); + _obj = item._obj; + SWIG_PYTHON_THREAD_END_BLOCK; + return *this; + } + + ~SwigPtr_PyObject() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_XDECREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + + operator PyObject *() const + { + return _obj; + } + + PyObject *operator->() const + { + return _obj; + } + }; +} + + +namespace swig { + struct SwigVar_PyObject : SwigPtr_PyObject { + SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } + + SwigVar_PyObject & operator = (PyObject* obj) + { + Py_XDECREF(_obj); + _obj = obj; + return *this; + } + }; +} + + +#define SWIG_FILE_WITH_INIT +#include "cdi.hpp" + + +#include <typeinfo> +#include <stdexcept> + + +#if defined(__GNUC__) +# if __GNUC__ == 2 && __GNUC_MINOR <= 96 +# define SWIG_STD_NOMODERN_STL +# endif +#endif + + +#include <string> + + +#include <stddef.h> + + +#include <iostream> + +#if PY_VERSION_HEX >= 0x03020000 +# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) +#else +# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) +#endif + + +namespace swig { + struct stop_iteration { + }; + + struct SwigPyIterator { + private: + SwigPtr_PyObject _seq; + + protected: + SwigPyIterator(PyObject *seq) : _seq(seq) + { + } + + public: + virtual ~SwigPyIterator() {} + + // Access iterator method, required by Python + virtual PyObject *value() const = 0; + + // Forward iterator method, required by Python + virtual SwigPyIterator *incr(size_t n = 1) = 0; + + // Backward iterator method, very common in C++, but not required in Python + virtual SwigPyIterator *decr(size_t /*n*/ = 1) + { + throw stop_iteration(); + } + + // Random access iterator methods, but not required in Python + virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const + { + throw std::invalid_argument("operation not supported"); + } + + virtual bool equal (const SwigPyIterator &/*x*/) const + { + throw std::invalid_argument("operation not supported"); + } + + // C++ common/needed methods + virtual SwigPyIterator *copy() const = 0; + + PyObject *next() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads + PyObject *obj = value(); + incr(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; + } + + /* Make an alias for Python 3.x */ + PyObject *__next__() + { + return next(); + } + + PyObject *previous() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads + decr(); + PyObject *obj = value(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; + } + + SwigPyIterator *advance(ptrdiff_t n) + { + return (n > 0) ? incr(n) : decr(-n); + } + + bool operator == (const SwigPyIterator& x) const + { + return equal(x); + } + + bool operator != (const SwigPyIterator& x) const + { + return ! operator==(x); + } + + SwigPyIterator& operator += (ptrdiff_t n) + { + return *advance(n); + } + + SwigPyIterator& operator -= (ptrdiff_t n) + { + return *advance(-n); + } + + SwigPyIterator* operator + (ptrdiff_t n) const + { + return copy()->advance(n); + } + + SwigPyIterator* operator - (ptrdiff_t n) const + { + return copy()->advance(-n); + } + + ptrdiff_t operator - (const SwigPyIterator& x) const + { + return x.distance(*this); + } + + static swig_type_info* descriptor() { + static int init = 0; + static swig_type_info* desc = 0; + if (!init) { + desc = SWIG_TypeQuery("swig::SwigPyIterator *"); + init = 1; + } + return desc; + } + }; + +#if defined(SWIGPYTHON_BUILTIN) + inline PyObject* make_output_iterator_builtin (PyObject *pyself) + { + Py_INCREF(pyself); + return pyself; + } +#endif +} + + +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; +#if PY_VERSION_HEX < 0x03000000 + } else if (PyInt_Check(obj)) { + if (val) *val = (double) PyInt_AsLong(obj); + return SWIG_OK; +#endif + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } +#endif + return res; +} + + +#include <float.h> + + +#include <math.h> + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else +#endif + if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +#include <limits.h> +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + } +#endif + return res; +} + + + #define SWIG_From_long PyInt_FromLong + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_long_SS_long (long long value) +{ + return ((value < LONG_MIN) || (value > LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); +} +#endif + + +SWIGINTERNINLINE PyObject * +SWIG_From_ptrdiff_t (ptrdiff_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(ptrdiff_t) <= sizeof(long)) { +#endif + return SWIG_From_long (static_cast< long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ + return SWIG_From_long_SS_long (static_cast< long long >(value)); + } +#endif +} + + +SWIGINTERNINLINE PyObject* + SWIG_From_bool (bool value) +{ + return PyBool_FromLong(value ? 1 : 0); +} + + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else +#endif + if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_long_SS_long (PyObject *obj, long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + long long v = PyLong_AsLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + long v; + res = SWIG_AsVal_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + const double mant_min = -mant_max; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) { + if (val) *val = (long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(ptrdiff_t) <= sizeof(long)) { +#endif + long v; + res = SWIG_AsVal_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { + long long v; + res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); + } +#endif + return res; +} + + +#include <algorithm> + + +#include <vector> + + +#include <utility> + + +#include <map> + + +#include <algorithm> + + +namespace swig { + template <class Type> + struct noconst_traits { + typedef Type noconst_type; + }; + + template <class Type> + struct noconst_traits<const Type> { + typedef Type noconst_type; + }; + + /* + type categories + */ + struct pointer_category { }; + struct value_category { }; + + /* + General traits that provides type_name and type_info + */ + template <class Type> struct traits { }; + + template <class Type> + inline const char* type_name() { + return traits<typename noconst_traits<Type >::noconst_type >::type_name(); + } + + template <class Type> struct traits_info { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name<Type>()); + return info; + } + }; + + /* + Partial specialization for pointers (traits_info) + */ + template <class Type> struct traits_info<Type *> { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name<Type>()); + return info; + } + }; + + template <class Type> + inline swig_type_info *type_info() { + return traits_info<Type>::type_info(); + } + + /* + Partial specialization for pointers (traits) + */ + template <class Type> struct traits <Type *> { + typedef pointer_category category; + static std::string make_ptr_name(const char* name) { + std::string ptrname = name; + ptrname += " *"; + return ptrname; + } + static const char* type_name() { + static std::string name = make_ptr_name(swig::type_name<Type>()); + return name.c_str(); + } + }; + + template <class Type, class Category> + struct traits_as { }; + + template <class Type, class Category> + struct traits_check { }; + +} + + +namespace swig { + /* + Traits that provides the from method + */ + template <class Type> struct traits_from_ptr { + static PyObject *from(Type *val, int owner = 0) { + return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner); + } + }; + + template <class Type> struct traits_from { + static PyObject *from(const Type& val) { + return traits_from_ptr<Type>::from(new Type(val), 1); + } + }; + + template <class Type> struct traits_from<Type *> { + static PyObject *from(Type* val) { + return traits_from_ptr<Type>::from(val, 0); + } + }; + + template <class Type> struct traits_from<const Type *> { + static PyObject *from(const Type* val) { + return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0); + } + }; + + + template <class Type> + inline PyObject *from(const Type& val) { + return traits_from<Type>::from(val); + } + + template <class Type> + inline PyObject *from_ptr(Type* val, int owner) { + return traits_from_ptr<Type>::from(val, owner); + } + + /* + Traits that provides the asval/as/check method + */ + template <class Type> + struct traits_asptr { + static int asptr(PyObject *obj, Type **val) { + int res = SWIG_ERROR; + swig_type_info *descriptor = type_info<Type>(); + if (val) { + Type *p = 0; + int newmem = 0; + res = descriptor ? SWIG_ConvertPtrAndOwn(obj, (void **)&p, descriptor, 0, &newmem) : SWIG_ERROR; + if (SWIG_IsOK(res)) { + if (newmem & SWIG_CAST_NEW_MEMORY) { + res |= SWIG_NEWOBJMASK; + } + *val = p; + } + } else { + res = descriptor ? SWIG_ConvertPtr(obj, 0, descriptor, 0) : SWIG_ERROR; + } + return res; + } + }; + + template <class Type> + inline int asptr(PyObject *obj, Type **vptr) { + return traits_asptr<Type>::asptr(obj, vptr); + } + + template <class Type> + struct traits_asval { + static int asval(PyObject *obj, Type *val) { + if (val) { + Type *p = 0; + int res = traits_asptr<Type>::asptr(obj, &p); + if (!SWIG_IsOK(res)) return res; + if (p) { + typedef typename noconst_traits<Type>::noconst_type noconst_type; + *(const_cast<noconst_type*>(val)) = *p; + if (SWIG_IsNewObj(res)){ + delete p; + res = SWIG_DelNewMask(res); + } + return res; + } else { + return SWIG_ERROR; + } + } else { + return traits_asptr<Type>::asptr(obj, (Type **)(0)); + } + } + }; + + template <class Type> struct traits_asval<Type*> { + static int asval(PyObject *obj, Type **val) { + if (val) { + typedef typename noconst_traits<Type>::noconst_type noconst_type; + noconst_type *p = 0; + int res = traits_asptr<noconst_type>::asptr(obj, &p); + if (SWIG_IsOK(res)) { + *(const_cast<noconst_type**>(val)) = p; + } + return res; + } else { + return traits_asptr<Type>::asptr(obj, (Type **)(0)); + } + } + }; + + template <class Type> + inline int asval(PyObject *obj, Type *val) { + return traits_asval<Type>::asval(obj, val); + } + + template <class Type> + struct traits_as<Type, value_category> { + static Type as(PyObject *obj) { + Type v; + int res = asval(obj, &v); + if (!obj || !SWIG_IsOK(res)) { + if (!PyErr_Occurred()) { + ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + throw std::invalid_argument("bad type"); + } + return v; + } + }; + + template <class Type> + struct traits_as<Type, pointer_category> { + static Type as(PyObject *obj) { + Type *v = 0; + int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res) && v) { + if (SWIG_IsNewObj(res)) { + Type r(*v); + delete v; + return r; + } else { + return *v; + } + } else { + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + throw std::invalid_argument("bad type"); + } + } + }; + + template <class Type> + struct traits_as<Type*, pointer_category> { + static Type* as(PyObject *obj) { + Type *v = 0; + int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res)) { + return v; + } else { + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + throw std::invalid_argument("bad type"); + } + } + }; + + template <class Type> + inline Type as(PyObject *obj) { + return traits_as<Type, typename traits<Type>::category>::as(obj); + } + + template <class Type> + struct traits_check<Type, value_category> { + static bool check(PyObject *obj) { + int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; + + template <class Type> + struct traits_check<Type, pointer_category> { + static bool check(PyObject *obj) { + int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; + + template <class Type> + inline bool check(PyObject *obj) { + return traits_check<Type, typename traits<Type>::category>::check(obj); + } +} + + +#include <functional> + +namespace std { + template <> + struct less <PyObject *> + { + bool + operator()(PyObject * v, PyObject *w) const + { + bool res; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; + /* This may fall into a case of inconsistent + eg. ObjA > ObjX > ObjB + but ObjA < ObjB + */ + if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) + { + /* Objects can't be compared, this mostly occurred in Python 3.0 */ + /* Compare their ptr directly for a workaround */ + res = (v < w); + PyErr_Clear(); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return res; + } + }; + + template <> + struct less <swig::SwigPtr_PyObject> + { + bool + operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const + { + return std::less<PyObject *>()(v, w); + } + }; + + template <> + struct less <swig::SwigVar_PyObject> + { + bool + operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const + { + return std::less<PyObject *>()(v, w); + } + }; + +} + +namespace swig { + template <> struct traits<PyObject *> { + typedef value_category category; + static const char* type_name() { return "PyObject *"; } + }; + + template <> struct traits_asval<PyObject * > { + typedef PyObject * value_type; + static int asval(PyObject *obj, value_type *val) { + if (val) *val = obj; + return SWIG_OK; + } + }; + + template <> + struct traits_check<PyObject *, value_category> { + static bool check(PyObject *) { + return true; + } + }; + + template <> struct traits_from<PyObject *> { + typedef PyObject * value_type; + static PyObject *from(const value_type& val) { + Py_XINCREF(val); + return val; + } + }; + +} + +namespace swig { + template <class Difference> + inline size_t + check_index(Difference i, size_t size, bool insert = false) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) + return (size_t) (i + size); + } else if ( (size_t) i < size ) { + return (size_t) i; + } else if (insert && ((size_t) i == size)) { + return size; + } + throw std::out_of_range("index out of range"); + } + + template <class Difference> + void + slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) { + if (step == 0) { + throw std::invalid_argument("slice step cannot be zero"); + } else if (step > 0) { + // Required range: 0 <= i < size, 0 <= j < size, i <= j + if (i < 0) { + ii = 0; + } else if (i < (Difference)size) { + ii = i; + } else if (insert && (i >= (Difference)size)) { + ii = (Difference)size; + } + if (j < 0) { + jj = 0; + } else { + jj = (j < (Difference)size) ? j : (Difference)size; + } + if (jj < ii) + jj = ii; + } else { + // Required range: -1 <= i < size-1, -1 <= j < size-1, i >= j + if (i < -1) { + ii = -1; + } else if (i < (Difference) size) { + ii = i; + } else if (i >= (Difference)(size-1)) { + ii = (Difference)(size-1); + } + if (j < -1) { + jj = -1; + } else { + jj = (j < (Difference)size ) ? j : (Difference)(size-1); + } + if (ii < jj) + ii = jj; + } + } + + template <class Sequence, class Difference> + inline typename Sequence::iterator + getpos(Sequence* self, Difference i) { + typename Sequence::iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template <class Sequence, class Difference> + inline typename Sequence::const_iterator + cgetpos(const Sequence* self, Difference i) { + typename Sequence::const_iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template <class Sequence> + inline void + erase(Sequence* seq, const typename Sequence::iterator& position) { + seq->erase(position); + } + + template <class Sequence> + struct traits_reserve { + static void reserve(Sequence & /*seq*/, typename Sequence::size_type /*n*/) { + // This should be specialized for types that support reserve + } + }; + + template <class Sequence, class Difference> + inline Sequence* + getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj); + + if (step > 0) { + typename Sequence::const_iterator sb = self->begin(); + typename Sequence::const_iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + if (step == 1) { + return new Sequence(sb, se); + } else { + Sequence *sequence = new Sequence(); + swig::traits_reserve<Sequence>::reserve(*sequence, (jj - ii + step - 1) / step); + typename Sequence::const_iterator it = sb; + while (it!=se) { + sequence->push_back(*it); + for (Py_ssize_t c=0; c<step && it!=se; ++c) + it++; + } + return sequence; + } + } else { + Sequence *sequence = new Sequence(); + swig::traits_reserve<Sequence>::reserve(*sequence, (ii - jj - step - 1) / -step); + typename Sequence::const_reverse_iterator sb = self->rbegin(); + typename Sequence::const_reverse_iterator se = self->rbegin(); + std::advance(sb,size-ii-1); + std::advance(se,size-jj-1); + typename Sequence::const_reverse_iterator it = sb; + while (it!=se) { + sequence->push_back(*it); + for (Py_ssize_t c=0; c<-step && it!=se; ++c) + it++; + } + return sequence; + } + } + + template <class Sequence, class Difference, class InputSeq> + inline void + setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj, true); + if (step > 0) { + if (step == 1) { + size_t ssize = jj - ii; + if (ssize <= is.size()) { + // expanding/staying the same size + swig::traits_reserve<Sequence>::reserve(*self, self->size() - ssize + is.size()); + typename Sequence::iterator sb = self->begin(); + typename InputSeq::const_iterator isit = is.begin(); + std::advance(sb,ii); + std::advance(isit, jj - ii); + self->insert(std::copy(is.begin(), isit, sb), isit, is.end()); + } else { + // shrinking + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + sb = self->begin(); + std::advance(sb,ii); + self->insert(sb, is.begin(), is.end()); + } + } else { + size_t replacecount = (jj - ii + step - 1) / step; + if (is.size() != replacecount) { + char msg[1024]; + sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); + throw std::invalid_argument(msg); + } + typename Sequence::const_iterator isit = is.begin(); + typename Sequence::iterator it = self->begin(); + std::advance(it,ii); + for (size_t rc=0; rc<replacecount && it != self->end(); ++rc) { + *it++ = *isit++; + for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) + it++; + } + } + } else { + size_t replacecount = (ii - jj - step - 1) / -step; + if (is.size() != replacecount) { + char msg[1024]; + sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); + throw std::invalid_argument(msg); + } + typename Sequence::const_iterator isit = is.begin(); + typename Sequence::reverse_iterator it = self->rbegin(); + std::advance(it,size-ii-1); + for (size_t rc=0; rc<replacecount && it != self->rend(); ++rc) { + *it++ = *isit++; + for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) + it++; + } + } + } + + template <class Sequence, class Difference> + inline void + delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj, true); + if (step > 0) { + typename Sequence::iterator sb = self->begin(); + std::advance(sb,ii); + if (step == 1) { + typename Sequence::iterator se = self->begin(); + std::advance(se,jj); + self->erase(sb,se); + } else { + typename Sequence::iterator it = sb; + size_t delcount = (jj - ii + step - 1) / step; + while (delcount) { + it = self->erase(it); + for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) + it++; + delcount--; + } + } + } else { + typename Sequence::reverse_iterator sb = self->rbegin(); + std::advance(sb,size-ii-1); + typename Sequence::reverse_iterator it = sb; + size_t delcount = (ii - jj - step - 1) / -step; + while (delcount) { + it = typename Sequence::reverse_iterator(self->erase((++it).base())); + for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) + it++; + delcount--; + } + } + } +} + + +#if defined(__SUNPRO_CC) && defined(_RWSTD_VER) +# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) +# define SWIG_STD_NOITERATOR_TRAITS_STL +# endif +#endif + +#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) +#include <iterator> +#else +namespace std { + template <class Iterator> + struct iterator_traits { + typedef ptrdiff_t difference_type; + typedef typename Iterator::value_type value_type; + }; + + template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance> + struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > { + typedef Distance difference_type; + typedef T value_type; + }; + + template <class T> + struct iterator_traits<T*> { + typedef T value_type; + typedef ptrdiff_t difference_type; + }; + + template<typename _InputIterator> + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) { + ++__first; ++__n; + } + return __n; + } +} +#endif + + +namespace swig { + template<typename OutIterator> + class SwigPyIterator_T : public SwigPyIterator + { + public: + typedef OutIterator out_iterator; + typedef typename std::iterator_traits<out_iterator>::value_type value_type; + typedef SwigPyIterator_T<out_iterator> self_type; + + SwigPyIterator_T(out_iterator curr, PyObject *seq) + : SwigPyIterator(seq), current(curr) + { + } + + const out_iterator& get_current() const + { + return current; + } + + + bool equal (const SwigPyIterator &iter) const + { + const self_type *iters = dynamic_cast<const self_type *>(&iter); + if (iters) { + return (current == iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + ptrdiff_t distance(const SwigPyIterator &iter) const + { + const self_type *iters = dynamic_cast<const self_type *>(&iter); + if (iters) { + return std::distance(current, iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + protected: + out_iterator current; + }; + + template <class ValueType> + struct from_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v); + } + }; + + template<typename OutIterator, + typename ValueType = typename std::iterator_traits<OutIterator>::value_type, + typename FromOper = from_oper<ValueType> > + class SwigPyForwardIteratorOpen_T : public SwigPyIterator_T<OutIterator> + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T<out_iterator> base; + typedef SwigPyForwardIteratorOpen_T<OutIterator, ValueType, FromOper> self_type; + + SwigPyForwardIteratorOpen_T(out_iterator curr, PyObject *seq) + : SwigPyIterator_T<OutIterator>(curr, seq) + { + } + + PyObject *value() const { + return from(static_cast<const value_type&>(*(base::current))); + } + + SwigPyIterator *copy() const + { + return new self_type(*this); + } + + SwigPyIterator *incr(size_t n = 1) + { + while (n--) { + ++base::current; + } + return this; + } + + }; + + template<typename OutIterator, + typename ValueType = typename std::iterator_traits<OutIterator>::value_type, + typename FromOper = from_oper<ValueType> > + class SwigPyIteratorOpen_T : public SwigPyForwardIteratorOpen_T<OutIterator, ValueType, FromOper> + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T<out_iterator> base; + typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type; + + SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq) + : SwigPyForwardIteratorOpen_T<OutIterator>(curr, seq) + { + } + + SwigPyIterator *decr(size_t n = 1) + { + while (n--) { + --base::current; + } + return this; + } + }; + + template<typename OutIterator, + typename ValueType = typename std::iterator_traits<OutIterator>::value_type, + typename FromOper = from_oper<ValueType> > + class SwigPyForwardIteratorClosed_T : public SwigPyIterator_T<OutIterator> + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T<out_iterator> base; + typedef SwigPyForwardIteratorClosed_T<OutIterator, ValueType, FromOper> self_type; + + SwigPyForwardIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) + : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last) + { + } + + PyObject *value() const { + if (base::current == end) { + throw stop_iteration(); + } else { + return from(static_cast<const value_type&>(*(base::current))); + } + } + + SwigPyIterator *copy() const + { + return new self_type(*this); + } + + SwigPyIterator *incr(size_t n = 1) + { + while (n--) { + if (base::current == end) { + throw stop_iteration(); + } else { + ++base::current; + } + } + return this; + } + + protected: + out_iterator begin; + out_iterator end; + }; + + template<typename OutIterator, + typename ValueType = typename std::iterator_traits<OutIterator>::value_type, + typename FromOper = from_oper<ValueType> > + class SwigPyIteratorClosed_T : public SwigPyForwardIteratorClosed_T<OutIterator,ValueType,FromOper> + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T<out_iterator> base; + typedef SwigPyForwardIteratorClosed_T<OutIterator, ValueType, FromOper> base0; + typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type; + + SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) + : SwigPyForwardIteratorClosed_T<OutIterator,ValueType,FromOper>(curr, first, last, seq) + { + } + + SwigPyIterator *decr(size_t n = 1) + { + while (n--) { + if (base::current == base0::begin) { + throw stop_iteration(); + } else { + --base::current; + } + } + return this; + } + }; + + + template<typename OutIter> + inline SwigPyIterator* + make_output_forward_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) + { + return new SwigPyForwardIteratorClosed_T<OutIter>(current, begin, end, seq); + } + + template<typename OutIter> + inline SwigPyIterator* + make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) + { + return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq); + } + + template<typename OutIter> + inline SwigPyIterator* + make_output_forward_iterator(const OutIter& current, PyObject *seq = 0) + { + return new SwigPyForwardIteratorOpen_T<OutIter>(current, seq); + } + + template<typename OutIter> + inline SwigPyIterator* + make_output_iterator(const OutIter& current, PyObject *seq = 0) + { + return new SwigPyIteratorOpen_T<OutIter>(current, seq); + } + +} + + +namespace swig +{ + template <class T> + struct SwigPySequence_Ref + { + SwigPySequence_Ref(PyObject* seq, Py_ssize_t index) + : _seq(seq), _index(index) + { + } + + operator T () const + { + swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index); + try { + return swig::as<T>(item); + } catch (const std::invalid_argument& e) { + char msg[1024]; + sprintf(msg, "in sequence element %d ", (int)_index); + if (!PyErr_Occurred()) { + ::SWIG_Error(SWIG_TypeError, swig::type_name<T>()); + } + SWIG_Python_AddErrorMsg(msg); + SWIG_Python_AddErrorMsg(e.what()); + throw; + } + } + + SwigPySequence_Ref& operator=(const T& v) + { + PySequence_SetItem(_seq, _index, swig::from<T>(v)); + return *this; + } + + private: + PyObject* _seq; + Py_ssize_t _index; + }; + + template <class T> + struct SwigPySequence_ArrowProxy + { + SwigPySequence_ArrowProxy(const T& x): m_value(x) {} + const T* operator->() const { return &m_value; } + operator const T*() const { return &m_value; } + T m_value; + }; + + template <class T, class Reference > + struct SwigPySequence_InputIterator + { + typedef SwigPySequence_InputIterator<T, Reference > self; + + typedef std::random_access_iterator_tag iterator_category; + typedef Reference reference; + typedef T value_type; + typedef T* pointer; + typedef Py_ssize_t difference_type; + + SwigPySequence_InputIterator() + { + } + + SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index) + : _seq(seq), _index(index) + { + } + + reference operator*() const + { + return reference(_seq, _index); + } + + SwigPySequence_ArrowProxy<T> + operator->() const { + return SwigPySequence_ArrowProxy<T>(operator*()); + } + + bool operator==(const self& ri) const + { + return (_index == ri._index) && (_seq == ri._seq); + } + + bool operator!=(const self& ri) const + { + return !(operator==(ri)); + } + + self& operator ++ () + { + ++_index; + return *this; + } + + self& operator -- () + { + --_index; + return *this; + } + + self& operator += (difference_type n) + { + _index += n; + return *this; + } + + self operator +(difference_type n) const + { + return self(_seq, _index + n); + } + + self& operator -= (difference_type n) + { + _index -= n; + return *this; + } + + self operator -(difference_type n) const + { + return self(_seq, _index - n); + } + + difference_type operator - (const self& ri) const + { + return _index - ri._index; + } + + bool operator < (const self& ri) const + { + return _index < ri._index; + } + + reference + operator[](difference_type n) const + { + return reference(_seq, _index + n); + } + + private: + PyObject* _seq; + difference_type _index; + }; + + // STL container wrapper around a Python sequence + template <class T> + struct SwigPySequence_Cont + { + typedef SwigPySequence_Ref<T> reference; + typedef const SwigPySequence_Ref<T> const_reference; + typedef T value_type; + typedef T* pointer; + typedef Py_ssize_t difference_type; + typedef size_t size_type; + typedef const pointer const_pointer; + typedef SwigPySequence_InputIterator<T, reference> iterator; + typedef SwigPySequence_InputIterator<T, const_reference> const_iterator; + + SwigPySequence_Cont(PyObject* seq) : _seq(0) + { + if (!PySequence_Check(seq)) { + throw std::invalid_argument("a sequence is expected"); + } + _seq = seq; + Py_INCREF(_seq); + } + + ~SwigPySequence_Cont() + { + Py_XDECREF(_seq); + } + + size_type size() const + { + return static_cast<size_type>(PySequence_Size(_seq)); + } + + bool empty() const + { + return size() == 0; + } + + iterator begin() + { + return iterator(_seq, 0); + } + + const_iterator begin() const + { + return const_iterator(_seq, 0); + } + + iterator end() + { + return iterator(_seq, size()); + } + + const_iterator end() const + { + return const_iterator(_seq, size()); + } + + reference operator[](difference_type n) + { + return reference(_seq, n); + } + + const_reference operator[](difference_type n) const + { + return const_reference(_seq, n); + } + + bool check() const + { + Py_ssize_t s = size(); + for (Py_ssize_t i = 0; i < s; ++i) { + swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i); + if (!swig::check<value_type>(item)) + return false; + } + return true; + } + + private: + PyObject* _seq; + }; + +} + + +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} + + +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) +{ + return PyInt_FromLong((long) value); +} + + +namespace swig { + template <> struct traits< int > { + typedef value_category category; + static const char* type_name() { return"int"; } + }; + template <> struct traits_asval< int > { + typedef int value_type; + static int asval(PyObject *obj, value_type *val) { + return SWIG_AsVal_int (obj, val); + } + }; + template <> struct traits_from< int > { + typedef int value_type; + static PyObject *from(const value_type& val) { + return SWIG_From_int (val); + } + }; +} + + +namespace swig { + template <class SwigPySeq, class Seq> + inline void + assign(const SwigPySeq& swigpyseq, Seq* seq) { + // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented + typedef typename SwigPySeq::value_type value_type; + typename SwigPySeq::const_iterator it = swigpyseq.begin(); + for (;it != swigpyseq.end(); ++it) { + seq->insert(seq->end(),(value_type)(*it)); + } + } + + template <class Seq, class T = typename Seq::value_type > + struct traits_asptr_stdseq { + typedef Seq sequence; + typedef T value_type; + + static int asptr(PyObject *obj, sequence **seq) { + if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { + sequence *p; + swig_type_info *descriptor = swig::type_info<sequence>(); + if (descriptor && SWIG_IsOK(::SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0))) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } + } else if (PySequence_Check(obj)) { + try { + SwigPySequence_Cont<value_type> swigpyseq(obj); + if (seq) { + sequence *pseq = new sequence(); + assign(swigpyseq, pseq); + *seq = pseq; + return SWIG_NEWOBJ; + } else { + return swigpyseq.check() ? SWIG_OK : SWIG_ERROR; + } + } catch (std::exception& e) { + if (seq) { + if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, e.what()); + } + } + return SWIG_ERROR; + } + } + return SWIG_ERROR; + } + }; + + template <class Seq, class T = typename Seq::value_type > + struct traits_from_stdseq { + typedef Seq sequence; + typedef T value_type; + typedef typename Seq::size_type size_type; + typedef typename sequence::const_iterator const_iterator; + + static PyObject *from(const sequence& seq) { +#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS + swig_type_info *desc = swig::type_info<sequence>(); + if (desc && desc->clientdata) { + return SWIG_InternalNewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); + } +#endif + size_type size = seq.size(); + if (size <= (size_type)INT_MAX) { + PyObject *obj = PyTuple_New((Py_ssize_t)size); + Py_ssize_t i = 0; + for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) { + PyTuple_SetItem(obj,i,swig::from<value_type>(*it)); + } + return obj; + } else { + PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); + return NULL; + } + } + }; +} + + + namespace swig { + template <class T> + struct traits_reserve<std::vector<T> > { + static void reserve(std::vector<T> &seq, typename std::vector<T>::size_type n) { + seq.reserve(n); + } + }; + + template <class T> + struct traits_asptr<std::vector<T> > { + static int asptr(PyObject *obj, std::vector<T> **vec) { + return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec); + } + }; + + template <class T> + struct traits_from<std::vector<T> > { + static PyObject *from(const std::vector<T>& vec) { + return traits_from_stdseq<std::vector<T> >::from(vec); + } + }; + } + + + namespace swig { + template <> struct traits<std::vector< int, std::allocator< int > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "int" "," "std::allocator< int >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){ + return self->size(); + } + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value)); +} +#endif + + +SWIGINTERNINLINE PyObject * +SWIG_From_size_t (size_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(size_t) <= sizeof(unsigned long long) */ + return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value)); + } +#endif +} + +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< int,std::allocator< int > >()); + } +SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_1(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){ + return *(swig::cgetpos(self, i)); + } + +namespace swig { + static PyObject* container_owner_attribute() { + static PyObject* attr = SWIG_Python_str_FromChar("__swig_container"); + return attr; + } + + template <typename T> + struct container_owner { + // By default, do not add the back-reference (for value types) + // Specialization below will check the reference for pointer types. + static bool back_reference(PyObject* /*child*/, PyObject* /*owner*/) { + return false; + } + }; + + template <> + struct container_owner<swig::pointer_category> { + /* + * Call to add a back-reference to the owning object when returning a + * reference from a container. Will only set the reference if child + * is a SWIG wrapper object that does not own the pointer. + * + * returns whether the reference was set or not + */ + static bool back_reference(PyObject* child, PyObject* owner) { + SwigPyObject* swigThis = SWIG_Python_GetSwigThis(child); + if (swigThis && (swigThis->own & SWIG_POINTER_OWN) != SWIG_POINTER_OWN) { + return PyObject_SetAttr(child, container_owner_attribute(), owner) != -1; + } + return false; + } + }; +} + +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< int,std::allocator< int > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_1(std::vector< int > *self,std::vector< int >::iterator first,std::vector< int >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__insert__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_int_Sg__insert__SWIG_1(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::size_type n,std::vector< int >::value_type const &x){ self->insert(pos, n, x); } + + #define SWIG_From_double PyFloat_FromDouble + + +namespace swig { + template <> struct traits< double > { + typedef value_category category; + static const char* type_name() { return"double"; } + }; + template <> struct traits_asval< double > { + typedef double value_type; + static int asval(PyObject *obj, value_type *val) { + return SWIG_AsVal_double (obj, val); + } + }; + template <> struct traits_from< double > { + typedef double value_type; + static PyObject *from(const value_type& val) { + return SWIG_From_double (val); + } + }; +} + + + namespace swig { + template <> struct traits<std::vector< double, std::allocator< double > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "double" "," "std::allocator< double >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_double_Sg__iterator(std::vector< double > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_double_Sg____nonzero__(std::vector< double > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_double_Sg____bool__(std::vector< double > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< double >::size_type std_vector_Sl_double_Sg____len__(std::vector< double > const *self){ + return self->size(); + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< double,std::allocator< double > >()); + } +SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_1(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j,std::vector< double,std::allocator< double > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< double,std::allocator< double > >::difference_type id = i; + std::vector< double,std::allocator< double > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< double,std::allocator< double > >::difference_type id = i; + std::vector< double,std::allocator< double > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< double,std::allocator< double > >::difference_type id = i; + std::vector< double,std::allocator< double > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< double,std::allocator< double > >::difference_type id = i; + std::vector< double,std::allocator< double > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< double >::value_type const &std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< double >::value_type std_vector_Sl_double_Sg__pop(std::vector< double > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< double,std::allocator< double > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_double_Sg__append(std::vector< double > *self,std::vector< double >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_1(std::vector< double > *self,std::vector< double >::iterator first,std::vector< double >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__insert__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_double_Sg__insert__SWIG_1(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::size_type n,std::vector< double >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + template <> struct traits<std::vector< std::vector< double,std::allocator< double > >, std::allocator< std::vector< double,std::allocator< double > > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "std::vector< double,std::allocator< double > >" "," "std::allocator< std::vector< double,std::allocator< double > > >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_vector_Sl_double_Sg__Sg__iterator(std::vector< std::vector< double > > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_std_vector_Sl_double_Sg__Sg____nonzero__(std::vector< std::vector< double > > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_std_vector_Sl_double_Sg__Sg____bool__(std::vector< std::vector< double > > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< std::vector< double > >::size_type std_vector_Sl_std_vector_Sl_double_Sg__Sg____len__(std::vector< std::vector< double > > const *self){ + return self->size(); + } +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getslice__(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setslice____SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >()); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setslice____SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type j,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delslice__(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< std::vector< double > >::value_type const &std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_1(std::vector< std::vector< double > > const *self,std::vector< std::vector< double > >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_2(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< std::vector< double > >::value_type std_vector_Sl_std_vector_Sl_double_Sg__Sg__pop(std::vector< std::vector< double > > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg__append(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator first,std::vector< std::vector< double > >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos,std::vector< std::vector< double > >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos,std::vector< std::vector< double > >::size_type n,std::vector< std::vector< double > >::value_type const &x){ self->insert(pos, n, x); } + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else + if (PyUnicode_Check(obj)) +#endif +#else + if (PyString_Check(obj)) +#endif + { + char *cstr; Py_ssize_t len; + int ret = SWIG_OK; +#if PY_VERSION_HEX>=0x03000000 +#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (!alloc && cptr) { + /* We can't allow converting without allocation, since the internal + representation of string in Python 3 is UCS-2/UCS-4 but we require + a UTF-8 representation. + TODO(bhy) More detailed explanation */ + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (!obj) + return SWIG_TypeError; + if (alloc) + *alloc = SWIG_NEWOBJ; +#endif + if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; +#else + if (PyString_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; +#endif + if (cptr) { + if (alloc) { + if (*alloc == SWIG_NEWOBJ) { + *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + *alloc = SWIG_NEWOBJ; + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } else { +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + *cptr = PyBytes_AsString(obj); +#else + assert(0); /* Should never reach here with Unicode strings in Python 3 */ +#endif +#else + *cptr = SWIG_Python_str_AsChar(obj); + if (!*cptr) + ret = SWIG_TypeError; +#endif + } + } + if (psize) *psize = len + 1; +#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + Py_XDECREF(obj); +#endif + return ret; + } else { +#if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif +#if PY_VERSION_HEX<0x03000000 + if (PyUnicode_Check(obj)) { + char *cstr; Py_ssize_t len; + if (!alloc && cptr) { + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (!obj) + return SWIG_TypeError; + if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { + if (cptr) { + if (alloc) *alloc = SWIG_NEWOBJ; + *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + } + if (psize) *psize = len + 1; + + Py_XDECREF(obj); + return SWIG_OK; + } else { + Py_XDECREF(obj); + } + } +#endif +#endif + + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsPtr_std_string (PyObject * obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + + +SWIGINTERN int +SWIG_AsVal_std_string (PyObject * obj, std::string *val) +{ + std::string* v = (std::string *) 0; + int res = SWIG_AsPtr_std_string (obj, &v); + if (!SWIG_IsOK(res)) return res; + if (v) { + if (val) *val = *v; + if (SWIG_IsNewObj(res)) { + delete v; + res = SWIG_DelNewMask(res); + } + return res; + } + return SWIG_ERROR; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { +#if PY_VERSION_HEX >= 0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#else + return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); +#endif +#else + return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#endif + } + } else { + return SWIG_Py_Void(); + } +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + +namespace swig { + template <> struct traits< std::string > { + typedef value_category category; + static const char* type_name() { return"std::string"; } + }; + template <> struct traits_asval< std::string > { + typedef std::string value_type; + static int asval(PyObject *obj, value_type *val) { + return SWIG_AsVal_std_string (obj, val); + } + }; + template <> struct traits_from< std::string > { + typedef std::string value_type; + static PyObject *from(const value_type& val) { + return SWIG_From_std_string (val); + } + }; +} + + + namespace swig { + template <> struct traits<std::vector< std::string, std::allocator< std::string > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "std::string" "," "std::allocator< std::string >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_string_Sg__iterator(std::vector< std::string > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_std_string_Sg____nonzero__(std::vector< std::string > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_std_string_Sg____bool__(std::vector< std::string > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< std::string >::size_type std_vector_Sl_std_string_Sg____len__(std::vector< std::string > const *self){ + return self->size(); + } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< std::string,std::allocator< std::string > >()); + } +SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_1(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j,std::vector< std::string,std::allocator< std::string > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_std_string_Sg____delslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< std::string,std::allocator< std::string > >::difference_type id = i; + std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice,std::vector< std::string,std::allocator< std::string > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< std::string,std::allocator< std::string > >::difference_type id = i; + std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< std::string,std::allocator< std::string > >::difference_type id = i; + std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< std::string,std::allocator< std::string > >::difference_type id = i; + std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< std::string >::value_type const &std_vector_Sl_std_string_Sg____getitem____SWIG_1(std::vector< std::string > const *self,std::vector< std::string >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_2(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< std::string >::value_type std_vector_Sl_std_string_Sg__pop(std::vector< std::string > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< std::string,std::allocator< std::string > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_std_string_Sg__append(std::vector< std::string > *self,std::vector< std::string >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator first,std::vector< std::string >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__insert__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::size_type n,std::vector< std::string >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + template <> struct traits< CdiVariable > { + typedef pointer_category category; + static const char* type_name() { return"CdiVariable"; } + }; + } + + + namespace swig { + template <> struct traits<std::vector< CdiVariable, std::allocator< CdiVariable > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "CdiVariable" "," "std::allocator< CdiVariable >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_CdiVariable_Sg__iterator(std::vector< CdiVariable > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_CdiVariable_Sg____nonzero__(std::vector< CdiVariable > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_CdiVariable_Sg____bool__(std::vector< CdiVariable > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< CdiVariable >::size_type std_vector_Sl_CdiVariable_Sg____len__(std::vector< CdiVariable > const *self){ + return self->size(); + } +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg____getslice__(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg____setslice____SWIG_0(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< CdiVariable,std::allocator< CdiVariable > >()); + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg____setslice____SWIG_1(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::difference_type j,std::vector< CdiVariable,std::allocator< CdiVariable > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg____delslice__(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg____delitem____SWIG_0(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg____getitem____SWIG_0(std::vector< CdiVariable > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type id = i; + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg____setitem____SWIG_0(std::vector< CdiVariable > *self,PySliceObject *slice,std::vector< CdiVariable,std::allocator< CdiVariable > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type id = i; + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg____setitem____SWIG_1(std::vector< CdiVariable > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type id = i; + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg____delitem____SWIG_1(std::vector< CdiVariable > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type id = i; + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< CdiVariable >::value_type const &std_vector_Sl_CdiVariable_Sg____getitem____SWIG_1(std::vector< CdiVariable > const *self,std::vector< CdiVariable >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg____setitem____SWIG_2(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< CdiVariable >::value_type std_vector_Sl_CdiVariable_Sg__pop(std::vector< CdiVariable > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg__append(std::vector< CdiVariable > *self,std::vector< CdiVariable >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< CdiVariable >::iterator std_vector_Sl_CdiVariable_Sg__erase__SWIG_0(std::vector< CdiVariable > *self,std::vector< CdiVariable >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< CdiVariable >::iterator std_vector_Sl_CdiVariable_Sg__erase__SWIG_1(std::vector< CdiVariable > *self,std::vector< CdiVariable >::iterator first,std::vector< CdiVariable >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< CdiVariable >::iterator std_vector_Sl_CdiVariable_Sg__insert__SWIG_0(std::vector< CdiVariable > *self,std::vector< CdiVariable >::iterator pos,std::vector< CdiVariable >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg__insert__SWIG_1(std::vector< CdiVariable > *self,std::vector< CdiVariable >::iterator pos,std::vector< CdiVariable >::size_type n,std::vector< CdiVariable >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + template <class T, class U > + struct traits_asptr<std::pair<T,U> > { + typedef std::pair<T,U> value_type; + + static int get_pair(PyObject* first, PyObject* second, + std::pair<T,U> **val) + { + if (val) { + value_type *vp = (new std::pair<T,U>()); + T *pfirst = &(vp->first); + int res1 = swig::asval((PyObject*)first, pfirst); + if (!SWIG_IsOK(res1)) { + delete vp; + return res1; + } + U *psecond = &(vp->second); + int res2 = swig::asval((PyObject*)second, psecond); + if (!SWIG_IsOK(res2)) { + delete vp; + return res2; + } + *val = vp; + return SWIG_AddNewMask(res1 > res2 ? res1 : res2); + } else { + T *pfirst = 0; + int res1 = swig::asval((PyObject*)first, pfirst); + if (!SWIG_IsOK(res1)) return res1; + U *psecond = 0; + int res2 = swig::asval((PyObject*)second, psecond); + if (!SWIG_IsOK(res2)) return res2; + return res1 > res2 ? res1 : res2; + } + } + + static int asptr(PyObject *obj, std::pair<T,U> **val) { + int res = SWIG_ERROR; + if (PyTuple_Check(obj)) { + if (PyTuple_GET_SIZE(obj) == 2) { + res = get_pair(PyTuple_GET_ITEM(obj,0),PyTuple_GET_ITEM(obj,1), val); + } + } else if (PySequence_Check(obj)) { + if (PySequence_Size(obj) == 2) { + swig::SwigVar_PyObject first = PySequence_GetItem(obj,0); + swig::SwigVar_PyObject second = PySequence_GetItem(obj,1); + res = get_pair(first, second, val); + } + } else { + value_type *p = 0; + swig_type_info *descriptor = swig::type_info<value_type>(); + res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res) && val) *val = p; + } + return res; + } + }; + + + template <class T, class U > + struct traits_from<std::pair<T,U> > { + static PyObject *from(const std::pair<T,U>& val) { + PyObject* obj = PyTuple_New(2); + PyTuple_SetItem(obj,0,swig::from(val.first)); + PyTuple_SetItem(obj,1,swig::from(val.second)); + return obj; + } + }; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + namespace swig { + template <> struct traits<std::pair< std::string, CdiVariable > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "std::string" "," "CdiVariable" " >"; + } + }; + } + + + namespace swig { + template <class ValueType> + struct from_key_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v.first); + } + }; + + template <class ValueType> + struct from_value_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v.second); + } + }; + + template<class OutIterator, class FromOper, class ValueType = typename OutIterator::value_type> + struct SwigPyMapIterator_T : SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> + { + SwigPyMapIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) + : SwigPyIteratorClosed_T<OutIterator,ValueType,FromOper>(curr, first, last, seq) + { + } + }; + + + template<class OutIterator, + class FromOper = from_key_oper<typename OutIterator::value_type> > + struct SwigPyMapKeyIterator_T : SwigPyMapIterator_T<OutIterator, FromOper> + { + SwigPyMapKeyIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) + : SwigPyMapIterator_T<OutIterator, FromOper>(curr, first, last, seq) + { + } + }; + + template<typename OutIter> + inline SwigPyIterator* + make_output_key_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, PyObject *seq = 0) + { + return new SwigPyMapKeyIterator_T<OutIter>(current, begin, end, seq); + } + + template<class OutIterator, + class FromOper = from_value_oper<typename OutIterator::value_type> > + struct SwigPyMapValueIterator_T : SwigPyMapIterator_T<OutIterator, FromOper> + { + SwigPyMapValueIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) + : SwigPyMapIterator_T<OutIterator, FromOper>(curr, first, last, seq) + { + } + }; + + + template<typename OutIter> + inline SwigPyIterator* + make_output_value_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, PyObject *seq = 0) + { + return new SwigPyMapValueIterator_T<OutIter>(current, begin, end, seq); + } + } + + + namespace swig { + template <class SwigPySeq, class K, class T, class Compare, class Alloc > + inline void + assign(const SwigPySeq& swigpyseq, std::map<K,T,Compare,Alloc > *map) { + typedef typename std::map<K,T,Compare,Alloc >::value_type value_type; + typename SwigPySeq::const_iterator it = swigpyseq.begin(); + for (;it != swigpyseq.end(); ++it) { + map->insert(value_type(it->first, it->second)); + } + } + + template <class K, class T, class Compare, class Alloc> + struct traits_asptr<std::map<K,T,Compare,Alloc > > { + typedef std::map<K,T,Compare,Alloc > map_type; + static int asptr(PyObject *obj, map_type **val) { + int res = SWIG_ERROR; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (PyDict_Check(obj)) { + SwigVar_PyObject items = PyObject_CallMethod(obj,(char *)"items",NULL); +#if PY_VERSION_HEX >= 0x03000000 + /* In Python 3.x the ".items()" method returns a dict_items object */ + items = PySequence_Fast(items, ".items() didn't return a sequence!"); +#endif + res = traits_asptr_stdseq<map_type, std::pair<K, T> >::asptr(items, val); + } else { + map_type *p = 0; + swig_type_info *descriptor = swig::type_info<map_type>(); + res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res) && val) *val = p; + } + SWIG_PYTHON_THREAD_END_BLOCK; + return res; + } + }; + + template <class K, class T, class Compare, class Alloc > + struct traits_from<std::map<K,T,Compare,Alloc > > { + typedef std::map<K,T,Compare,Alloc > map_type; + typedef typename map_type::const_iterator const_iterator; + typedef typename map_type::size_type size_type; + + static PyObject *asdict(const map_type& map) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + size_type size = map.size(); + Py_ssize_t pysize = (size <= (size_type) INT_MAX) ? (Py_ssize_t) size : -1; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject *obj = PyDict_New(); + for (const_iterator i= map.begin(); i!= map.end(); ++i) { + swig::SwigVar_PyObject key = swig::from(i->first); + swig::SwigVar_PyObject val = swig::from(i->second); + PyDict_SetItem(obj, key, val); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return obj; + } + + static PyObject *from(const map_type& map) { + swig_type_info *desc = swig::type_info<map_type>(); + if (desc && desc->clientdata) { + return SWIG_InternalNewPointerObj(new map_type(map), desc, SWIG_POINTER_OWN); + } else { + return asdict(map); + } + } + }; + } + + + namespace swig { + template <> struct traits<std::map< std::string, CdiVariable, std::less< std::string >, std::allocator< std::pair< std::string const,CdiVariable > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "std::string" "," "CdiVariable" "," "std::less< std::string >" "," "std::allocator< std::pair< std::string const,CdiVariable > >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_CdiVariable_Sg__iterator(std::map< std::string,CdiVariable > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_map_Sl_std_string_Sc_CdiVariable_Sg____nonzero__(std::map< std::string,CdiVariable > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_map_Sl_std_string_Sc_CdiVariable_Sg____bool__(std::map< std::string,CdiVariable > const *self){ + return !(self->empty()); + } +SWIGINTERN std::map< std::string,CdiVariable >::size_type std_map_Sl_std_string_Sc_CdiVariable_Sg____len__(std::map< std::string,CdiVariable > const *self){ + return self->size(); + } +SWIGINTERN std::map< std::string,CdiVariable >::mapped_type const &std_map_Sl_std_string_Sc_CdiVariable_Sg____getitem__(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::key_type const &key){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->find(key); + if (i != self->end()) + return i->second; + else + throw std::out_of_range("key not found"); + } +SWIGINTERN void std_map_Sl_std_string_Sc_CdiVariable_Sg____delitem__(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::key_type const &key){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator i = self->find(key); + if (i != self->end()) + self->erase(i); + else + throw std::out_of_range("key not found"); + } +SWIGINTERN bool std_map_Sl_std_string_Sc_CdiVariable_Sg__has_key(std::map< std::string,CdiVariable > const *self,std::map< std::string,CdiVariable >::key_type const &key){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN PyObject *std_map_Sl_std_string_Sc_CdiVariable_Sg__keys(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* keyList = PyList_New(pysize); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(keyList, j, swig::from(i->first)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return keyList; + } +SWIGINTERN PyObject *std_map_Sl_std_string_Sc_CdiVariable_Sg__values(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* valList = PyList_New(pysize); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(valList, j, swig::from(i->second)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return valList; + } +SWIGINTERN PyObject *std_map_Sl_std_string_Sc_CdiVariable_Sg__items(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* itemList = PyList_New(pysize); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(itemList, j, swig::from(*i)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return itemList; + } +SWIGINTERN bool std_map_Sl_std_string_Sc_CdiVariable_Sg____contains__(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_CdiVariable_Sg__key_iterator(std::map< std::string,CdiVariable > *self,PyObject **PYTHON_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_CdiVariable_Sg__value_iterator(std::map< std::string,CdiVariable > *self,PyObject **PYTHON_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN void std_map_Sl_std_string_Sc_CdiVariable_Sg____setitem____SWIG_0(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::key_type const &key){ + self->erase(key); + } +SWIGINTERN void std_map_Sl_std_string_Sc_CdiVariable_Sg____setitem____SWIG_1(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::key_type const &key,std::map< std::string,CdiVariable >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN PyObject *std_map_Sl_std_string_Sc_CdiVariable_Sg__asdict(std::map< std::string,CdiVariable > *self){ + return swig::traits_from< std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > >::asdict(*self); + } +SWIGINTERN void std_map_Sl_std_string_Sc_CdiVariable_Sg__erase__SWIG_1(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_std_string_Sc_CdiVariable_Sg__erase__SWIG_2(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::iterator first,std::map< std::string,CdiVariable >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits<std::pair< int, CdiVariable > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "int" "," "CdiVariable" " >"; + } + }; + } + + + namespace swig { + template <> struct traits<std::map< int, CdiVariable, std::less< int >, std::allocator< std::pair< int const,CdiVariable > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "int" "," "CdiVariable" "," "std::less< int >" "," "std::allocator< std::pair< int const,CdiVariable > >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiVariable_Sg__iterator(std::map< int,CdiVariable > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiVariable_Sg____nonzero__(std::map< int,CdiVariable > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiVariable_Sg____bool__(std::map< int,CdiVariable > const *self){ + return !(self->empty()); + } +SWIGINTERN std::map< int,CdiVariable >::size_type std_map_Sl_int_Sc_CdiVariable_Sg____len__(std::map< int,CdiVariable > const *self){ + return self->size(); + } +SWIGINTERN std::map< int,CdiVariable >::mapped_type const &std_map_Sl_int_Sc_CdiVariable_Sg____getitem__(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::key_type const &key){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->find(key); + if (i != self->end()) + return i->second; + else + throw std::out_of_range("key not found"); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiVariable_Sg____delitem__(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::key_type const &key){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator i = self->find(key); + if (i != self->end()) + self->erase(i); + else + throw std::out_of_range("key not found"); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiVariable_Sg__has_key(std::map< int,CdiVariable > const *self,std::map< int,CdiVariable >::key_type const &key){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiVariable_Sg__keys(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* keyList = PyList_New(pysize); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(keyList, j, swig::from(i->first)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return keyList; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiVariable_Sg__values(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* valList = PyList_New(pysize); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(valList, j, swig::from(i->second)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return valList; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiVariable_Sg__items(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* itemList = PyList_New(pysize); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(itemList, j, swig::from(*i)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return itemList; + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiVariable_Sg____contains__(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiVariable_Sg__key_iterator(std::map< int,CdiVariable > *self,PyObject **PYTHON_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiVariable_Sg__value_iterator(std::map< int,CdiVariable > *self,PyObject **PYTHON_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiVariable_Sg____setitem____SWIG_0(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::key_type const &key){ + self->erase(key); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiVariable_Sg____setitem____SWIG_1(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::key_type const &key,std::map< int,CdiVariable >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiVariable_Sg__asdict(std::map< int,CdiVariable > *self){ + return swig::traits_from< std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > >::asdict(*self); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiVariable_Sg__erase__SWIG_1(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_int_Sc_CdiVariable_Sg__erase__SWIG_2(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::iterator first,std::map< int,CdiVariable >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits< CdiTaxis > { + typedef pointer_category category; + static const char* type_name() { return"CdiTaxis"; } + }; + } + + + namespace swig { + template <> struct traits<std::pair< int, CdiTaxis > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "int" "," "CdiTaxis" " >"; + } + }; + } + + + namespace swig { + template <> struct traits<std::map< int, CdiTaxis, std::less< int >, std::allocator< std::pair< int const,CdiTaxis > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "int" "," "CdiTaxis" "," "std::less< int >" "," "std::allocator< std::pair< int const,CdiTaxis > >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiTaxis_Sg__iterator(std::map< int,CdiTaxis > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiTaxis_Sg____nonzero__(std::map< int,CdiTaxis > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiTaxis_Sg____bool__(std::map< int,CdiTaxis > const *self){ + return !(self->empty()); + } +SWIGINTERN std::map< int,CdiTaxis >::size_type std_map_Sl_int_Sc_CdiTaxis_Sg____len__(std::map< int,CdiTaxis > const *self){ + return self->size(); + } +SWIGINTERN std::map< int,CdiTaxis >::mapped_type const &std_map_Sl_int_Sc_CdiTaxis_Sg____getitem__(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::key_type const &key){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->find(key); + if (i != self->end()) + return i->second; + else + throw std::out_of_range("key not found"); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiTaxis_Sg____delitem__(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::key_type const &key){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator i = self->find(key); + if (i != self->end()) + self->erase(i); + else + throw std::out_of_range("key not found"); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiTaxis_Sg__has_key(std::map< int,CdiTaxis > const *self,std::map< int,CdiTaxis >::key_type const &key){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiTaxis_Sg__keys(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* keyList = PyList_New(pysize); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(keyList, j, swig::from(i->first)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return keyList; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiTaxis_Sg__values(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* valList = PyList_New(pysize); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(valList, j, swig::from(i->second)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return valList; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiTaxis_Sg__items(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* itemList = PyList_New(pysize); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(itemList, j, swig::from(*i)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return itemList; + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiTaxis_Sg____contains__(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiTaxis_Sg__key_iterator(std::map< int,CdiTaxis > *self,PyObject **PYTHON_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiTaxis_Sg__value_iterator(std::map< int,CdiTaxis > *self,PyObject **PYTHON_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiTaxis_Sg____setitem____SWIG_0(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::key_type const &key){ + self->erase(key); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiTaxis_Sg____setitem____SWIG_1(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::key_type const &key,std::map< int,CdiTaxis >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiTaxis_Sg__asdict(std::map< int,CdiTaxis > *self){ + return swig::traits_from< std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > >::asdict(*self); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiTaxis_Sg__erase__SWIG_1(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_int_Sc_CdiTaxis_Sg__erase__SWIG_2(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::iterator first,std::map< int,CdiTaxis >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits< CdiZaxis > { + typedef pointer_category category; + static const char* type_name() { return"CdiZaxis"; } + }; + } + + + namespace swig { + template <> struct traits<std::pair< int, CdiZaxis > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "int" "," "CdiZaxis" " >"; + } + }; + } + + + namespace swig { + template <> struct traits<std::map< int, CdiZaxis, std::less< int >, std::allocator< std::pair< int const,CdiZaxis > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "int" "," "CdiZaxis" "," "std::less< int >" "," "std::allocator< std::pair< int const,CdiZaxis > >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiZaxis_Sg__iterator(std::map< int,CdiZaxis > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiZaxis_Sg____nonzero__(std::map< int,CdiZaxis > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiZaxis_Sg____bool__(std::map< int,CdiZaxis > const *self){ + return !(self->empty()); + } +SWIGINTERN std::map< int,CdiZaxis >::size_type std_map_Sl_int_Sc_CdiZaxis_Sg____len__(std::map< int,CdiZaxis > const *self){ + return self->size(); + } +SWIGINTERN std::map< int,CdiZaxis >::mapped_type const &std_map_Sl_int_Sc_CdiZaxis_Sg____getitem__(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::key_type const &key){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->find(key); + if (i != self->end()) + return i->second; + else + throw std::out_of_range("key not found"); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiZaxis_Sg____delitem__(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::key_type const &key){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator i = self->find(key); + if (i != self->end()) + self->erase(i); + else + throw std::out_of_range("key not found"); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiZaxis_Sg__has_key(std::map< int,CdiZaxis > const *self,std::map< int,CdiZaxis >::key_type const &key){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiZaxis_Sg__keys(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* keyList = PyList_New(pysize); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(keyList, j, swig::from(i->first)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return keyList; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiZaxis_Sg__values(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* valList = PyList_New(pysize); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(valList, j, swig::from(i->second)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return valList; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiZaxis_Sg__items(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* itemList = PyList_New(pysize); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(itemList, j, swig::from(*i)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return itemList; + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiZaxis_Sg____contains__(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiZaxis_Sg__key_iterator(std::map< int,CdiZaxis > *self,PyObject **PYTHON_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiZaxis_Sg__value_iterator(std::map< int,CdiZaxis > *self,PyObject **PYTHON_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiZaxis_Sg____setitem____SWIG_0(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::key_type const &key){ + self->erase(key); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiZaxis_Sg____setitem____SWIG_1(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::key_type const &key,std::map< int,CdiZaxis >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiZaxis_Sg__asdict(std::map< int,CdiZaxis > *self){ + return swig::traits_from< std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > >::asdict(*self); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiZaxis_Sg__erase__SWIG_1(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_int_Sc_CdiZaxis_Sg__erase__SWIG_2(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::iterator first,std::map< int,CdiZaxis >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits< CdiGrid > { + typedef pointer_category category; + static const char* type_name() { return"CdiGrid"; } + }; + } + + + namespace swig { + template <> struct traits<std::pair< int, CdiGrid > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "int" "," "CdiGrid" " >"; + } + }; + } + + + namespace swig { + template <> struct traits<std::map< int, CdiGrid, std::less< int >, std::allocator< std::pair< int const,CdiGrid > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "int" "," "CdiGrid" "," "std::less< int >" "," "std::allocator< std::pair< int const,CdiGrid > >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiGrid_Sg__iterator(std::map< int,CdiGrid > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiGrid_Sg____nonzero__(std::map< int,CdiGrid > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiGrid_Sg____bool__(std::map< int,CdiGrid > const *self){ + return !(self->empty()); + } +SWIGINTERN std::map< int,CdiGrid >::size_type std_map_Sl_int_Sc_CdiGrid_Sg____len__(std::map< int,CdiGrid > const *self){ + return self->size(); + } +SWIGINTERN std::map< int,CdiGrid >::mapped_type const &std_map_Sl_int_Sc_CdiGrid_Sg____getitem__(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::key_type const &key){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->find(key); + if (i != self->end()) + return i->second; + else + throw std::out_of_range("key not found"); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiGrid_Sg____delitem__(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::key_type const &key){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator i = self->find(key); + if (i != self->end()) + self->erase(i); + else + throw std::out_of_range("key not found"); + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiGrid_Sg__has_key(std::map< int,CdiGrid > const *self,std::map< int,CdiGrid >::key_type const &key){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiGrid_Sg__keys(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* keyList = PyList_New(pysize); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(keyList, j, swig::from(i->first)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return keyList; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiGrid_Sg__values(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* valList = PyList_New(pysize); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(valList, j, swig::from(i->second)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return valList; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiGrid_Sg__items(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* itemList = PyList_New(pysize); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(itemList, j, swig::from(*i)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return itemList; + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiGrid_Sg____contains__(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiGrid_Sg__key_iterator(std::map< int,CdiGrid > *self,PyObject **PYTHON_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_int_Sc_CdiGrid_Sg__value_iterator(std::map< int,CdiGrid > *self,PyObject **PYTHON_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiGrid_Sg____setitem____SWIG_0(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::key_type const &key){ + self->erase(key); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiGrid_Sg____setitem____SWIG_1(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::key_type const &key,std::map< int,CdiGrid >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN PyObject *std_map_Sl_int_Sc_CdiGrid_Sg__asdict(std::map< int,CdiGrid > *self){ + return swig::traits_from< std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > >::asdict(*self); + } +SWIGINTERN void std_map_Sl_int_Sc_CdiGrid_Sg__erase__SWIG_1(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_int_Sc_CdiGrid_Sg__erase__SWIG_2(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::iterator first,std::map< int,CdiGrid >::iterator last){ self->erase(first, last); } + +SWIGINTERN int +SWIG_AsVal_bool (PyObject *obj, bool *val) +{ + int r; + if (!PyBool_Check(obj)) + return SWIG_ERROR; + r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; +} + + +SWIGINTERN int +SWIG_AsCharArray(PyObject * obj, char *val, size_t size) +{ + char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; + int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); + if (SWIG_IsOK(res)) { + /* special case of single char conversion when we don't need space for NUL */ + if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; + if (csize <= size) { + if (val) { + if (csize) memcpy(val, cptr, csize*sizeof(char)); + if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); + } + if (alloc == SWIG_NEWOBJ) { + delete[] cptr; + res = SWIG_DelNewMask(res); + } + return res; + } + if (alloc == SWIG_NEWOBJ) delete[] cptr; + } + return SWIG_TypeError; +} + + +SWIGINTERN size_t +SWIG_strnlen(const char* s, size_t maxlen) +{ + const char *p; + for (p = s; maxlen-- && *p; p++) + ; + return p - s; +} + + + + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + swig::SwigPyIterator *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + try { + result = (swig::SwigPyIterator *)(arg1)->incr(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (swig::SwigPyIterator *)(arg1)->incr(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator_incr", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SwigPyIterator_incr__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_SwigPyIterator_incr__SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n" + " Possible C/C++ prototypes are:\n" + " swig::SwigPyIterator::incr(size_t)\n" + " swig::SwigPyIterator::incr()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + swig::SwigPyIterator *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + try { + result = (swig::SwigPyIterator *)(arg1)->decr(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (swig::SwigPyIterator *)(arg1)->decr(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator_decr", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SwigPyIterator_decr__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_SwigPyIterator_decr__SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n" + " Possible C/C++ prototypes are:\n" + " swig::SwigPyIterator::decr(size_t)\n" + " swig::SwigPyIterator::decr()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + ptrdiff_t result; + + if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_distance", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + try { + result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); + } catch(std::invalid_argument &_e) { + SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; + } + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_equal", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + try { + result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); + } catch(std::invalid_argument &_e) { + SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->next(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->__next__(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->previous(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + swig::SwigPyIterator *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_advance", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)(arg1)->advance(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___eq__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + PyErr_Clear(); + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___ne__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + PyErr_Clear(); + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + swig::SwigPyIterator *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___iadd__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + swig::SwigPyIterator *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___isub__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + swig::SwigPyIterator *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___add__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + PyErr_Clear(); + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + swig::SwigPyIterator *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + PyErr_Clear(); + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + ptrdiff_t result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + PyErr_Clear(); + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator___sub__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SwigPyIterator___sub____SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_SwigPyIterator___sub____SWIG_0(self, argc, argv); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_IntVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_iterator" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___bool__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)std_vector_Sl_int_Sg____bool__((std::vector< int > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___len__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + std::vector< int,std::allocator< int > > *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "IntVector___getslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + std::vector< int,std::allocator< int > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_int_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "IntVector___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector___setslice____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_IntVector___setslice____SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type)\n" + " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type,std::vector< int,std::allocator< int > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_IntVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "IntVector___delslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + try { + std_vector_Sl_int_Sg____delitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + std::vector< int,std::allocator< int > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< int,std::allocator< int > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "IntVector___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_IntVector___delitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector___delitem____SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n" + " std::vector< int >::__delitem__(PySliceObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + try { + result = (std::vector< int >::value_type *) &std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_From_int(static_cast< int >(*result)); + (void)swig::container_owner<swig::traits<std::vector< int >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "IntVector___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_IntVector___getitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector___getitem____SWIG_1(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__getitem__(PySliceObject *)\n" + " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + try { + std_vector_Sl_int_Sg____setitem____SWIG_2(arg1,arg2,(int const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "IntVector___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_IntVector___setitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_IntVector___setitem____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector___setitem____SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n" + " std::vector< int >::__setitem__(PySliceObject *)\n" + " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_IntVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + try { + result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "IntVector_append", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_append" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< int > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< int > *)new std::vector< int >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< int > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_empty" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)((std::vector< int > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_size" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "IntVector_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); + } + arg2 = reinterpret_cast< std::vector< int > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_begin" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_end" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rbegin" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rend" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< int > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< int > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); + } + arg1 = static_cast< std::vector< int >::size_type >(val1); + result = (std::vector< int > *)new std::vector< int >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< int >::iterator result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + result = std_vector_Sl_int_Sg__erase__SWIG_0(arg1,arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< int >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); + } + } + result = std_vector_Sl_int_Sg__erase__SWIG_1(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "IntVector_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_IntVector_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_IntVector_erase__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::erase(std::vector< int >::iterator)\n" + " std::vector< int >::erase(std::vector< int >::iterator,std::vector< int >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int >::size_type arg1 ; + std::vector< int >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::vector< int > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); + } + arg1 = static_cast< std::vector< int >::size_type >(val1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVector" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_IntVector(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_IntVector", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_IntVector__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_IntVector__SWIG_2(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_IntVector__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_IntVector__SWIG_3(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_IntVector'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::vector()\n" + " std::vector< int >::vector(std::vector< int > const &)\n" + " std::vector< int >::vector(std::vector< int >::size_type)\n" + " std::vector< int >::vector(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_IntVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "IntVector_push_back", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + (arg1)->push_back((std::vector< int >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_front" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front(); + resultobj = SWIG_From_int(static_cast< int >(*result)); + (void)swig::container_owner<swig::traits<std::vector< int >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_back" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back(); + resultobj = SWIG_From_int(static_cast< int >(*result)); + (void)swig::container_owner<swig::traits<std::vector< int >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "IntVector_assign", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_assign" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "IntVector_resize", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector_resize__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector_resize__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::resize(std::vector< int >::size_type)\n" + " std::vector< int >::resize(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + std::vector< int >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + result = std_vector_Sl_int_Sg__insert__SWIG_0(arg1,arg2,(int const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::size_type arg3 ; + std::vector< int >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< int >::value_type temp4 ; + int val4 ; + int ecode4 = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'"); + } + arg3 = static_cast< std::vector< int >::size_type >(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IntVector_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'"); + } + temp4 = static_cast< std::vector< int >::value_type >(val4); + arg4 = &temp4; + std_vector_Sl_int_Sg__insert__SWIG_1(arg1,arg2,arg3,(int const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "IntVector_insert", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector_insert__SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector_insert__SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::value_type const &)\n" + " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_IntVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "IntVector_reserve", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_reserve" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IntVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *IntVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *IntVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_DoubleVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_iterator" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_double_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___nonzero__" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (bool)std_vector_Sl_double_Sg____nonzero__((std::vector< double > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___bool__" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (bool)std_vector_Sl_double_Sg____bool__((std::vector< double > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___len__" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = std_vector_Sl_double_Sg____len__((std::vector< double > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleVector___getslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___getslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + try { + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + try { + std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + std::vector< double,std::allocator< double > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_double_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleVector___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector___setslice____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleVector___setslice____SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type)\n" + " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type,std::vector< double,std::allocator< double > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleVector___delslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___delslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + try { + std_vector_Sl_double_Sg____delslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + try { + std_vector_Sl_double_Sg____delitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + std::vector< double,std::allocator< double > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_double_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleVector___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_DoubleVector___delitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector___delitem____SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::__delitem__(std::vector< double >::difference_type)\n" + " std::vector< double >::__delitem__(PySliceObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + try { + result = (std::vector< double >::value_type *) &std_vector_Sl_double_Sg____getitem____SWIG_1((std::vector< double > const *)arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_From_double(static_cast< double >(*result)); + (void)swig::container_owner<swig::traits<std::vector< double >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleVector___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_DoubleVector___getitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector___getitem____SWIG_1(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::__getitem__(PySliceObject *)\n" + " std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + try { + std_vector_Sl_double_Sg____setitem____SWIG_2(arg1,arg2,(double const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleVector___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_DoubleVector___setitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleVector___setitem____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector___setitem____SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n" + " std::vector< double >::__setitem__(PySliceObject *)\n" + " std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::value_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + try { + result = (std::vector< double >::value_type)std_vector_Sl_double_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleVector_append", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_append" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_append" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + std_vector_Sl_double_Sg__append(arg1,(double const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< double > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< double > *)new std::vector< double >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< double > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_empty" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (bool)((std::vector< double > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_size" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleVector_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_swap" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); + } + arg2 = reinterpret_cast< std::vector< double > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_begin" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_end" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rbegin" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rend" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< double > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_get_allocator" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< double >::allocator_type(static_cast< const std::vector< double >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_double_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< double > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'"); + } + arg1 = static_cast< std::vector< double >::size_type >(val1); + result = (std::vector< double > *)new std::vector< double >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop_back" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< double >::iterator result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } + } + result = std_vector_Sl_double_Sg__erase__SWIG_0(arg1,arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< double >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'"); + } + } + result = std_vector_Sl_double_Sg__erase__SWIG_1(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleVector_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_DoubleVector_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_DoubleVector_erase__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::erase(std::vector< double >::iterator)\n" + " std::vector< double >::erase(std::vector< double >::iterator,std::vector< double >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double >::size_type arg1 ; + std::vector< double >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + std::vector< double > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'"); + } + arg1 = static_cast< std::vector< double >::size_type >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DoubleVector" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< double > *)new std::vector< double >(arg1,(std::vector< double >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleVector(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_DoubleVector", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_DoubleVector__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DoubleVector__SWIG_2(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_DoubleVector__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DoubleVector__SWIG_3(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_DoubleVector'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::vector()\n" + " std::vector< double >::vector(std::vector< double > const &)\n" + " std::vector< double >::vector(std::vector< double >::size_type)\n" + " std::vector< double >::vector(std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleVector_push_back", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_push_back" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + (arg1)->push_back((std::vector< double >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_front" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->front(); + resultobj = SWIG_From_double(static_cast< double >(*result)); + (void)swig::container_owner<swig::traits<std::vector< double >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_back" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->back(); + resultobj = SWIG_From_double(static_cast< double >(*result)); + (void)swig::container_owner<swig::traits<std::vector< double >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleVector_assign", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_assign" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_assign" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_assign" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(arg2,(std::vector< double >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_resize" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(arg2,(std::vector< double >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleVector_resize", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector_resize__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector_resize__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::resize(std::vector< double >::size_type)\n" + " std::vector< double >::resize(std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + std::vector< double >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + result = std_vector_Sl_double_Sg__insert__SWIG_0(arg1,arg2,(double const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::size_type arg3 ; + std::vector< double >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< double >::value_type temp4 ; + double val4 ; + int ecode4 = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::size_type""'"); + } + arg3 = static_cast< std::vector< double >::size_type >(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DoubleVector_insert" "', argument " "4"" of type '" "std::vector< double >::value_type""'"); + } + temp4 = static_cast< std::vector< double >::value_type >(val4); + arg4 = &temp4; + std_vector_Sl_double_Sg__insert__SWIG_1(arg1,arg2,arg3,(double const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleVector_insert", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector_insert__SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector_insert__SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::value_type const &)\n" + " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleVector_reserve", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_reserve" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_reserve" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_capacity" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *DoubleVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_iterator" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_std_vector_Sl_double_Sg__Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___nonzero__" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (bool)std_vector_Sl_std_vector_Sl_double_Sg__Sg____nonzero__((std::vector< std::vector< double > > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___bool__" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (bool)std_vector_Sl_std_vector_Sl_double_Sg__Sg____bool__((std::vector< std::vector< double > > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___len__" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg____len__((std::vector< std::vector< double > > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleDoubleVector___getslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___getslice__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector___getslice__" "', argument " "2"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleDoubleVector___getslice__" "', argument " "3"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg3 = static_cast< std::vector< std::vector< double > >::difference_type >(val3); + try { + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg____getslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleDoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg3 = static_cast< std::vector< std::vector< double > >::difference_type >(val3); + try { + std_vector_Sl_std_vector_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::difference_type arg3 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleDoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg3 = static_cast< std::vector< std::vector< double > >::difference_type >(val3); + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DoubleDoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_std_vector_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleDoubleVector___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleDoubleVector___setslice____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector___setslice____SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleDoubleVector___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::vector< double > >::__setslice__(std::vector< std::vector< double > >::difference_type,std::vector< std::vector< double > >::difference_type)\n" + " std::vector< std::vector< double > >::__setslice__(std::vector< std::vector< double > >::difference_type,std::vector< std::vector< double > >::difference_type,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleDoubleVector___delslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___delslice__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector___delslice__" "', argument " "2"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleDoubleVector___delslice__" "', argument " "3"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg3 = static_cast< std::vector< std::vector< double > >::difference_type >(val3); + try { + std_vector_Sl_std_vector_Sl_double_Sg__Sg____delslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector___delitem__" "', argument " "2"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + try { + std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleDoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleDoubleVector___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_DoubleDoubleVector___delitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleDoubleVector___delitem____SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleDoubleVector___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::vector< double > >::__delitem__(std::vector< std::vector< double > >::difference_type)\n" + " std::vector< std::vector< double > >::__delitem__(PySliceObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< std::vector< double > >::value_type *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector___getitem__" "', argument " "2"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + try { + result = (std::vector< std::vector< double > >::value_type *) &std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< std::vector< double > > const *)arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(*result)); + (void)swig::container_owner<swig::traits<std::vector< std::vector< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleDoubleVector___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_DoubleDoubleVector___getitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleDoubleVector___getitem____SWIG_1(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleDoubleVector___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::vector< double > >::__getitem__(PySliceObject *)\n" + " std::vector< std::vector< double > >::__getitem__(std::vector< std::vector< double > >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector___setitem__" "', argument " "2"" of type '" "std::vector< std::vector< double > >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleDoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleDoubleVector___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_DoubleDoubleVector___setitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector___setitem____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector___setitem____SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleDoubleVector___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::vector< double > >::__setitem__(PySliceObject *,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n" + " std::vector< std::vector< double > >::__setitem__(PySliceObject *)\n" + " std::vector< std::vector< double > >::__setitem__(std::vector< std::vector< double > >::difference_type,std::vector< std::vector< double > >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::value_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_pop" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + try { + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleDoubleVector_append", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_append" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res2 = swig::asptr(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleDoubleVector_append" "', argument " "2"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector_append" "', argument " "2"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + arg2 = ptr; + } + std_vector_Sl_std_vector_Sl_double_Sg__Sg__append(arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleDoubleVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< std::vector< double > > *)new std::vector< std::vector< double > >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleDoubleVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double,std::allocator< double > > > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< std::vector< double > > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleDoubleVector" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleDoubleVector" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > > > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< std::vector< double > > *)new std::vector< std::vector< double > >((std::vector< std::vector< double,std::allocator< double > > > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_empty" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (bool)((std::vector< std::vector< double > > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_size" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = ((std::vector< std::vector< double > > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double,std::allocator< double > > > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleDoubleVector_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleDoubleVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< double,std::allocator< double > > > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< double,std::allocator< double > > > &""'"); + } + arg2 = reinterpret_cast< std::vector< std::vector< double,std::allocator< double > > > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_begin" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_end" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_rbegin" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< double > >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_rend" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< double > >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::vector< double,std::allocator< double > > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_get_allocator" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = ((std::vector< std::vector< double > > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< std::vector< double > >::allocator_type(static_cast< const std::vector< std::vector< double > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleDoubleVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< std::vector< double > > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleDoubleVector" "', argument " "1"" of type '" "std::vector< std::vector< double > >::size_type""'"); + } + arg1 = static_cast< std::vector< std::vector< double > >::size_type >(val1); + result = (std::vector< std::vector< double > > *)new std::vector< std::vector< double > >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_pop_back" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector_resize" "', argument " "2"" of type '" "std::vector< std::vector< double > >::size_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< std::vector< double > >::iterator result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_erase" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_erase" "', argument " "2"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_erase" "', argument " "2"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } + } + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_0(arg1,arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::iterator arg2 ; + std::vector< std::vector< double > >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< std::vector< double > >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_erase" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_erase" "', argument " "2"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_erase" "', argument " "2"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_erase" "', argument " "3"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_erase" "', argument " "3"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } + } + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_1(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleDoubleVector_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_DoubleDoubleVector_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_DoubleDoubleVector_erase__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleDoubleVector_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::vector< double > >::erase(std::vector< std::vector< double > >::iterator)\n" + " std::vector< std::vector< double > >::erase(std::vector< std::vector< double > >::iterator,std::vector< std::vector< double > >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleDoubleVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > >::size_type arg1 ; + std::vector< std::vector< double > >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::vector< std::vector< double > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleDoubleVector" "', argument " "1"" of type '" "std::vector< std::vector< double > >::size_type""'"); + } + arg1 = static_cast< std::vector< std::vector< double > >::size_type >(val1); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res2 = swig::asptr(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DoubleDoubleVector" "', argument " "2"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleDoubleVector" "', argument " "2"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + arg2 = ptr; + } + result = (std::vector< std::vector< double > > *)new std::vector< std::vector< double > >(arg1,(std::vector< std::vector< double > >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DoubleDoubleVector(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_DoubleDoubleVector", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_DoubleDoubleVector__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DoubleDoubleVector__SWIG_2(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_DoubleDoubleVector__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[1], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_DoubleDoubleVector__SWIG_3(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_DoubleDoubleVector'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::vector< double > >::vector()\n" + " std::vector< std::vector< double > >::vector(std::vector< std::vector< double,std::allocator< double > > > const &)\n" + " std::vector< std::vector< double > >::vector(std::vector< std::vector< double > >::size_type)\n" + " std::vector< std::vector< double > >::vector(std::vector< std::vector< double > >::size_type,std::vector< std::vector< double > >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleDoubleVector_push_back", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res2 = swig::asptr(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleDoubleVector_push_back" "', argument " "2"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector_push_back" "', argument " "2"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + arg2 = ptr; + } + (arg1)->push_back((std::vector< std::vector< double > >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_front" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double > >::value_type *) &((std::vector< std::vector< double > > const *)arg1)->front(); + resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(*result)); + (void)swig::container_owner<swig::traits<std::vector< std::vector< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_back" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double > >::value_type *) &((std::vector< std::vector< double > > const *)arg1)->back(); + resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(*result)); + (void)swig::container_owner<swig::traits<std::vector< std::vector< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::size_type arg2 ; + std::vector< std::vector< double > >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleDoubleVector_assign", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_assign" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector_assign" "', argument " "2"" of type '" "std::vector< std::vector< double > >::size_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::size_type >(val2); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleDoubleVector_assign" "', argument " "3"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector_assign" "', argument " "3"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + arg3 = ptr; + } + (arg1)->assign(arg2,(std::vector< std::vector< double > >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::size_type arg2 ; + std::vector< std::vector< double > >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector_resize" "', argument " "2"" of type '" "std::vector< std::vector< double > >::size_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::size_type >(val2); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleDoubleVector_resize" "', argument " "3"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector_resize" "', argument " "3"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + arg3 = ptr; + } + (arg1)->resize(arg2,(std::vector< std::vector< double > >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleDoubleVector_resize", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleDoubleVector_resize__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector_resize__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleDoubleVector_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::vector< double > >::resize(std::vector< std::vector< double > >::size_type)\n" + " std::vector< std::vector< double > >::resize(std::vector< std::vector< double > >::size_type,std::vector< std::vector< double > >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::iterator arg2 ; + std::vector< std::vector< double > >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + int res3 = SWIG_OLDOBJ ; + std::vector< std::vector< double > >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_insert" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_insert" "', argument " "2"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_insert" "', argument " "2"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } + } + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleDoubleVector_insert" "', argument " "3"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector_insert" "', argument " "3"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + arg3 = ptr; + } + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_0(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::iterator arg2 ; + std::vector< std::vector< double > >::size_type arg3 ; + std::vector< std::vector< double > >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_insert" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_insert" "', argument " "2"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleDoubleVector_insert" "', argument " "2"" of type '" "std::vector< std::vector< double > >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleDoubleVector_insert" "', argument " "3"" of type '" "std::vector< std::vector< double > >::size_type""'"); + } + arg3 = static_cast< std::vector< std::vector< double > >::size_type >(val3); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DoubleDoubleVector_insert" "', argument " "4"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleDoubleVector_insert" "', argument " "4"" of type '" "std::vector< std::vector< double > >::value_type const &""'"); + } + arg4 = ptr; + } + std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_1(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "DoubleDoubleVector_insert", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector_insert__SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector_insert__SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleDoubleVector_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::vector< double > >::insert(std::vector< std::vector< double > >::iterator,std::vector< std::vector< double > >::value_type const &)\n" + " std::vector< std::vector< double > >::insert(std::vector< std::vector< double > >::iterator,std::vector< std::vector< double > >::size_type,std::vector< std::vector< double > >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "DoubleDoubleVector_reserve", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_reserve" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleDoubleVector_reserve" "', argument " "2"" of type '" "std::vector< std::vector< double > >::size_type""'"); + } + arg2 = static_cast< std::vector< std::vector< double > >::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DoubleDoubleVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double > >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleDoubleVector_capacity" "', argument " "1"" of type '" "std::vector< std::vector< double > > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = ((std::vector< std::vector< double > > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_DoubleDoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleDoubleVector" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DoubleDoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *DoubleDoubleVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_StringVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_iterator" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_std_string_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___nonzero__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (bool)std_vector_Sl_std_string_Sg____nonzero__((std::vector< std::string > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___bool__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (bool)std_vector_Sl_std_string_Sg____bool__((std::vector< std::string > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___len__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = std_vector_Sl_std_string_Sg____len__((std::vector< std::string > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "StringVector___getslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___getslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___getslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector___getslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg3 = static_cast< std::vector< std::string >::difference_type >(val3); + try { + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___setslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector___setslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg3 = static_cast< std::vector< std::string >::difference_type >(val3); + try { + std_vector_Sl_std_string_Sg____setslice____SWIG_0(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::difference_type arg3 ; + std::vector< std::string,std::allocator< std::string > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___setslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector___setslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg3 = static_cast< std::vector< std::string >::difference_type >(val3); + { + std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "StringVector___setslice__" "', argument " "4"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector___setslice__" "', argument " "4"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_std_string_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< std::string,std::allocator< std::string > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StringVector___setslice____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector___setslice____SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::string >::__setslice__(std::vector< std::string >::difference_type,std::vector< std::string >::difference_type)\n" + " std::vector< std::string >::__setslice__(std::vector< std::string >::difference_type,std::vector< std::string >::difference_type,std::vector< std::string,std::allocator< std::string > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_StringVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "StringVector___delslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___delslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___delslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector___delslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg3 = static_cast< std::vector< std::string >::difference_type >(val3); + try { + std_vector_Sl_std_string_Sg____delslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___delitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___delitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + try { + std_vector_Sl_std_string_Sg____delitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___getitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + std::vector< std::string,std::allocator< std::string > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + { + std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector___setitem__" "', argument " "3"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector___setitem__" "', argument " "3"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_std_string_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< std::string,std::allocator< std::string > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_std_string_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___delitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_std_string_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_StringVector___delitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StringVector___delitem____SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::string >::__delitem__(std::vector< std::string >::difference_type)\n" + " std::vector< std::string >::__delitem__(PySliceObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_StringVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< std::string >::value_type *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___getitem__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___getitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + try { + result = (std::vector< std::string >::value_type *) &std_vector_Sl_std_string_Sg____getitem____SWIG_1((std::vector< std::string > const *)arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + (void)swig::container_owner<swig::traits<std::vector< std::string >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_StringVector___getitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StringVector___getitem____SWIG_1(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::string >::__getitem__(PySliceObject *)\n" + " std::vector< std::string >::__getitem__(std::vector< std::string >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_StringVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector___setitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'"); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector___setitem__" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector___setitem__" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_std_string_Sg____setitem____SWIG_2(arg1,arg2,(std::string const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_StringVector___setitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector___setitem____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector___setitem____SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::string >::__setitem__(PySliceObject *,std::vector< std::string,std::allocator< std::string > > const &)\n" + " std::vector< std::string >::__setitem__(PySliceObject *)\n" + " std::vector< std::string >::__setitem__(std::vector< std::string >::difference_type,std::vector< std::string >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_StringVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::value_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_pop" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + try { + result = std_vector_Sl_std_string_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "StringVector_append", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_append" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVector_append" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_append" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); + } + arg2 = ptr; + } + std_vector_Sl_std_string_Sg__append(arg1,(std::string const &)*arg2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StringVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< std::string > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< std::string > *)new std::vector< std::string >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StringVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< std::string > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringVector" "', argument " "1"" of type '" "std::vector< std::string > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringVector" "', argument " "1"" of type '" "std::vector< std::string > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< std::string > *)new std::vector< std::string >((std::vector< std::string > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_empty" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (bool)((std::vector< std::string > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_size" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = ((std::vector< std::string > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "StringVector_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_swap" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVector_swap" "', argument " "2"" of type '" "std::vector< std::string > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_swap" "', argument " "2"" of type '" "std::vector< std::string > &""'"); + } + arg2 = reinterpret_cast< std::vector< std::string > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_begin" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_end" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_rbegin" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_rend" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_clear" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::string > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_get_allocator" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = ((std::vector< std::string > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< std::string >::allocator_type(static_cast< const std::vector< std::string >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__string_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StringVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< std::string > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringVector" "', argument " "1"" of type '" "std::vector< std::string >::size_type""'"); + } + arg1 = static_cast< std::vector< std::string >::size_type >(val1); + result = (std::vector< std::string > *)new std::vector< std::string >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_pop_back" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_resize" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_resize" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'"); + } + arg2 = static_cast< std::vector< std::string >::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< std::string >::iterator result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_erase" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); + } + } + result = std_vector_Sl_std_string_Sg__erase__SWIG_0(arg1,arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::iterator arg2 ; + std::vector< std::string >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< std::string >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_erase" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "3"" of type '" "std::vector< std::string >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_erase" "', argument " "3"" of type '" "std::vector< std::string >::iterator""'"); + } + } + result = std_vector_Sl_std_string_Sg__erase__SWIG_1(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_StringVector_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_StringVector_erase__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::string >::erase(std::vector< std::string >::iterator)\n" + " std::vector< std::string >::erase(std::vector< std::string >::iterator,std::vector< std::string >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_StringVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string >::size_type arg1 ; + std::vector< std::string >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::vector< std::string > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringVector" "', argument " "1"" of type '" "std::vector< std::string >::size_type""'"); + } + arg1 = static_cast< std::vector< std::string >::size_type >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StringVector" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringVector" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); + } + arg2 = ptr; + } + result = (std::vector< std::string > *)new std::vector< std::string >(arg1,(std::vector< std::string >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StringVector(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_StringVector", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_StringVector__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_StringVector__SWIG_2(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StringVector__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StringVector__SWIG_3(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_StringVector'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::string >::vector()\n" + " std::vector< std::string >::vector(std::vector< std::string > const &)\n" + " std::vector< std::string >::vector(std::vector< std::string >::size_type)\n" + " std::vector< std::string >::vector(std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_StringVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "StringVector_push_back", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_push_back" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVector_push_back" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_push_back" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); + } + arg2 = ptr; + } + (arg1)->push_back((std::vector< std::string >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_front" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string >::value_type *) &((std::vector< std::string > const *)arg1)->front(); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + (void)swig::container_owner<swig::traits<std::vector< std::string >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_back" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string >::value_type *) &((std::vector< std::string > const *)arg1)->back(); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + (void)swig::container_owner<swig::traits<std::vector< std::string >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::size_type arg2 ; + std::vector< std::string >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "StringVector_assign", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_assign" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_assign" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'"); + } + arg2 = static_cast< std::vector< std::string >::size_type >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector_assign" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_assign" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); + } + arg3 = ptr; + } + (arg1)->assign(arg2,(std::vector< std::string >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::size_type arg2 ; + std::vector< std::string >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_resize" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_resize" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'"); + } + arg2 = static_cast< std::vector< std::string >::size_type >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector_resize" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_resize" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); + } + arg3 = ptr; + } + (arg1)->resize(arg2,(std::vector< std::string >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector_resize", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StringVector_resize__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector_resize__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::string >::resize(std::vector< std::string >::size_type)\n" + " std::vector< std::string >::resize(std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_StringVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::iterator arg2 ; + std::vector< std::string >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + int res3 = SWIG_OLDOBJ ; + std::vector< std::string >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_insert" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVector_insert" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_insert" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); + } + arg3 = ptr; + } + result = std_vector_Sl_std_string_Sg__insert__SWIG_0(arg1,arg2,(std::string const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::iterator arg2 ; + std::vector< std::string >::size_type arg3 ; + std::vector< std::string >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_insert" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVector_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVector_insert" "', argument " "3"" of type '" "std::vector< std::string >::size_type""'"); + } + arg3 = static_cast< std::vector< std::string >::size_type >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "StringVector_insert" "', argument " "4"" of type '" "std::vector< std::string >::value_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVector_insert" "', argument " "4"" of type '" "std::vector< std::string >::value_type const &""'"); + } + arg4 = ptr; + } + std_vector_Sl_std_string_Sg__insert__SWIG_1(arg1,arg2,arg3,(std::string const &)*arg4); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "StringVector_insert", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector_insert__SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector_insert__SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'StringVector_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< std::string >::insert(std::vector< std::string >::iterator,std::vector< std::string >::value_type const &)\n" + " std::vector< std::string >::insert(std::vector< std::string >::iterator,std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_StringVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "StringVector_reserve", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_reserve" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_reserve" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'"); + } + arg2 = static_cast< std::vector< std::string >::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StringVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_capacity" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = ((std::vector< std::string > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StringVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringVector" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StringVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *StringVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_VarsVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_iterator" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_CdiVariable_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___nonzero__" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (bool)std_vector_Sl_CdiVariable_Sg____nonzero__((std::vector< CdiVariable > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___bool__" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (bool)std_vector_Sl_CdiVariable_Sg____bool__((std::vector< CdiVariable > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___len__" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = std_vector_Sl_CdiVariable_Sg____len__((std::vector< CdiVariable > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "VarsVector___getslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___getslice__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector___getslice__" "', argument " "2"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VarsVector___getslice__" "', argument " "3"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg3 = static_cast< std::vector< CdiVariable >::difference_type >(val3); + try { + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg____getslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___setslice__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector___setslice__" "', argument " "2"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VarsVector___setslice__" "', argument " "3"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg3 = static_cast< std::vector< CdiVariable >::difference_type >(val3); + try { + std_vector_Sl_CdiVariable_Sg____setslice____SWIG_0(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::difference_type arg3 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___setslice__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector___setslice__" "', argument " "2"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VarsVector___setslice__" "', argument " "3"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg3 = static_cast< std::vector< CdiVariable >::difference_type >(val3); + { + std::vector< CdiVariable,std::allocator< CdiVariable > > *ptr = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VarsVector___setslice__" "', argument " "4"" of type '" "std::vector< CdiVariable,std::allocator< CdiVariable > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector___setslice__" "', argument " "4"" of type '" "std::vector< CdiVariable,std::allocator< CdiVariable > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_CdiVariable_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< CdiVariable,std::allocator< CdiVariable > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsVector___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsVector___setslice____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector___setslice____SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsVector___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< CdiVariable >::__setslice__(std::vector< CdiVariable >::difference_type,std::vector< CdiVariable >::difference_type)\n" + " std::vector< CdiVariable >::__setslice__(std::vector< CdiVariable >::difference_type,std::vector< CdiVariable >::difference_type,std::vector< CdiVariable,std::allocator< CdiVariable > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsVector___delslice__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___delslice__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector___delslice__" "', argument " "2"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VarsVector___delslice__" "', argument " "3"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg3 = static_cast< std::vector< CdiVariable >::difference_type >(val3); + try { + std_vector_Sl_CdiVariable_Sg____delslice__(arg1,arg2,arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___delitem__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector___delitem__" "', argument " "2"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + try { + std_vector_Sl_CdiVariable_Sg____delitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___getitem__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___setitem__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + { + std::vector< CdiVariable,std::allocator< CdiVariable > > *ptr = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VarsVector___setitem__" "', argument " "3"" of type '" "std::vector< CdiVariable,std::allocator< CdiVariable > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector___setitem__" "', argument " "3"" of type '" "std::vector< CdiVariable,std::allocator< CdiVariable > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_CdiVariable_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< CdiVariable,std::allocator< CdiVariable > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___setitem__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_CdiVariable_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___delitem__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_CdiVariable_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsVector___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_VarsVector___delitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsVector___delitem____SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsVector___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< CdiVariable >::__delitem__(std::vector< CdiVariable >::difference_type)\n" + " std::vector< CdiVariable >::__delitem__(PySliceObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< CdiVariable >::value_type *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___getitem__" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector___getitem__" "', argument " "2"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + try { + result = (std::vector< CdiVariable >::value_type *) &std_vector_Sl_CdiVariable_Sg____getitem____SWIG_1((std::vector< CdiVariable > const *)arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, 0 | 0 ); + (void)swig::container_owner<swig::traits<std::vector< CdiVariable >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsVector___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_VarsVector___getitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsVector___getitem____SWIG_1(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsVector___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< CdiVariable >::__getitem__(PySliceObject *)\n" + " std::vector< CdiVariable >::__getitem__(std::vector< CdiVariable >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector___setitem__" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector___setitem__" "', argument " "2"" of type '" "std::vector< CdiVariable >::difference_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VarsVector___setitem__" "', argument " "3"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector___setitem__" "', argument " "3"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp3); + try { + std_vector_Sl_CdiVariable_Sg____setitem____SWIG_2(arg1,arg2,(CdiVariable const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsVector___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + return _wrap_VarsVector___setitem____SWIG_1(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + _v = PySlice_Check(argv[1]); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector___setitem____SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector___setitem____SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsVector___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< CdiVariable >::__setitem__(PySliceObject *,std::vector< CdiVariable,std::allocator< CdiVariable > > const &)\n" + " std::vector< CdiVariable >::__setitem__(PySliceObject *)\n" + " std::vector< CdiVariable >::__setitem__(std::vector< CdiVariable >::difference_type,std::vector< CdiVariable >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::value_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_pop" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + try { + result = std_vector_Sl_CdiVariable_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj((new std::vector< CdiVariable >::value_type(static_cast< const std::vector< CdiVariable >::value_type& >(result))), SWIGTYPE_p_CdiVariable, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsVector_append", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_append" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsVector_append" "', argument " "2"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector_append" "', argument " "2"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp2); + std_vector_Sl_CdiVariable_Sg__append(arg1,(CdiVariable const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< CdiVariable > *)new std::vector< CdiVariable >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< CdiVariable > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< CdiVariable,std::allocator< CdiVariable > > *ptr = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VarsVector" "', argument " "1"" of type '" "std::vector< CdiVariable > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarsVector" "', argument " "1"" of type '" "std::vector< CdiVariable > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< CdiVariable > *)new std::vector< CdiVariable >((std::vector< CdiVariable > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_empty" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (bool)((std::vector< CdiVariable > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_size" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = ((std::vector< CdiVariable > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsVector_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_swap" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsVector_swap" "', argument " "2"" of type '" "std::vector< CdiVariable > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector_swap" "', argument " "2"" of type '" "std::vector< CdiVariable > &""'"); + } + arg2 = reinterpret_cast< std::vector< CdiVariable > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_begin" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_end" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_rbegin" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< CdiVariable >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_rend" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< CdiVariable >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_clear" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< CdiVariable > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_get_allocator" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = ((std::vector< CdiVariable > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< CdiVariable >::allocator_type(static_cast< const std::vector< CdiVariable >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_CdiVariable_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< CdiVariable > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VarsVector" "', argument " "1"" of type '" "std::vector< CdiVariable >::size_type""'"); + } + arg1 = static_cast< std::vector< CdiVariable >::size_type >(val1); + result = (std::vector< CdiVariable > *)new std::vector< CdiVariable >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_pop_back" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_resize" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector_resize" "', argument " "2"" of type '" "std::vector< CdiVariable >::size_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< CdiVariable >::iterator result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_erase" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_erase" "', argument " "2"" of type '" "std::vector< CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_erase" "', argument " "2"" of type '" "std::vector< CdiVariable >::iterator""'"); + } + } + result = std_vector_Sl_CdiVariable_Sg__erase__SWIG_0(arg1,arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::iterator arg2 ; + std::vector< CdiVariable >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< CdiVariable >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_erase" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_erase" "', argument " "2"" of type '" "std::vector< CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_erase" "', argument " "2"" of type '" "std::vector< CdiVariable >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_erase" "', argument " "3"" of type '" "std::vector< CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_erase" "', argument " "3"" of type '" "std::vector< CdiVariable >::iterator""'"); + } + } + result = std_vector_Sl_CdiVariable_Sg__erase__SWIG_1(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsVector_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_VarsVector_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_VarsVector_erase__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsVector_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< CdiVariable >::erase(std::vector< CdiVariable >::iterator)\n" + " std::vector< CdiVariable >::erase(std::vector< CdiVariable >::iterator,std::vector< CdiVariable >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_VarsVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable >::size_type arg1 ; + std::vector< CdiVariable >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::vector< CdiVariable > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VarsVector" "', argument " "1"" of type '" "std::vector< CdiVariable >::size_type""'"); + } + arg1 = static_cast< std::vector< CdiVariable >::size_type >(val1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VarsVector" "', argument " "2"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarsVector" "', argument " "2"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp2); + result = (std::vector< CdiVariable > *)new std::vector< CdiVariable >(arg1,(std::vector< CdiVariable >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsVector(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_VarsVector", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_VarsVector__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_VarsVector__SWIG_2(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsVector__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsVector__SWIG_3(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_VarsVector'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< CdiVariable >::vector()\n" + " std::vector< CdiVariable >::vector(std::vector< CdiVariable > const &)\n" + " std::vector< CdiVariable >::vector(std::vector< CdiVariable >::size_type)\n" + " std::vector< CdiVariable >::vector(std::vector< CdiVariable >::size_type,std::vector< CdiVariable >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsVector_push_back", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_push_back" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsVector_push_back" "', argument " "2"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector_push_back" "', argument " "2"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp2); + (arg1)->push_back((std::vector< CdiVariable >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_front" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable >::value_type *) &((std::vector< CdiVariable > const *)arg1)->front(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, 0 | 0 ); + (void)swig::container_owner<swig::traits<std::vector< CdiVariable >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_back" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable >::value_type *) &((std::vector< CdiVariable > const *)arg1)->back(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, 0 | 0 ); + (void)swig::container_owner<swig::traits<std::vector< CdiVariable >::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::size_type arg2 ; + std::vector< CdiVariable >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsVector_assign", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_assign" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector_assign" "', argument " "2"" of type '" "std::vector< CdiVariable >::size_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::size_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VarsVector_assign" "', argument " "3"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector_assign" "', argument " "3"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp3); + (arg1)->assign(arg2,(std::vector< CdiVariable >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::size_type arg2 ; + std::vector< CdiVariable >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_resize" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector_resize" "', argument " "2"" of type '" "std::vector< CdiVariable >::size_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::size_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VarsVector_resize" "', argument " "3"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector_resize" "', argument " "3"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp3); + (arg1)->resize(arg2,(std::vector< CdiVariable >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsVector_resize", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsVector_resize__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector_resize__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsVector_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< CdiVariable >::resize(std::vector< CdiVariable >::size_type)\n" + " std::vector< CdiVariable >::resize(std::vector< CdiVariable >::size_type,std::vector< CdiVariable >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::iterator arg2 ; + std::vector< CdiVariable >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + std::vector< CdiVariable >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_insert" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_insert" "', argument " "2"" of type '" "std::vector< CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_insert" "', argument " "2"" of type '" "std::vector< CdiVariable >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VarsVector_insert" "', argument " "3"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector_insert" "', argument " "3"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp3); + result = std_vector_Sl_CdiVariable_Sg__insert__SWIG_0(arg1,arg2,(CdiVariable const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::iterator arg2 ; + std::vector< CdiVariable >::size_type arg3 ; + std::vector< CdiVariable >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_insert" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_insert" "', argument " "2"" of type '" "std::vector< CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsVector_insert" "', argument " "2"" of type '" "std::vector< CdiVariable >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VarsVector_insert" "', argument " "3"" of type '" "std::vector< CdiVariable >::size_type""'"); + } + arg3 = static_cast< std::vector< CdiVariable >::size_type >(val3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VarsVector_insert" "', argument " "4"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsVector_insert" "', argument " "4"" of type '" "std::vector< CdiVariable >::value_type const &""'"); + } + arg4 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp4); + std_vector_Sl_CdiVariable_Sg__insert__SWIG_1(arg1,arg2,arg3,(CdiVariable const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsVector_insert", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector_insert__SWIG_0(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector_insert__SWIG_1(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsVector_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< CdiVariable >::insert(std::vector< CdiVariable >::iterator,std::vector< CdiVariable >::value_type const &)\n" + " std::vector< CdiVariable >::insert(std::vector< CdiVariable >::iterator,std::vector< CdiVariable >::size_type,std::vector< CdiVariable >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsVector_reserve", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_reserve" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsVector_reserve" "', argument " "2"" of type '" "std::vector< CdiVariable >::size_type""'"); + } + arg2 = static_cast< std::vector< CdiVariable >::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsVector_capacity" "', argument " "1"" of type '" "std::vector< CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = ((std::vector< CdiVariable > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_VarsVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VarsVector" "', argument " "1"" of type '" "std::vector< CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *VarsVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *VarsVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_VarsMap__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::less< std::string > *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_std__string_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VarsMap" "', argument " "1"" of type '" "std::less< std::string > const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarsMap" "', argument " "1"" of type '" "std::less< std::string > const &""'"); + } + arg1 = reinterpret_cast< std::less< std::string > * >(argp1); + result = (std::map< std::string,CdiVariable > *)new std::map< std::string,CdiVariable >((std::less< std::string > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_iterator" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_CdiVariable_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap___nonzero__" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (bool)std_map_Sl_std_string_Sc_CdiVariable_Sg____nonzero__((std::map< std::string,CdiVariable > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap___bool__" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (bool)std_map_Sl_std_string_Sc_CdiVariable_Sg____bool__((std::map< std::string,CdiVariable > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< std::string,CdiVariable >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap___len__" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = std_map_Sl_std_string_Sc_CdiVariable_Sg____len__((std::map< std::string,CdiVariable > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + std::map< std::string,CdiVariable >::mapped_type *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap___getitem__" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap___getitem__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap___getitem__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + try { + result = (std::map< std::string,CdiVariable >::mapped_type *) &std_map_Sl_std_string_Sc_CdiVariable_Sg____getitem__(arg1,(std::string const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap___delitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap___delitem__" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap___delitem__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap___delitem__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + try { + std_map_Sl_std_string_Sc_CdiVariable_Sg____delitem__(arg1,(std::string const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_has_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap_has_key", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_has_key" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap_has_key" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap_has_key" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + result = (bool)std_map_Sl_std_string_Sc_CdiVariable_Sg__has_key((std::map< std::string,CdiVariable > const *)arg1,(std::string const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_keys" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (PyObject *)std_map_Sl_std_string_Sc_CdiVariable_Sg__keys(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_values" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (PyObject *)std_map_Sl_std_string_Sc_CdiVariable_Sg__values(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_items(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_items" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (PyObject *)std_map_Sl_std_string_Sc_CdiVariable_Sg__items(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap___contains__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap___contains__" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap___contains__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap___contains__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + result = (bool)std_map_Sl_std_string_Sc_CdiVariable_Sg____contains__(arg1,(std::string const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_key_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_key_iterator" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_CdiVariable_Sg__key_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_value_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_value_iterator" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_CdiVariable_Sg__value_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap___setitem__" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap___setitem__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap___setitem__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + std_map_Sl_std_string_Sc_CdiVariable_Sg____setitem____SWIG_0(arg1,(std::string const &)*arg2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + std::map< std::string,CdiVariable >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap___setitem__" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap___setitem__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap___setitem__" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VarsMap___setitem__" "', argument " "3"" of type '" "std::map< std::string,CdiVariable >::mapped_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap___setitem__" "', argument " "3"" of type '" "std::map< std::string,CdiVariable >::mapped_type const &""'"); + } + arg3 = reinterpret_cast< std::map< std::string,CdiVariable >::mapped_type * >(argp3); + try { + std_map_Sl_std_string_Sc_CdiVariable_Sg____setitem____SWIG_1(arg1,(std::string const &)*arg2,(CdiVariable const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsMap___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsMap___setitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsMap___setitem____SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsMap___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< std::string,CdiVariable >::__setitem__(std::map< std::string,CdiVariable >::key_type const &)\n" + " std::map< std::string,CdiVariable >::__setitem__(std::map< std::string,CdiVariable >::key_type const &,std::map< std::string,CdiVariable >::mapped_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_asdict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_asdict" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (PyObject *)std_map_Sl_std_string_Sc_CdiVariable_Sg__asdict(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsMap__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::map< std::string,CdiVariable > *)new std::map< std::string,CdiVariable >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsMap__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< std::string,CdiVariable > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *ptr = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VarsMap" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarsMap" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const &""'"); + } + arg1 = ptr; + } + result = (std::map< std::string,CdiVariable > *)new std::map< std::string,CdiVariable >((std::map< std::string,CdiVariable > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsMap(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_VarsMap", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_VarsMap__SWIG_1(self, argc, argv); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_std__string_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsMap__SWIG_0(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsMap__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_VarsMap'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< std::string,CdiVariable >::map(std::less< std::string > const &)\n" + " std::map< std::string,CdiVariable >::map()\n" + " std::map< std::string,CdiVariable >::map(std::map< std::string,CdiVariable > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_empty" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (bool)((std::map< std::string,CdiVariable > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< std::string,CdiVariable >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_size" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = ((std::map< std::string,CdiVariable > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_swap" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap_swap" "', argument " "2"" of type '" "std::map< std::string,CdiVariable > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap_swap" "', argument " "2"" of type '" "std::map< std::string,CdiVariable > &""'"); + } + arg2 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< std::string,CdiVariable >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_begin" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< std::string,CdiVariable >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_end" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< std::string,CdiVariable >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_rbegin" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,CdiVariable >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< std::string,CdiVariable >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_rend" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,CdiVariable >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_clear" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::pair< std::string const,CdiVariable > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_get_allocator" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = ((std::map< std::string,CdiVariable > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::allocator_type(static_cast< const std::map< std::string,CdiVariable >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::map< std::string,CdiVariable >::size_type result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_erase" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap_erase" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap_erase" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + result = (arg1)->erase((std::map< std::string,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + std::map< std::string,CdiVariable >::size_type result; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap_count", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_count" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap_count" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap_count" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + result = ((std::map< std::string,CdiVariable > const *)arg1)->count((std::map< std::string,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_erase" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsMap_erase" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsMap_erase" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::iterator""'"); + } + } + std_map_Sl_std_string_Sc_CdiVariable_Sg__erase__SWIG_1(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::iterator arg2 ; + std::map< std::string,CdiVariable >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_erase" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsMap_erase" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsMap_erase" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsMap_erase" "', argument " "3"" of type '" "std::map< std::string,CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsMap_erase" "', argument " "3"" of type '" "std::map< std::string,CdiVariable >::iterator""'"); + } + } + std_map_Sl_std_string_Sc_CdiVariable_Sg__erase__SWIG_2(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsMap_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_VarsMap_erase__SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsMap_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_VarsMap_erase__SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsMap_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< std::string,CdiVariable >::erase(std::map< std::string,CdiVariable >::key_type const &)\n" + " std::map< std::string,CdiVariable >::erase(std::map< std::string,CdiVariable >::iterator)\n" + " std::map< std::string,CdiVariable >::erase(std::map< std::string,CdiVariable >::iterator,std::map< std::string,CdiVariable >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + std::map< std::string,CdiVariable >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap_find", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_find" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap_find" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap_find" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + result = (arg1)->find((std::map< std::string,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + std::map< std::string,CdiVariable >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap_lower_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_lower_bound" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap_lower_bound" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap_lower_bound" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + result = (arg1)->lower_bound((std::map< std::string,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsMap_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + std::map< std::string,CdiVariable >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "VarsMap_upper_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsMap_upper_bound" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsMap_upper_bound" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsMap_upper_bound" "', argument " "2"" of type '" "std::map< std::string,CdiVariable >::key_type const &""'"); + } + arg2 = ptr; + } + result = (arg1)->upper_bound((std::map< std::string,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_VarsMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VarsMap" "', argument " "1"" of type '" "std::map< std::string,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *VarsMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *VarsMap_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_VarsByCode__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::less< int > *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_int_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VarsByCode" "', argument " "1"" of type '" "std::less< int > const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarsByCode" "', argument " "1"" of type '" "std::less< int > const &""'"); + } + arg1 = reinterpret_cast< std::less< int > * >(argp1); + result = (std::map< int,CdiVariable > *)new std::map< int,CdiVariable >((std::less< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_iterator" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiVariable_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode___nonzero__" "', argument " "1"" of type '" "std::map< int,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (bool)std_map_Sl_int_Sc_CdiVariable_Sg____nonzero__((std::map< int,CdiVariable > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode___bool__" "', argument " "1"" of type '" "std::map< int,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (bool)std_map_Sl_int_Sc_CdiVariable_Sg____bool__((std::map< int,CdiVariable > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiVariable >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode___len__" "', argument " "1"" of type '" "std::map< int,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = std_map_Sl_int_Sc_CdiVariable_Sg____len__((std::map< int,CdiVariable > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiVariable >::mapped_type *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode___getitem__" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode___getitem__" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + try { + result = (std::map< int,CdiVariable >::mapped_type *) &std_map_Sl_int_Sc_CdiVariable_Sg____getitem__(arg1,(int const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode___delitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode___delitem__" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode___delitem__" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + try { + std_map_Sl_int_Sc_CdiVariable_Sg____delitem__(arg1,(int const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_has_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode_has_key", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_has_key" "', argument " "1"" of type '" "std::map< int,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode_has_key" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiVariable_Sg__has_key((std::map< int,CdiVariable > const *)arg1,(int const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_keys" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiVariable_Sg__keys(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_values" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiVariable_Sg__values(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_items(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_items" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiVariable_Sg__items(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode___contains__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode___contains__" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode___contains__" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiVariable_Sg____contains__(arg1,(int const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_key_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_key_iterator" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiVariable_Sg__key_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_value_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_value_iterator" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiVariable_Sg__value_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode___setitem__" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode___setitem__" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + std_map_Sl_int_Sc_CdiVariable_Sg____setitem____SWIG_0(arg1,(int const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + std::map< int,CdiVariable >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode___setitem__" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode___setitem__" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiVariable, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VarsByCode___setitem__" "', argument " "3"" of type '" "std::map< int,CdiVariable >::mapped_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsByCode___setitem__" "', argument " "3"" of type '" "std::map< int,CdiVariable >::mapped_type const &""'"); + } + arg3 = reinterpret_cast< std::map< int,CdiVariable >::mapped_type * >(argp3); + try { + std_map_Sl_int_Sc_CdiVariable_Sg____setitem____SWIG_1(arg1,(int const &)*arg2,(CdiVariable const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsByCode___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsByCode___setitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsByCode___setitem____SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsByCode___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiVariable >::__setitem__(std::map< int,CdiVariable >::key_type const &)\n" + " std::map< int,CdiVariable >::__setitem__(std::map< int,CdiVariable >::key_type const &,std::map< int,CdiVariable >::mapped_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_asdict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_asdict" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiVariable_Sg__asdict(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsByCode__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::map< int,CdiVariable > *)new std::map< int,CdiVariable >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsByCode__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< int,CdiVariable > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *ptr = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VarsByCode" "', argument " "1"" of type '" "std::map< int,CdiVariable > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarsByCode" "', argument " "1"" of type '" "std::map< int,CdiVariable > const &""'"); + } + arg1 = ptr; + } + result = (std::map< int,CdiVariable > *)new std::map< int,CdiVariable >((std::map< int,CdiVariable > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VarsByCode(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_VarsByCode", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_VarsByCode__SWIG_1(self, argc, argv); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_int_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsByCode__SWIG_0(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsByCode__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_VarsByCode'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiVariable >::map(std::less< int > const &)\n" + " std::map< int,CdiVariable >::map()\n" + " std::map< int,CdiVariable >::map(std::map< int,CdiVariable > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_empty" "', argument " "1"" of type '" "std::map< int,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (bool)((std::map< int,CdiVariable > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiVariable >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_size" "', argument " "1"" of type '" "std::map< int,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = ((std::map< int,CdiVariable > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_swap" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VarsByCode_swap" "', argument " "2"" of type '" "std::map< int,CdiVariable > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VarsByCode_swap" "', argument " "2"" of type '" "std::map< int,CdiVariable > &""'"); + } + arg2 = reinterpret_cast< std::map< int,CdiVariable > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiVariable >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_begin" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiVariable >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_end" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiVariable >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_rbegin" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiVariable >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiVariable >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_rend" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiVariable >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_clear" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::pair< int const,CdiVariable > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_get_allocator" "', argument " "1"" of type '" "std::map< int,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = ((std::map< int,CdiVariable > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::map< int,CdiVariable >::allocator_type(static_cast< const std::map< int,CdiVariable >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiVariable >::size_type result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_erase" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode_erase" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->erase((std::map< int,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiVariable >::size_type result; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode_count", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_count" "', argument " "1"" of type '" "std::map< int,CdiVariable > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode_count" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = ((std::map< int,CdiVariable > const *)arg1)->count((std::map< int,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_erase" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsByCode_erase" "', argument " "2"" of type '" "std::map< int,CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsByCode_erase" "', argument " "2"" of type '" "std::map< int,CdiVariable >::iterator""'"); + } + } + std_map_Sl_int_Sc_CdiVariable_Sg__erase__SWIG_1(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::iterator arg2 ; + std::map< int,CdiVariable >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_erase" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsByCode_erase" "', argument " "2"" of type '" "std::map< int,CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsByCode_erase" "', argument " "2"" of type '" "std::map< int,CdiVariable >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsByCode_erase" "', argument " "3"" of type '" "std::map< int,CdiVariable >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VarsByCode_erase" "', argument " "3"" of type '" "std::map< int,CdiVariable >::iterator""'"); + } + } + std_map_Sl_int_Sc_CdiVariable_Sg__erase__SWIG_2(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "VarsByCode_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_VarsByCode_erase__SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsByCode_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_VarsByCode_erase__SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VarsByCode_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiVariable >::erase(std::map< int,CdiVariable >::key_type const &)\n" + " std::map< int,CdiVariable >::erase(std::map< int,CdiVariable >::iterator)\n" + " std::map< int,CdiVariable >::erase(std::map< int,CdiVariable >::iterator,std::map< int,CdiVariable >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiVariable >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode_find", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_find" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode_find" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->find((std::map< int,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiVariable >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode_lower_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_lower_bound" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode_lower_bound" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->lower_bound((std::map< int,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VarsByCode_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiVariable >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "VarsByCode_upper_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarsByCode_upper_bound" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VarsByCode_upper_bound" "', argument " "2"" of type '" "std::map< int,CdiVariable >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->upper_bound((std::map< int,CdiVariable >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiVariable >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_VarsByCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VarsByCode" "', argument " "1"" of type '" "std::map< int,CdiVariable > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *VarsByCode_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *VarsByCode_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_TaxesMap__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::less< int > *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_int_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TaxesMap" "', argument " "1"" of type '" "std::less< int > const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TaxesMap" "', argument " "1"" of type '" "std::less< int > const &""'"); + } + arg1 = reinterpret_cast< std::less< int > * >(argp1); + result = (std::map< int,CdiTaxis > *)new std::map< int,CdiTaxis >((std::less< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_iterator" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiTaxis_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap___nonzero__" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (bool)std_map_Sl_int_Sc_CdiTaxis_Sg____nonzero__((std::map< int,CdiTaxis > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap___bool__" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (bool)std_map_Sl_int_Sc_CdiTaxis_Sg____bool__((std::map< int,CdiTaxis > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiTaxis >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap___len__" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = std_map_Sl_int_Sc_CdiTaxis_Sg____len__((std::map< int,CdiTaxis > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiTaxis >::mapped_type *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap___getitem__" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap___getitem__" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + try { + result = (std::map< int,CdiTaxis >::mapped_type *) &std_map_Sl_int_Sc_CdiTaxis_Sg____getitem__(arg1,(int const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiTaxis, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap___delitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap___delitem__" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap___delitem__" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + try { + std_map_Sl_int_Sc_CdiTaxis_Sg____delitem__(arg1,(int const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_has_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap_has_key", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_has_key" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap_has_key" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiTaxis_Sg__has_key((std::map< int,CdiTaxis > const *)arg1,(int const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_keys" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiTaxis_Sg__keys(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_values" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiTaxis_Sg__values(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_items(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_items" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiTaxis_Sg__items(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap___contains__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap___contains__" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap___contains__" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiTaxis_Sg____contains__(arg1,(int const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_key_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_key_iterator" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiTaxis_Sg__key_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_value_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_value_iterator" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiTaxis_Sg__value_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap___setitem__" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap___setitem__" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + std_map_Sl_int_Sc_CdiTaxis_Sg____setitem____SWIG_0(arg1,(int const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + std::map< int,CdiTaxis >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap___setitem__" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap___setitem__" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiTaxis, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TaxesMap___setitem__" "', argument " "3"" of type '" "std::map< int,CdiTaxis >::mapped_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TaxesMap___setitem__" "', argument " "3"" of type '" "std::map< int,CdiTaxis >::mapped_type const &""'"); + } + arg3 = reinterpret_cast< std::map< int,CdiTaxis >::mapped_type * >(argp3); + try { + std_map_Sl_int_Sc_CdiTaxis_Sg____setitem____SWIG_1(arg1,(int const &)*arg2,(CdiTaxis const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "TaxesMap___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_TaxesMap___setitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_CdiTaxis, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TaxesMap___setitem____SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'TaxesMap___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiTaxis >::__setitem__(std::map< int,CdiTaxis >::key_type const &)\n" + " std::map< int,CdiTaxis >::__setitem__(std::map< int,CdiTaxis >::key_type const &,std::map< int,CdiTaxis >::mapped_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_asdict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_asdict" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiTaxis_Sg__asdict(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TaxesMap__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::map< int,CdiTaxis > *)new std::map< int,CdiTaxis >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TaxesMap__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< int,CdiTaxis > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *ptr = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TaxesMap" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TaxesMap" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const &""'"); + } + arg1 = ptr; + } + result = (std::map< int,CdiTaxis > *)new std::map< int,CdiTaxis >((std::map< int,CdiTaxis > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TaxesMap(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_TaxesMap", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_TaxesMap__SWIG_1(self, argc, argv); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_int_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_TaxesMap__SWIG_0(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_TaxesMap__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_TaxesMap'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiTaxis >::map(std::less< int > const &)\n" + " std::map< int,CdiTaxis >::map()\n" + " std::map< int,CdiTaxis >::map(std::map< int,CdiTaxis > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_empty" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (bool)((std::map< int,CdiTaxis > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiTaxis >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_size" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = ((std::map< int,CdiTaxis > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_swap" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TaxesMap_swap" "', argument " "2"" of type '" "std::map< int,CdiTaxis > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TaxesMap_swap" "', argument " "2"" of type '" "std::map< int,CdiTaxis > &""'"); + } + arg2 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiTaxis >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_begin" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiTaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiTaxis >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_end" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiTaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiTaxis >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_rbegin" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiTaxis >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiTaxis >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_rend" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiTaxis >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_clear" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::pair< int const,CdiTaxis > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_get_allocator" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = ((std::map< int,CdiTaxis > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::allocator_type(static_cast< const std::map< int,CdiTaxis >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiTaxis >::size_type result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_erase" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->erase((std::map< int,CdiTaxis >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiTaxis >::size_type result; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap_count", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_count" "', argument " "1"" of type '" "std::map< int,CdiTaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap_count" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = ((std::map< int,CdiTaxis > const *)arg1)->count((std::map< int,CdiTaxis >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_erase" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "TaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "TaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::iterator""'"); + } + } + std_map_Sl_int_Sc_CdiTaxis_Sg__erase__SWIG_1(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::iterator arg2 ; + std::map< int,CdiTaxis >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_erase" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "TaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "TaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "TaxesMap_erase" "', argument " "3"" of type '" "std::map< int,CdiTaxis >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "TaxesMap_erase" "', argument " "3"" of type '" "std::map< int,CdiTaxis >::iterator""'"); + } + } + std_map_Sl_int_Sc_CdiTaxis_Sg__erase__SWIG_2(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "TaxesMap_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_TaxesMap_erase__SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_TaxesMap_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiTaxis >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_TaxesMap_erase__SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'TaxesMap_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiTaxis >::erase(std::map< int,CdiTaxis >::key_type const &)\n" + " std::map< int,CdiTaxis >::erase(std::map< int,CdiTaxis >::iterator)\n" + " std::map< int,CdiTaxis >::erase(std::map< int,CdiTaxis >::iterator,std::map< int,CdiTaxis >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiTaxis >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap_find", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_find" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap_find" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->find((std::map< int,CdiTaxis >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiTaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiTaxis >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap_lower_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_lower_bound" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap_lower_bound" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->lower_bound((std::map< int,CdiTaxis >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiTaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TaxesMap_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiTaxis >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "TaxesMap_upper_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaxesMap_upper_bound" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TaxesMap_upper_bound" "', argument " "2"" of type '" "std::map< int,CdiTaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->upper_bound((std::map< int,CdiTaxis >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiTaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TaxesMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TaxesMap" "', argument " "1"" of type '" "std::map< int,CdiTaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TaxesMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *TaxesMap_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_ZaxesMap__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::less< int > *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_int_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZaxesMap" "', argument " "1"" of type '" "std::less< int > const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZaxesMap" "', argument " "1"" of type '" "std::less< int > const &""'"); + } + arg1 = reinterpret_cast< std::less< int > * >(argp1); + result = (std::map< int,CdiZaxis > *)new std::map< int,CdiZaxis >((std::less< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_iterator" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiZaxis_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap___nonzero__" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (bool)std_map_Sl_int_Sc_CdiZaxis_Sg____nonzero__((std::map< int,CdiZaxis > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap___bool__" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (bool)std_map_Sl_int_Sc_CdiZaxis_Sg____bool__((std::map< int,CdiZaxis > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiZaxis >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap___len__" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = std_map_Sl_int_Sc_CdiZaxis_Sg____len__((std::map< int,CdiZaxis > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiZaxis >::mapped_type *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap___getitem__" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap___getitem__" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + try { + result = (std::map< int,CdiZaxis >::mapped_type *) &std_map_Sl_int_Sc_CdiZaxis_Sg____getitem__(arg1,(int const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiZaxis, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap___delitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap___delitem__" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap___delitem__" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + try { + std_map_Sl_int_Sc_CdiZaxis_Sg____delitem__(arg1,(int const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_has_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap_has_key", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_has_key" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap_has_key" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiZaxis_Sg__has_key((std::map< int,CdiZaxis > const *)arg1,(int const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_keys" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiZaxis_Sg__keys(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_values" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiZaxis_Sg__values(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_items(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_items" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiZaxis_Sg__items(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap___contains__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap___contains__" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap___contains__" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiZaxis_Sg____contains__(arg1,(int const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_key_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_key_iterator" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiZaxis_Sg__key_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_value_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_value_iterator" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiZaxis_Sg__value_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap___setitem__" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap___setitem__" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + std_map_Sl_int_Sc_CdiZaxis_Sg____setitem____SWIG_0(arg1,(int const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + std::map< int,CdiZaxis >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap___setitem__" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap___setitem__" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiZaxis, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ZaxesMap___setitem__" "', argument " "3"" of type '" "std::map< int,CdiZaxis >::mapped_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZaxesMap___setitem__" "', argument " "3"" of type '" "std::map< int,CdiZaxis >::mapped_type const &""'"); + } + arg3 = reinterpret_cast< std::map< int,CdiZaxis >::mapped_type * >(argp3); + try { + std_map_Sl_int_Sc_CdiZaxis_Sg____setitem____SWIG_1(arg1,(int const &)*arg2,(CdiZaxis const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "ZaxesMap___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ZaxesMap___setitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_CdiZaxis, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ZaxesMap___setitem____SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ZaxesMap___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiZaxis >::__setitem__(std::map< int,CdiZaxis >::key_type const &)\n" + " std::map< int,CdiZaxis >::__setitem__(std::map< int,CdiZaxis >::key_type const &,std::map< int,CdiZaxis >::mapped_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_asdict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_asdict" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiZaxis_Sg__asdict(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ZaxesMap__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::map< int,CdiZaxis > *)new std::map< int,CdiZaxis >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ZaxesMap__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< int,CdiZaxis > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *ptr = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZaxesMap" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZaxesMap" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const &""'"); + } + arg1 = ptr; + } + result = (std::map< int,CdiZaxis > *)new std::map< int,CdiZaxis >((std::map< int,CdiZaxis > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ZaxesMap(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_ZaxesMap", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_ZaxesMap__SWIG_1(self, argc, argv); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_int_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ZaxesMap__SWIG_0(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ZaxesMap__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_ZaxesMap'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiZaxis >::map(std::less< int > const &)\n" + " std::map< int,CdiZaxis >::map()\n" + " std::map< int,CdiZaxis >::map(std::map< int,CdiZaxis > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_empty" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (bool)((std::map< int,CdiZaxis > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiZaxis >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_size" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = ((std::map< int,CdiZaxis > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_swap" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZaxesMap_swap" "', argument " "2"" of type '" "std::map< int,CdiZaxis > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZaxesMap_swap" "', argument " "2"" of type '" "std::map< int,CdiZaxis > &""'"); + } + arg2 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiZaxis >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_begin" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiZaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiZaxis >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_end" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiZaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiZaxis >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_rbegin" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiZaxis >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiZaxis >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_rend" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiZaxis >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_clear" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::pair< int const,CdiZaxis > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_get_allocator" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = ((std::map< int,CdiZaxis > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::allocator_type(static_cast< const std::map< int,CdiZaxis >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiZaxis >::size_type result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_erase" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->erase((std::map< int,CdiZaxis >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiZaxis >::size_type result; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap_count", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_count" "', argument " "1"" of type '" "std::map< int,CdiZaxis > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap_count" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = ((std::map< int,CdiZaxis > const *)arg1)->count((std::map< int,CdiZaxis >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_erase" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ZaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ZaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::iterator""'"); + } + } + std_map_Sl_int_Sc_CdiZaxis_Sg__erase__SWIG_1(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::iterator arg2 ; + std::map< int,CdiZaxis >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_erase" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ZaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ZaxesMap_erase" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ZaxesMap_erase" "', argument " "3"" of type '" "std::map< int,CdiZaxis >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ZaxesMap_erase" "', argument " "3"" of type '" "std::map< int,CdiZaxis >::iterator""'"); + } + } + std_map_Sl_int_Sc_CdiZaxis_Sg__erase__SWIG_2(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "ZaxesMap_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ZaxesMap_erase__SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ZaxesMap_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiZaxis >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ZaxesMap_erase__SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ZaxesMap_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiZaxis >::erase(std::map< int,CdiZaxis >::key_type const &)\n" + " std::map< int,CdiZaxis >::erase(std::map< int,CdiZaxis >::iterator)\n" + " std::map< int,CdiZaxis >::erase(std::map< int,CdiZaxis >::iterator,std::map< int,CdiZaxis >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiZaxis >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap_find", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_find" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap_find" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->find((std::map< int,CdiZaxis >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiZaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiZaxis >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap_lower_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_lower_bound" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap_lower_bound" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->lower_bound((std::map< int,CdiZaxis >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiZaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZaxesMap_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiZaxis >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "ZaxesMap_upper_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZaxesMap_upper_bound" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZaxesMap_upper_bound" "', argument " "2"" of type '" "std::map< int,CdiZaxis >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->upper_bound((std::map< int,CdiZaxis >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiZaxis >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ZaxesMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZaxesMap" "', argument " "1"" of type '" "std::map< int,CdiZaxis > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ZaxesMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ZaxesMap_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_GridsMap__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::less< int > *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_int_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GridsMap" "', argument " "1"" of type '" "std::less< int > const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GridsMap" "', argument " "1"" of type '" "std::less< int > const &""'"); + } + arg1 = reinterpret_cast< std::less< int > * >(argp1); + result = (std::map< int,CdiGrid > *)new std::map< int,CdiGrid >((std::less< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_iterator" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiGrid_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap___nonzero__" "', argument " "1"" of type '" "std::map< int,CdiGrid > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (bool)std_map_Sl_int_Sc_CdiGrid_Sg____nonzero__((std::map< int,CdiGrid > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap___bool__" "', argument " "1"" of type '" "std::map< int,CdiGrid > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (bool)std_map_Sl_int_Sc_CdiGrid_Sg____bool__((std::map< int,CdiGrid > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiGrid >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap___len__" "', argument " "1"" of type '" "std::map< int,CdiGrid > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = std_map_Sl_int_Sc_CdiGrid_Sg____len__((std::map< int,CdiGrid > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiGrid >::mapped_type *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap___getitem__" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap___getitem__" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + try { + result = (std::map< int,CdiGrid >::mapped_type *) &std_map_Sl_int_Sc_CdiGrid_Sg____getitem__(arg1,(int const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiGrid, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap___delitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap___delitem__" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap___delitem__" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + try { + std_map_Sl_int_Sc_CdiGrid_Sg____delitem__(arg1,(int const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_has_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap_has_key", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_has_key" "', argument " "1"" of type '" "std::map< int,CdiGrid > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap_has_key" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiGrid_Sg__has_key((std::map< int,CdiGrid > const *)arg1,(int const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_keys" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiGrid_Sg__keys(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_values" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiGrid_Sg__values(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_items(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_items" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiGrid_Sg__items(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap___contains__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap___contains__" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap___contains__" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiGrid_Sg____contains__(arg1,(int const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_key_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_key_iterator" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiGrid_Sg__key_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_value_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_value_iterator" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_int_Sc_CdiGrid_Sg__value_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap___setitem__" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap___setitem__" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + std_map_Sl_int_Sc_CdiGrid_Sg____setitem____SWIG_0(arg1,(int const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + std::map< int,CdiGrid >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap___setitem__" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap___setitem__" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_CdiGrid, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridsMap___setitem__" "', argument " "3"" of type '" "std::map< int,CdiGrid >::mapped_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridsMap___setitem__" "', argument " "3"" of type '" "std::map< int,CdiGrid >::mapped_type const &""'"); + } + arg3 = reinterpret_cast< std::map< int,CdiGrid >::mapped_type * >(argp3); + try { + std_map_Sl_int_Sc_CdiGrid_Sg____setitem____SWIG_1(arg1,(int const &)*arg2,(CdiGrid const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "GridsMap___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_GridsMap___setitem____SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_CdiGrid, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_GridsMap___setitem____SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridsMap___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiGrid >::__setitem__(std::map< int,CdiGrid >::key_type const &)\n" + " std::map< int,CdiGrid >::__setitem__(std::map< int,CdiGrid >::key_type const &,std::map< int,CdiGrid >::mapped_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_asdict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_asdict" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (PyObject *)std_map_Sl_int_Sc_CdiGrid_Sg__asdict(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GridsMap__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::map< int,CdiGrid > *)new std::map< int,CdiGrid >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GridsMap__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< int,CdiGrid > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *ptr = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GridsMap" "', argument " "1"" of type '" "std::map< int,CdiGrid > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GridsMap" "', argument " "1"" of type '" "std::map< int,CdiGrid > const &""'"); + } + arg1 = ptr; + } + result = (std::map< int,CdiGrid > *)new std::map< int,CdiGrid >((std::map< int,CdiGrid > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GridsMap(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_GridsMap", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_GridsMap__SWIG_1(self, argc, argv); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_int_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_GridsMap__SWIG_0(self, argc, argv); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_GridsMap__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_GridsMap'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiGrid >::map(std::less< int > const &)\n" + " std::map< int,CdiGrid >::map()\n" + " std::map< int,CdiGrid >::map(std::map< int,CdiGrid > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_empty" "', argument " "1"" of type '" "std::map< int,CdiGrid > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (bool)((std::map< int,CdiGrid > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiGrid >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_size" "', argument " "1"" of type '" "std::map< int,CdiGrid > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = ((std::map< int,CdiGrid > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap_swap", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_swap" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridsMap_swap" "', argument " "2"" of type '" "std::map< int,CdiGrid > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridsMap_swap" "', argument " "2"" of type '" "std::map< int,CdiGrid > &""'"); + } + arg2 = reinterpret_cast< std::map< int,CdiGrid > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiGrid >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_begin" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiGrid >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiGrid >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_end" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiGrid >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiGrid >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_rbegin" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiGrid >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiGrid >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_rend" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiGrid >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_clear" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::pair< int const,CdiGrid > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_get_allocator" "', argument " "1"" of type '" "std::map< int,CdiGrid > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = ((std::map< int,CdiGrid > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::map< int,CdiGrid >::allocator_type(static_cast< const std::map< int,CdiGrid >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiGrid >::size_type result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_erase" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap_erase" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->erase((std::map< int,CdiGrid >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiGrid >::size_type result; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap_count", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_count" "', argument " "1"" of type '" "std::map< int,CdiGrid > const *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap_count" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = ((std::map< int,CdiGrid > const *)arg1)->count((std::map< int,CdiGrid >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_erase" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridsMap_erase" "', argument " "2"" of type '" "std::map< int,CdiGrid >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridsMap_erase" "', argument " "2"" of type '" "std::map< int,CdiGrid >::iterator""'"); + } + } + std_map_Sl_int_Sc_CdiGrid_Sg__erase__SWIG_1(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::iterator arg2 ; + std::map< int,CdiGrid >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_erase" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridsMap_erase" "', argument " "2"" of type '" "std::map< int,CdiGrid >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridsMap_erase" "', argument " "2"" of type '" "std::map< int,CdiGrid >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridsMap_erase" "', argument " "3"" of type '" "std::map< int,CdiGrid >::iterator""'"); + } else { + swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridsMap_erase" "', argument " "3"" of type '" "std::map< int,CdiGrid >::iterator""'"); + } + } + std_map_Sl_int_Sc_CdiGrid_Sg__erase__SWIG_2(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "GridsMap_erase", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_GridsMap_erase__SWIG_1(self, argc, argv); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_GridsMap_erase__SWIG_0(self, argc, argv); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *>(iter) != 0)); + if (_v) { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< int,CdiGrid >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_GridsMap_erase__SWIG_2(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridsMap_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< int,CdiGrid >::erase(std::map< int,CdiGrid >::key_type const &)\n" + " std::map< int,CdiGrid >::erase(std::map< int,CdiGrid >::iterator)\n" + " std::map< int,CdiGrid >::erase(std::map< int,CdiGrid >::iterator,std::map< int,CdiGrid >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiGrid >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap_find", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_find" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap_find" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->find((std::map< int,CdiGrid >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiGrid >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiGrid >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap_lower_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_lower_bound" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap_lower_bound" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->lower_bound((std::map< int,CdiGrid >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiGrid >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridsMap_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::map< int,CdiGrid >::iterator result; + + if (!SWIG_Python_UnpackTuple(args, "GridsMap_upper_bound", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridsMap_upper_bound" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridsMap_upper_bound" "', argument " "2"" of type '" "std::map< int,CdiGrid >::key_type""'"); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->upper_bound((std::map< int,CdiGrid >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< int,CdiGrid >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GridsMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GridsMap" "', argument " "1"" of type '" "std::map< int,CdiGrid > *""'"); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GridsMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *GridsMap_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_CdiGrid__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + CdiGrid *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (CdiGrid *)new CdiGrid(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiGrid, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CdiGrid__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + CdiGrid *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CdiGrid" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = (CdiGrid *)new CdiGrid(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiGrid, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CdiGrid(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_CdiGrid", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_CdiGrid__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CdiGrid__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CdiGrid'.\n" + " Possible C/C++ prototypes are:\n" + " CdiGrid::CdiGrid()\n" + " CdiGrid::CdiGrid(int)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_CdiGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CdiGrid" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_gridID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_gridID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_gridID_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_gridID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->gridID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_gridID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_gridID_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->gridID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_type_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_type_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_type_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->type = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_type_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->type); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_size_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_size_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_size_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->size = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_size_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->size); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xsize_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_xsize_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xsize_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_xsize_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->xsize = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xsize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xsize_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->xsize); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ysize_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_ysize_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ysize_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_ysize_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ysize = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ysize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ysize_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->ysize); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_prec_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_prec_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_prec_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_prec_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->prec = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_prec_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_prec_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->prec); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ncorner_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_ncorner_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ncorner_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_ncorner_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ncorner = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ncorner_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ncorner_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->ncorner); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_hasXValues_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_hasXValues_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_hasXValues_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_hasXValues_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->hasXValues = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_hasXValues_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_hasXValues_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (bool) ((arg1)->hasXValues); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_hasYValues_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_hasYValues_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_hasYValues_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_hasYValues_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->hasYValues = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_hasYValues_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_hasYValues_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (bool) ((arg1)->hasYValues); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_hasBounds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_hasBounds_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_hasBounds_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiGrid_hasBounds_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->hasBounds = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_hasBounds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_hasBounds_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (bool) ((arg1)->hasBounds); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xvalues_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_xvalues_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xvalues_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_xvalues_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->xvalues = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xvalues_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xvalues_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->xvalues); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_yvalues_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_yvalues_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_yvalues_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_yvalues_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->yvalues = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_yvalues_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_yvalues_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->yvalues); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xbounds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_xbounds_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xbounds_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_xbounds_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->xbounds = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xbounds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xbounds_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->xbounds); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ybounds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_ybounds_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ybounds_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_ybounds_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->ybounds = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ybounds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ybounds_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->ybounds); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_xname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xname_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_xname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_xname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->xname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xname_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->xname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xlongname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_xlongname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xlongname_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_xlongname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_xlongname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->xlongname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xlongname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xlongname_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->xlongname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xstdname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_xstdname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xstdname_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_xstdname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_xstdname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->xstdname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xstdname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xstdname_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->xstdname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xunits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_xunits_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xunits_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_xunits_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_xunits_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->xunits = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_xunits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_xunits_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->xunits); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_yname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_yname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_yname_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_yname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_yname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->yname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_yname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_yname_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->yname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ylongname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_ylongname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ylongname_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_ylongname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_ylongname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->ylongname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ylongname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ylongname_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->ylongname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ystdname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_ystdname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ystdname_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_ystdname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_ystdname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->ystdname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_ystdname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_ystdname_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->ystdname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_yunits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_yunits_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_yunits_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_yunits_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_yunits_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->yunits = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_yunits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_yunits_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->yunits); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_name_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_name_set" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiGrid_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_name_get" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->name); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_getValues(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_getValues" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + (arg1)->getValues(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_getBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_getBounds" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + (arg1)->getBounds(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_getValuesAsPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_getValuesAsPointer", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_getValuesAsPointer" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_getValuesAsPointer" "', argument " "2"" of type '" "double *""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CdiGrid_getValuesAsPointer" "', argument " "3"" of type '" "double *""'"); + } + arg3 = reinterpret_cast< double * >(argp3); + (arg1)->getValuesAsPointer(arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_getBoundsAsPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_getBoundsAsPointer", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_getBoundsAsPointer" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_getBoundsAsPointer" "', argument " "2"" of type '" "double *""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CdiGrid_getBoundsAsPointer" "', argument " "3"" of type '" "double *""'"); + } + arg3 = reinterpret_cast< double * >(argp3); + (arg1)->getBoundsAsPointer(arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_getFloatVals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + float *arg2 = (float *) 0 ; + float *arg3 = (float *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_getFloatVals", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_getFloatVals" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_getFloatVals" "', argument " "2"" of type '" "float *""'"); + } + arg2 = reinterpret_cast< float * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CdiGrid_getFloatVals" "', argument " "3"" of type '" "float *""'"); + } + arg3 = reinterpret_cast< float * >(argp3); + (arg1)->getFloatVals(arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiGrid_getFloatBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiGrid *arg1 = (CdiGrid *) 0 ; + float *arg2 = (float *) 0 ; + float *arg3 = (float *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiGrid_getFloatBounds", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiGrid_getFloatBounds" "', argument " "1"" of type '" "CdiGrid *""'"); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiGrid_getFloatBounds" "', argument " "2"" of type '" "float *""'"); + } + arg2 = reinterpret_cast< float * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CdiGrid_getFloatBounds" "', argument " "3"" of type '" "float *""'"); + } + arg3 = reinterpret_cast< float * >(argp3); + (arg1)->getFloatBounds(arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CdiGrid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CdiGrid, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CdiGrid_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_CdiTaxis__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + CdiTaxis *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (CdiTaxis *)new CdiTaxis(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiTaxis, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CdiTaxis__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + CdiTaxis *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CdiTaxis" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = (CdiTaxis *)new CdiTaxis(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiTaxis, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CdiTaxis(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_CdiTaxis", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_CdiTaxis__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CdiTaxis__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CdiTaxis'.\n" + " Possible C/C++ prototypes are:\n" + " CdiTaxis::CdiTaxis()\n" + " CdiTaxis::CdiTaxis(int)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_CdiTaxis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CdiTaxis" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_taxisID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_taxisID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_taxisID_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_taxisID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->taxisID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_taxisID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_taxisID_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->taxisID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_ntsteps_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_ntsteps_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_ntsteps_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_ntsteps_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ntsteps = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_ntsteps_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_ntsteps_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->ntsteps); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_unit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_unit_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_unit_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_unit_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->unit = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_unit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_unit_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->unit); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_rdate_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_rdate_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_rdate_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_rdate_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->rdate = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_rdate_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_rdate_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->rdate); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_rtime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_rtime_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_rtime_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_rtime_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->rtime = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_rtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_rtime_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->rtime); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_vdate_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_vdate_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_vdate_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_vdate_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->vdate = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_vdate_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_vdate_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->vdate); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_vtime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_vtime_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_vtime_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_vtime_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->vtime = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_vtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_vtime_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->vtime); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_type_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_type_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_type_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->type = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_type_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->type); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_calendar_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_calendar_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_calendar_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_calendar_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->calendar = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_calendar_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_calendar_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->calendar); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_hasBounds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_hasBounds_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_hasBounds_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiTaxis_hasBounds_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->hasBounds = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_hasBounds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_hasBounds_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->hasBounds); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + char *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + char temp2[CDI_MAX_NAME] ; + int res2 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_name_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_name_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + res2 = SWIG_AsCharArray(swig_obj[1], temp2, CDI_MAX_NAME); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiTaxis_name_set" "', argument " "2"" of type '" "char [CDI_MAX_NAME]""'"); + } + arg2 = reinterpret_cast< char * >(temp2); + if (arg2) memcpy(arg1->name,arg2,CDI_MAX_NAME*sizeof(char)); + else memset(arg1->name,0,CDI_MAX_NAME*sizeof(char)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_name_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (char *)(char *) ((arg1)->name); + { + size_t size = SWIG_strnlen(result, CDI_MAX_NAME); + + + + resultobj = SWIG_FromCharPtrAndSize(result, size); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_unitname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiTaxis_unitname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_unitname_set" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiTaxis_unitname_set" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(reinterpret_cast< const char * >(arg2))) + 1; + arg1->unitname = (char const *)reinterpret_cast< char* >(memcpy(new char[size], arg2, sizeof(char)*(size))); + } else { + arg1->unitname = 0; + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiTaxis_unitname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiTaxis_unitname_get" "', argument " "1"" of type '" "CdiTaxis *""'"); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (char *) ((arg1)->unitname); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CdiTaxis_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CdiTaxis, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CdiTaxis_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_CdiZaxis__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + CdiZaxis *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (CdiZaxis *)new CdiZaxis(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiZaxis, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CdiZaxis__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + CdiZaxis *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CdiZaxis" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = (CdiZaxis *)new CdiZaxis(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiZaxis, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CdiZaxis(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_CdiZaxis", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_CdiZaxis__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CdiZaxis__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CdiZaxis'.\n" + " Possible C/C++ prototypes are:\n" + " CdiZaxis::CdiZaxis()\n" + " CdiZaxis::CdiZaxis(int)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_CdiZaxis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CdiZaxis" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_zaxisID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_zaxisID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_zaxisID_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiZaxis_zaxisID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->zaxisID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_zaxisID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_zaxisID_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->zaxisID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_type_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_type_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiZaxis_type_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->type = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_type_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->type); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_ltype_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_ltype_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_ltype_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiZaxis_ltype_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ltype = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_ltype_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_ltype_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->ltype); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_size_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_size_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiZaxis_size_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->size = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_size_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->size); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_prec_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_prec_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_prec_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiZaxis_prec_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->prec = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_prec_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_prec_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->prec); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_plevels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_plevels_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_plevels_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_plevels_set" "', argument " "2"" of type '" "double *""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->plevels = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_plevels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_plevels_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (double *) ((arg1)->plevels); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_plbounds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_plbounds_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_plbounds_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_plbounds_set" "', argument " "2"" of type '" "double *""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->plbounds = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_plbounds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_plbounds_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (double *) ((arg1)->plbounds); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_pubounds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_pubounds_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_pubounds_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_pubounds_set" "', argument " "2"" of type '" "double *""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->pubounds = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_pubounds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_pubounds_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (double *) ((arg1)->pubounds); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_pweights_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_pweights_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_pweights_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_pweights_set" "', argument " "2"" of type '" "double *""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->pweights = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_pweights_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_pweights_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (double *) ((arg1)->pweights); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_levels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_levels_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_levels_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_levels_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->levels = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_levels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_levels_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->levels); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_lbounds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_lbounds_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_lbounds_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_lbounds_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->lbounds = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_lbounds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_lbounds_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->lbounds); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_ubounds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_ubounds_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_ubounds_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_ubounds_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->ubounds = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_ubounds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_ubounds_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->ubounds); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_weights_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_weights_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_weights_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_weights_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->weights = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_weights_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_weights_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->weights); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_name_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_name_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiZaxis_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_name_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::string *) & ((arg1)->name); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_longname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_longname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_longname_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_longname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiZaxis_longname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->longname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_longname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_longname_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::string *) & ((arg1)->longname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_units_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiZaxis_units_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_units_set" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiZaxis_units_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiZaxis_units_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->units = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiZaxis_units_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiZaxis_units_get" "', argument " "1"" of type '" "CdiZaxis *""'"); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::string *) & ((arg1)->units); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CdiZaxis_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CdiZaxis, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CdiZaxis_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_CdiVariable__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + CdiVariable *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (CdiVariable *)new CdiVariable(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CdiVariable__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + int arg1 ; + int arg2 ; + int arg3 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + CdiVariable *result = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CdiVariable" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CdiVariable" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CdiVariable" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (CdiVariable *)new CdiVariable(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CdiVariable(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_CdiVariable", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_CdiVariable__SWIG_0(self, argc, argv); + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CdiVariable__SWIG_1(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CdiVariable'.\n" + " Possible C/C++ prototypes are:\n" + " CdiVariable::CdiVariable()\n" + " CdiVariable::CdiVariable(int,int,int)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_CdiVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CdiVariable" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_varID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_varID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_varID_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_varID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->varID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_varID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_varID_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->varID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_zaxisID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_zaxisID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_zaxisID_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_zaxisID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->zaxisID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_zaxisID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_zaxisID_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->zaxisID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_gridID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_gridID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_gridID_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_gridID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->gridID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_gridID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_gridID_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->gridID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_taxisID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_taxisID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_taxisID_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_taxisID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->taxisID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_taxisID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_taxisID_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->taxisID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_timeID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_timeID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_timeID_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_timeID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->timeID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_timeID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_timeID_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->timeID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_vlistID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_vlistID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_vlistID_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_vlistID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->vlistID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_vlistID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_vlistID_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->vlistID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_size_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_size_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_size_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->size = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_size_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->size); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_code_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_code_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_code_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_code_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->code = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_code_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->code); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_datatype_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_datatype_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_datatype_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_datatype_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->datatype = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_datatype_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_datatype_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->datatype); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_streamID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_streamID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_streamID_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_streamID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->streamID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_streamID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_streamID_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->streamID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_name_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_name_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiVariable_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_name_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::string *) & ((arg1)->name); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_longname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_longname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_longname_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_longname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiVariable_longname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->longname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_longname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_longname_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::string *) & ((arg1)->longname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_units_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_units_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_units_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_units_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiVariable_units_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->units = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_units_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_units_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::string *) & ((arg1)->units); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_stdname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_stdname_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_stdname_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_stdname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CdiVariable_stdname_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->stdname = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_stdname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_stdname_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::string *) & ((arg1)->stdname); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_missval_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_missval_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_missval_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_missval_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->missval = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_missval_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_missval_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (double) ((arg1)->missval); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_values_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_values_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_values_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_values_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->values = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_values_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_values_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->values); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_valuesWithLevel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg2 = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_valuesWithLevel_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_valuesWithLevel_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_valuesWithLevel_set" "', argument " "2"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *""'"); + } + arg2 = reinterpret_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > * >(argp2); + if (arg1) (arg1)->valuesWithLevel = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_valuesWithLevel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_valuesWithLevel_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)& ((arg1)->valuesWithLevel); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_grid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + CdiGrid *arg2 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_grid_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_grid_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_grid_set" "', argument " "2"" of type '" "CdiGrid *""'"); + } + arg2 = reinterpret_cast< CdiGrid * >(argp2); + if (arg1) (arg1)->grid = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_grid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + CdiGrid *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_grid_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (CdiGrid *)& ((arg1)->grid); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiGrid, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_zaxis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + CdiZaxis *arg2 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_zaxis_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_zaxis_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_zaxis_set" "', argument " "2"" of type '" "CdiZaxis *""'"); + } + arg2 = reinterpret_cast< CdiZaxis * >(argp2); + if (arg1) (arg1)->zaxis = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_zaxis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + CdiZaxis *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_zaxis_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (CdiZaxis *)& ((arg1)->zaxis); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiZaxis, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_taxis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + CdiTaxis *arg2 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "CdiVariable_taxis_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_taxis_set" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CdiVariable_taxis_set" "', argument " "2"" of type '" "CdiTaxis *""'"); + } + arg2 = reinterpret_cast< CdiTaxis * >(argp2); + if (arg1) (arg1)->taxis = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_taxis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + CdiTaxis *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_taxis_get" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (CdiTaxis *)& ((arg1)->taxis); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiTaxis, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_sinfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_sinfo" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + (arg1)->sinfo(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getValues(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getValues" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + (arg1)->getValues(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getValuesWithLevel__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getValuesWithLevel" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_getValuesWithLevel" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + (arg1)->getValuesWithLevel(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getValuesWithLevel__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getValuesWithLevel" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + (arg1)->getValuesWithLevel(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getValuesWithLevel(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "CdiVariable_getValuesWithLevel", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CdiVariable_getValuesWithLevel__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CdiVariable_getValuesWithLevel__SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CdiVariable_getValuesWithLevel'.\n" + " Possible C/C++ prototypes are:\n" + " CdiVariable::getValuesWithLevel(int)\n" + " CdiVariable::getValuesWithLevel()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getFValues(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::vector< float,std::allocator< float > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getFValues" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (arg1)->getFValues(); + resultobj = SWIG_NewPointerObj((new std::vector< float,std::allocator< float > >(static_cast< const std::vector< float,std::allocator< float > >& >(result))), SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getFValuesWithLevel__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + SwigValueWrapper< std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > > > result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getFValuesWithLevel" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_getFValuesWithLevel" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (arg1)->getFValuesWithLevel(arg2); + resultobj = SWIG_NewPointerObj((new std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > >(static_cast< const std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > >& >(result))), SWIGTYPE_p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getFValuesWithLevel__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > > > result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getFValuesWithLevel" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (arg1)->getFValuesWithLevel(); + resultobj = SWIG_NewPointerObj((new std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > >(static_cast< const std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > >& >(result))), SWIGTYPE_p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getFValuesWithLevel(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "CdiVariable_getFValuesWithLevel", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CdiVariable_getFValuesWithLevel__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CdiVariable_getFValuesWithLevel__SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CdiVariable_getFValuesWithLevel'.\n" + " Possible C/C++ prototypes are:\n" + " CdiVariable::getFValuesWithLevel(int)\n" + " CdiVariable::getFValuesWithLevel()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getValuesAsPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getValuesAsPointer" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (double *)(arg1)->getValuesAsPointer(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getValuesWithLevelAsPointer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double **result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getValuesWithLevelAsPointer" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CdiVariable_getValuesWithLevelAsPointer" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double **)(arg1)->getValuesWithLevelAsPointer(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getValuesWithLevelAsPointer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double **result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_getValuesWithLevelAsPointer" "', argument " "1"" of type '" "CdiVariable *""'"); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (double **)(arg1)->getValuesWithLevelAsPointer(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CdiVariable_getValuesWithLevelAsPointer(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "CdiVariable_getValuesWithLevelAsPointer", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CdiVariable_getValuesWithLevelAsPointer__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CdiVariable_getValuesWithLevelAsPointer__SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CdiVariable_getValuesWithLevelAsPointer'.\n" + " Possible C/C++ prototypes are:\n" + " CdiVariable::getValuesWithLevelAsPointer(int)\n" + " CdiVariable::getValuesWithLevelAsPointer()\n"); + return 0; +} + + +SWIGINTERN PyObject *CdiVariable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CdiVariable, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CdiVariable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_Cdi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject *swig_obj[1] ; + Cdi *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Cdi" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + result = (Cdi *)new Cdi((char const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cdi, SWIG_POINTER_NEW | 0 ); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Cdi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cdi" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_streamID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_streamID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_streamID_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cdi_streamID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->streamID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_streamID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_streamID_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->streamID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_vlistID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_vlistID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_vlistID_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cdi_vlistID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->vlistID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_vlistID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_vlistID_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->vlistID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_nvars_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_nvars_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_nvars_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cdi_nvars_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->nvars = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_nvars_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_nvars_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->nvars); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_nzaxes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_nzaxes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_nzaxes_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cdi_nzaxes_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->nzaxes = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_nzaxes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_nzaxes_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->nzaxes); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_ngrids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_ngrids_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_ngrids_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cdi_ngrids_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ngrids = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_ngrids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_ngrids_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->ngrids); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_ntaxes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_ntaxes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_ntaxes_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cdi_ntaxes_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ntaxes = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_ntaxes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_ntaxes_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->ntaxes); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_taxisID_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_taxisID_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_taxisID_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cdi_taxisID_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->taxisID = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_taxisID_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_taxisID_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->taxisID); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_varnames_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + std::vector< std::string,std::allocator< std::string > > *arg2 = (std::vector< std::string,std::allocator< std::string > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_varnames_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_varnames_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cdi_varnames_set" "', argument " "2"" of type '" "std::vector< std::string,std::allocator< std::string > > *""'"); + } + arg2 = reinterpret_cast< std::vector< std::string,std::allocator< std::string > > * >(argp2); + if (arg1) (arg1)->varnames = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_varnames_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_varnames_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::vector< std::string,std::allocator< std::string > > *)& ((arg1)->varnames); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + std::vector< int,std::allocator< int > > *arg2 = (std::vector< int,std::allocator< int > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_codes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_codes_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cdi_codes_set" "', argument " "2"" of type '" "std::vector< int,std::allocator< int > > *""'"); + } + arg2 = reinterpret_cast< std::vector< int,std::allocator< int > > * >(argp2); + if (arg1) (arg1)->codes = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int,std::allocator< int > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_codes_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::vector< int,std::allocator< int > > *)& ((arg1)->codes); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_variables_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *arg2 = (std::vector< CdiVariable,std::allocator< CdiVariable > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_variables_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_variables_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cdi_variables_set" "', argument " "2"" of type '" "std::vector< CdiVariable,std::allocator< CdiVariable > > *""'"); + } + arg2 = reinterpret_cast< std::vector< CdiVariable,std::allocator< CdiVariable > > * >(argp2); + if (arg1) (arg1)->variables = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_variables_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_variables_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)& ((arg1)->variables); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_var_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *arg2 = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_var_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_var_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cdi_var_set" "', argument " "2"" of type '" "std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *""'"); + } + arg2 = reinterpret_cast< std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > * >(argp2); + if (arg1) (arg1)->var = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_var_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_var_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)& ((arg1)->var); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_varByCode_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *arg2 = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_varByCode_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_varByCode_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cdi_varByCode_set" "', argument " "2"" of type '" "std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *""'"); + } + arg2 = reinterpret_cast< std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > * >(argp2); + if (arg1) (arg1)->varByCode = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_varByCode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_varByCode_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)& ((arg1)->varByCode); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_taxes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *arg2 = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_taxes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_taxes_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cdi_taxes_set" "', argument " "2"" of type '" "std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *""'"); + } + arg2 = reinterpret_cast< std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > * >(argp2); + if (arg1) (arg1)->taxes = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_taxes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_taxes_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)& ((arg1)->taxes); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_zaxes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *arg2 = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_zaxes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_zaxes_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cdi_zaxes_set" "', argument " "2"" of type '" "std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *""'"); + } + arg2 = reinterpret_cast< std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > * >(argp2); + if (arg1) (arg1)->zaxes = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_zaxes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_zaxes_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)& ((arg1)->zaxes); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_grids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *arg2 = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "Cdi_grids_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_grids_set" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cdi_grids_set" "', argument " "2"" of type '" "std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *""'"); + } + arg2 = reinterpret_cast< std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > * >(argp2); + if (arg1) (arg1)->grids = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_grids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_grids_get" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)& ((arg1)->grids); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cdi_griddes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cdi_griddes" "', argument " "1"" of type '" "Cdi *""'"); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + (arg1)->griddes(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Cdi_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Cdi, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Cdi_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +static PyMethodDef SwigMethods[] = { + { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL}, + { "delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_O, NULL}, + { "SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_O, NULL}, + { "SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL}, + { "SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL}, + { "SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL}, + { "SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL}, + { "SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_O, NULL}, + { "SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_O, NULL}, + { "SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_O, NULL}, + { "SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_O, NULL}, + { "SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL}, + { "SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL}, + { "SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL}, + { "SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL}, + { "SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL}, + { "SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL}, + { "SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, + { "SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_O, NULL}, + { "IntVector_iterator", _wrap_IntVector_iterator, METH_O, NULL}, + { "IntVector___nonzero__", _wrap_IntVector___nonzero__, METH_O, NULL}, + { "IntVector___bool__", _wrap_IntVector___bool__, METH_O, NULL}, + { "IntVector___len__", _wrap_IntVector___len__, METH_O, NULL}, + { "IntVector___getslice__", _wrap_IntVector___getslice__, METH_VARARGS, NULL}, + { "IntVector___setslice__", _wrap_IntVector___setslice__, METH_VARARGS, NULL}, + { "IntVector___delslice__", _wrap_IntVector___delslice__, METH_VARARGS, NULL}, + { "IntVector___delitem__", _wrap_IntVector___delitem__, METH_VARARGS, NULL}, + { "IntVector___getitem__", _wrap_IntVector___getitem__, METH_VARARGS, NULL}, + { "IntVector___setitem__", _wrap_IntVector___setitem__, METH_VARARGS, NULL}, + { "IntVector_pop", _wrap_IntVector_pop, METH_O, NULL}, + { "IntVector_append", _wrap_IntVector_append, METH_VARARGS, NULL}, + { "IntVector_empty", _wrap_IntVector_empty, METH_O, NULL}, + { "IntVector_size", _wrap_IntVector_size, METH_O, NULL}, + { "IntVector_swap", _wrap_IntVector_swap, METH_VARARGS, NULL}, + { "IntVector_begin", _wrap_IntVector_begin, METH_O, NULL}, + { "IntVector_end", _wrap_IntVector_end, METH_O, NULL}, + { "IntVector_rbegin", _wrap_IntVector_rbegin, METH_O, NULL}, + { "IntVector_rend", _wrap_IntVector_rend, METH_O, NULL}, + { "IntVector_clear", _wrap_IntVector_clear, METH_O, NULL}, + { "IntVector_get_allocator", _wrap_IntVector_get_allocator, METH_O, NULL}, + { "IntVector_pop_back", _wrap_IntVector_pop_back, METH_O, NULL}, + { "IntVector_erase", _wrap_IntVector_erase, METH_VARARGS, NULL}, + { "new_IntVector", _wrap_new_IntVector, METH_VARARGS, NULL}, + { "IntVector_push_back", _wrap_IntVector_push_back, METH_VARARGS, NULL}, + { "IntVector_front", _wrap_IntVector_front, METH_O, NULL}, + { "IntVector_back", _wrap_IntVector_back, METH_O, NULL}, + { "IntVector_assign", _wrap_IntVector_assign, METH_VARARGS, NULL}, + { "IntVector_resize", _wrap_IntVector_resize, METH_VARARGS, NULL}, + { "IntVector_insert", _wrap_IntVector_insert, METH_VARARGS, NULL}, + { "IntVector_reserve", _wrap_IntVector_reserve, METH_VARARGS, NULL}, + { "IntVector_capacity", _wrap_IntVector_capacity, METH_O, NULL}, + { "delete_IntVector", _wrap_delete_IntVector, METH_O, NULL}, + { "IntVector_swigregister", IntVector_swigregister, METH_O, NULL}, + { "IntVector_swiginit", IntVector_swiginit, METH_VARARGS, NULL}, + { "DoubleVector_iterator", _wrap_DoubleVector_iterator, METH_O, NULL}, + { "DoubleVector___nonzero__", _wrap_DoubleVector___nonzero__, METH_O, NULL}, + { "DoubleVector___bool__", _wrap_DoubleVector___bool__, METH_O, NULL}, + { "DoubleVector___len__", _wrap_DoubleVector___len__, METH_O, NULL}, + { "DoubleVector___getslice__", _wrap_DoubleVector___getslice__, METH_VARARGS, NULL}, + { "DoubleVector___setslice__", _wrap_DoubleVector___setslice__, METH_VARARGS, NULL}, + { "DoubleVector___delslice__", _wrap_DoubleVector___delslice__, METH_VARARGS, NULL}, + { "DoubleVector___delitem__", _wrap_DoubleVector___delitem__, METH_VARARGS, NULL}, + { "DoubleVector___getitem__", _wrap_DoubleVector___getitem__, METH_VARARGS, NULL}, + { "DoubleVector___setitem__", _wrap_DoubleVector___setitem__, METH_VARARGS, NULL}, + { "DoubleVector_pop", _wrap_DoubleVector_pop, METH_O, NULL}, + { "DoubleVector_append", _wrap_DoubleVector_append, METH_VARARGS, NULL}, + { "DoubleVector_empty", _wrap_DoubleVector_empty, METH_O, NULL}, + { "DoubleVector_size", _wrap_DoubleVector_size, METH_O, NULL}, + { "DoubleVector_swap", _wrap_DoubleVector_swap, METH_VARARGS, NULL}, + { "DoubleVector_begin", _wrap_DoubleVector_begin, METH_O, NULL}, + { "DoubleVector_end", _wrap_DoubleVector_end, METH_O, NULL}, + { "DoubleVector_rbegin", _wrap_DoubleVector_rbegin, METH_O, NULL}, + { "DoubleVector_rend", _wrap_DoubleVector_rend, METH_O, NULL}, + { "DoubleVector_clear", _wrap_DoubleVector_clear, METH_O, NULL}, + { "DoubleVector_get_allocator", _wrap_DoubleVector_get_allocator, METH_O, NULL}, + { "DoubleVector_pop_back", _wrap_DoubleVector_pop_back, METH_O, NULL}, + { "DoubleVector_erase", _wrap_DoubleVector_erase, METH_VARARGS, NULL}, + { "new_DoubleVector", _wrap_new_DoubleVector, METH_VARARGS, NULL}, + { "DoubleVector_push_back", _wrap_DoubleVector_push_back, METH_VARARGS, NULL}, + { "DoubleVector_front", _wrap_DoubleVector_front, METH_O, NULL}, + { "DoubleVector_back", _wrap_DoubleVector_back, METH_O, NULL}, + { "DoubleVector_assign", _wrap_DoubleVector_assign, METH_VARARGS, NULL}, + { "DoubleVector_resize", _wrap_DoubleVector_resize, METH_VARARGS, NULL}, + { "DoubleVector_insert", _wrap_DoubleVector_insert, METH_VARARGS, NULL}, + { "DoubleVector_reserve", _wrap_DoubleVector_reserve, METH_VARARGS, NULL}, + { "DoubleVector_capacity", _wrap_DoubleVector_capacity, METH_O, NULL}, + { "delete_DoubleVector", _wrap_delete_DoubleVector, METH_O, NULL}, + { "DoubleVector_swigregister", DoubleVector_swigregister, METH_O, NULL}, + { "DoubleVector_swiginit", DoubleVector_swiginit, METH_VARARGS, NULL}, + { "DoubleDoubleVector_iterator", _wrap_DoubleDoubleVector_iterator, METH_O, NULL}, + { "DoubleDoubleVector___nonzero__", _wrap_DoubleDoubleVector___nonzero__, METH_O, NULL}, + { "DoubleDoubleVector___bool__", _wrap_DoubleDoubleVector___bool__, METH_O, NULL}, + { "DoubleDoubleVector___len__", _wrap_DoubleDoubleVector___len__, METH_O, NULL}, + { "DoubleDoubleVector___getslice__", _wrap_DoubleDoubleVector___getslice__, METH_VARARGS, NULL}, + { "DoubleDoubleVector___setslice__", _wrap_DoubleDoubleVector___setslice__, METH_VARARGS, NULL}, + { "DoubleDoubleVector___delslice__", _wrap_DoubleDoubleVector___delslice__, METH_VARARGS, NULL}, + { "DoubleDoubleVector___delitem__", _wrap_DoubleDoubleVector___delitem__, METH_VARARGS, NULL}, + { "DoubleDoubleVector___getitem__", _wrap_DoubleDoubleVector___getitem__, METH_VARARGS, NULL}, + { "DoubleDoubleVector___setitem__", _wrap_DoubleDoubleVector___setitem__, METH_VARARGS, NULL}, + { "DoubleDoubleVector_pop", _wrap_DoubleDoubleVector_pop, METH_O, NULL}, + { "DoubleDoubleVector_append", _wrap_DoubleDoubleVector_append, METH_VARARGS, NULL}, + { "DoubleDoubleVector_empty", _wrap_DoubleDoubleVector_empty, METH_O, NULL}, + { "DoubleDoubleVector_size", _wrap_DoubleDoubleVector_size, METH_O, NULL}, + { "DoubleDoubleVector_swap", _wrap_DoubleDoubleVector_swap, METH_VARARGS, NULL}, + { "DoubleDoubleVector_begin", _wrap_DoubleDoubleVector_begin, METH_O, NULL}, + { "DoubleDoubleVector_end", _wrap_DoubleDoubleVector_end, METH_O, NULL}, + { "DoubleDoubleVector_rbegin", _wrap_DoubleDoubleVector_rbegin, METH_O, NULL}, + { "DoubleDoubleVector_rend", _wrap_DoubleDoubleVector_rend, METH_O, NULL}, + { "DoubleDoubleVector_clear", _wrap_DoubleDoubleVector_clear, METH_O, NULL}, + { "DoubleDoubleVector_get_allocator", _wrap_DoubleDoubleVector_get_allocator, METH_O, NULL}, + { "DoubleDoubleVector_pop_back", _wrap_DoubleDoubleVector_pop_back, METH_O, NULL}, + { "DoubleDoubleVector_erase", _wrap_DoubleDoubleVector_erase, METH_VARARGS, NULL}, + { "new_DoubleDoubleVector", _wrap_new_DoubleDoubleVector, METH_VARARGS, NULL}, + { "DoubleDoubleVector_push_back", _wrap_DoubleDoubleVector_push_back, METH_VARARGS, NULL}, + { "DoubleDoubleVector_front", _wrap_DoubleDoubleVector_front, METH_O, NULL}, + { "DoubleDoubleVector_back", _wrap_DoubleDoubleVector_back, METH_O, NULL}, + { "DoubleDoubleVector_assign", _wrap_DoubleDoubleVector_assign, METH_VARARGS, NULL}, + { "DoubleDoubleVector_resize", _wrap_DoubleDoubleVector_resize, METH_VARARGS, NULL}, + { "DoubleDoubleVector_insert", _wrap_DoubleDoubleVector_insert, METH_VARARGS, NULL}, + { "DoubleDoubleVector_reserve", _wrap_DoubleDoubleVector_reserve, METH_VARARGS, NULL}, + { "DoubleDoubleVector_capacity", _wrap_DoubleDoubleVector_capacity, METH_O, NULL}, + { "delete_DoubleDoubleVector", _wrap_delete_DoubleDoubleVector, METH_O, NULL}, + { "DoubleDoubleVector_swigregister", DoubleDoubleVector_swigregister, METH_O, NULL}, + { "DoubleDoubleVector_swiginit", DoubleDoubleVector_swiginit, METH_VARARGS, NULL}, + { "StringVector_iterator", _wrap_StringVector_iterator, METH_O, NULL}, + { "StringVector___nonzero__", _wrap_StringVector___nonzero__, METH_O, NULL}, + { "StringVector___bool__", _wrap_StringVector___bool__, METH_O, NULL}, + { "StringVector___len__", _wrap_StringVector___len__, METH_O, NULL}, + { "StringVector___getslice__", _wrap_StringVector___getslice__, METH_VARARGS, NULL}, + { "StringVector___setslice__", _wrap_StringVector___setslice__, METH_VARARGS, NULL}, + { "StringVector___delslice__", _wrap_StringVector___delslice__, METH_VARARGS, NULL}, + { "StringVector___delitem__", _wrap_StringVector___delitem__, METH_VARARGS, NULL}, + { "StringVector___getitem__", _wrap_StringVector___getitem__, METH_VARARGS, NULL}, + { "StringVector___setitem__", _wrap_StringVector___setitem__, METH_VARARGS, NULL}, + { "StringVector_pop", _wrap_StringVector_pop, METH_O, NULL}, + { "StringVector_append", _wrap_StringVector_append, METH_VARARGS, NULL}, + { "StringVector_empty", _wrap_StringVector_empty, METH_O, NULL}, + { "StringVector_size", _wrap_StringVector_size, METH_O, NULL}, + { "StringVector_swap", _wrap_StringVector_swap, METH_VARARGS, NULL}, + { "StringVector_begin", _wrap_StringVector_begin, METH_O, NULL}, + { "StringVector_end", _wrap_StringVector_end, METH_O, NULL}, + { "StringVector_rbegin", _wrap_StringVector_rbegin, METH_O, NULL}, + { "StringVector_rend", _wrap_StringVector_rend, METH_O, NULL}, + { "StringVector_clear", _wrap_StringVector_clear, METH_O, NULL}, + { "StringVector_get_allocator", _wrap_StringVector_get_allocator, METH_O, NULL}, + { "StringVector_pop_back", _wrap_StringVector_pop_back, METH_O, NULL}, + { "StringVector_erase", _wrap_StringVector_erase, METH_VARARGS, NULL}, + { "new_StringVector", _wrap_new_StringVector, METH_VARARGS, NULL}, + { "StringVector_push_back", _wrap_StringVector_push_back, METH_VARARGS, NULL}, + { "StringVector_front", _wrap_StringVector_front, METH_O, NULL}, + { "StringVector_back", _wrap_StringVector_back, METH_O, NULL}, + { "StringVector_assign", _wrap_StringVector_assign, METH_VARARGS, NULL}, + { "StringVector_resize", _wrap_StringVector_resize, METH_VARARGS, NULL}, + { "StringVector_insert", _wrap_StringVector_insert, METH_VARARGS, NULL}, + { "StringVector_reserve", _wrap_StringVector_reserve, METH_VARARGS, NULL}, + { "StringVector_capacity", _wrap_StringVector_capacity, METH_O, NULL}, + { "delete_StringVector", _wrap_delete_StringVector, METH_O, NULL}, + { "StringVector_swigregister", StringVector_swigregister, METH_O, NULL}, + { "StringVector_swiginit", StringVector_swiginit, METH_VARARGS, NULL}, + { "VarsVector_iterator", _wrap_VarsVector_iterator, METH_O, NULL}, + { "VarsVector___nonzero__", _wrap_VarsVector___nonzero__, METH_O, NULL}, + { "VarsVector___bool__", _wrap_VarsVector___bool__, METH_O, NULL}, + { "VarsVector___len__", _wrap_VarsVector___len__, METH_O, NULL}, + { "VarsVector___getslice__", _wrap_VarsVector___getslice__, METH_VARARGS, NULL}, + { "VarsVector___setslice__", _wrap_VarsVector___setslice__, METH_VARARGS, NULL}, + { "VarsVector___delslice__", _wrap_VarsVector___delslice__, METH_VARARGS, NULL}, + { "VarsVector___delitem__", _wrap_VarsVector___delitem__, METH_VARARGS, NULL}, + { "VarsVector___getitem__", _wrap_VarsVector___getitem__, METH_VARARGS, NULL}, + { "VarsVector___setitem__", _wrap_VarsVector___setitem__, METH_VARARGS, NULL}, + { "VarsVector_pop", _wrap_VarsVector_pop, METH_O, NULL}, + { "VarsVector_append", _wrap_VarsVector_append, METH_VARARGS, NULL}, + { "VarsVector_empty", _wrap_VarsVector_empty, METH_O, NULL}, + { "VarsVector_size", _wrap_VarsVector_size, METH_O, NULL}, + { "VarsVector_swap", _wrap_VarsVector_swap, METH_VARARGS, NULL}, + { "VarsVector_begin", _wrap_VarsVector_begin, METH_O, NULL}, + { "VarsVector_end", _wrap_VarsVector_end, METH_O, NULL}, + { "VarsVector_rbegin", _wrap_VarsVector_rbegin, METH_O, NULL}, + { "VarsVector_rend", _wrap_VarsVector_rend, METH_O, NULL}, + { "VarsVector_clear", _wrap_VarsVector_clear, METH_O, NULL}, + { "VarsVector_get_allocator", _wrap_VarsVector_get_allocator, METH_O, NULL}, + { "VarsVector_pop_back", _wrap_VarsVector_pop_back, METH_O, NULL}, + { "VarsVector_erase", _wrap_VarsVector_erase, METH_VARARGS, NULL}, + { "new_VarsVector", _wrap_new_VarsVector, METH_VARARGS, NULL}, + { "VarsVector_push_back", _wrap_VarsVector_push_back, METH_VARARGS, NULL}, + { "VarsVector_front", _wrap_VarsVector_front, METH_O, NULL}, + { "VarsVector_back", _wrap_VarsVector_back, METH_O, NULL}, + { "VarsVector_assign", _wrap_VarsVector_assign, METH_VARARGS, NULL}, + { "VarsVector_resize", _wrap_VarsVector_resize, METH_VARARGS, NULL}, + { "VarsVector_insert", _wrap_VarsVector_insert, METH_VARARGS, NULL}, + { "VarsVector_reserve", _wrap_VarsVector_reserve, METH_VARARGS, NULL}, + { "VarsVector_capacity", _wrap_VarsVector_capacity, METH_O, NULL}, + { "delete_VarsVector", _wrap_delete_VarsVector, METH_O, NULL}, + { "VarsVector_swigregister", VarsVector_swigregister, METH_O, NULL}, + { "VarsVector_swiginit", VarsVector_swiginit, METH_VARARGS, NULL}, + { "VarsMap_iterator", _wrap_VarsMap_iterator, METH_O, NULL}, + { "VarsMap___nonzero__", _wrap_VarsMap___nonzero__, METH_O, NULL}, + { "VarsMap___bool__", _wrap_VarsMap___bool__, METH_O, NULL}, + { "VarsMap___len__", _wrap_VarsMap___len__, METH_O, NULL}, + { "VarsMap___getitem__", _wrap_VarsMap___getitem__, METH_VARARGS, NULL}, + { "VarsMap___delitem__", _wrap_VarsMap___delitem__, METH_VARARGS, NULL}, + { "VarsMap_has_key", _wrap_VarsMap_has_key, METH_VARARGS, NULL}, + { "VarsMap_keys", _wrap_VarsMap_keys, METH_O, NULL}, + { "VarsMap_values", _wrap_VarsMap_values, METH_O, NULL}, + { "VarsMap_items", _wrap_VarsMap_items, METH_O, NULL}, + { "VarsMap___contains__", _wrap_VarsMap___contains__, METH_VARARGS, NULL}, + { "VarsMap_key_iterator", _wrap_VarsMap_key_iterator, METH_O, NULL}, + { "VarsMap_value_iterator", _wrap_VarsMap_value_iterator, METH_O, NULL}, + { "VarsMap___setitem__", _wrap_VarsMap___setitem__, METH_VARARGS, NULL}, + { "VarsMap_asdict", _wrap_VarsMap_asdict, METH_O, NULL}, + { "new_VarsMap", _wrap_new_VarsMap, METH_VARARGS, NULL}, + { "VarsMap_empty", _wrap_VarsMap_empty, METH_O, NULL}, + { "VarsMap_size", _wrap_VarsMap_size, METH_O, NULL}, + { "VarsMap_swap", _wrap_VarsMap_swap, METH_VARARGS, NULL}, + { "VarsMap_begin", _wrap_VarsMap_begin, METH_O, NULL}, + { "VarsMap_end", _wrap_VarsMap_end, METH_O, NULL}, + { "VarsMap_rbegin", _wrap_VarsMap_rbegin, METH_O, NULL}, + { "VarsMap_rend", _wrap_VarsMap_rend, METH_O, NULL}, + { "VarsMap_clear", _wrap_VarsMap_clear, METH_O, NULL}, + { "VarsMap_get_allocator", _wrap_VarsMap_get_allocator, METH_O, NULL}, + { "VarsMap_count", _wrap_VarsMap_count, METH_VARARGS, NULL}, + { "VarsMap_erase", _wrap_VarsMap_erase, METH_VARARGS, NULL}, + { "VarsMap_find", _wrap_VarsMap_find, METH_VARARGS, NULL}, + { "VarsMap_lower_bound", _wrap_VarsMap_lower_bound, METH_VARARGS, NULL}, + { "VarsMap_upper_bound", _wrap_VarsMap_upper_bound, METH_VARARGS, NULL}, + { "delete_VarsMap", _wrap_delete_VarsMap, METH_O, NULL}, + { "VarsMap_swigregister", VarsMap_swigregister, METH_O, NULL}, + { "VarsMap_swiginit", VarsMap_swiginit, METH_VARARGS, NULL}, + { "VarsByCode_iterator", _wrap_VarsByCode_iterator, METH_O, NULL}, + { "VarsByCode___nonzero__", _wrap_VarsByCode___nonzero__, METH_O, NULL}, + { "VarsByCode___bool__", _wrap_VarsByCode___bool__, METH_O, NULL}, + { "VarsByCode___len__", _wrap_VarsByCode___len__, METH_O, NULL}, + { "VarsByCode___getitem__", _wrap_VarsByCode___getitem__, METH_VARARGS, NULL}, + { "VarsByCode___delitem__", _wrap_VarsByCode___delitem__, METH_VARARGS, NULL}, + { "VarsByCode_has_key", _wrap_VarsByCode_has_key, METH_VARARGS, NULL}, + { "VarsByCode_keys", _wrap_VarsByCode_keys, METH_O, NULL}, + { "VarsByCode_values", _wrap_VarsByCode_values, METH_O, NULL}, + { "VarsByCode_items", _wrap_VarsByCode_items, METH_O, NULL}, + { "VarsByCode___contains__", _wrap_VarsByCode___contains__, METH_VARARGS, NULL}, + { "VarsByCode_key_iterator", _wrap_VarsByCode_key_iterator, METH_O, NULL}, + { "VarsByCode_value_iterator", _wrap_VarsByCode_value_iterator, METH_O, NULL}, + { "VarsByCode___setitem__", _wrap_VarsByCode___setitem__, METH_VARARGS, NULL}, + { "VarsByCode_asdict", _wrap_VarsByCode_asdict, METH_O, NULL}, + { "new_VarsByCode", _wrap_new_VarsByCode, METH_VARARGS, NULL}, + { "VarsByCode_empty", _wrap_VarsByCode_empty, METH_O, NULL}, + { "VarsByCode_size", _wrap_VarsByCode_size, METH_O, NULL}, + { "VarsByCode_swap", _wrap_VarsByCode_swap, METH_VARARGS, NULL}, + { "VarsByCode_begin", _wrap_VarsByCode_begin, METH_O, NULL}, + { "VarsByCode_end", _wrap_VarsByCode_end, METH_O, NULL}, + { "VarsByCode_rbegin", _wrap_VarsByCode_rbegin, METH_O, NULL}, + { "VarsByCode_rend", _wrap_VarsByCode_rend, METH_O, NULL}, + { "VarsByCode_clear", _wrap_VarsByCode_clear, METH_O, NULL}, + { "VarsByCode_get_allocator", _wrap_VarsByCode_get_allocator, METH_O, NULL}, + { "VarsByCode_count", _wrap_VarsByCode_count, METH_VARARGS, NULL}, + { "VarsByCode_erase", _wrap_VarsByCode_erase, METH_VARARGS, NULL}, + { "VarsByCode_find", _wrap_VarsByCode_find, METH_VARARGS, NULL}, + { "VarsByCode_lower_bound", _wrap_VarsByCode_lower_bound, METH_VARARGS, NULL}, + { "VarsByCode_upper_bound", _wrap_VarsByCode_upper_bound, METH_VARARGS, NULL}, + { "delete_VarsByCode", _wrap_delete_VarsByCode, METH_O, NULL}, + { "VarsByCode_swigregister", VarsByCode_swigregister, METH_O, NULL}, + { "VarsByCode_swiginit", VarsByCode_swiginit, METH_VARARGS, NULL}, + { "TaxesMap_iterator", _wrap_TaxesMap_iterator, METH_O, NULL}, + { "TaxesMap___nonzero__", _wrap_TaxesMap___nonzero__, METH_O, NULL}, + { "TaxesMap___bool__", _wrap_TaxesMap___bool__, METH_O, NULL}, + { "TaxesMap___len__", _wrap_TaxesMap___len__, METH_O, NULL}, + { "TaxesMap___getitem__", _wrap_TaxesMap___getitem__, METH_VARARGS, NULL}, + { "TaxesMap___delitem__", _wrap_TaxesMap___delitem__, METH_VARARGS, NULL}, + { "TaxesMap_has_key", _wrap_TaxesMap_has_key, METH_VARARGS, NULL}, + { "TaxesMap_keys", _wrap_TaxesMap_keys, METH_O, NULL}, + { "TaxesMap_values", _wrap_TaxesMap_values, METH_O, NULL}, + { "TaxesMap_items", _wrap_TaxesMap_items, METH_O, NULL}, + { "TaxesMap___contains__", _wrap_TaxesMap___contains__, METH_VARARGS, NULL}, + { "TaxesMap_key_iterator", _wrap_TaxesMap_key_iterator, METH_O, NULL}, + { "TaxesMap_value_iterator", _wrap_TaxesMap_value_iterator, METH_O, NULL}, + { "TaxesMap___setitem__", _wrap_TaxesMap___setitem__, METH_VARARGS, NULL}, + { "TaxesMap_asdict", _wrap_TaxesMap_asdict, METH_O, NULL}, + { "new_TaxesMap", _wrap_new_TaxesMap, METH_VARARGS, NULL}, + { "TaxesMap_empty", _wrap_TaxesMap_empty, METH_O, NULL}, + { "TaxesMap_size", _wrap_TaxesMap_size, METH_O, NULL}, + { "TaxesMap_swap", _wrap_TaxesMap_swap, METH_VARARGS, NULL}, + { "TaxesMap_begin", _wrap_TaxesMap_begin, METH_O, NULL}, + { "TaxesMap_end", _wrap_TaxesMap_end, METH_O, NULL}, + { "TaxesMap_rbegin", _wrap_TaxesMap_rbegin, METH_O, NULL}, + { "TaxesMap_rend", _wrap_TaxesMap_rend, METH_O, NULL}, + { "TaxesMap_clear", _wrap_TaxesMap_clear, METH_O, NULL}, + { "TaxesMap_get_allocator", _wrap_TaxesMap_get_allocator, METH_O, NULL}, + { "TaxesMap_count", _wrap_TaxesMap_count, METH_VARARGS, NULL}, + { "TaxesMap_erase", _wrap_TaxesMap_erase, METH_VARARGS, NULL}, + { "TaxesMap_find", _wrap_TaxesMap_find, METH_VARARGS, NULL}, + { "TaxesMap_lower_bound", _wrap_TaxesMap_lower_bound, METH_VARARGS, NULL}, + { "TaxesMap_upper_bound", _wrap_TaxesMap_upper_bound, METH_VARARGS, NULL}, + { "delete_TaxesMap", _wrap_delete_TaxesMap, METH_O, NULL}, + { "TaxesMap_swigregister", TaxesMap_swigregister, METH_O, NULL}, + { "TaxesMap_swiginit", TaxesMap_swiginit, METH_VARARGS, NULL}, + { "ZaxesMap_iterator", _wrap_ZaxesMap_iterator, METH_O, NULL}, + { "ZaxesMap___nonzero__", _wrap_ZaxesMap___nonzero__, METH_O, NULL}, + { "ZaxesMap___bool__", _wrap_ZaxesMap___bool__, METH_O, NULL}, + { "ZaxesMap___len__", _wrap_ZaxesMap___len__, METH_O, NULL}, + { "ZaxesMap___getitem__", _wrap_ZaxesMap___getitem__, METH_VARARGS, NULL}, + { "ZaxesMap___delitem__", _wrap_ZaxesMap___delitem__, METH_VARARGS, NULL}, + { "ZaxesMap_has_key", _wrap_ZaxesMap_has_key, METH_VARARGS, NULL}, + { "ZaxesMap_keys", _wrap_ZaxesMap_keys, METH_O, NULL}, + { "ZaxesMap_values", _wrap_ZaxesMap_values, METH_O, NULL}, + { "ZaxesMap_items", _wrap_ZaxesMap_items, METH_O, NULL}, + { "ZaxesMap___contains__", _wrap_ZaxesMap___contains__, METH_VARARGS, NULL}, + { "ZaxesMap_key_iterator", _wrap_ZaxesMap_key_iterator, METH_O, NULL}, + { "ZaxesMap_value_iterator", _wrap_ZaxesMap_value_iterator, METH_O, NULL}, + { "ZaxesMap___setitem__", _wrap_ZaxesMap___setitem__, METH_VARARGS, NULL}, + { "ZaxesMap_asdict", _wrap_ZaxesMap_asdict, METH_O, NULL}, + { "new_ZaxesMap", _wrap_new_ZaxesMap, METH_VARARGS, NULL}, + { "ZaxesMap_empty", _wrap_ZaxesMap_empty, METH_O, NULL}, + { "ZaxesMap_size", _wrap_ZaxesMap_size, METH_O, NULL}, + { "ZaxesMap_swap", _wrap_ZaxesMap_swap, METH_VARARGS, NULL}, + { "ZaxesMap_begin", _wrap_ZaxesMap_begin, METH_O, NULL}, + { "ZaxesMap_end", _wrap_ZaxesMap_end, METH_O, NULL}, + { "ZaxesMap_rbegin", _wrap_ZaxesMap_rbegin, METH_O, NULL}, + { "ZaxesMap_rend", _wrap_ZaxesMap_rend, METH_O, NULL}, + { "ZaxesMap_clear", _wrap_ZaxesMap_clear, METH_O, NULL}, + { "ZaxesMap_get_allocator", _wrap_ZaxesMap_get_allocator, METH_O, NULL}, + { "ZaxesMap_count", _wrap_ZaxesMap_count, METH_VARARGS, NULL}, + { "ZaxesMap_erase", _wrap_ZaxesMap_erase, METH_VARARGS, NULL}, + { "ZaxesMap_find", _wrap_ZaxesMap_find, METH_VARARGS, NULL}, + { "ZaxesMap_lower_bound", _wrap_ZaxesMap_lower_bound, METH_VARARGS, NULL}, + { "ZaxesMap_upper_bound", _wrap_ZaxesMap_upper_bound, METH_VARARGS, NULL}, + { "delete_ZaxesMap", _wrap_delete_ZaxesMap, METH_O, NULL}, + { "ZaxesMap_swigregister", ZaxesMap_swigregister, METH_O, NULL}, + { "ZaxesMap_swiginit", ZaxesMap_swiginit, METH_VARARGS, NULL}, + { "GridsMap_iterator", _wrap_GridsMap_iterator, METH_O, NULL}, + { "GridsMap___nonzero__", _wrap_GridsMap___nonzero__, METH_O, NULL}, + { "GridsMap___bool__", _wrap_GridsMap___bool__, METH_O, NULL}, + { "GridsMap___len__", _wrap_GridsMap___len__, METH_O, NULL}, + { "GridsMap___getitem__", _wrap_GridsMap___getitem__, METH_VARARGS, NULL}, + { "GridsMap___delitem__", _wrap_GridsMap___delitem__, METH_VARARGS, NULL}, + { "GridsMap_has_key", _wrap_GridsMap_has_key, METH_VARARGS, NULL}, + { "GridsMap_keys", _wrap_GridsMap_keys, METH_O, NULL}, + { "GridsMap_values", _wrap_GridsMap_values, METH_O, NULL}, + { "GridsMap_items", _wrap_GridsMap_items, METH_O, NULL}, + { "GridsMap___contains__", _wrap_GridsMap___contains__, METH_VARARGS, NULL}, + { "GridsMap_key_iterator", _wrap_GridsMap_key_iterator, METH_O, NULL}, + { "GridsMap_value_iterator", _wrap_GridsMap_value_iterator, METH_O, NULL}, + { "GridsMap___setitem__", _wrap_GridsMap___setitem__, METH_VARARGS, NULL}, + { "GridsMap_asdict", _wrap_GridsMap_asdict, METH_O, NULL}, + { "new_GridsMap", _wrap_new_GridsMap, METH_VARARGS, NULL}, + { "GridsMap_empty", _wrap_GridsMap_empty, METH_O, NULL}, + { "GridsMap_size", _wrap_GridsMap_size, METH_O, NULL}, + { "GridsMap_swap", _wrap_GridsMap_swap, METH_VARARGS, NULL}, + { "GridsMap_begin", _wrap_GridsMap_begin, METH_O, NULL}, + { "GridsMap_end", _wrap_GridsMap_end, METH_O, NULL}, + { "GridsMap_rbegin", _wrap_GridsMap_rbegin, METH_O, NULL}, + { "GridsMap_rend", _wrap_GridsMap_rend, METH_O, NULL}, + { "GridsMap_clear", _wrap_GridsMap_clear, METH_O, NULL}, + { "GridsMap_get_allocator", _wrap_GridsMap_get_allocator, METH_O, NULL}, + { "GridsMap_count", _wrap_GridsMap_count, METH_VARARGS, NULL}, + { "GridsMap_erase", _wrap_GridsMap_erase, METH_VARARGS, NULL}, + { "GridsMap_find", _wrap_GridsMap_find, METH_VARARGS, NULL}, + { "GridsMap_lower_bound", _wrap_GridsMap_lower_bound, METH_VARARGS, NULL}, + { "GridsMap_upper_bound", _wrap_GridsMap_upper_bound, METH_VARARGS, NULL}, + { "delete_GridsMap", _wrap_delete_GridsMap, METH_O, NULL}, + { "GridsMap_swigregister", GridsMap_swigregister, METH_O, NULL}, + { "GridsMap_swiginit", GridsMap_swiginit, METH_VARARGS, NULL}, + { "new_CdiGrid", _wrap_new_CdiGrid, METH_VARARGS, NULL}, + { "delete_CdiGrid", _wrap_delete_CdiGrid, METH_O, NULL}, + { "CdiGrid_gridID_set", _wrap_CdiGrid_gridID_set, METH_VARARGS, NULL}, + { "CdiGrid_gridID_get", _wrap_CdiGrid_gridID_get, METH_O, NULL}, + { "CdiGrid_type_set", _wrap_CdiGrid_type_set, METH_VARARGS, NULL}, + { "CdiGrid_type_get", _wrap_CdiGrid_type_get, METH_O, NULL}, + { "CdiGrid_size_set", _wrap_CdiGrid_size_set, METH_VARARGS, NULL}, + { "CdiGrid_size_get", _wrap_CdiGrid_size_get, METH_O, NULL}, + { "CdiGrid_xsize_set", _wrap_CdiGrid_xsize_set, METH_VARARGS, NULL}, + { "CdiGrid_xsize_get", _wrap_CdiGrid_xsize_get, METH_O, NULL}, + { "CdiGrid_ysize_set", _wrap_CdiGrid_ysize_set, METH_VARARGS, NULL}, + { "CdiGrid_ysize_get", _wrap_CdiGrid_ysize_get, METH_O, NULL}, + { "CdiGrid_prec_set", _wrap_CdiGrid_prec_set, METH_VARARGS, NULL}, + { "CdiGrid_prec_get", _wrap_CdiGrid_prec_get, METH_O, NULL}, + { "CdiGrid_ncorner_set", _wrap_CdiGrid_ncorner_set, METH_VARARGS, NULL}, + { "CdiGrid_ncorner_get", _wrap_CdiGrid_ncorner_get, METH_O, NULL}, + { "CdiGrid_hasXValues_set", _wrap_CdiGrid_hasXValues_set, METH_VARARGS, NULL}, + { "CdiGrid_hasXValues_get", _wrap_CdiGrid_hasXValues_get, METH_O, NULL}, + { "CdiGrid_hasYValues_set", _wrap_CdiGrid_hasYValues_set, METH_VARARGS, NULL}, + { "CdiGrid_hasYValues_get", _wrap_CdiGrid_hasYValues_get, METH_O, NULL}, + { "CdiGrid_hasBounds_set", _wrap_CdiGrid_hasBounds_set, METH_VARARGS, NULL}, + { "CdiGrid_hasBounds_get", _wrap_CdiGrid_hasBounds_get, METH_O, NULL}, + { "CdiGrid_xvalues_set", _wrap_CdiGrid_xvalues_set, METH_VARARGS, NULL}, + { "CdiGrid_xvalues_get", _wrap_CdiGrid_xvalues_get, METH_O, NULL}, + { "CdiGrid_yvalues_set", _wrap_CdiGrid_yvalues_set, METH_VARARGS, NULL}, + { "CdiGrid_yvalues_get", _wrap_CdiGrid_yvalues_get, METH_O, NULL}, + { "CdiGrid_xbounds_set", _wrap_CdiGrid_xbounds_set, METH_VARARGS, NULL}, + { "CdiGrid_xbounds_get", _wrap_CdiGrid_xbounds_get, METH_O, NULL}, + { "CdiGrid_ybounds_set", _wrap_CdiGrid_ybounds_set, METH_VARARGS, NULL}, + { "CdiGrid_ybounds_get", _wrap_CdiGrid_ybounds_get, METH_O, NULL}, + { "CdiGrid_xname_set", _wrap_CdiGrid_xname_set, METH_VARARGS, NULL}, + { "CdiGrid_xname_get", _wrap_CdiGrid_xname_get, METH_O, NULL}, + { "CdiGrid_xlongname_set", _wrap_CdiGrid_xlongname_set, METH_VARARGS, NULL}, + { "CdiGrid_xlongname_get", _wrap_CdiGrid_xlongname_get, METH_O, NULL}, + { "CdiGrid_xstdname_set", _wrap_CdiGrid_xstdname_set, METH_VARARGS, NULL}, + { "CdiGrid_xstdname_get", _wrap_CdiGrid_xstdname_get, METH_O, NULL}, + { "CdiGrid_xunits_set", _wrap_CdiGrid_xunits_set, METH_VARARGS, NULL}, + { "CdiGrid_xunits_get", _wrap_CdiGrid_xunits_get, METH_O, NULL}, + { "CdiGrid_yname_set", _wrap_CdiGrid_yname_set, METH_VARARGS, NULL}, + { "CdiGrid_yname_get", _wrap_CdiGrid_yname_get, METH_O, NULL}, + { "CdiGrid_ylongname_set", _wrap_CdiGrid_ylongname_set, METH_VARARGS, NULL}, + { "CdiGrid_ylongname_get", _wrap_CdiGrid_ylongname_get, METH_O, NULL}, + { "CdiGrid_ystdname_set", _wrap_CdiGrid_ystdname_set, METH_VARARGS, NULL}, + { "CdiGrid_ystdname_get", _wrap_CdiGrid_ystdname_get, METH_O, NULL}, + { "CdiGrid_yunits_set", _wrap_CdiGrid_yunits_set, METH_VARARGS, NULL}, + { "CdiGrid_yunits_get", _wrap_CdiGrid_yunits_get, METH_O, NULL}, + { "CdiGrid_name_set", _wrap_CdiGrid_name_set, METH_VARARGS, NULL}, + { "CdiGrid_name_get", _wrap_CdiGrid_name_get, METH_O, NULL}, + { "CdiGrid_getValues", _wrap_CdiGrid_getValues, METH_O, NULL}, + { "CdiGrid_getBounds", _wrap_CdiGrid_getBounds, METH_O, NULL}, + { "CdiGrid_getValuesAsPointer", _wrap_CdiGrid_getValuesAsPointer, METH_VARARGS, NULL}, + { "CdiGrid_getBoundsAsPointer", _wrap_CdiGrid_getBoundsAsPointer, METH_VARARGS, NULL}, + { "CdiGrid_getFloatVals", _wrap_CdiGrid_getFloatVals, METH_VARARGS, NULL}, + { "CdiGrid_getFloatBounds", _wrap_CdiGrid_getFloatBounds, METH_VARARGS, NULL}, + { "CdiGrid_swigregister", CdiGrid_swigregister, METH_O, NULL}, + { "CdiGrid_swiginit", CdiGrid_swiginit, METH_VARARGS, NULL}, + { "new_CdiTaxis", _wrap_new_CdiTaxis, METH_VARARGS, NULL}, + { "delete_CdiTaxis", _wrap_delete_CdiTaxis, METH_O, NULL}, + { "CdiTaxis_taxisID_set", _wrap_CdiTaxis_taxisID_set, METH_VARARGS, NULL}, + { "CdiTaxis_taxisID_get", _wrap_CdiTaxis_taxisID_get, METH_O, NULL}, + { "CdiTaxis_ntsteps_set", _wrap_CdiTaxis_ntsteps_set, METH_VARARGS, NULL}, + { "CdiTaxis_ntsteps_get", _wrap_CdiTaxis_ntsteps_get, METH_O, NULL}, + { "CdiTaxis_unit_set", _wrap_CdiTaxis_unit_set, METH_VARARGS, NULL}, + { "CdiTaxis_unit_get", _wrap_CdiTaxis_unit_get, METH_O, NULL}, + { "CdiTaxis_rdate_set", _wrap_CdiTaxis_rdate_set, METH_VARARGS, NULL}, + { "CdiTaxis_rdate_get", _wrap_CdiTaxis_rdate_get, METH_O, NULL}, + { "CdiTaxis_rtime_set", _wrap_CdiTaxis_rtime_set, METH_VARARGS, NULL}, + { "CdiTaxis_rtime_get", _wrap_CdiTaxis_rtime_get, METH_O, NULL}, + { "CdiTaxis_vdate_set", _wrap_CdiTaxis_vdate_set, METH_VARARGS, NULL}, + { "CdiTaxis_vdate_get", _wrap_CdiTaxis_vdate_get, METH_O, NULL}, + { "CdiTaxis_vtime_set", _wrap_CdiTaxis_vtime_set, METH_VARARGS, NULL}, + { "CdiTaxis_vtime_get", _wrap_CdiTaxis_vtime_get, METH_O, NULL}, + { "CdiTaxis_type_set", _wrap_CdiTaxis_type_set, METH_VARARGS, NULL}, + { "CdiTaxis_type_get", _wrap_CdiTaxis_type_get, METH_O, NULL}, + { "CdiTaxis_calendar_set", _wrap_CdiTaxis_calendar_set, METH_VARARGS, NULL}, + { "CdiTaxis_calendar_get", _wrap_CdiTaxis_calendar_get, METH_O, NULL}, + { "CdiTaxis_hasBounds_set", _wrap_CdiTaxis_hasBounds_set, METH_VARARGS, NULL}, + { "CdiTaxis_hasBounds_get", _wrap_CdiTaxis_hasBounds_get, METH_O, NULL}, + { "CdiTaxis_name_set", _wrap_CdiTaxis_name_set, METH_VARARGS, NULL}, + { "CdiTaxis_name_get", _wrap_CdiTaxis_name_get, METH_O, NULL}, + { "CdiTaxis_unitname_set", _wrap_CdiTaxis_unitname_set, METH_VARARGS, NULL}, + { "CdiTaxis_unitname_get", _wrap_CdiTaxis_unitname_get, METH_O, NULL}, + { "CdiTaxis_swigregister", CdiTaxis_swigregister, METH_O, NULL}, + { "CdiTaxis_swiginit", CdiTaxis_swiginit, METH_VARARGS, NULL}, + { "new_CdiZaxis", _wrap_new_CdiZaxis, METH_VARARGS, NULL}, + { "delete_CdiZaxis", _wrap_delete_CdiZaxis, METH_O, NULL}, + { "CdiZaxis_zaxisID_set", _wrap_CdiZaxis_zaxisID_set, METH_VARARGS, NULL}, + { "CdiZaxis_zaxisID_get", _wrap_CdiZaxis_zaxisID_get, METH_O, NULL}, + { "CdiZaxis_type_set", _wrap_CdiZaxis_type_set, METH_VARARGS, NULL}, + { "CdiZaxis_type_get", _wrap_CdiZaxis_type_get, METH_O, NULL}, + { "CdiZaxis_ltype_set", _wrap_CdiZaxis_ltype_set, METH_VARARGS, NULL}, + { "CdiZaxis_ltype_get", _wrap_CdiZaxis_ltype_get, METH_O, NULL}, + { "CdiZaxis_size_set", _wrap_CdiZaxis_size_set, METH_VARARGS, NULL}, + { "CdiZaxis_size_get", _wrap_CdiZaxis_size_get, METH_O, NULL}, + { "CdiZaxis_prec_set", _wrap_CdiZaxis_prec_set, METH_VARARGS, NULL}, + { "CdiZaxis_prec_get", _wrap_CdiZaxis_prec_get, METH_O, NULL}, + { "CdiZaxis_plevels_set", _wrap_CdiZaxis_plevels_set, METH_VARARGS, NULL}, + { "CdiZaxis_plevels_get", _wrap_CdiZaxis_plevels_get, METH_O, NULL}, + { "CdiZaxis_plbounds_set", _wrap_CdiZaxis_plbounds_set, METH_VARARGS, NULL}, + { "CdiZaxis_plbounds_get", _wrap_CdiZaxis_plbounds_get, METH_O, NULL}, + { "CdiZaxis_pubounds_set", _wrap_CdiZaxis_pubounds_set, METH_VARARGS, NULL}, + { "CdiZaxis_pubounds_get", _wrap_CdiZaxis_pubounds_get, METH_O, NULL}, + { "CdiZaxis_pweights_set", _wrap_CdiZaxis_pweights_set, METH_VARARGS, NULL}, + { "CdiZaxis_pweights_get", _wrap_CdiZaxis_pweights_get, METH_O, NULL}, + { "CdiZaxis_levels_set", _wrap_CdiZaxis_levels_set, METH_VARARGS, NULL}, + { "CdiZaxis_levels_get", _wrap_CdiZaxis_levels_get, METH_O, NULL}, + { "CdiZaxis_lbounds_set", _wrap_CdiZaxis_lbounds_set, METH_VARARGS, NULL}, + { "CdiZaxis_lbounds_get", _wrap_CdiZaxis_lbounds_get, METH_O, NULL}, + { "CdiZaxis_ubounds_set", _wrap_CdiZaxis_ubounds_set, METH_VARARGS, NULL}, + { "CdiZaxis_ubounds_get", _wrap_CdiZaxis_ubounds_get, METH_O, NULL}, + { "CdiZaxis_weights_set", _wrap_CdiZaxis_weights_set, METH_VARARGS, NULL}, + { "CdiZaxis_weights_get", _wrap_CdiZaxis_weights_get, METH_O, NULL}, + { "CdiZaxis_name_set", _wrap_CdiZaxis_name_set, METH_VARARGS, NULL}, + { "CdiZaxis_name_get", _wrap_CdiZaxis_name_get, METH_O, NULL}, + { "CdiZaxis_longname_set", _wrap_CdiZaxis_longname_set, METH_VARARGS, NULL}, + { "CdiZaxis_longname_get", _wrap_CdiZaxis_longname_get, METH_O, NULL}, + { "CdiZaxis_units_set", _wrap_CdiZaxis_units_set, METH_VARARGS, NULL}, + { "CdiZaxis_units_get", _wrap_CdiZaxis_units_get, METH_O, NULL}, + { "CdiZaxis_swigregister", CdiZaxis_swigregister, METH_O, NULL}, + { "CdiZaxis_swiginit", CdiZaxis_swiginit, METH_VARARGS, NULL}, + { "new_CdiVariable", _wrap_new_CdiVariable, METH_VARARGS, NULL}, + { "delete_CdiVariable", _wrap_delete_CdiVariable, METH_O, NULL}, + { "CdiVariable_varID_set", _wrap_CdiVariable_varID_set, METH_VARARGS, NULL}, + { "CdiVariable_varID_get", _wrap_CdiVariable_varID_get, METH_O, NULL}, + { "CdiVariable_zaxisID_set", _wrap_CdiVariable_zaxisID_set, METH_VARARGS, NULL}, + { "CdiVariable_zaxisID_get", _wrap_CdiVariable_zaxisID_get, METH_O, NULL}, + { "CdiVariable_gridID_set", _wrap_CdiVariable_gridID_set, METH_VARARGS, NULL}, + { "CdiVariable_gridID_get", _wrap_CdiVariable_gridID_get, METH_O, NULL}, + { "CdiVariable_taxisID_set", _wrap_CdiVariable_taxisID_set, METH_VARARGS, NULL}, + { "CdiVariable_taxisID_get", _wrap_CdiVariable_taxisID_get, METH_O, NULL}, + { "CdiVariable_timeID_set", _wrap_CdiVariable_timeID_set, METH_VARARGS, NULL}, + { "CdiVariable_timeID_get", _wrap_CdiVariable_timeID_get, METH_O, NULL}, + { "CdiVariable_vlistID_set", _wrap_CdiVariable_vlistID_set, METH_VARARGS, NULL}, + { "CdiVariable_vlistID_get", _wrap_CdiVariable_vlistID_get, METH_O, NULL}, + { "CdiVariable_size_set", _wrap_CdiVariable_size_set, METH_VARARGS, NULL}, + { "CdiVariable_size_get", _wrap_CdiVariable_size_get, METH_O, NULL}, + { "CdiVariable_code_set", _wrap_CdiVariable_code_set, METH_VARARGS, NULL}, + { "CdiVariable_code_get", _wrap_CdiVariable_code_get, METH_O, NULL}, + { "CdiVariable_datatype_set", _wrap_CdiVariable_datatype_set, METH_VARARGS, NULL}, + { "CdiVariable_datatype_get", _wrap_CdiVariable_datatype_get, METH_O, NULL}, + { "CdiVariable_streamID_set", _wrap_CdiVariable_streamID_set, METH_VARARGS, NULL}, + { "CdiVariable_streamID_get", _wrap_CdiVariable_streamID_get, METH_O, NULL}, + { "CdiVariable_name_set", _wrap_CdiVariable_name_set, METH_VARARGS, NULL}, + { "CdiVariable_name_get", _wrap_CdiVariable_name_get, METH_O, NULL}, + { "CdiVariable_longname_set", _wrap_CdiVariable_longname_set, METH_VARARGS, NULL}, + { "CdiVariable_longname_get", _wrap_CdiVariable_longname_get, METH_O, NULL}, + { "CdiVariable_units_set", _wrap_CdiVariable_units_set, METH_VARARGS, NULL}, + { "CdiVariable_units_get", _wrap_CdiVariable_units_get, METH_O, NULL}, + { "CdiVariable_stdname_set", _wrap_CdiVariable_stdname_set, METH_VARARGS, NULL}, + { "CdiVariable_stdname_get", _wrap_CdiVariable_stdname_get, METH_O, NULL}, + { "CdiVariable_missval_set", _wrap_CdiVariable_missval_set, METH_VARARGS, NULL}, + { "CdiVariable_missval_get", _wrap_CdiVariable_missval_get, METH_O, NULL}, + { "CdiVariable_values_set", _wrap_CdiVariable_values_set, METH_VARARGS, NULL}, + { "CdiVariable_values_get", _wrap_CdiVariable_values_get, METH_O, NULL}, + { "CdiVariable_valuesWithLevel_set", _wrap_CdiVariable_valuesWithLevel_set, METH_VARARGS, NULL}, + { "CdiVariable_valuesWithLevel_get", _wrap_CdiVariable_valuesWithLevel_get, METH_O, NULL}, + { "CdiVariable_grid_set", _wrap_CdiVariable_grid_set, METH_VARARGS, NULL}, + { "CdiVariable_grid_get", _wrap_CdiVariable_grid_get, METH_O, NULL}, + { "CdiVariable_zaxis_set", _wrap_CdiVariable_zaxis_set, METH_VARARGS, NULL}, + { "CdiVariable_zaxis_get", _wrap_CdiVariable_zaxis_get, METH_O, NULL}, + { "CdiVariable_taxis_set", _wrap_CdiVariable_taxis_set, METH_VARARGS, NULL}, + { "CdiVariable_taxis_get", _wrap_CdiVariable_taxis_get, METH_O, NULL}, + { "CdiVariable_sinfo", _wrap_CdiVariable_sinfo, METH_O, NULL}, + { "CdiVariable_getValues", _wrap_CdiVariable_getValues, METH_O, NULL}, + { "CdiVariable_getValuesWithLevel", _wrap_CdiVariable_getValuesWithLevel, METH_VARARGS, NULL}, + { "CdiVariable_getFValues", _wrap_CdiVariable_getFValues, METH_O, NULL}, + { "CdiVariable_getFValuesWithLevel", _wrap_CdiVariable_getFValuesWithLevel, METH_VARARGS, NULL}, + { "CdiVariable_getValuesAsPointer", _wrap_CdiVariable_getValuesAsPointer, METH_O, NULL}, + { "CdiVariable_getValuesWithLevelAsPointer", _wrap_CdiVariable_getValuesWithLevelAsPointer, METH_VARARGS, NULL}, + { "CdiVariable_swigregister", CdiVariable_swigregister, METH_O, NULL}, + { "CdiVariable_swiginit", CdiVariable_swiginit, METH_VARARGS, NULL}, + { "new_Cdi", _wrap_new_Cdi, METH_O, NULL}, + { "delete_Cdi", _wrap_delete_Cdi, METH_O, NULL}, + { "Cdi_streamID_set", _wrap_Cdi_streamID_set, METH_VARARGS, NULL}, + { "Cdi_streamID_get", _wrap_Cdi_streamID_get, METH_O, NULL}, + { "Cdi_vlistID_set", _wrap_Cdi_vlistID_set, METH_VARARGS, NULL}, + { "Cdi_vlistID_get", _wrap_Cdi_vlistID_get, METH_O, NULL}, + { "Cdi_nvars_set", _wrap_Cdi_nvars_set, METH_VARARGS, NULL}, + { "Cdi_nvars_get", _wrap_Cdi_nvars_get, METH_O, NULL}, + { "Cdi_nzaxes_set", _wrap_Cdi_nzaxes_set, METH_VARARGS, NULL}, + { "Cdi_nzaxes_get", _wrap_Cdi_nzaxes_get, METH_O, NULL}, + { "Cdi_ngrids_set", _wrap_Cdi_ngrids_set, METH_VARARGS, NULL}, + { "Cdi_ngrids_get", _wrap_Cdi_ngrids_get, METH_O, NULL}, + { "Cdi_ntaxes_set", _wrap_Cdi_ntaxes_set, METH_VARARGS, NULL}, + { "Cdi_ntaxes_get", _wrap_Cdi_ntaxes_get, METH_O, NULL}, + { "Cdi_taxisID_set", _wrap_Cdi_taxisID_set, METH_VARARGS, NULL}, + { "Cdi_taxisID_get", _wrap_Cdi_taxisID_get, METH_O, NULL}, + { "Cdi_varnames_set", _wrap_Cdi_varnames_set, METH_VARARGS, NULL}, + { "Cdi_varnames_get", _wrap_Cdi_varnames_get, METH_O, NULL}, + { "Cdi_codes_set", _wrap_Cdi_codes_set, METH_VARARGS, NULL}, + { "Cdi_codes_get", _wrap_Cdi_codes_get, METH_O, NULL}, + { "Cdi_variables_set", _wrap_Cdi_variables_set, METH_VARARGS, NULL}, + { "Cdi_variables_get", _wrap_Cdi_variables_get, METH_O, NULL}, + { "Cdi_var_set", _wrap_Cdi_var_set, METH_VARARGS, NULL}, + { "Cdi_var_get", _wrap_Cdi_var_get, METH_O, NULL}, + { "Cdi_varByCode_set", _wrap_Cdi_varByCode_set, METH_VARARGS, NULL}, + { "Cdi_varByCode_get", _wrap_Cdi_varByCode_get, METH_O, NULL}, + { "Cdi_taxes_set", _wrap_Cdi_taxes_set, METH_VARARGS, NULL}, + { "Cdi_taxes_get", _wrap_Cdi_taxes_get, METH_O, NULL}, + { "Cdi_zaxes_set", _wrap_Cdi_zaxes_set, METH_VARARGS, NULL}, + { "Cdi_zaxes_get", _wrap_Cdi_zaxes_get, METH_O, NULL}, + { "Cdi_grids_set", _wrap_Cdi_grids_set, METH_VARARGS, NULL}, + { "Cdi_grids_get", _wrap_Cdi_grids_get, METH_O, NULL}, + { "Cdi_griddes", _wrap_Cdi_griddes, METH_O, NULL}, + { "Cdi_swigregister", Cdi_swigregister, METH_O, NULL}, + { "Cdi_swiginit", Cdi_swiginit, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + +static PyMethodDef SwigMethods_proxydocs[] = { + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static swig_type_info _swigt__p_Cdi = {"_p_Cdi", "Cdi *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CdiGrid = {"_p_CdiGrid", "std::map< int,CdiGrid >::mapped_type *|CdiGrid *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CdiTaxis = {"_p_CdiTaxis", "std::map< int,CdiTaxis >::mapped_type *|CdiTaxis *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CdiVariable = {"_p_CdiVariable", "std::map< std::string,CdiVariable >::mapped_type *|std::vector< CdiVariable >::value_type *|std::map< int,CdiVariable >::mapped_type *|CdiVariable *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CdiZaxis = {"_p_CdiZaxis", "std::map< int,CdiZaxis >::mapped_type *|CdiZaxis *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_mapped_type = {"_p_mapped_type", "mapped_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_CdiVariable_t = {"_p_std__allocatorT_CdiVariable_t", "std::vector< CdiVariable >::allocator_type *|std::allocator< CdiVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_double_t = {"_p_std__allocatorT_double_t", "std::vector< double >::allocator_type *|std::allocator< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_int_t = {"_p_std__allocatorT_int_t", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t = {"_p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t", "std::map< int,CdiGrid >::allocator_type *|std::allocator< std::pair< int const,CdiGrid > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t = {"_p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t", "std::map< int,CdiTaxis >::allocator_type *|std::allocator< std::pair< int const,CdiTaxis > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t = {"_p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t", "std::map< int,CdiVariable >::allocator_type *|std::allocator< std::pair< int const,CdiVariable > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t = {"_p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t", "std::map< int,CdiZaxis >::allocator_type *|std::allocator< std::pair< int const,CdiZaxis > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t = {"_p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t", "std::allocator< std::pair< std::string const,CdiVariable > > *|std::map< std::string,CdiVariable >::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__string_t = {"_p_std__allocatorT_std__string_t", "std::vector< std::string >::allocator_type *|std::allocator< std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t = {"_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t", "std::vector< std::vector< double > >::allocator_type *|std::allocator< std::vector< double,std::allocator< double > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__lessT_int_t = {"_p_std__lessT_int_t", "std::less< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__lessT_std__string_t = {"_p_std__lessT_std__string_t", "std::less< std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t = {"_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t", "std::map< int,CdiGrid > *|std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t = {"_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t", "std::map< int,CdiTaxis > *|std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t = {"_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t", "std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *|std::map< int,CdiVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t = {"_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t", "std::map< int,CdiZaxis > *|std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t = {"_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t", "std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *|std::map< std::string,CdiVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t = {"_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t", "std::vector< CdiVariable,std::allocator< CdiVariable > > *|std::vector< CdiVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_double_std__allocatorT_double_t_t = {"_p_std__vectorT_double_std__allocatorT_double_t_t", "std::vector< double,std::allocator< double > > *|std::vector< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_float_std__allocatorT_float_t_t = {"_p_std__vectorT_float_std__allocatorT_float_t_t", "std::vector< float,std::allocator< float > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t = {"_p_std__vectorT_std__string_std__allocatorT_std__string_t_t", "std::vector< std::string,std::allocator< std::string > > *|std::vector< std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t = {"_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t", "std::vector< std::vector< double > > *|std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *|std::vector< std::vector< double,std::allocator< double > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t = {"_p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t", "std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_Cdi, + &_swigt__p_CdiGrid, + &_swigt__p_CdiTaxis, + &_swigt__p_CdiVariable, + &_swigt__p_CdiZaxis, + &_swigt__p_allocator_type, + &_swigt__p_char, + &_swigt__p_difference_type, + &_swigt__p_double, + &_swigt__p_float, + &_swigt__p_key_type, + &_swigt__p_mapped_type, + &_swigt__p_p_PyObject, + &_swigt__p_p_double, + &_swigt__p_size_type, + &_swigt__p_std__allocatorT_CdiVariable_t, + &_swigt__p_std__allocatorT_double_t, + &_swigt__p_std__allocatorT_int_t, + &_swigt__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t, + &_swigt__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t, + &_swigt__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t, + &_swigt__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t, + &_swigt__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t, + &_swigt__p_std__allocatorT_std__string_t, + &_swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, + &_swigt__p_std__invalid_argument, + &_swigt__p_std__lessT_int_t, + &_swigt__p_std__lessT_std__string_t, + &_swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, + &_swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, + &_swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, + &_swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, + &_swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, + &_swigt__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, + &_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, + &_swigt__p_std__vectorT_float_std__allocatorT_float_t_t, + &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, + &_swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, + &_swigt__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, + &_swigt__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, + &_swigt__p_swig__SwigPyIterator, + &_swigt__p_value_type, +}; + +static swig_cast_info _swigc__p_Cdi[] = { {&_swigt__p_Cdi, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CdiGrid[] = { {&_swigt__p_CdiGrid, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CdiTaxis[] = { {&_swigt__p_CdiTaxis, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CdiVariable[] = { {&_swigt__p_CdiVariable, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CdiZaxis[] = { {&_swigt__p_CdiZaxis, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_key_type[] = { {&_swigt__p_key_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_mapped_type[] = { {&_swigt__p_mapped_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_CdiVariable_t[] = { {&_swigt__p_std__allocatorT_CdiVariable_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_double_t[] = { {&_swigt__p_std__allocatorT_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_int_t[] = { {&_swigt__p_std__allocatorT_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__string_t[] = { {&_swigt__p_std__allocatorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t[] = { {&_swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__lessT_int_t[] = { {&_swigt__p_std__lessT_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__lessT_std__string_t[] = { {&_swigt__p_std__lessT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t[] = { {&_swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t[] = { {&_swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t[] = { {&_swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t[] = { {&_swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t[] = { {&_swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t[] = { {&_swigt__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_double_std__allocatorT_double_t_t[] = { {&_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_float_std__allocatorT_float_t_t[] = { {&_swigt__p_std__vectorT_float_std__allocatorT_float_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__string_std__allocatorT_std__string_t_t[] = { {&_swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_Cdi, + _swigc__p_CdiGrid, + _swigc__p_CdiTaxis, + _swigc__p_CdiVariable, + _swigc__p_CdiZaxis, + _swigc__p_allocator_type, + _swigc__p_char, + _swigc__p_difference_type, + _swigc__p_double, + _swigc__p_float, + _swigc__p_key_type, + _swigc__p_mapped_type, + _swigc__p_p_PyObject, + _swigc__p_p_double, + _swigc__p_size_type, + _swigc__p_std__allocatorT_CdiVariable_t, + _swigc__p_std__allocatorT_double_t, + _swigc__p_std__allocatorT_int_t, + _swigc__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t, + _swigc__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t, + _swigc__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t, + _swigc__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t, + _swigc__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t, + _swigc__p_std__allocatorT_std__string_t, + _swigc__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, + _swigc__p_std__invalid_argument, + _swigc__p_std__lessT_int_t, + _swigc__p_std__lessT_std__string_t, + _swigc__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, + _swigc__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, + _swigc__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, + _swigc__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, + _swigc__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, + _swigc__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, + _swigc__p_std__vectorT_double_std__allocatorT_double_t_t, + _swigc__p_std__vectorT_float_std__allocatorT_float_t_t, + _swigc__p_std__vectorT_int_std__allocatorT_int_t_t, + _swigc__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, + _swigc__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, + _swigc__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, + _swigc__p_swig__SwigPyIterator, + _swigc__p_value_type, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_InternFromString("<Swig global variables>"); +#else + return PyString_FromString("<Swig global variables>"); +#endif + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *str = PyUnicode_InternFromString("("); + PyObject *tail; + PyObject *joined; + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + tail = PyUnicode_FromString(var->name); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + if (var->next) { + tail = PyUnicode_InternFromString(", "); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + } + } + tail = PyUnicode_InternFromString(")"); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; +#else + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); +#endif + return str; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "swigvarlink", /* tp_name */ + sizeof(swig_varlinkobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) swig_varlink_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + (getattrfunc) swig_varlink_getattr, /* tp_getattr */ + (setattrfunc) swig_varlink_setattr, /* tp_setattr */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc) swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + varlink_type = tmp; + type_init = 1; + if (PyType_Ready(&varlink_type) < 0) + return NULL; + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + memcpy(gv->name, name, size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *globals = 0; + if (!globals) { + globals = SWIG_newvarlink(); + } + return globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (!c) continue; + c = strstr(c, "swig_ptr: "); + if (c) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + memcpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + memcpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + + /* ----------------------------------------------------------------------------- + * Method creation and docstring support functions + * ----------------------------------------------------------------------------- */ + + /* ----------------------------------------------------------------------------- + * Function to find the method definition with the correct docstring for the + * proxy module as opposed to the low-level API + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) { + /* Find the function in the modified method table */ + size_t offset = 0; + int found = 0; + while (SwigMethods_proxydocs[offset].ml_meth != NULL) { + if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) { + found = 1; + break; + } + offset++; + } + /* Use the copy with the modified docstring if available */ + return found ? &SwigMethods_proxydocs[offset] : NULL; + } + + /* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { + if (PyCFunction_Check(func)) { + PyCFunctionObject *funcobj = (PyCFunctionObject *)func; + PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); + if (ml) + func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); + } +#if PY_VERSION_HEX >= 0x03000000 + return PyInstanceMethod_New(func); +#else + return PyMethod_New(func, NULL, NULL); +#endif + } + + /* ----------------------------------------------------------------------------- + * Wrapper of PyStaticMethod_New() + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { + if (PyCFunction_Check(func)) { + PyCFunctionObject *funcobj = (PyCFunctionObject *)func; + PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); + if (ml) + func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); + } + return PyStaticMethod_New(func); + } + +#ifdef __cplusplus +} +#endif + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif + +SWIGEXPORT +#if PY_VERSION_HEX >= 0x03000000 +PyObject* +#else +void +#endif +SWIG_init(void) { + PyObject *m, *d, *md, *globals; + +#if PY_VERSION_HEX >= 0x03000000 + static struct PyModuleDef SWIG_module = { + PyModuleDef_HEAD_INIT, + SWIG_name, + NULL, + -1, + SwigMethods, + NULL, + NULL, + NULL, + NULL + }; +#endif + +#if defined(SWIGPYTHON_BUILTIN) + static SwigPyClientData SwigPyObject_clientdata = { + 0, 0, 0, 0, 0, 0, 0 + }; + static PyGetSetDef this_getset_def = { + (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL + }; + static SwigPyGetSet thisown_getset_closure = { + SwigPyObject_own, + SwigPyObject_own + }; + static PyGetSetDef thisown_getset_def = { + (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure + }; + PyTypeObject *builtin_pytype; + int builtin_base_count; + swig_type_info *builtin_basetype; + PyObject *tuple; + PyGetSetDescrObject *static_getset; + PyTypeObject *metatype; + PyTypeObject *swigpyobject; + SwigPyClientData *cd; + PyObject *public_interface, *public_symbol; + PyObject *this_descr; + PyObject *thisown_descr; + PyObject *self = 0; + int i; + + (void)builtin_pytype; + (void)builtin_base_count; + (void)builtin_basetype; + (void)tuple; + (void)static_getset; + (void)self; + + /* Metaclass is used to implement static member variables */ + metatype = SwigPyObjectType(); + assert(metatype); +#endif + + (void)globals; + + /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */ + SWIG_This(); + SWIG_Python_TypeCache(); + SwigPyPacked_type(); +#ifndef SWIGPYTHON_BUILTIN + SwigPyObject_type(); +#endif + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + +#if PY_VERSION_HEX >= 0x03000000 + m = PyModule_Create(&SWIG_module); +#else + m = Py_InitModule(SWIG_name, SwigMethods); +#endif + + md = d = PyModule_GetDict(m); + (void)md; + + SWIG_InitializeModule(0); + +#ifdef SWIGPYTHON_BUILTIN + swigpyobject = SwigPyObject_TypeOnce(); + + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + if (!cd) { + SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; + SwigPyObject_clientdata.pytype = swigpyobject; + } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { + PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); +# if PY_VERSION_HEX >= 0x03000000 + return NULL; +# else + return; +# endif + } + + /* All objects have a 'this' attribute */ + this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); + (void)this_descr; + + /* All objects have a 'thisown' attribute */ + thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); + (void)thisown_descr; + + public_interface = PyList_New(0); + public_symbol = 0; + (void)public_symbol; + + PyDict_SetItemString(md, "__all__", public_interface); + Py_DECREF(public_interface); + for (i = 0; SwigMethods[i].ml_name != NULL; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); + for (i = 0; swig_const_table[i].name != 0; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); +#endif + + SWIG_InstallConstants(d,swig_const_table); + + + // thread safe initialization + swig::container_owner_attribute(); + +#if PY_VERSION_HEX >= 0x03000000 + return m; +#else + return; +#endif +} + diff --git a/interfaces/ruby/cdi_wrapper.cpp b/interfaces/ruby/cdi_wrapper.cpp new file mode 100644 index 000000000..701e66dcd --- /dev/null +++ b/interfaces/ruby/cdi_wrapper.cpp @@ -0,0 +1,33805 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.2 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + + +#ifndef SWIGRUBY +#define SWIGRUBY +#endif + + + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template<typename T> class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); + SwigValueWrapper(const SwigValueWrapper<T>& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template <typename T> T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 +#define SWIG_POINTER_NO_NULL 0x4 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if (<obj is ok>) { + if (<need new object>) { + *ptr = <ptr to new allocated object>; + return SWIG_NEWOBJ; + } else { + *ptr = <ptr to old object>; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include <string.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class<int>" == "Class<int >", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +#include <ruby.h> + +/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which + * breaks using rb_intern as an lvalue, as SWIG does. We work around this + * issue for now by disabling this. + * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645 + */ +#ifdef rb_intern +# undef rb_intern +#endif + +/* Remove global macros defined in Ruby's win32.h */ +#ifdef write +# undef write +#endif +#ifdef read +# undef read +#endif +#ifdef bind +# undef bind +#endif +#ifdef close +# undef close +#endif +#ifdef connect +# undef connect +#endif + + +/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ +#ifndef NUM2LL +#define NUM2LL(x) NUM2LONG((x)) +#endif +#ifndef LL2NUM +#define LL2NUM(x) INT2NUM((long) (x)) +#endif +#ifndef ULL2NUM +#define ULL2NUM(x) UINT2NUM((unsigned long) (x)) +#endif + +/* Ruby 1.7 doesn't (yet) define NUM2ULL() */ +#ifndef NUM2ULL +#ifdef HAVE_LONG_LONG +#define NUM2ULL(x) rb_num2ull((x)) +#else +#define NUM2ULL(x) NUM2ULONG(x) +#endif +#endif + +/* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */ +/* Define these for older versions so we can just write code the new way */ +#ifndef RSTRING_LEN +# define RSTRING_LEN(x) RSTRING(x)->len +#endif +#ifndef RSTRING_PTR +# define RSTRING_PTR(x) RSTRING(x)->ptr +#endif +#ifndef RSTRING_END +# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x)) +#endif +#ifndef RARRAY_LEN +# define RARRAY_LEN(x) RARRAY(x)->len +#endif +#ifndef RARRAY_PTR +# define RARRAY_PTR(x) RARRAY(x)->ptr +#endif +#ifndef RFLOAT_VALUE +# define RFLOAT_VALUE(x) RFLOAT(x)->value +#endif +#ifndef DOUBLE2NUM +# define DOUBLE2NUM(x) rb_float_new(x) +#endif +#ifndef RHASH_TBL +# define RHASH_TBL(x) (RHASH(x)->tbl) +#endif +#ifndef RHASH_ITER_LEV +# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev) +#endif +#ifndef RHASH_IFNONE +# define RHASH_IFNONE(x) (RHASH(x)->ifnone) +#endif +#ifndef RHASH_SIZE +# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries) +#endif +#ifndef RHASH_EMPTY_P +# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0) +#endif +#ifndef RSTRUCT_LEN +# define RSTRUCT_LEN(x) RSTRUCT(x)->len +#endif +#ifndef RSTRUCT_PTR +# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr +#endif +#ifndef RTYPEDDATA_P +# define RTYPEDDATA_P(x) (TYPE(x) != T_DATA) +#endif + + + +/* + * The following macros are used for providing the correct type of a + * function pointer to the Ruby C API. + * Starting with Ruby 2.7 (corresponding to RB_METHOD_DEFINITION_DECL being + * defined) these macros act transparently due to Ruby's moving away from + * ANYARGS and instead employing strict function signatures. + * + * Note: In case of C (not C++) the macros are transparent even before + * Ruby 2.7 due to the fact that the Ruby C API used function declarators + * with empty parentheses, which allows for an unspecified number of + * arguments. + * + * PROTECTFUNC(f) is used for the function pointer argument of the Ruby + * C API function rb_protect(). + * + * VALUEFUNC(f) is used for the function pointer argument(s) of Ruby C API + * functions like rb_define_method() and rb_define_singleton_method(). + * + * VOIDFUNC(f) is used to typecast a C function that implements either + * the "mark" or "free" stuff for a Ruby Data object, so that it can be + * passed as an argument to Ruby C API functions like Data_Wrap_Struct() + * and Data_Make_Struct(). + * + * SWIG_RUBY_VOID_ANYARGS_FUNC(f) is used for the function pointer + * argument(s) of Ruby C API functions like rb_define_virtual_variable(). + * + * SWIG_RUBY_INT_ANYARGS_FUNC(f) is used for the function pointer + * argument(s) of Ruby C API functions like st_foreach(). + */ +#if defined(__cplusplus) && !defined(RB_METHOD_DEFINITION_DECL) +# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) +# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) +# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) +# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) ((void (*)(ANYARGS))(f)) +# define SWIG_RUBY_INT_ANYARGS_FUNC(f) ((int (*)(ANYARGS))(f)) +#else +# define PROTECTFUNC(f) (f) +# define VALUEFUNC(f) (f) +# define VOIDFUNC(f) (f) +# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) (f) +# define SWIG_RUBY_INT_ANYARGS_FUNC(f) (f) +#endif + +/* Don't use for expressions have side effect */ +#ifndef RB_STRING_VALUE +#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) +#endif +#ifndef StringValue +#define StringValue(s) RB_STRING_VALUE(s) +#endif +#ifndef StringValuePtr +#define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s)) +#endif +#ifndef StringValueLen +#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s)) +#endif +#ifndef SafeStringValue +#define SafeStringValue(v) do {\ + StringValue(v);\ + rb_check_safe_str(v);\ +} while (0) +#endif + +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC +#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1) +#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") +#endif + +static VALUE _mSWIG = Qnil; + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + + +/* Define some additional error types */ +#define SWIG_ObjectPreviouslyDeletedError -100 + + +/* Define custom exceptions for errors that do not map to existing Ruby + exceptions. Note this only works for C++ since a global cannot be + initialized by a function in C. For C, fallback to rb_eRuntimeError.*/ + +SWIGINTERN VALUE +getNullReferenceError(void) { + static int init = 0; + static VALUE rb_eNullReferenceError ; + if (!init) { + init = 1; + rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError); + } + return rb_eNullReferenceError; +} + +SWIGINTERN VALUE +getObjectPreviouslyDeletedError(void) { + static int init = 0; + static VALUE rb_eObjectPreviouslyDeleted ; + if (!init) { + init = 1; + rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError); + } + return rb_eObjectPreviouslyDeleted; +} + + +SWIGINTERN VALUE +SWIG_Ruby_ErrorType(int SWIG_code) { + VALUE type; + switch (SWIG_code) { + case SWIG_MemoryError: + type = rb_eNoMemError; + break; + case SWIG_IOError: + type = rb_eIOError; + break; + case SWIG_RuntimeError: + type = rb_eRuntimeError; + break; + case SWIG_IndexError: + type = rb_eIndexError; + break; + case SWIG_TypeError: + type = rb_eTypeError; + break; + case SWIG_DivisionByZero: + type = rb_eZeroDivError; + break; + case SWIG_OverflowError: + type = rb_eRangeError; + break; + case SWIG_SyntaxError: + type = rb_eSyntaxError; + break; + case SWIG_ValueError: + type = rb_eArgError; + break; + case SWIG_SystemError: + type = rb_eFatal; + break; + case SWIG_AttributeError: + type = rb_eRuntimeError; + break; + case SWIG_NullReferenceError: + type = getNullReferenceError(); + break; + case SWIG_ObjectPreviouslyDeletedError: + type = getObjectPreviouslyDeletedError(); + break; + case SWIG_UnknownError: + type = rb_eRuntimeError; + break; + default: + type = rb_eRuntimeError; + } + return type; +} + + +/* This function is called when a user inputs a wrong argument to + a method. + */ +SWIGINTERN +const char* Ruby_Format_TypeError( const char* msg, + const char* type, + const char* name, + const int argn, + VALUE input ) +{ + char buf[128]; + VALUE str; + VALUE asStr; + if ( msg && *msg ) + { + str = rb_str_new2(msg); + } + else + { + str = rb_str_new(NULL, 0); + } + + str = rb_str_cat2( str, "Expected argument " ); + sprintf( buf, "%d of type ", argn-1 ); + str = rb_str_cat2( str, buf ); + str = rb_str_cat2( str, type ); + str = rb_str_cat2( str, ", but got " ); + str = rb_str_cat2( str, rb_obj_classname(input) ); + str = rb_str_cat2( str, " " ); + asStr = rb_inspect(input); + if ( RSTRING_LEN(asStr) > 30 ) + { + str = rb_str_cat( str, StringValuePtr(asStr), 30 ); + str = rb_str_cat2( str, "..." ); + } + else + { + str = rb_str_append( str, asStr ); + } + + if ( name ) + { + str = rb_str_cat2( str, "\n\tin SWIG method '" ); + str = rb_str_cat2( str, name ); + str = rb_str_cat2( str, "'" ); + } + + return StringValuePtr( str ); +} + +/* This function is called when an overloaded method fails */ +SWIGINTERN +void Ruby_Format_OverloadedError( + const int argc, + const int maxargs, + const char* method, + const char* prototypes + ) +{ + const char* msg = "Wrong # of arguments"; + if ( argc <= maxargs ) msg = "Wrong arguments"; + rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n" + "Possible C/C++ prototypes are:\n%s", + msg, method, prototypes); +} + +/* ----------------------------------------------------------------------------- + * rubytracking.swg + * + * This file contains support for tracking mappings from + * Ruby objects to C++ objects. This functionality is needed + * to implement mark functions for Ruby's mark and sweep + * garbage collector. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(ST_DATA_T_DEFINED) +/* Needs to be explicitly included for Ruby 1.8 and earlier */ +#include <st.h> +#endif + +/* Ruby 1.8 actually assumes the first case. */ +#if SIZEOF_VOIDP == SIZEOF_LONG +# define SWIG2NUM(v) LONG2NUM((unsigned long)v) +# define NUM2SWIG(x) (unsigned long)NUM2LONG(x) +#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG +# define SWIG2NUM(v) LL2NUM((unsigned long long)v) +# define NUM2SWIG(x) (unsigned long long)NUM2LL(x) +#else +# error sizeof(void*) is not the same as long or long long +#endif + +/* Global hash table to store Trackings from C/C++ + structs to Ruby Objects. +*/ +static st_table* swig_ruby_trackings = NULL; + +static VALUE swig_ruby_trackings_count(ID id, VALUE *var) { + return SWIG2NUM(swig_ruby_trackings->num_entries); +} + + +/* Setup a hash table to store Trackings */ +SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) { + /* Create a hash table to store Trackings from C++ + objects to Ruby objects. */ + + /* Try to see if some other .so has already created a + tracking hash table, which we keep hidden in an instance var + in the SWIG module. + This is done to allow multiple DSOs to share the same + tracking table. + */ + VALUE trackings_value = Qnil; + /* change the variable name so that we can mix modules + compiled with older SWIG's - this used to be called "@__trackings__" */ + ID trackings_id = rb_intern( "@__safetrackings__" ); + VALUE verbose = rb_gv_get("VERBOSE"); + rb_gv_set("VERBOSE", Qfalse); + trackings_value = rb_ivar_get( _mSWIG, trackings_id ); + rb_gv_set("VERBOSE", verbose); + + /* The trick here is that we have to store the hash table + pointer in a Ruby variable. We do not want Ruby's GC to + treat this pointer as a Ruby object, so we convert it to + a Ruby numeric value. */ + if (trackings_value == Qnil) { + /* No, it hasn't. Create one ourselves */ + swig_ruby_trackings = st_init_numtable(); + rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) ); + } else { + swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value); + } + + rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", + VALUEFUNC(swig_ruby_trackings_count), + SWIG_RUBY_VOID_ANYARGS_FUNC((rb_gvar_setter_t*)NULL)); +} + +/* Add a Tracking from a C/C++ struct to a Ruby object */ +SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) { + /* Store the mapping to the global hash table. */ + st_insert(swig_ruby_trackings, (st_data_t)ptr, object); +} + +/* Get the Ruby object that owns the specified C/C++ struct */ +SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) { + /* Now lookup the value stored in the global hash table */ + VALUE value; + + if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) { + return value; + } else { + return Qnil; + } +} + +/* Remove a Tracking from a C/C++ struct to a Ruby object. It + is very important to remove objects once they are destroyed + since the same memory address may be reused later to create + a new object. */ +SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) { + /* Delete the object from the hash table */ + st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL); +} + +/* This is a helper method that unlinks a Ruby object from its + underlying C++ object. This is needed if the lifetime of the + Ruby object is longer than the C++ object. */ +SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) { + VALUE object = SWIG_RubyInstanceFor(ptr); + + if (object != Qnil) { + // object might have the T_ZOMBIE type, but that's just + // because the GC has flagged it as such for a deferred + // destruction. Until then, it's still a T_DATA object. + DATA_PTR(object) = 0; + } +} + +/* This is a helper method that iterates over all the trackings + passing the C++ object pointer and its related Ruby object + to the passed callback function. */ + +/* Proxy method to abstract the internal trackings datatype */ +static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_data_t meth) { + ((void (*) (void *, VALUE))meth)((void *)ptr, (VALUE)obj); + return ST_CONTINUE; +} + +SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) { + st_foreach(swig_ruby_trackings, + SWIG_RUBY_INT_ANYARGS_FUNC(swig_ruby_internal_iterate_callback), + (st_data_t)meth); +} + +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * Ruby API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +SWIGINTERN VALUE +SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { + if (NIL_P(target)) { + target = o; + } else { + if (TYPE(target) != T_ARRAY) { + VALUE o2 = target; + target = rb_ary_new(); + rb_ary_push(target, o2); + } + rb_ary_push(target, o); + } + return target; +} + +/* For ruby1.8.4 and earlier. */ +#ifndef RUBY_INIT_STACK + RUBY_EXTERN void Init_stack(VALUE* addr); +# define RUBY_INIT_STACK \ + VALUE variable_in_this_stack_frame; \ + Init_stack(&variable_in_this_stack_frame); +#endif + + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * rubyrun.swg + * + * This file contains the runtime support for Ruby modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* For backward compatibility only */ +#define SWIG_POINTER_EXCEPTION 0 + +/* for raw pointers */ +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags) +#define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own) +#define swig_owntype swig_ruby_owntype + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) + + +/* Error manipulation */ + +#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code) +#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg) +#define SWIG_fail goto fail + + +/* Ruby-specific SWIG API */ + +#define SWIG_InitRuntime() SWIG_Ruby_InitRuntime() +#define SWIG_define_class(ty) SWIG_Ruby_define_class(ty) +#define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty) +#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value) +#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty) + +#include "assert.h" + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + VALUE klass; + VALUE mImpl; + void (*mark)(void *); + void (*destroy)(void *); + int trackObjects; +} swig_class; + + +/* Global pointer used to keep some internal SWIG stuff */ +static VALUE _cSWIG_Pointer = Qnil; +static VALUE swig_runtime_data_type_pointer = Qnil; + +/* Global IDs used to keep some internal SWIG stuff */ +static ID swig_arity_id = 0; +static ID swig_call_id = 0; + +/* + If your swig extension is to be run within an embedded ruby and has + director callbacks, you should set -DRUBY_EMBEDDED during compilation. + This will reset ruby's stack frame on each entry point from the main + program the first time a virtual director function is invoked (in a + non-recursive way). + If this is not done, you run the risk of Ruby trashing the stack. +*/ + +#ifdef RUBY_EMBEDDED + +# define SWIG_INIT_STACK \ + if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \ + ++swig_virtual_calls; +# define SWIG_RELEASE_STACK --swig_virtual_calls; +# define Ruby_DirectorTypeMismatchException(x) \ + rb_raise( rb_eTypeError, "%s", x ); return c_result; + + static unsigned int swig_virtual_calls = 0; + +#else /* normal non-embedded extension */ + +# define SWIG_INIT_STACK +# define SWIG_RELEASE_STACK +# define Ruby_DirectorTypeMismatchException(x) \ + throw Swig::DirectorTypeMismatchException( x ); + +#endif /* RUBY_EMBEDDED */ + + +SWIGRUNTIME VALUE +getExceptionClass(void) { + static int init = 0; + static VALUE rubyExceptionClass ; + if (!init) { + init = 1; + rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception")); + } + return rubyExceptionClass; +} + +/* This code checks to see if the Ruby object being raised as part + of an exception inherits from the Ruby class Exception. If so, + the object is simply returned. If not, then a new Ruby exception + object is created and that will be returned to Ruby.*/ +SWIGRUNTIME VALUE +SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) { + VALUE exceptionClass = getExceptionClass(); + if (rb_obj_is_kind_of(obj, exceptionClass)) { + return obj; + } else { + return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)); + } +} + +/* Initialize Ruby runtime support */ +SWIGRUNTIME void +SWIG_Ruby_InitRuntime(void) +{ + if (_mSWIG == Qnil) { + _mSWIG = rb_define_module("SWIG"); + swig_call_id = rb_intern("call"); + swig_arity_id = rb_intern("arity"); + } +} + +/* Define Ruby class for C type */ +SWIGRUNTIME void +SWIG_Ruby_define_class(swig_type_info *type) +{ + char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); + sprintf(klass_name, "TYPE%s", type->name); + if (NIL_P(_cSWIG_Pointer)) { + _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); + rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); + } + rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); + free((void *) klass_name); +} + +/* Create a new pointer object */ +SWIGRUNTIME VALUE +SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) +{ + int own = flags & SWIG_POINTER_OWN; + int track; + char *klass_name; + swig_class *sklass; + VALUE klass; + VALUE obj; + + if (!ptr) + return Qnil; + + assert(type); + if (type->clientdata) { + sklass = (swig_class *) type->clientdata; + + /* Are we tracking this class and have we already returned this Ruby object? */ + track = sklass->trackObjects; + if (track) { + obj = SWIG_RubyInstanceFor(ptr); + + /* Check the object's type and make sure it has the correct type. + It might not in cases where methods do things like + downcast methods. */ + if (obj != Qnil) { + VALUE value = rb_iv_get(obj, "@__swigtype__"); + const char* type_name = RSTRING_PTR(value); + + if (strcmp(type->name, type_name) == 0) { + return obj; + } + } + } + + /* Create a new Ruby object */ + obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), + ( own ? VOIDFUNC(sklass->destroy) : + (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 ) + ), ptr); + + /* If tracking is on for this class then track this object. */ + if (track) { + SWIG_RubyAddTracking(ptr, obj); + } + } else { + klass_name = (char *) malloc(4 + strlen(type->name) + 1); + sprintf(klass_name, "TYPE%s", type->name); + klass = rb_const_get(_mSWIG, rb_intern(klass_name)); + free((void *) klass_name); + obj = Data_Wrap_Struct(klass, 0, 0, ptr); + } + rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); + + return obj; +} + +/* Create a new class instance (always owned) */ +SWIGRUNTIME VALUE +SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) +{ + VALUE obj; + swig_class *sklass = (swig_class *) type->clientdata; + obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0); + rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); + return obj; +} + +/* Get type mangle from class name */ +SWIGRUNTIMEINLINE char * +SWIG_Ruby_MangleStr(VALUE obj) +{ + VALUE stype = rb_iv_get(obj, "@__swigtype__"); + if (NIL_P(stype)) + return NULL; + return StringValuePtr(stype); +} + +/* Acquire a pointer value */ +typedef struct { + void (*datafree)(void *); + int own; +} swig_ruby_owntype; + +SWIGRUNTIME swig_ruby_owntype +SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) { + swig_ruby_owntype oldown = {0, 0}; + if (TYPE(obj) == T_DATA && !RTYPEDDATA_P(obj)) { + oldown.datafree = RDATA(obj)->dfree; + RDATA(obj)->dfree = own.datafree; + } + return oldown; +} + +/* Convert a pointer value */ +SWIGRUNTIME int +SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own) +{ + char *c; + swig_cast_info *tc; + void *vptr = 0; + + /* Grab the pointer */ + if (NIL_P(obj)) { + if (ptr) + *ptr = 0; + return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; + } else { + if (TYPE(obj) != T_DATA || (TYPE(obj) == T_DATA && RTYPEDDATA_P(obj))) { + return SWIG_ERROR; + } + Data_Get_Struct(obj, void, vptr); + } + + if (own) { + own->datafree = RDATA(obj)->dfree; + own->own = 0; + } + + /* Check to see if the input object is giving up ownership + of the underlying C struct or C++ object. If so then we + need to reset the destructor since the Ruby object no + longer owns the underlying C++ object.*/ + if (flags & SWIG_POINTER_DISOWN) { + /* Is tracking on for this class? */ + int track = 0; + if (ty && ty->clientdata) { + swig_class *sklass = (swig_class *) ty->clientdata; + track = sklass->trackObjects; + } + + if (track) { + /* We are tracking objects for this class. Thus we change the destructor + * to SWIG_RubyRemoveTracking. This allows us to + * remove the mapping from the C++ to Ruby object + * when the Ruby object is garbage collected. If we don't + * do this, then it is possible we will return a reference + * to a Ruby object that no longer exists thereby crashing Ruby. */ + RDATA(obj)->dfree = SWIG_RubyRemoveTracking; + } else { + RDATA(obj)->dfree = 0; + } + } + + /* Do type-checking if type info was provided */ + if (ty) { + if (ty->clientdata) { + if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) { + if (vptr == 0) { + /* The object has already been deleted */ + return SWIG_ObjectPreviouslyDeletedError; + } + } + } + if ((c = SWIG_MangleStr(obj)) == NULL) { + return SWIG_ERROR; + } + tc = SWIG_TypeCheck(c, ty); + if (!tc) { + return SWIG_ERROR; + } else { + if (ptr) { + if (tc->type == ty) { + *ptr = vptr; + } else { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc, vptr, &newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + own->own = own->own | SWIG_CAST_NEW_MEMORY; + } + } + } + } + } else { + if (ptr) + *ptr = vptr; + } + + return SWIG_OK; +} + +/* Check convert */ +SWIGRUNTIMEINLINE int +SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty) +{ + char *c = SWIG_MangleStr(obj); + if (!c) return 0; + return SWIG_TypeCheck(c,ty) != 0; +} + +SWIGRUNTIME VALUE +SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; + *(r++) = '_'; + r = SWIG_PackData(r, ptr, sz); + strcpy(r, type->name); + return rb_str_new2(result); +} + +/* Convert a packed pointer value */ +SWIGRUNTIME int +SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) { + swig_cast_info *tc; + const char *c; + + if (TYPE(obj) != T_STRING) goto type_error; + c = StringValuePtr(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') goto type_error; + c++; + c = SWIG_UnpackData(c, ptr, sz); + if (ty) { + tc = SWIG_TypeCheck(c, ty); + if (!tc) goto type_error; + } + return SWIG_OK; + + type_error: + return SWIG_ERROR; +} + +SWIGRUNTIME swig_module_info * +SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata)) +{ + VALUE pointer; + swig_module_info *ret = 0; + VALUE verbose = rb_gv_get("VERBOSE"); + + /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */ + rb_gv_set("VERBOSE", Qfalse); + + /* first check if pointer already created */ + pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); + if (pointer != Qnil) { + Data_Get_Struct(pointer, swig_module_info, ret); + } + + /* reinstate warnings */ + rb_gv_set("VERBOSE", verbose); + return ret; +} + +SWIGRUNTIME void +SWIG_Ruby_SetModule(swig_module_info *pointer) +{ + /* register a new class */ + VALUE cl = rb_define_class("swig_runtime_data", rb_cObject); + /* create and store the structure pointer to a global variable */ + swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer); + rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer); +} + +/* This function can be used to check whether a proc or method or similarly + callable function has been passed. Usually used in a %typecheck, like: + + %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) { + $result = SWIG_Ruby_isCallable( $input ); + } + */ +SWIGINTERN +int SWIG_Ruby_isCallable( VALUE proc ) +{ + if ( rb_respond_to( proc, swig_call_id ) ) + return 1; + return 0; +} + +/* This function can be used to check the arity (number of arguments) + a proc or method can take. Usually used in a %typecheck. + Valid arities will be that equal to minimal or those < 0 + which indicate a variable number of parameters at the end. + */ +SWIGINTERN +int SWIG_Ruby_arity( VALUE proc, int minimal ) +{ + if ( rb_respond_to( proc, swig_arity_id ) ) + { + VALUE num = rb_funcall( proc, swig_arity_id, 0 ); + int arity = NUM2INT(num); + if ( arity < 0 && (arity+1) < -minimal ) return 1; + if ( arity == minimal ) return 1; + return 1; + } + return 0; +} + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0) + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_Cdi swig_types[0] +#define SWIGTYPE_p_CdiGrid swig_types[1] +#define SWIGTYPE_p_CdiTaxis swig_types[2] +#define SWIGTYPE_p_CdiVariable swig_types[3] +#define SWIGTYPE_p_CdiZaxis swig_types[4] +#define SWIGTYPE_p_allocator_type swig_types[5] +#define SWIGTYPE_p_char swig_types[6] +#define SWIGTYPE_p_difference_type swig_types[7] +#define SWIGTYPE_p_double swig_types[8] +#define SWIGTYPE_p_float swig_types[9] +#define SWIGTYPE_p_key_type swig_types[10] +#define SWIGTYPE_p_mapped_type swig_types[11] +#define SWIGTYPE_p_p_double swig_types[12] +#define SWIGTYPE_p_p_void swig_types[13] +#define SWIGTYPE_p_size_type swig_types[14] +#define SWIGTYPE_p_std__allocatorT_CdiVariable_t swig_types[15] +#define SWIGTYPE_p_std__allocatorT_double_t swig_types[16] +#define SWIGTYPE_p_std__allocatorT_int_t swig_types[17] +#define SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t swig_types[18] +#define SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t swig_types[19] +#define SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t swig_types[20] +#define SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t swig_types[21] +#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t swig_types[22] +#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[23] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[24] +#define SWIGTYPE_p_std__lessT_int_t swig_types[25] +#define SWIGTYPE_p_std__lessT_std__string_t swig_types[26] +#define SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t swig_types[27] +#define SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator swig_types[28] +#define SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator swig_types[29] +#define SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t swig_types[30] +#define SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator swig_types[31] +#define SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator swig_types[32] +#define SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t swig_types[33] +#define SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator swig_types[34] +#define SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator swig_types[35] +#define SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t swig_types[36] +#define SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator swig_types[37] +#define SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator swig_types[38] +#define SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t swig_types[39] +#define SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator swig_types[40] +#define SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator swig_types[41] +#define SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t swig_types[42] +#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[43] +#define SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t swig_types[44] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[45] +#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[46] +#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[47] +#define SWIGTYPE_p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t swig_types[48] +#define SWIGTYPE_p_swig__ConstIterator swig_types[49] +#define SWIGTYPE_p_swig__GC_VALUE swig_types[50] +#define SWIGTYPE_p_swig__Iterator swig_types[51] +#define SWIGTYPE_p_value_type swig_types[52] +#define SWIGTYPE_p_void swig_types[53] +static swig_type_info *swig_types[55]; +static swig_module_info swig_module = {swig_types, 54, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#define SWIG_init Init_Cdi +#define SWIG_name "Cdi" + +static VALUE mCdi; + +#define SWIG_RUBY_THREAD_BEGIN_BLOCK +#define SWIG_RUBY_THREAD_END_BLOCK + + +#define SWIGVERSION 0x040002 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) + + +#include <stdexcept> + + +#define SWIG_FILE_WITH_INIT +#include "cdi.hpp" + + +#include <typeinfo> +#include <stdexcept> + + +namespace swig { + class SwigGCReferences { + VALUE _hash; + + SwigGCReferences() : _hash(Qnil) { + } + ~SwigGCReferences() { + if (_hash != Qnil) + rb_gc_unregister_address(&_hash); + } + static void EndProcHandler(VALUE) { + // Ruby interpreter ending - _hash can no longer be accessed. + SwigGCReferences &s_references = instance(); + s_references._hash = Qnil; + } + public: + static SwigGCReferences& instance() { + // Hash of all GC_VALUE's currently in use + static SwigGCReferences s_references; + + return s_references; + } + static void initialize() { + SwigGCReferences &s_references = instance(); + if (s_references._hash == Qnil) { + rb_set_end_proc(&EndProcHandler, Qnil); + s_references._hash = rb_hash_new(); + rb_gc_register_address(&s_references._hash); + } + } + void GC_register(VALUE& obj) { + if (FIXNUM_P(obj) || SPECIAL_CONST_P(obj) || SYMBOL_P(obj)) + return; + if (_hash != Qnil) { + VALUE val = rb_hash_aref(_hash, obj); + unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 0; + ++n; + rb_hash_aset(_hash, obj, INT2NUM(n)); + } + } + void GC_unregister(const VALUE& obj) { + if (FIXNUM_P(obj) || SPECIAL_CONST_P(obj) || SYMBOL_P(obj)) + return; + // this test should not be needed but I've noticed some very erratic + // behavior of none being unregistered in some very rare situations. + if (BUILTIN_TYPE(obj) == T_NONE) + return; + if (_hash != Qnil) { + VALUE val = rb_hash_aref(_hash, obj); + unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 1; + --n; + if (n) + rb_hash_aset(_hash, obj, INT2NUM(n)); + else + rb_hash_delete(_hash, obj); + } + } + }; + + class GC_VALUE { + protected: + VALUE _obj; + + static ID hash_id; + static ID lt_id; + static ID gt_id; + static ID eq_id; + static ID le_id; + static ID ge_id; + + static ID pos_id; + static ID neg_id; + static ID inv_id; + + static ID add_id; + static ID sub_id; + static ID mul_id; + static ID div_id; + static ID mod_id; + + static ID and_id; + static ID or_id; + static ID xor_id; + + static ID lshift_id; + static ID rshift_id; + + struct OpArgs + { + VALUE src; + ID id; + int nargs; + VALUE target; + }; + + + public: + GC_VALUE() : _obj(Qnil) + { + } + + GC_VALUE(const GC_VALUE& item) : _obj(item._obj) + { + SwigGCReferences::instance().GC_register(_obj); + } + + GC_VALUE(VALUE obj) :_obj(obj) + { + SwigGCReferences::instance().GC_register(_obj); + } + + ~GC_VALUE() + { + SwigGCReferences::instance().GC_unregister(_obj); + } + + GC_VALUE & operator=(const GC_VALUE& item) + { + SwigGCReferences::instance().GC_unregister(_obj); + _obj = item._obj; + SwigGCReferences::instance().GC_register(_obj); + return *this; + } + + operator VALUE() const + { + return _obj; + } + + VALUE inspect() const + { + return rb_inspect(_obj); + } + + VALUE to_s() const + { + return rb_inspect(_obj); + } + + static VALUE swig_rescue_swallow(VALUE, VALUE) + { + /* + VALUE errstr = rb_obj_as_string(rb_errinfo()); + printf("Swallowing error: '%s'\n", RSTRING_PTR(StringValue(errstr))); + */ + return Qnil; /* Swallow Ruby exception */ + } + + static VALUE swig_rescue_funcall(VALUE p) + { + OpArgs* args = (OpArgs*) p; + return rb_funcall(args->src, args->id, args->nargs, args->target); + } + + bool relational_equal_op(const GC_VALUE& other, const ID& op_id, bool (*op_func)(const VALUE& a, const VALUE& b)) const + { + if (FIXNUM_P(_obj) && FIXNUM_P(other._obj)) { + return op_func(_obj, other._obj); + } + bool res = false; + VALUE ret = Qnil; + SWIG_RUBY_THREAD_BEGIN_BLOCK; + if (rb_respond_to(_obj, op_id)) { + OpArgs args; + args.src = _obj; + args.id = op_id; + args.nargs = 1; + args.target = VALUE(other); + ret = rb_rescue(VALUEFUNC(swig_rescue_funcall), VALUE(&args), + (VALUEFUNC(swig_rescue_swallow)), Qnil); + } + if (ret == Qnil) { + VALUE a = rb_funcall( _obj, hash_id, 0 ); + VALUE b = rb_funcall( VALUE(other), hash_id, 0 ); + res = op_func(a, b); + } else { + res = RTEST(ret); + } + SWIG_RUBY_THREAD_END_BLOCK; + return res; + } + + static bool operator_eq(const VALUE& a, const VALUE& b) { return a == b; } + static bool operator_lt(const VALUE& a, const VALUE& b) { return a < b; } + static bool operator_le(const VALUE& a, const VALUE& b) { return a <= b; } + static bool operator_gt(const VALUE& a, const VALUE& b) { return a > b; } + static bool operator_ge(const VALUE& a, const VALUE& b) { return a >= b; } + + bool operator==(const GC_VALUE& other) const { return relational_equal_op(other, eq_id, operator_eq); } + bool operator<(const GC_VALUE& other) const { return relational_equal_op(other, lt_id, operator_lt); } + bool operator<=(const GC_VALUE& other) const { return relational_equal_op(other, le_id, operator_le); } + bool operator>(const GC_VALUE& other) const { return relational_equal_op(other, gt_id, operator_gt); } + bool operator>=(const GC_VALUE& other) const { return relational_equal_op(other, ge_id, operator_ge); } + + bool operator!=(const GC_VALUE& other) const + { + return !(this->operator==(other)); + } + + GC_VALUE unary_op(const ID& op_id) const + { + VALUE ret = Qnil; + SWIG_RUBY_THREAD_BEGIN_BLOCK; + OpArgs args; + args.src = _obj; + args.id = op_id; + args.nargs = 0; + args.target = Qnil; + ret = rb_rescue(VALUEFUNC(swig_rescue_funcall), VALUE(&args), + (VALUEFUNC(swig_rescue_swallow)), Qnil); + SWIG_RUBY_THREAD_END_BLOCK; + return ret; + } + + GC_VALUE operator+() const { return unary_op(pos_id); } + GC_VALUE operator-() const { return unary_op(neg_id); } + GC_VALUE operator~() const { return unary_op(inv_id); } + + GC_VALUE binary_op(const GC_VALUE& other, const ID& op_id) const + { + VALUE ret = Qnil; + SWIG_RUBY_THREAD_BEGIN_BLOCK; + OpArgs args; + args.src = _obj; + args.id = op_id; + args.nargs = 1; + args.target = VALUE(other); + ret = rb_rescue(VALUEFUNC(swig_rescue_funcall), VALUE(&args), + (VALUEFUNC(swig_rescue_swallow)), Qnil); + SWIG_RUBY_THREAD_END_BLOCK; + return GC_VALUE(ret); + } + + GC_VALUE operator+(const GC_VALUE& other) const { return binary_op(other, add_id); } + GC_VALUE operator-(const GC_VALUE& other) const { return binary_op(other, sub_id); } + GC_VALUE operator*(const GC_VALUE& other) const { return binary_op(other, mul_id); } + GC_VALUE operator/(const GC_VALUE& other) const { return binary_op(other, div_id); } + GC_VALUE operator%(const GC_VALUE& other) const { return binary_op(other, mod_id); } + GC_VALUE operator&(const GC_VALUE& other) const { return binary_op(other, and_id); } + GC_VALUE operator^(const GC_VALUE& other) const { return binary_op(other, xor_id); } + GC_VALUE operator|(const GC_VALUE& other) const { return binary_op(other, or_id); } + GC_VALUE operator<<(const GC_VALUE& other) const { return binary_op(other, lshift_id); } + GC_VALUE operator>>(const GC_VALUE& other) const { return binary_op(other, rshift_id); } + }; + + ID GC_VALUE::hash_id = rb_intern("hash"); + ID GC_VALUE::lt_id = rb_intern("<"); + ID GC_VALUE::gt_id = rb_intern(">"); + ID GC_VALUE::eq_id = rb_intern("=="); + ID GC_VALUE::le_id = rb_intern("<="); + ID GC_VALUE::ge_id = rb_intern(">="); + + ID GC_VALUE::pos_id = rb_intern("+@"); + ID GC_VALUE::neg_id = rb_intern("-@"); + ID GC_VALUE::inv_id = rb_intern("~"); + + ID GC_VALUE::add_id = rb_intern("+"); + ID GC_VALUE::sub_id = rb_intern("-"); + ID GC_VALUE::mul_id = rb_intern("*"); + ID GC_VALUE::div_id = rb_intern("/"); + ID GC_VALUE::mod_id = rb_intern("%"); + + ID GC_VALUE::and_id = rb_intern("&"); + ID GC_VALUE::or_id = rb_intern("|"); + ID GC_VALUE::xor_id = rb_intern("^"); + + ID GC_VALUE::lshift_id = rb_intern("<<"); + ID GC_VALUE::rshift_id = rb_intern(">>"); + + typedef GC_VALUE LANGUAGE_OBJ; + +} // namespace swig + + + +#if defined(__GNUC__) +# if __GNUC__ == 2 && __GNUC_MINOR <= 96 +# define SWIG_STD_NOMODERN_STL +# endif +#endif + + +#include <string> + + +#include <stddef.h> + + +#include <iostream> + + +namespace swig { + struct stop_iteration { + }; + + /** + * Abstract base class used to represent all iterators of STL containers. + */ + struct ConstIterator { + public: + typedef ConstIterator self_type; + + protected: + GC_VALUE _seq; + + protected: + ConstIterator(VALUE seq) : _seq(seq) + { + } + + // Random access iterator methods, but not required in Ruby + virtual ptrdiff_t distance(const ConstIterator &x) const + { + throw std::invalid_argument("distance not supported"); + } + + virtual bool equal (const ConstIterator &x) const + { + throw std::invalid_argument("equal not supported"); + } + + virtual self_type* advance(ptrdiff_t n) + { + throw std::invalid_argument("advance not supported"); + } + + public: + virtual ~ConstIterator() {} + + // Access iterator method, required by Ruby + virtual VALUE value() const { + throw std::invalid_argument("value not supported"); + return Qnil; + }; + + virtual VALUE setValue( const VALUE& v ) { + throw std::invalid_argument("value= not supported"); + return Qnil; + } + + virtual self_type* next( size_t n = 1 ) + { + return this->advance( n ); + } + + virtual self_type* previous( size_t n = 1 ) + { + ptrdiff_t nn = n; + return this->advance( -nn ); + } + + virtual VALUE to_s() const { + throw std::invalid_argument("to_s not supported"); + return Qnil; + } + + virtual VALUE inspect() const { + throw std::invalid_argument("inspect not supported"); + return Qnil; + } + + virtual ConstIterator *dup() const + { + throw std::invalid_argument("dup not supported"); + return NULL; + } + + // + // C++ common/needed methods. We emulate a bidirectional + // operator, to be compatible with all the STL. + // The iterator traits will then tell the STL what type of + // iterator we really are. + // + ConstIterator() : _seq( Qnil ) + { + } + + ConstIterator( const self_type& b ) : _seq( b._seq ) + { + } + + self_type& operator=( const self_type& b ) + { + _seq = b._seq; + return *this; + } + + bool operator == (const ConstIterator& x) const + { + return equal(x); + } + + bool operator != (const ConstIterator& x) const + { + return ! operator==(x); + } + + // Pre-decrement operator + self_type& operator--() + { + return *previous(); + } + + // Pre-increment operator + self_type& operator++() + { + return *next(); + } + + // Post-decrement operator + self_type operator--(int) + { + self_type r = *this; + previous(); + return r; + } + + // Post-increment operator + self_type operator++(int) + { + self_type r = *this; + next(); + return r; + } + + ConstIterator& operator += (ptrdiff_t n) + { + return *advance(n); + } + + ConstIterator& operator -= (ptrdiff_t n) + { + return *advance(-n); + } + + ConstIterator* operator + (ptrdiff_t n) const + { + return dup()->advance(n); + } + + ConstIterator* operator - (ptrdiff_t n) const + { + return dup()->advance(-n); + } + + ptrdiff_t operator - (const ConstIterator& x) const + { + return x.distance(*this); + } + + static swig_type_info* descriptor() { + static int init = 0; + static swig_type_info* desc = 0; + if (!init) { + desc = SWIG_TypeQuery("swig::ConstIterator *"); + init = 1; + } + return desc; + } + }; + + + /** + * Abstract base class used to represent all non-const iterators of STL containers. + * + */ + struct Iterator : public ConstIterator { + public: + typedef Iterator self_type; + + protected: + Iterator(VALUE seq) : ConstIterator(seq) + { + } + + virtual self_type* advance(ptrdiff_t n) + { + throw std::invalid_argument("operation not supported"); + } + + public: + static swig_type_info* descriptor() { + static int init = 0; + static swig_type_info* desc = 0; + if (!init) { + desc = SWIG_TypeQuery("swig::Iterator *"); + init = 1; + } + return desc; + } + + virtual Iterator *dup() const + { + throw std::invalid_argument("dup not supported"); + return NULL; + } + + virtual self_type* next( size_t n = 1 ) + { + return this->advance( n ); + } + + virtual self_type* previous( size_t n = 1 ) + { + ptrdiff_t nn = n; + return this->advance( -nn ); + } + + bool operator == (const ConstIterator& x) const + { + return equal(x); + } + + bool operator != (const Iterator& x) const + { + return ! operator==(x); + } + + Iterator& operator += (ptrdiff_t n) + { + return *advance(n); + } + + Iterator& operator -= (ptrdiff_t n) + { + return *advance(-n); + } + + Iterator* operator + (ptrdiff_t n) const + { + return dup()->advance(n); + } + + Iterator* operator - (ptrdiff_t n) const + { + return dup()->advance(-n); + } + + ptrdiff_t operator - (const Iterator& x) const + { + return x.distance(*this); + } + }; + +} + + +SWIGINTERN VALUE +SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2)) +{ + return Qnil; +} + + +/*@SWIG:/usr/share/swig4.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + unsigned long *res = (unsigned long *)(args[1]); + *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + unsigned long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +#include <limits.h> +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/usr/share/swig4.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + unsigned long long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2ULL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (VALUE obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + } +#endif + return res; +} + + +SWIGINTERNINLINE VALUE +SWIG_From_bool (bool value) +{ + return value ? Qtrue : Qfalse; +} + + +/*@SWIG:/usr/share/swig4.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long *res = (long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long (VALUE obj, long* val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/usr/share/swig4.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long_SS_long (VALUE obj, long long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_ptrdiff_t (VALUE obj, ptrdiff_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(ptrdiff_t) <= sizeof(long)) { +#endif + long v; + res = SWIG_AsVal_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { + long long v; + res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); + } +#endif + return res; +} + + + #define SWIG_From_long LONG2NUM + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE VALUE +SWIG_From_long_SS_long (long long value) +{ + return LL2NUM(value); +} +#endif + + +SWIGINTERNINLINE VALUE +SWIG_From_ptrdiff_t (ptrdiff_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(ptrdiff_t) <= sizeof(long)) { +#endif + return SWIG_From_long (static_cast< long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ + return SWIG_From_long_SS_long (static_cast< long long >(value)); + } +#endif +} + + +#include <algorithm> + + +#include <vector> + + +#include <utility> + + +#include <map> + + +#include <algorithm> + + +SWIGINTERN int +SWIG_AsVal_int (VALUE obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} + + +SWIGINTERNINLINE VALUE +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + +namespace swig { + template <class Type> + struct noconst_traits { + typedef Type noconst_type; + }; + + template <class Type> + struct noconst_traits<const Type> { + typedef Type noconst_type; + }; + + /* + type categories + */ + struct pointer_category { }; + struct value_category { }; + + /* + General traits that provides type_name and type_info + */ + template <class Type> struct traits { }; + + template <class Type> + inline const char* type_name() { + return traits<typename noconst_traits<Type >::noconst_type >::type_name(); + } + + template <class Type> struct traits_info { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name<Type>()); + return info; + } + }; + + /* + Partial specialization for pointers (traits_info) + */ + template <class Type> struct traits_info<Type *> { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name<Type>()); + return info; + } + }; + + template <class Type> + inline swig_type_info *type_info() { + return traits_info<Type>::type_info(); + } + + /* + Partial specialization for pointers (traits) + */ + template <class Type> struct traits <Type *> { + typedef pointer_category category; + static std::string make_ptr_name(const char* name) { + std::string ptrname = name; + ptrname += " *"; + return ptrname; + } + static const char* type_name() { + static std::string name = make_ptr_name(swig::type_name<Type>()); + return name.c_str(); + } + }; + + template <class Type, class Category> + struct traits_as { }; + + template <class Type, class Category> + struct traits_check { }; + +} + + +namespace swig { + template <class Type> struct traits_asptr; + template <class Type> struct traits_asval; + struct pointer_category; + template <class Type, class Category> struct traits_as; + template <class Type> struct traits_from; + template <class Type> struct traits_from_ptr; + template <class Type> struct noconst_traits; + template <class Type> swig_type_info* type_info(); + template <class Type> const char* type_name(); + template <class Type> VALUE from(const Type& val); +} + + + +namespace swig { + /* + Traits that provides the from method + */ + template <class Type> struct traits_from_ptr { + static VALUE from(Type *val, int owner = 0) { + return SWIG_NewPointerObj(val, type_info<Type>(), owner); + } + }; + + template <class Type> struct traits_from { + static VALUE from(const Type& val) { + return traits_from_ptr<Type>::from(new Type(val), 1); + } + }; + + template <class Type> struct traits_from<Type *> { + static VALUE from(Type* val) { + return traits_from_ptr<Type>::from(val, 0); + } + }; + + template <class Type> struct traits_from<const Type *> { + static VALUE from(const Type* val) { + return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0); + } + }; + + + template <class Type> + inline VALUE from(const Type& val) { + return traits_from<Type>::from(val); + } + + template <class Type> + inline VALUE from_ptr(Type* val, int owner) { + return traits_from_ptr<Type>::from(val, owner); + } + + /* + Traits that provides the asval/as/check method + */ + template <class Type> + struct traits_asptr { + static int asptr(VALUE obj, Type **val) { + Type *p = 0; + swig_type_info *descriptor = type_info<Type>(); + int res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res)) { + if (val) *val = p; + } + return res; + } + }; + + template <class Type> + inline int asptr(VALUE obj, Type **vptr) { + return traits_asptr<Type>::asptr(obj, vptr); + } + + template <class Type> + struct traits_asval { + static int asval(VALUE obj, Type *val) { + if (val) { + Type *p = 0; + int res = traits_asptr<Type>::asptr(obj, &p); + if (!SWIG_IsOK(res)) return res; + if (p) { + typedef typename noconst_traits<Type>::noconst_type noconst_type; + *(const_cast<noconst_type*>(val)) = *p; + if (SWIG_IsNewObj(res)){ + delete p; + res = SWIG_DelNewMask(res); + } + return res; + } else { + return SWIG_ERROR; + } + } else { + return traits_asptr<Type>::asptr(obj, (Type **)(0)); + } + } + }; + + template <class Type> struct traits_asval<Type*> { + static int asval(VALUE obj, Type **val) { + if (val) { + typedef typename noconst_traits<Type>::noconst_type noconst_type; + noconst_type *p = 0; + int res = traits_asptr<noconst_type>::asptr(obj, &p); + if (SWIG_IsOK(res)) { + *(const_cast<noconst_type**>(val)) = p; + } + return res; + } else { + return traits_asptr<Type>::asptr(obj, (Type **)(0)); + } + } + }; + + template <class Type> + inline int asval(VALUE obj, Type *val) { + return traits_asval<Type>::asval(obj, val); + } + + template <class Type> + struct traits_as<Type, value_category> { + static Type as(VALUE obj) { + Type v; + int res = asval(obj, &v); + if (!SWIG_IsOK(res)) { + VALUE lastErr = rb_gv_get("$!"); + if (lastErr == Qnil) { + SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + throw std::invalid_argument("bad type"); + } + return v; + } + }; + + template <class Type> + struct traits_as<Type, pointer_category> { + static Type as(VALUE obj) { + Type *v = 0; + int res = traits_asptr<Type>::asptr(obj, &v); + if (SWIG_IsOK(res) && v) { + if (SWIG_IsNewObj(res)) { + Type r(*v); + delete v; + return r; + } else { + return *v; + } + } else { + VALUE lastErr = rb_gv_get("$!"); + if (lastErr == Qnil) { + SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + throw std::invalid_argument("bad type"); + } + } + }; + + template <class Type> + struct traits_as<Type*, pointer_category> { + static Type* as(VALUE obj) { + Type *v = 0; + int res = traits_asptr<Type>::asptr(obj, &v); + if (SWIG_IsOK(res)) { + return v; + } else { + VALUE lastErr = rb_gv_get("$!"); + if (lastErr == Qnil) { + SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + throw std::invalid_argument("bad type"); + } + } + }; + + template <class Type> + inline Type as(VALUE obj) { + return traits_as< Type, typename traits< Type >::category >::as(obj); + } + + template <class Type> + struct traits_check<Type, value_category> { + static bool check(VALUE obj) { + int res = asval(obj, (Type *)(0)); + return SWIG_IsOK(res) ? true : false; + } + }; + + template <class Type> + struct traits_check<Type, pointer_category> { + static bool check(VALUE obj) { + int res = asptr(obj, (Type **)(0)); + return SWIG_IsOK(res) ? true : false; + } + }; + + template <class Type> + inline bool check(VALUE obj) { + return traits_check<Type, typename traits<Type>::category>::check(obj); + } +} + + +namespace swig { + template <> struct traits< int > { + typedef value_category category; + static const char* type_name() { return"int"; } + }; + template <> struct traits_asval< int > { + typedef int value_type; + static int asval(VALUE obj, value_type *val) { + return SWIG_AsVal_int (obj, val); + } + }; + template <> struct traits_from< int > { + typedef int value_type; + static VALUE from(const value_type& val) { + return SWIG_From_int (val); + } + }; +} + + +#include <functional> + + +namespace swig { + template < class T > + struct yield + { + bool + operator()( const T& v ) const + { + return RTEST( rb_yield( swig::from< T >(v) ) ); + } + }; + + + inline size_t + check_index(ptrdiff_t i, size_t size, bool insert = false) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) + return (size_t) (i + size); + } else if ( (size_t) i < size ) { + return (size_t) i; + } else if (insert && ((size_t) i == size)) { + return size; + } + + throw std::out_of_range("index out of range"); + } + + inline size_t + slice_index(ptrdiff_t i, size_t size) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) { + return (size_t) (i + size); + } else { + throw std::out_of_range("index out of range"); + } + } else { + return ( (size_t) i < size ) ? ((size_t) i) : size; + } + } + + template <class Sequence, class Difference> + inline typename Sequence::iterator + getpos(Sequence* self, Difference i) { + typename Sequence::iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template <class Sequence, class Difference> + inline typename Sequence::const_iterator + cgetpos(const Sequence* self, Difference i) { + typename Sequence::const_iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template <class Sequence> + inline void + resize(Sequence *seq, typename Sequence::size_type n, typename Sequence::value_type x) { + seq->resize(n, x); + } + + template <class Sequence, class Difference> + inline Sequence* + getslice(const Sequence* self, Difference i, Difference j) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size, (i == size && j == size)); + typename Sequence::size_type jj = swig::slice_index(j, size); + + if (jj > ii) { + typename Sequence::const_iterator vb = self->begin(); + typename Sequence::const_iterator ve = self->begin(); + std::advance(vb,ii); + std::advance(ve,jj); + return new Sequence(vb, ve); + } else { + return new Sequence(); + } + } + + template <class Sequence, class Difference, class InputSeq> + inline void + setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size, true); + typename Sequence::size_type jj = swig::slice_index(j, size); + if (jj < ii) jj = ii; + size_t ssize = jj - ii; + if (ssize <= v.size()) { + typename Sequence::iterator sb = self->begin(); + typename InputSeq::const_iterator vmid = v.begin(); + std::advance(sb,ii); + std::advance(vmid, jj - ii); + self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end()); + } else { + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + self->insert(sb, v.begin(), v.end()); + } + } + + template <class Sequence, class Difference> + inline void + delslice(Sequence* self, Difference i, Difference j) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size, true); + typename Sequence::size_type jj = swig::slice_index(j, size); + if (jj > ii) { + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + } + } +} + + +#if defined(__SUNPRO_CC) && defined(_RWSTD_VER) +# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) +# define SWIG_STD_NOITERATOR_TRAITS_STL +# endif +#endif + +#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) +#include <iterator> +#else +namespace std { + template <class Iterator> + struct iterator_traits { + typedef ptrdiff_t difference_type; + typedef typename Iterator::value_type value_type; + }; + + template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance> + struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > { + typedef Distance difference_type; + typedef T value_type; + }; + + template <class T> + struct iterator_traits<T*> { + typedef T value_type; + typedef ptrdiff_t difference_type; + }; + + template<typename _InputIterator> + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) { + ++__first; ++__n; + } + return __n; + } +} +#endif + + +namespace swig { + + /** + * Templated base classes for all custom const_iterators. + * + */ + template<typename OutConstIterator> + class ConstIterator_T : public ConstIterator + { + public: + typedef OutConstIterator const_iter; + typedef typename std::iterator_traits<const_iter>::value_type value_type; + typedef ConstIterator_T<const_iter> self_type; + + protected: + + + virtual bool equal (const ConstIterator &iter) const + { + const self_type *iters = dynamic_cast<const self_type *>(&iter); + if (iters) { + return (current == iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + virtual ptrdiff_t distance(const ConstIterator &iter) const + { + const self_type *iters = dynamic_cast<const self_type *>(&iter); + if (iters) { + return std::distance(current, iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + virtual ConstIterator* advance(ptrdiff_t n) + { + std::advance( current, n ); + return this; + } + + public: + ConstIterator_T() : ConstIterator(Qnil) + { + } + + ConstIterator_T(const_iter curr, VALUE seq = Qnil) + : ConstIterator(seq), current(curr) + { + } + + const const_iter& get_current() const + { + return current; + } + + const value_type& operator*() const + { + return *current; + } + + virtual VALUE inspect() const + { + VALUE ret = rb_str_new2("#<"); + ret = rb_str_cat2( ret, rb_obj_classname(_seq) ); + ret = rb_str_cat2( ret, "::const_iterator " ); + VALUE cur = value(); + ret = rb_str_concat( ret, rb_inspect(cur) ); + ret = rb_str_cat2( ret, ">" ); + return ret; + } + + virtual VALUE to_s() const + { + VALUE ret = rb_str_new2( rb_obj_classname(_seq) ); + ret = rb_str_cat2( ret, "::const_iterator " ); + VALUE cur = value(); + ret = rb_str_concat( ret, rb_obj_as_string(cur) ); + return ret; + } + + protected: + const_iter current; + }; + + + /** + * Templated base classes for all custom non-const iterators. + * + */ + template<typename InOutIterator> + class Iterator_T : public Iterator + { + public: + typedef InOutIterator nonconst_iter; + + // Make this class iterator STL compatible, by using iterator_traits + typedef typename std::iterator_traits<nonconst_iter >::iterator_category iterator_category; + typedef typename std::iterator_traits<nonconst_iter >::value_type value_type; + typedef typename std::iterator_traits<nonconst_iter >::difference_type difference_type; + typedef typename std::iterator_traits<nonconst_iter >::pointer pointer; + typedef typename std::iterator_traits<nonconst_iter >::reference reference; + + typedef Iterator base; + typedef Iterator_T< nonconst_iter > self_type; + + protected: + + virtual bool equal (const ConstIterator &iter) const + { + const self_type *iters = dynamic_cast<const self_type *>(&iter); + if (iters) { + return (current == iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + virtual ptrdiff_t distance(const ConstIterator &iter) const + { + const self_type *iters = dynamic_cast<const self_type *>(&iter); + if (iters) { + return std::distance(current, iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + virtual Iterator* advance(ptrdiff_t n) + { + std::advance( current, n ); + return this; + } + + public: + + Iterator_T(nonconst_iter curr, VALUE seq = Qnil) + : Iterator(seq), current(curr) + { + } + + const nonconst_iter& get_current() const + { + return current; + } + + self_type& operator=( const self_type& b ) + { + base::operator=( b ); + return *this; + } + + self_type& operator=( const value_type& b ) + { + *current = b; + return *this; + } + + const value_type& operator*() const + { + return *current; + } + + value_type& operator*() + { + return *current; + } + + virtual VALUE inspect() const + { + VALUE ret = rb_str_new2("#<"); + ret = rb_str_cat2( ret, rb_obj_classname(_seq) ); + ret = rb_str_cat2( ret, "::iterator " ); + VALUE cur = value(); + ret = rb_str_concat( ret, rb_inspect(cur) ); + ret = rb_str_cat2( ret, ">" ); + return ret; + } + + virtual VALUE to_s() const + { + VALUE ret = rb_str_new2( rb_obj_classname(_seq) ); + ret = rb_str_cat2( ret, "::iterator " ); + VALUE cur = value(); + ret = rb_str_concat( ret, rb_obj_as_string(cur) ); + return ret; + } + + protected: + nonconst_iter current; + }; + + + /** + * Auxiliary functor to store the value of a ruby object inside + * a reference of a compatible C++ type. ie: Ruby -> C++ + * + */ + template <class ValueType> + struct asval_oper + { + typedef ValueType value_type; + typedef bool result_type; + bool operator()(VALUE obj, value_type& v) const + { + return ( swig::asval< value_type >(obj, &v) == SWIG_OK ); + } + }; + + /** + * Auxiliary functor to return a ruby object from a C++ type. + * ie: C++ -> Ruby + * + */ + template <class ValueType> + struct from_oper + { + typedef const ValueType& argument_type; + typedef VALUE result_type; + result_type operator()(argument_type v) const + { + return swig::from(v); + } + }; + + + /** + * ConstIterator class for a const_iterator with no end() boundaries. + * + */ + template<typename OutConstIterator, + typename ValueType = typename std::iterator_traits<OutConstIterator>::value_type, + typename FromOper = from_oper<ValueType> > + class ConstIteratorOpen_T : public ConstIterator_T<OutConstIterator> + { + public: + FromOper from; + typedef OutConstIterator const_iter; + typedef ValueType value_type; + typedef ConstIterator_T<const_iter> base; + typedef ConstIteratorOpen_T<OutConstIterator, ValueType, FromOper> self_type; + + ConstIteratorOpen_T(const_iter curr, VALUE seq = Qnil) + : ConstIterator_T<OutConstIterator>(curr, seq) + { + } + + virtual VALUE value() const { + return from(static_cast<const value_type&>(*(base::current))); + } + + ConstIterator *dup() const + { + return new self_type(*this); + } + }; + + /** + * Iterator class for an iterator with no end() boundaries. + * + */ + template<typename InOutIterator, + typename ValueType = typename std::iterator_traits<InOutIterator>::value_type, + typename FromOper = from_oper<ValueType>, + typename AsvalOper = asval_oper<ValueType> > + class IteratorOpen_T : public Iterator_T<InOutIterator> + { + public: + FromOper from; + AsvalOper asval; + typedef InOutIterator nonconst_iter; + typedef ValueType value_type; + typedef Iterator_T<nonconst_iter> base; + typedef IteratorOpen_T<InOutIterator, ValueType, FromOper, AsvalOper> self_type; + + public: + IteratorOpen_T(nonconst_iter curr, VALUE seq = Qnil) + : Iterator_T<InOutIterator>(curr, seq) + { + } + + virtual VALUE value() const { + return from(static_cast<const value_type&>(*(base::current))); + } + + virtual VALUE setValue( const VALUE& v ) + { + value_type& dst = *base::current; + if ( asval(v, dst) ) return v; + return Qnil; + } + + Iterator *dup() const + { + return new self_type(*this); + } + }; + + /** + * ConstIterator class for a const_iterator where begin() and end() boundaries are known. + * + */ + template<typename OutConstIterator, + typename ValueType = typename std::iterator_traits<OutConstIterator>::value_type, + typename FromOper = from_oper<ValueType> > + class ConstIteratorClosed_T : public ConstIterator_T<OutConstIterator> + { + public: + FromOper from; + typedef OutConstIterator const_iter; + typedef ValueType value_type; + typedef ConstIterator_T<const_iter> base; + typedef ConstIteratorClosed_T<OutConstIterator, ValueType, FromOper> self_type; + + protected: + virtual ConstIterator* advance(ptrdiff_t n) + { + std::advance( base::current, n ); + if ( base::current == end ) + throw stop_iteration(); + return this; + } + + public: + ConstIteratorClosed_T(const_iter curr, const_iter first, + const_iter last, VALUE seq = Qnil) + : ConstIterator_T<OutConstIterator>(curr, seq), begin(first), end(last) + { + } + + virtual VALUE value() const { + if (base::current == end) { + throw stop_iteration(); + } else { + return from(static_cast<const value_type&>(*(base::current))); + } + } + + ConstIterator *dup() const + { + return new self_type(*this); + } + + + private: + const_iter begin; + const_iter end; + }; + + /** + * Iterator class for a iterator where begin() and end() boundaries are known. + * + */ + template<typename InOutIterator, + typename ValueType = typename std::iterator_traits<InOutIterator>::value_type, + typename FromOper = from_oper<ValueType>, + typename AsvalOper = asval_oper<ValueType> > + class IteratorClosed_T : public Iterator_T<InOutIterator> + { + public: + FromOper from; + AsvalOper asval; + typedef InOutIterator nonconst_iter; + typedef ValueType value_type; + typedef Iterator_T<nonconst_iter> base; + typedef IteratorClosed_T<InOutIterator, ValueType, FromOper, AsvalOper> self_type; + + protected: + virtual Iterator* advance(ptrdiff_t n) + { + std::advance( base::current, n ); + if ( base::current == end ) + throw stop_iteration(); + return this; + } + + public: + IteratorClosed_T(nonconst_iter curr, nonconst_iter first, + nonconst_iter last, VALUE seq = Qnil) + : Iterator_T<InOutIterator>(curr, seq), begin(first), end(last) + { + } + + virtual VALUE value() const { + if (base::current == end) { + throw stop_iteration(); + } else { + return from(static_cast<const value_type&>(*(base::current))); + } + } + + // Iterator setter method, required by Ruby + virtual VALUE setValue( const VALUE& v ) + { + if (base::current == end) + throw stop_iteration(); + + value_type& dst = *base::current; + if ( asval( v, dst ) ) return v; + return Qnil; + } + + Iterator *dup() const + { + return new self_type(*this); + } + + private: + nonconst_iter begin; + nonconst_iter end; + }; + + /* Partial specialization for bools which don't allow de-referencing */ + template< typename InOutIterator, typename FromOper, typename AsvalOper > + class IteratorOpen_T< InOutIterator, bool, FromOper, AsvalOper > : + public Iterator_T<InOutIterator> + { + public: + FromOper from; + AsvalOper asval; + typedef InOutIterator nonconst_iter; + typedef bool value_type; + typedef Iterator_T<nonconst_iter> base; + typedef IteratorOpen_T<InOutIterator, bool, FromOper, AsvalOper> self_type; + + IteratorOpen_T(nonconst_iter curr, VALUE seq = Qnil) + : Iterator_T<InOutIterator>(curr, seq) + { + } + + virtual VALUE value() const { + return from(static_cast<const value_type&>(*(base::current))); + } + + virtual VALUE setValue( const VALUE& v ) + { + bool tmp = *base::current; + if ( asval( v, tmp ) ) + { + *base::current = tmp; + return v; + } + return Qnil; + } + + Iterator *dup() const + { + return new self_type(*this); + } + + }; + + /* Partial specialization for bools which don't allow de-referencing */ + template< typename InOutIterator, typename FromOper, typename AsvalOper > + class IteratorClosed_T< InOutIterator, bool, FromOper, AsvalOper > : + public Iterator_T<InOutIterator> + { + public: + FromOper from; + AsvalOper asval; + typedef InOutIterator nonconst_iter; + typedef bool value_type; + typedef Iterator_T<nonconst_iter> base; + typedef IteratorClosed_T<InOutIterator, bool, FromOper, AsvalOper> self_type; + + protected: + virtual Iterator* advance(ptrdiff_t n) + { + std::advance( base::current, n ); + if ( base::current == end ) + throw stop_iteration(); + return this; + } + + public: + IteratorClosed_T(nonconst_iter curr, nonconst_iter first, + nonconst_iter last, VALUE seq = Qnil) + : Iterator_T<InOutIterator>(curr, seq), begin(first), end(last) + { + } + + virtual VALUE value() const { + if (base::current == end) { + throw stop_iteration(); + } else { + return from(static_cast<const value_type&>(*(base::current))); + } + } + + virtual VALUE setValue( const VALUE& v ) + { + if (base::current == end) + throw stop_iteration(); + + bool tmp = *base::current; + if ( asval( v, tmp ) ) + { + *base::current = tmp; + return v; + } + return Qnil; + } + + Iterator *dup() const + { + return new self_type(*this); + } + + private: + nonconst_iter begin; + nonconst_iter end; + }; + + + /** + * Helper function used to wrap a bounded const_iterator. This is to be used in + * a %typemap(out), for example. + * + */ + template<typename InOutIter> + inline Iterator* + make_nonconst_iterator(const InOutIter& current, const InOutIter& begin, + const InOutIter& end, VALUE seq = Qnil) + { + return new IteratorClosed_T<InOutIter>(current, begin, end, seq); + } + + /** + * Helper function used to wrap an unbounded const_iterator. This is to be used in + * a %typemap(out), for example. + * + */ + template<typename InOutIter> + inline Iterator* + make_nonconst_iterator(const InOutIter& current, VALUE seq = Qnil) + { + return new IteratorOpen_T<InOutIter>(current, seq); + } + + /** + * Helper function used to wrap a bounded const_iterator. This is to be used in + * a %typemap(out), for example. + * + */ + template<typename OutIter> + inline ConstIterator* + make_const_iterator(const OutIter& current, const OutIter& begin, + const OutIter& end, VALUE seq = Qnil) + { + return new ConstIteratorClosed_T<OutIter>(current, begin, end, seq); + } + + /** + * Helper function used to wrap an unbounded const_iterator. This is to be used in + * a %typemap(out), for example. + * + */ + template<typename OutIter> + inline ConstIterator* + make_const_iterator(const OutIter& current, VALUE seq = Qnil) + { + return new ConstIteratorOpen_T<OutIter>(current, seq); + } +} + + +namespace swig +{ + + /** + * This class is a proxy class for references, used to return and set values + * of an element of a Ruby Array of stuff. + * It can be used by RubySequence_InputIterator to make it work with STL + * algorithms. + */ + template <class T> + struct RubySequence_Ref + { + RubySequence_Ref(VALUE seq, int index) + : _seq(seq), _index(index) + { + } + + operator T () const + { + VALUE item = rb_ary_entry(_seq, _index ); + try { + return swig::as<T>(item); + } catch (const std::invalid_argument& e) { + char msg[1024]; + sprintf(msg, "in sequence element %d ", _index); + VALUE lastErr = rb_gv_get("$!"); + if ( lastErr == Qnil ) { + SWIG_Error(SWIG_TypeError, swig::type_name<T>()); + } + VALUE str = rb_str_new2(msg); + str = rb_str_cat2( str, e.what() ); + SWIG_Ruby_ExceptionType( NULL, str ); + throw; + } + } + + RubySequence_Ref& operator=(const T& v) + { + rb_ary_set(_seq, _index, swig::from< T >(v)); + return *this; + } + + private: + VALUE _seq; + int _index; + }; + + + /** + * This class is a proxy to return a pointer to a class, usually + * RubySequence_Ref. + * It can be used by RubySequence_InputIterator to make it work with STL + * algorithms. + */ + template <class T> + struct RubySequence_ArrowProxy + { + RubySequence_ArrowProxy(const T& x): m_value(x) {} + const T* operator->() const { return &m_value; } + operator const T*() const { return &m_value; } + T m_value; + }; + + + /** + * Input Iterator. This adapator class is a random access iterator that + * allows you to use STL algorithms with a Ruby class (a Ruby Array by default). + */ + template <class T, class Reference = RubySequence_Ref< T > > + struct RubySequence_InputIterator + { + typedef RubySequence_InputIterator<T, Reference > self; + + typedef std::random_access_iterator_tag iterator_category; + typedef Reference reference; + typedef T value_type; + typedef T* pointer; + typedef ptrdiff_t difference_type; + + RubySequence_InputIterator() + { + } + + RubySequence_InputIterator(VALUE seq, int index) + : _seq(seq), _index(index) + { + } + + reference operator*() const + { + return reference(_seq, _index); + } + + RubySequence_ArrowProxy<T> + operator->() const { + return RubySequence_ArrowProxy<T>(operator*()); + } + + bool operator==(const self& ri) const + { + return (_index == ri._index) && (_seq == ri._seq); + } + + bool operator!=(const self& ri) const + { + return !(operator==(ri)); + } + + self& operator ++ () + { + ++_index; + return *this; + } + + self& operator -- () + { + --_index; + return *this; + } + + self& operator += (difference_type n) + { + _index += n; + return *this; + } + + self operator +(difference_type n) const + { + return self(_seq, _index + n); + } + + self& operator -= (difference_type n) + { + _index -= n; + return *this; + } + + self operator -(difference_type n) const + { + return self(_seq, _index - n); + } + + difference_type operator - (const self& ri) const + { + return _index - ri._index; + } + + bool operator < (const self& ri) const + { + return _index < ri._index; + } + + reference + operator[](difference_type n) const + { + return reference(_seq, _index + n); + } + + private: + VALUE _seq; + difference_type _index; + }; + + + /** + * This adaptor class allows you to use a Ruby Array as if it was an STL + * container, giving it begin(), end(), and iterators. + */ + template <class T> + struct RubySequence_Cont + { + typedef RubySequence_Ref<T> reference; + typedef const RubySequence_Ref<T> const_reference; + typedef T value_type; + typedef T* pointer; + typedef int difference_type; + typedef int size_type; + typedef const pointer const_pointer; + typedef RubySequence_InputIterator<T, reference> iterator; + typedef RubySequence_InputIterator<T, const_reference> const_iterator; + + RubySequence_Cont(VALUE seq) : _seq(0) + { + if (!rb_obj_is_kind_of(seq, rb_cArray)) { + throw std::invalid_argument("an Array is expected"); + } + _seq = seq; + } + + ~RubySequence_Cont() + { + } + + size_type size() const + { + return RARRAY_LEN(_seq); + } + + bool empty() const + { + return size() == 0; + } + + iterator begin() + { + return iterator(_seq, 0); + } + + const_iterator begin() const + { + return const_iterator(_seq, 0); + } + + iterator end() + { + return iterator(_seq, size()); + } + + const_iterator end() const + { + return const_iterator(_seq, size()); + } + + reference operator[](difference_type n) + { + return reference(_seq, n); + } + + const_reference operator[](difference_type n) const + { + return const_reference(_seq, n); + } + + bool check() const + { + int s = (int) size(); + for (int i = 0; i < s; ++i) { + VALUE item = rb_ary_entry(_seq, i ); + if (!swig::check<value_type>(item)) + return false; + } + return true; + } + + private: + VALUE _seq; + }; + +} + + +namespace swig { + template <class RubySeq, class Seq> + inline void + assign(const RubySeq& rubyseq, Seq* seq) { + // seq->assign(rubyseq.begin(), rubyseq.end()); // not used as not always implemented + typedef typename RubySeq::value_type value_type; + typename RubySeq::const_iterator it = rubyseq.begin(); + for (;it != rubyseq.end(); ++it) { + seq->insert(seq->end(),(value_type)(*it)); + } + } + + template <class Seq, class T = typename Seq::value_type > + struct traits_asptr_stdseq { + typedef Seq sequence; + typedef T value_type; + + static int asptr(VALUE obj, sequence **seq) { + if (rb_obj_is_kind_of(obj, rb_cArray) == Qtrue) { + try { + RubySequence_Cont<value_type> rubyseq(obj); + if (seq) { + sequence *pseq = new sequence(); + assign(rubyseq, pseq); + *seq = pseq; + return SWIG_NEWOBJ; + } else { + return rubyseq.check() ? SWIG_OK : SWIG_ERROR; + } + } catch (const std::exception& e) { + if (seq) { + VALUE lastErr = rb_gv_get("$!"); + if (lastErr == Qnil) { + rb_raise(rb_eTypeError, "%s", e.what()); + } + } + return SWIG_ERROR; + } + } else { + sequence *p; + swig_type_info *descriptor = swig::type_info<sequence>(); + if (descriptor && SWIG_IsOK(SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0))) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } + } + return SWIG_ERROR; + } + }; + + // Partial specialization for GC_VALUE's. No need to typecheck each + // element. + template< class Seq > + struct traits_asptr_stdseq< Seq, swig::GC_VALUE > { + typedef Seq sequence; + typedef swig::GC_VALUE value_type; + + static int asptr(VALUE obj, sequence **seq) { + if (rb_obj_is_kind_of(obj, rb_cArray) == Qtrue) { + try { + if (seq) { + RubySequence_Cont<value_type> rubyseq(obj); + sequence *pseq = new sequence(); + assign(rubyseq, pseq); + *seq = pseq; + return SWIG_NEWOBJ; + } else { + return true; + } + } catch (const std::exception& e) { + if (seq) { + VALUE lastErr = rb_gv_get("$!"); + if (lastErr == Qnil) { + rb_raise(rb_eTypeError, "%s", e.what()); + } + } + return SWIG_ERROR; + } + } else { + sequence *p; + swig_type_info *descriptor = swig::type_info<sequence>(); + if (descriptor && SWIG_IsOK(SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0))) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } + } + return SWIG_ERROR; + } + }; + + template <class Seq, class T = typename Seq::value_type > + struct traits_from_stdseq { + typedef Seq sequence; + typedef T value_type; + typedef typename Seq::size_type size_type; + typedef typename sequence::const_iterator const_iterator; + + static VALUE from(const sequence& seq) { + + + + + + + size_type size = seq.size(); + if (size <= (size_type)INT_MAX) { + VALUE obj = rb_ary_new2((int)size); + int i = 0; + for (const_iterator it = seq.begin(); + it != seq.end(); ++it, ++i) { + rb_ary_push(obj, swig::from< value_type >(*it)); + } + rb_obj_freeze(obj); // treat as immutable result + return obj; + } else { + rb_raise(rb_eRangeError,"sequence size not valid in ruby"); + return Qnil; + } + } + }; +} + + + namespace swig { + template <class T> + struct traits_asptr<std::vector<T> > { + static int asptr(VALUE obj, std::vector<T> **vec) { + return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec); + } + }; + + template <class T> + struct traits_from<std::vector<T> > { + static VALUE from(const std::vector<T>& vec) { + return traits_from_stdseq<std::vector<T> >::from(vec); + } + }; + } + + + namespace swig { + template <> struct traits<std::vector< int, std::allocator< int > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "int" "," "std::allocator< int >" " >"; + } + }; + } + +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg__dup(std::vector< int > *self){ + return new std::vector< int,std::allocator< int > >(*self); + } +SWIGINTERN VALUE std_vector_Sl_int_Sg__inspect(std::vector< int > *self){ + std::vector< int,std::allocator< int > >::const_iterator i = self->begin(); + std::vector< int,std::allocator< int > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::vector< int,std::allocator< int > > >(); + VALUE str = rb_str_new2(type_name); + str = rb_str_cat2( str, " [" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::vector< int,std::allocator< int > >::value_type >( *i ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "]" ); + return str; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg__to_a(std::vector< int > *self){ + std::vector< int,std::allocator< int > >::const_iterator i = self->begin(); + std::vector< int,std::allocator< int > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< int,std::allocator< int > >::value_type >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg__to_s(std::vector< int > *self){ + std::vector< int,std::allocator< int > >::iterator i = self->begin(); + std::vector< int,std::allocator< int > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< int,std::allocator< int > >::value_type >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg__slice(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< int,std::allocator< int > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< int,std::allocator< int > >::difference_type j = length + i; + if ( j > static_cast<std::vector< int,std::allocator< int > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< int,std::allocator< int > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg__each(std::vector< int > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::vector< int,std::allocator< int > >::const_iterator i = self->begin(); + std::vector< int,std::allocator< int > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from< std::vector< int,std::allocator< int > >::value_type >(*i); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg____delete2__(std::vector< int > *self,std::vector< int >::value_type const &i){ + VALUE r = Qnil; + return r; + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg__select(std::vector< int > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< int,std::allocator< int > >* r = new std::vector< int,std::allocator< int > >(); + std::vector< int,std::allocator< int > >::const_iterator i = self->begin(); + std::vector< int,std::allocator< int > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE v = swig::from< std::vector< int,std::allocator< int > >::value_type >(*i); + if ( RTEST( rb_yield(v) ) ) + self->insert( r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg__delete_at(std::vector< int > *self,std::vector< int >::difference_type i){ + VALUE r = Qnil; + try { + std::vector< int,std::allocator< int > >::iterator at = swig::getpos(self, i); + r = swig::from< std::vector< int,std::allocator< int > >::value_type >( *(at) ); + self->erase(at); + } + catch (const std::out_of_range&) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg__at(std::vector< int > const *self,std::vector< int >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< int,std::allocator< int > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > const *self,std::vector< int >::difference_type i,std::vector< int >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< int,std::allocator< int > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< int,std::allocator< int > >::difference_type j = length + i; + if ( j > static_cast<std::vector< int,std::allocator< int > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< int,std::allocator< int > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< int,std::allocator< int > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg____getitem____SWIG_2(std::vector< int > const *self,VALUE i){ + if ( rb_obj_is_kind_of( i, rb_cRange ) == Qfalse ) { + rb_raise( rb_eTypeError, "not a valid index or range" ); + } + + static ID id_end = rb_intern("end"); + static ID id_start = rb_intern("begin"); + static ID id_noend = rb_intern("exclude_end?"); + + VALUE start = rb_funcall( i, id_start, 0 ); + VALUE end = rb_funcall( i, id_end, 0 ); + bool noend = ( rb_funcall( i, id_noend, 0 ) == Qtrue ); + + int len = self->size(); + + int s = NUM2INT( start ); + if ( s < 0 ) { + s = len + s; + if ( s < 0 ) + return Qnil; + } else if ( s > len ) + return Qnil; + + int e = NUM2INT( end ); + if ( e < 0 ) e = len + e; + if ( noend ) e -= 1; + if ( e < 0 ) e = -1; + if ( e >= len ) e = len - 1; + if ( s == len ) e = len - 1; + + return swig::from< std::vector< int,std::allocator< int > >* >( swig::getslice(self, s, e+1) ); + } +SWIGINTERN VALUE std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){ + if ( i >= static_cast<std::vector< int,std::allocator< int > >::difference_type>( self->size()) ) + swig::resize( self, i+1, x ); + else + *(swig::getpos(self, i)) = x; + + return swig::from< std::vector< int,std::allocator< int > >::value_type >( x ); + } +SWIGINTERN VALUE std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type length,std::vector< int,std::allocator< int > > const &v){ + + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< int,std::allocator< int > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< int,std::allocator< int > >::difference_type j = length + i; + if ( j > static_cast<std::vector< int,std::allocator< int > >::difference_type>(len) ) { + swig::resize( self, j, *(v.begin()) ); + } + + VALUE r = Qnil; + swig::setslice(self, i, j, v); + r = swig::from< const std::vector< int,std::allocator< int > >* >( &v ); + return r; + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg__reject_bang(std::vector< int > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + self->erase( std::remove_if( self->begin(), self->end(), + swig::yield< std::vector< int,std::allocator< int > >::value_type >() ), self->end() ); + return self; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg__pop(std::vector< int > *self){ + if (self->empty()) return Qnil; + std::vector< int,std::allocator< int > >::value_type x = self->back(); + self->pop_back(); + return swig::from< std::vector< int,std::allocator< int > >::value_type >( x ); + } +SWIGINTERN std::vector< int >::value_type const std_vector_Sl_int_Sg__push(std::vector< int > *self,std::vector< int >::value_type const &e){ + self->push_back( e ); + return e; + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg__reject(std::vector< int > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< int,std::allocator< int > >* r = new std::vector< int,std::allocator< int > >(); + std::remove_copy_if( self->begin(), self->end(), + std::back_inserter(*r), + swig::yield< std::vector< int,std::allocator< int > >::value_type >() ); + return r; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg__shift(std::vector< int > *self){ + if (self->empty()) return Qnil; + std::vector< int,std::allocator< int > >::value_type x = self->front(); + self->erase( self->begin() ); + return swig::from< std::vector< int,std::allocator< int > >::value_type >( x ); + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg__insert__SWIG_0(std::vector< int > *self,std::vector< int >::difference_type pos,int argc,VALUE *argv,...){ + std::size_t len = self->size(); + std::size_t i = swig::check_index( pos, len, true ); + std::vector< int,std::allocator< int > >::iterator start; + + VALUE elem = argv[0]; + int idx = 0; + try { + std::vector< int,std::allocator< int > >::value_type val = swig::as<std::vector< int,std::allocator< int > >::value_type>( elem ); + if ( i >= len ) { + self->resize(i-1, val); + return self; + } + start = self->begin(); + std::advance( start, i ); + self->insert( start++, val ); + + for ( ++idx; idx < argc; ++idx ) + { + elem = argv[idx]; + val = swig::as<std::vector< int,std::allocator< int > >::value_type>( elem ); + self->insert( start++, val ); + } + + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< int,std::allocator< int > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + + + return self; + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg__unshift(std::vector< int > *self,int argc,VALUE *argv,...){ + for ( int idx = argc-1; idx >= 0; --idx ) + { + std::vector< int,std::allocator< int > >::iterator start = self->begin(); + VALUE elem = argv[idx]; + try { + std::vector< int,std::allocator< int > >::value_type val = swig::as<std::vector< int,std::allocator< int > >::value_type>( elem ); + self->insert( start, val ); + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< int,std::allocator< int > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + } + + return self; + } + +SWIGINTERNINLINE VALUE +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return ULONG2NUM(value); +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE VALUE +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +{ + return ULL2NUM(value); +} +#endif + + +SWIGINTERNINLINE VALUE +SWIG_From_size_t (size_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(size_t) <= sizeof(unsigned long long) */ + return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value)); + } +#endif +} + +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_1(std::vector< int > *self,std::vector< int >::iterator first,std::vector< int >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__insert__SWIG_1(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_int_Sg__insert__SWIG_2(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::size_type n,std::vector< int >::value_type const &x){ self->insert(pos, n, x); } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg__map_bang(std::vector< int > *self){ + + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "No block given" ); + + VALUE r = Qnil; + std::vector< int >::iterator i = self->begin(); + std::vector< int >::iterator e = self->end(); + + try { + for ( ; i != e; ++i ) + { + r = swig::from< int >( *i ); + r = rb_yield( r ); + *i = swig::as< int >( r ); + } + } + catch (const std::invalid_argument&) + { + rb_raise(rb_eTypeError, + "Yield block did not return a valid element for " "std::vector"); + } + + return self; + } +SWIGINTERN VALUE std_vector_Sl_int_Sg____delete__(std::vector< int > *self,int const &val){ + VALUE r = Qnil; + std::vector<int >::iterator e = self->end(); + std::vector<int >::iterator i = std::remove( self->begin(), e, val ); + // remove dangling elements now + self->erase( i, e ); + + if ( i != e ) + r = swig::from< int >( val ); + else if ( rb_block_given_p() ) + r = rb_yield(Qnil); + return r; + } + +/*@SWIG:/usr/share/swig4.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + double *res = (double *)(args[1]); + *res = NUM2DBL(obj); (void)type; + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_double (VALUE obj, double *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) { + double v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2DBL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + + #define SWIG_From_double rb_float_new + + +namespace swig { + template <> struct traits< double > { + typedef value_category category; + static const char* type_name() { return"double"; } + }; + template <> struct traits_asval< double > { + typedef double value_type; + static int asval(VALUE obj, value_type *val) { + return SWIG_AsVal_double (obj, val); + } + }; + template <> struct traits_from< double > { + typedef double value_type; + static VALUE from(const value_type& val) { + return SWIG_From_double (val); + } + }; +} + + + namespace swig { + template <> struct traits<std::vector< double, std::allocator< double > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "double" "," "std::allocator< double >" " >"; + } + }; + } + +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg__dup(std::vector< double > *self){ + return new std::vector< double,std::allocator< double > >(*self); + } +SWIGINTERN VALUE std_vector_Sl_double_Sg__inspect(std::vector< double > *self){ + std::vector< double,std::allocator< double > >::const_iterator i = self->begin(); + std::vector< double,std::allocator< double > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::vector< double,std::allocator< double > > >(); + VALUE str = rb_str_new2(type_name); + str = rb_str_cat2( str, " [" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::vector< double,std::allocator< double > >::value_type >( *i ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "]" ); + return str; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg__to_a(std::vector< double > *self){ + std::vector< double,std::allocator< double > >::const_iterator i = self->begin(); + std::vector< double,std::allocator< double > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< double,std::allocator< double > >::value_type >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg__to_s(std::vector< double > *self){ + std::vector< double,std::allocator< double > >::iterator i = self->begin(); + std::vector< double,std::allocator< double > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< double,std::allocator< double > >::value_type >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg__slice(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< double,std::allocator< double > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< double,std::allocator< double > >::difference_type j = length + i; + if ( j > static_cast<std::vector< double,std::allocator< double > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< double,std::allocator< double > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg__each(std::vector< double > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::vector< double,std::allocator< double > >::const_iterator i = self->begin(); + std::vector< double,std::allocator< double > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from< std::vector< double,std::allocator< double > >::value_type >(*i); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg____delete2__(std::vector< double > *self,std::vector< double >::value_type const &i){ + VALUE r = Qnil; + return r; + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg__select(std::vector< double > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< double,std::allocator< double > >* r = new std::vector< double,std::allocator< double > >(); + std::vector< double,std::allocator< double > >::const_iterator i = self->begin(); + std::vector< double,std::allocator< double > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE v = swig::from< std::vector< double,std::allocator< double > >::value_type >(*i); + if ( RTEST( rb_yield(v) ) ) + self->insert( r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg__delete_at(std::vector< double > *self,std::vector< double >::difference_type i){ + VALUE r = Qnil; + try { + std::vector< double,std::allocator< double > >::iterator at = swig::getpos(self, i); + r = swig::from< std::vector< double,std::allocator< double > >::value_type >( *(at) ); + self->erase(at); + } + catch (const std::out_of_range&) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg__at(std::vector< double > const *self,std::vector< double >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< double,std::allocator< double > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > const *self,std::vector< double >::difference_type i,std::vector< double >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< double,std::allocator< double > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< double,std::allocator< double > >::difference_type j = length + i; + if ( j > static_cast<std::vector< double,std::allocator< double > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< double,std::allocator< double > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< double,std::allocator< double > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg____getitem____SWIG_2(std::vector< double > const *self,VALUE i){ + if ( rb_obj_is_kind_of( i, rb_cRange ) == Qfalse ) { + rb_raise( rb_eTypeError, "not a valid index or range" ); + } + + static ID id_end = rb_intern("end"); + static ID id_start = rb_intern("begin"); + static ID id_noend = rb_intern("exclude_end?"); + + VALUE start = rb_funcall( i, id_start, 0 ); + VALUE end = rb_funcall( i, id_end, 0 ); + bool noend = ( rb_funcall( i, id_noend, 0 ) == Qtrue ); + + int len = self->size(); + + int s = NUM2INT( start ); + if ( s < 0 ) { + s = len + s; + if ( s < 0 ) + return Qnil; + } else if ( s > len ) + return Qnil; + + int e = NUM2INT( end ); + if ( e < 0 ) e = len + e; + if ( noend ) e -= 1; + if ( e < 0 ) e = -1; + if ( e >= len ) e = len - 1; + if ( s == len ) e = len - 1; + + return swig::from< std::vector< double,std::allocator< double > >* >( swig::getslice(self, s, e+1) ); + } +SWIGINTERN VALUE std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){ + if ( i >= static_cast<std::vector< double,std::allocator< double > >::difference_type>( self->size()) ) + swig::resize( self, i+1, x ); + else + *(swig::getpos(self, i)) = x; + + return swig::from< std::vector< double,std::allocator< double > >::value_type >( x ); + } +SWIGINTERN VALUE std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type length,std::vector< double,std::allocator< double > > const &v){ + + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< double,std::allocator< double > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< double,std::allocator< double > >::difference_type j = length + i; + if ( j > static_cast<std::vector< double,std::allocator< double > >::difference_type>(len) ) { + swig::resize( self, j, *(v.begin()) ); + } + + VALUE r = Qnil; + swig::setslice(self, i, j, v); + r = swig::from< const std::vector< double,std::allocator< double > >* >( &v ); + return r; + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg__reject_bang(std::vector< double > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + self->erase( std::remove_if( self->begin(), self->end(), + swig::yield< std::vector< double,std::allocator< double > >::value_type >() ), self->end() ); + return self; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg__pop(std::vector< double > *self){ + if (self->empty()) return Qnil; + std::vector< double,std::allocator< double > >::value_type x = self->back(); + self->pop_back(); + return swig::from< std::vector< double,std::allocator< double > >::value_type >( x ); + } +SWIGINTERN std::vector< double >::value_type const std_vector_Sl_double_Sg__push(std::vector< double > *self,std::vector< double >::value_type const &e){ + self->push_back( e ); + return e; + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg__reject(std::vector< double > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< double,std::allocator< double > >* r = new std::vector< double,std::allocator< double > >(); + std::remove_copy_if( self->begin(), self->end(), + std::back_inserter(*r), + swig::yield< std::vector< double,std::allocator< double > >::value_type >() ); + return r; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg__shift(std::vector< double > *self){ + if (self->empty()) return Qnil; + std::vector< double,std::allocator< double > >::value_type x = self->front(); + self->erase( self->begin() ); + return swig::from< std::vector< double,std::allocator< double > >::value_type >( x ); + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg__insert__SWIG_0(std::vector< double > *self,std::vector< double >::difference_type pos,int argc,VALUE *argv,...){ + std::size_t len = self->size(); + std::size_t i = swig::check_index( pos, len, true ); + std::vector< double,std::allocator< double > >::iterator start; + + VALUE elem = argv[0]; + int idx = 0; + try { + std::vector< double,std::allocator< double > >::value_type val = swig::as<std::vector< double,std::allocator< double > >::value_type>( elem ); + if ( i >= len ) { + self->resize(i-1, val); + return self; + } + start = self->begin(); + std::advance( start, i ); + self->insert( start++, val ); + + for ( ++idx; idx < argc; ++idx ) + { + elem = argv[idx]; + val = swig::as<std::vector< double,std::allocator< double > >::value_type>( elem ); + self->insert( start++, val ); + } + + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< double,std::allocator< double > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + + + return self; + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg__unshift(std::vector< double > *self,int argc,VALUE *argv,...){ + for ( int idx = argc-1; idx >= 0; --idx ) + { + std::vector< double,std::allocator< double > >::iterator start = self->begin(); + VALUE elem = argv[idx]; + try { + std::vector< double,std::allocator< double > >::value_type val = swig::as<std::vector< double,std::allocator< double > >::value_type>( elem ); + self->insert( start, val ); + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< double,std::allocator< double > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + } + + return self; + } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_1(std::vector< double > *self,std::vector< double >::iterator first,std::vector< double >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__insert__SWIG_1(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_double_Sg__insert__SWIG_2(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::size_type n,std::vector< double >::value_type const &x){ self->insert(pos, n, x); } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg__map_bang(std::vector< double > *self){ + + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "No block given" ); + + VALUE r = Qnil; + std::vector< double >::iterator i = self->begin(); + std::vector< double >::iterator e = self->end(); + + try { + for ( ; i != e; ++i ) + { + r = swig::from< double >( *i ); + r = rb_yield( r ); + *i = swig::as< double >( r ); + } + } + catch (const std::invalid_argument&) + { + rb_raise(rb_eTypeError, + "Yield block did not return a valid element for " "std::vector"); + } + + return self; + } +SWIGINTERN VALUE std_vector_Sl_double_Sg____delete__(std::vector< double > *self,double const &val){ + VALUE r = Qnil; + std::vector<double >::iterator e = self->end(); + std::vector<double >::iterator i = std::remove( self->begin(), e, val ); + // remove dangling elements now + self->erase( i, e ); + + if ( i != e ) + r = swig::from< double >( val ); + else if ( rb_block_given_p() ) + r = rb_yield(Qnil); + return r; + } + + namespace swig { + template <> struct traits<std::vector< std::vector< double,std::allocator< double > >, std::allocator< std::vector< double,std::allocator< double > > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "std::vector< double,std::allocator< double > >" "," "std::allocator< std::vector< double,std::allocator< double > > >" " >"; + } + }; + } + +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg__dup(std::vector< std::vector< double > > *self){ + return new std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >(*self); + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg__inspect(std::vector< std::vector< double > > *self){ + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::const_iterator i = self->begin(); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(); + VALUE str = rb_str_new2(type_name); + str = rb_str_cat2( str, " [" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( *i ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "]" ); + return str; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg__to_a(std::vector< std::vector< double > > *self){ + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::const_iterator i = self->begin(); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg__to_s(std::vector< std::vector< double > > *self){ + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::iterator i = self->begin(); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg__slice(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type j = length + i; + if ( j > static_cast<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg__each(std::vector< std::vector< double > > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::const_iterator i = self->begin(); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >(*i); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg____delete2__(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::value_type const &i){ + VALUE r = Qnil; + return r; + } +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg__select(std::vector< std::vector< double > > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >* r = new std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >(); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::const_iterator i = self->begin(); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE v = swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >(*i); + if ( RTEST( rb_yield(v) ) ) + self->insert( r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg__delete_at(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i){ + VALUE r = Qnil; + try { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::iterator at = swig::getpos(self, i); + r = swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( *(at) ); + self->erase(at); + } + catch (const std::out_of_range&) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg__at(std::vector< std::vector< double > > const *self,std::vector< std::vector< double > >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > const *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type j = length + i; + if ( j > static_cast<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_1(std::vector< std::vector< double > > const *self,std::vector< std::vector< double > >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_2(std::vector< std::vector< double > > const *self,VALUE i){ + if ( rb_obj_is_kind_of( i, rb_cRange ) == Qfalse ) { + rb_raise( rb_eTypeError, "not a valid index or range" ); + } + + static ID id_end = rb_intern("end"); + static ID id_start = rb_intern("begin"); + static ID id_noend = rb_intern("exclude_end?"); + + VALUE start = rb_funcall( i, id_start, 0 ); + VALUE end = rb_funcall( i, id_end, 0 ); + bool noend = ( rb_funcall( i, id_noend, 0 ) == Qtrue ); + + int len = self->size(); + + int s = NUM2INT( start ); + if ( s < 0 ) { + s = len + s; + if ( s < 0 ) + return Qnil; + } else if ( s > len ) + return Qnil; + + int e = NUM2INT( end ); + if ( e < 0 ) e = len + e; + if ( noend ) e -= 1; + if ( e < 0 ) e = -1; + if ( e >= len ) e = len - 1; + if ( s == len ) e = len - 1; + + return swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >* >( swig::getslice(self, s, e+1) ); + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::value_type const &x){ + if ( i >= static_cast<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type>( self->size()) ) + swig::resize( self, i+1, x ); + else + *(swig::getpos(self, i)) = x; + + return swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( x ); + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type length,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ + + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type j = length + i; + if ( j > static_cast<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type>(len) ) { + swig::resize( self, j, *(v.begin()) ); + } + + VALUE r = Qnil; + swig::setslice(self, i, j, v); + r = swig::from< const std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >* >( &v ); + return r; + } +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg__reject_bang(std::vector< std::vector< double > > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + self->erase( std::remove_if( self->begin(), self->end(), + swig::yield< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >() ), self->end() ); + return self; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg__pop(std::vector< std::vector< double > > *self){ + if (self->empty()) return Qnil; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type x = self->back(); + self->pop_back(); + return swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( x ); + } +SWIGINTERN std::vector< std::vector< double > >::value_type const std_vector_Sl_std_vector_Sl_double_Sg__Sg__push(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::value_type const &e){ + self->push_back( e ); + return e; + } +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg__reject(std::vector< std::vector< double > > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >* r = new std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >(); + std::remove_copy_if( self->begin(), self->end(), + std::back_inserter(*r), + swig::yield< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >() ); + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_vector_Sl_double_Sg__Sg__shift(std::vector< std::vector< double > > *self){ + if (self->empty()) return Qnil; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type x = self->front(); + self->erase( self->begin() ); + return swig::from< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type >( x ); + } +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type pos,int argc,VALUE *argv,...){ + std::size_t len = self->size(); + std::size_t i = swig::check_index( pos, len, true ); + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::iterator start; + + VALUE elem = argv[0]; + int idx = 0; + try { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type val = swig::as<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type>( elem ); + if ( i >= len ) { + self->resize(i-1, val); + return self; + } + start = self->begin(); + std::advance( start, i ); + self->insert( start++, val ); + + for ( ++idx; idx < argc; ++idx ) + { + elem = argv[idx]; + val = swig::as<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type>( elem ); + self->insert( start++, val ); + } + + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + + + return self; + } +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg__unshift(std::vector< std::vector< double > > *self,int argc,VALUE *argv,...){ + for ( int idx = argc-1; idx >= 0; --idx ) + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::iterator start = self->begin(); + VALUE elem = argv[idx]; + try { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type val = swig::as<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type>( elem ); + self->insert( start, val ); + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + } + + return self; + } +SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator first,std::vector< std::vector< double > >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos,std::vector< std::vector< double > >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_2(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos,std::vector< std::vector< double > >::size_type n,std::vector< std::vector< double > >::value_type const &x){ self->insert(pos, n, x); } + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) +{ + if (TYPE(obj) == T_STRING) { + char *cstr = StringValuePtr(obj); + size_t size = RSTRING_LEN(obj) + 1; + if (cptr) { + if (alloc) { + if (*alloc == SWIG_NEWOBJ) { + *cptr = reinterpret_cast< char* >(memcpy(new char[size], cstr, sizeof(char)*(size))); + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } + } + if (psize) *psize = size; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *)vptr; + if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsPtr_std_string (VALUE obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + + +SWIGINTERN int +SWIG_AsVal_std_string (VALUE obj, std::string *val) +{ + std::string* v = (std::string *) 0; + int res = SWIG_AsPtr_std_string (obj, &v); + if (!SWIG_IsOK(res)) return res; + if (v) { + if (val) *val = *v; + if (SWIG_IsNewObj(res)) { + delete v; + res = SWIG_DelNewMask(res); + } + return res; + } + return SWIG_ERROR; +} + + +SWIGINTERNINLINE VALUE +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > LONG_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil; + } else { + return rb_str_new(carray, static_cast< long >(size)); + } + } else { + return Qnil; + } +} + + +SWIGINTERNINLINE VALUE +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + +namespace swig { + template <> struct traits< std::string > { + typedef value_category category; + static const char* type_name() { return"std::string"; } + }; + template <> struct traits_asval< std::string > { + typedef std::string value_type; + static int asval(VALUE obj, value_type *val) { + return SWIG_AsVal_std_string (obj, val); + } + }; + template <> struct traits_from< std::string > { + typedef std::string value_type; + static VALUE from(const value_type& val) { + return SWIG_From_std_string (val); + } + }; +} + + + namespace swig { + template <> struct traits<std::vector< std::string, std::allocator< std::string > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "std::string" "," "std::allocator< std::string >" " >"; + } + }; + } + +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg__dup(std::vector< std::string > *self){ + return new std::vector< std::string,std::allocator< std::string > >(*self); + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg__inspect(std::vector< std::string > *self){ + std::vector< std::string,std::allocator< std::string > >::const_iterator i = self->begin(); + std::vector< std::string,std::allocator< std::string > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::vector< std::string,std::allocator< std::string > > >(); + VALUE str = rb_str_new2(type_name); + str = rb_str_cat2( str, " [" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( *i ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "]" ); + return str; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg__to_a(std::vector< std::string > *self){ + std::vector< std::string,std::allocator< std::string > >::const_iterator i = self->begin(); + std::vector< std::string,std::allocator< std::string > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg__to_s(std::vector< std::string > *self){ + std::vector< std::string,std::allocator< std::string > >::iterator i = self->begin(); + std::vector< std::string,std::allocator< std::string > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg__slice(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< std::string,std::allocator< std::string > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< std::string,std::allocator< std::string > >::difference_type j = length + i; + if ( j > static_cast<std::vector< std::string,std::allocator< std::string > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< std::string,std::allocator< std::string > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg__each(std::vector< std::string > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::vector< std::string,std::allocator< std::string > >::const_iterator i = self->begin(); + std::vector< std::string,std::allocator< std::string > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >(*i); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg____delete2__(std::vector< std::string > *self,std::vector< std::string >::value_type const &i){ + VALUE r = Qnil; + return r; + } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg__select(std::vector< std::string > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< std::string,std::allocator< std::string > >* r = new std::vector< std::string,std::allocator< std::string > >(); + std::vector< std::string,std::allocator< std::string > >::const_iterator i = self->begin(); + std::vector< std::string,std::allocator< std::string > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE v = swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >(*i); + if ( RTEST( rb_yield(v) ) ) + self->insert( r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg__delete_at(std::vector< std::string > *self,std::vector< std::string >::difference_type i){ + VALUE r = Qnil; + try { + std::vector< std::string,std::allocator< std::string > >::iterator at = swig::getpos(self, i); + r = swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( *(at) ); + self->erase(at); + } + catch (const std::out_of_range&) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg__at(std::vector< std::string > const *self,std::vector< std::string >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > const *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< std::string,std::allocator< std::string > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< std::string,std::allocator< std::string > >::difference_type j = length + i; + if ( j > static_cast<std::vector< std::string,std::allocator< std::string > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< std::string,std::allocator< std::string > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg____getitem____SWIG_1(std::vector< std::string > const *self,std::vector< std::string >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg____getitem____SWIG_2(std::vector< std::string > const *self,VALUE i){ + if ( rb_obj_is_kind_of( i, rb_cRange ) == Qfalse ) { + rb_raise( rb_eTypeError, "not a valid index or range" ); + } + + static ID id_end = rb_intern("end"); + static ID id_start = rb_intern("begin"); + static ID id_noend = rb_intern("exclude_end?"); + + VALUE start = rb_funcall( i, id_start, 0 ); + VALUE end = rb_funcall( i, id_end, 0 ); + bool noend = ( rb_funcall( i, id_noend, 0 ) == Qtrue ); + + int len = self->size(); + + int s = NUM2INT( start ); + if ( s < 0 ) { + s = len + s; + if ( s < 0 ) + return Qnil; + } else if ( s > len ) + return Qnil; + + int e = NUM2INT( end ); + if ( e < 0 ) e = len + e; + if ( noend ) e -= 1; + if ( e < 0 ) e = -1; + if ( e >= len ) e = len - 1; + if ( s == len ) e = len - 1; + + return swig::from< std::vector< std::string,std::allocator< std::string > >* >( swig::getslice(self, s, e+1) ); + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::value_type const &x){ + if ( i >= static_cast<std::vector< std::string,std::allocator< std::string > >::difference_type>( self->size()) ) + swig::resize( self, i+1, x ); + else + *(swig::getpos(self, i)) = x; + + return swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( x ); + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type length,std::vector< std::string,std::allocator< std::string > > const &v){ + + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< std::string,std::allocator< std::string > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< std::string,std::allocator< std::string > >::difference_type j = length + i; + if ( j > static_cast<std::vector< std::string,std::allocator< std::string > >::difference_type>(len) ) { + swig::resize( self, j, *(v.begin()) ); + } + + VALUE r = Qnil; + swig::setslice(self, i, j, v); + r = swig::from< const std::vector< std::string,std::allocator< std::string > >* >( &v ); + return r; + } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg__reject_bang(std::vector< std::string > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + self->erase( std::remove_if( self->begin(), self->end(), + swig::yield< std::vector< std::string,std::allocator< std::string > >::value_type >() ), self->end() ); + return self; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg__pop(std::vector< std::string > *self){ + if (self->empty()) return Qnil; + std::vector< std::string,std::allocator< std::string > >::value_type x = self->back(); + self->pop_back(); + return swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( x ); + } +SWIGINTERN std::vector< std::string >::value_type const std_vector_Sl_std_string_Sg__push(std::vector< std::string > *self,std::vector< std::string >::value_type const &e){ + self->push_back( e ); + return e; + } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg__reject(std::vector< std::string > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< std::string,std::allocator< std::string > >* r = new std::vector< std::string,std::allocator< std::string > >(); + std::remove_copy_if( self->begin(), self->end(), + std::back_inserter(*r), + swig::yield< std::vector< std::string,std::allocator< std::string > >::value_type >() ); + return r; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg__shift(std::vector< std::string > *self){ + if (self->empty()) return Qnil; + std::vector< std::string,std::allocator< std::string > >::value_type x = self->front(); + self->erase( self->begin() ); + return swig::from< std::vector< std::string,std::allocator< std::string > >::value_type >( x ); + } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg__insert__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type pos,int argc,VALUE *argv,...){ + std::size_t len = self->size(); + std::size_t i = swig::check_index( pos, len, true ); + std::vector< std::string,std::allocator< std::string > >::iterator start; + + VALUE elem = argv[0]; + int idx = 0; + try { + std::vector< std::string,std::allocator< std::string > >::value_type val = swig::as<std::vector< std::string,std::allocator< std::string > >::value_type>( elem ); + if ( i >= len ) { + self->resize(i-1, val); + return self; + } + start = self->begin(); + std::advance( start, i ); + self->insert( start++, val ); + + for ( ++idx; idx < argc; ++idx ) + { + elem = argv[idx]; + val = swig::as<std::vector< std::string,std::allocator< std::string > >::value_type>( elem ); + self->insert( start++, val ); + } + + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< std::string,std::allocator< std::string > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + + + return self; + } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg__unshift(std::vector< std::string > *self,int argc,VALUE *argv,...){ + for ( int idx = argc-1; idx >= 0; --idx ) + { + std::vector< std::string,std::allocator< std::string > >::iterator start = self->begin(); + VALUE elem = argv[idx]; + try { + std::vector< std::string,std::allocator< std::string > >::value_type val = swig::as<std::vector< std::string,std::allocator< std::string > >::value_type>( elem ); + self->insert( start, val ); + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< std::string,std::allocator< std::string > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + } + + return self; + } +SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator first,std::vector< std::string >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_std_string_Sg__insert__SWIG_2(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::size_type n,std::vector< std::string >::value_type const &x){ self->insert(pos, n, x); } +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg__map_bang(std::vector< std::string > *self){ + + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "No block given" ); + + VALUE r = Qnil; + std::vector< std::string >::iterator i = self->begin(); + std::vector< std::string >::iterator e = self->end(); + + try { + for ( ; i != e; ++i ) + { + r = swig::from< std::string >( *i ); + r = rb_yield( r ); + *i = swig::as< std::string >( r ); + } + } + catch (const std::invalid_argument&) + { + rb_raise(rb_eTypeError, + "Yield block did not return a valid element for " "std::vector"); + } + + return self; + } +SWIGINTERN VALUE std_vector_Sl_std_string_Sg____delete__(std::vector< std::string > *self,std::string const &val){ + VALUE r = Qnil; + std::vector<std::string >::iterator e = self->end(); + std::vector<std::string >::iterator i = std::remove( self->begin(), e, val ); + // remove dangling elements now + self->erase( i, e ); + + if ( i != e ) + r = swig::from< std::string >( val ); + else if ( rb_block_given_p() ) + r = rb_yield(Qnil); + return r; + } + + namespace swig { + template <> struct traits< CdiVariable > { + typedef pointer_category category; + static const char* type_name() { return"CdiVariable"; } + }; + } + + + namespace swig { + template <> struct traits<std::vector< CdiVariable, std::allocator< CdiVariable > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "CdiVariable" "," "std::allocator< CdiVariable >" " >"; + } + }; + } + +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg__dup(std::vector< CdiVariable > *self){ + return new std::vector< CdiVariable,std::allocator< CdiVariable > >(*self); + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg__inspect(std::vector< CdiVariable > *self){ + std::vector< CdiVariable,std::allocator< CdiVariable > >::const_iterator i = self->begin(); + std::vector< CdiVariable,std::allocator< CdiVariable > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::vector< CdiVariable,std::allocator< CdiVariable > > >(); + VALUE str = rb_str_new2(type_name); + str = rb_str_cat2( str, " [" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( *i ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "]" ); + return str; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg__to_a(std::vector< CdiVariable > *self){ + std::vector< CdiVariable,std::allocator< CdiVariable > >::const_iterator i = self->begin(); + std::vector< CdiVariable,std::allocator< CdiVariable > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg__to_s(std::vector< CdiVariable > *self){ + std::vector< CdiVariable,std::allocator< CdiVariable > >::iterator i = self->begin(); + std::vector< CdiVariable,std::allocator< CdiVariable > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + tmp = swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg__slice(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type j = length + i; + if ( j > static_cast<std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< CdiVariable,std::allocator< CdiVariable > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg__each(std::vector< CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::vector< CdiVariable,std::allocator< CdiVariable > >::const_iterator i = self->begin(); + std::vector< CdiVariable,std::allocator< CdiVariable > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >(*i); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg____delete2__(std::vector< CdiVariable > *self,std::vector< CdiVariable >::value_type const &i){ + VALUE r = Qnil; + return r; + } +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg__select(std::vector< CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< CdiVariable,std::allocator< CdiVariable > >* r = new std::vector< CdiVariable,std::allocator< CdiVariable > >(); + std::vector< CdiVariable,std::allocator< CdiVariable > >::const_iterator i = self->begin(); + std::vector< CdiVariable,std::allocator< CdiVariable > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE v = swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >(*i); + if ( RTEST( rb_yield(v) ) ) + self->insert( r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg__delete_at(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i){ + VALUE r = Qnil; + try { + std::vector< CdiVariable,std::allocator< CdiVariable > >::iterator at = swig::getpos(self, i); + r = swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( *(at) ); + self->erase(at); + } + catch (const std::out_of_range&) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg__at(std::vector< CdiVariable > const *self,std::vector< CdiVariable >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg____getitem____SWIG_0(std::vector< CdiVariable > const *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::difference_type length){ + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type j = length + i; + if ( j > static_cast<std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type>(len) ) + j = len; + + VALUE r = Qnil; + try { + r = swig::from< const std::vector< CdiVariable,std::allocator< CdiVariable > >* >( swig::getslice(self, i, j) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg____getitem____SWIG_1(std::vector< CdiVariable > const *self,std::vector< CdiVariable >::difference_type i){ + VALUE r = Qnil; + try { + r = swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( *(swig::cgetpos(self, i)) ); + } + catch( const std::out_of_range& ) { + } + return r; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg____getitem____SWIG_2(std::vector< CdiVariable > const *self,VALUE i){ + if ( rb_obj_is_kind_of( i, rb_cRange ) == Qfalse ) { + rb_raise( rb_eTypeError, "not a valid index or range" ); + } + + static ID id_end = rb_intern("end"); + static ID id_start = rb_intern("begin"); + static ID id_noend = rb_intern("exclude_end?"); + + VALUE start = rb_funcall( i, id_start, 0 ); + VALUE end = rb_funcall( i, id_end, 0 ); + bool noend = ( rb_funcall( i, id_noend, 0 ) == Qtrue ); + + int len = self->size(); + + int s = NUM2INT( start ); + if ( s < 0 ) { + s = len + s; + if ( s < 0 ) + return Qnil; + } else if ( s > len ) + return Qnil; + + int e = NUM2INT( end ); + if ( e < 0 ) e = len + e; + if ( noend ) e -= 1; + if ( e < 0 ) e = -1; + if ( e >= len ) e = len - 1; + if ( s == len ) e = len - 1; + + return swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >* >( swig::getslice(self, s, e+1) ); + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg____setitem____SWIG_0(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::value_type const &x){ + if ( i >= static_cast<std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type>( self->size()) ) + swig::resize( self, i+1, x ); + else + *(swig::getpos(self, i)) = x; + + return swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( x ); + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg____setitem____SWIG_1(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type i,std::vector< CdiVariable >::difference_type length,std::vector< CdiVariable,std::allocator< CdiVariable > > const &v){ + + if ( length < 0 ) + return Qnil; + std::size_t len = self->size(); + if ( i < 0 ) { + if ( i + static_cast<std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type>(len) < 0 ) + return Qnil; + else + i = len + i; + } + std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type j = length + i; + if ( j > static_cast<std::vector< CdiVariable,std::allocator< CdiVariable > >::difference_type>(len) ) { + swig::resize( self, j, *(v.begin()) ); + } + + VALUE r = Qnil; + swig::setslice(self, i, j, v); + r = swig::from< const std::vector< CdiVariable,std::allocator< CdiVariable > >* >( &v ); + return r; + } +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg__reject_bang(std::vector< CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + self->erase( std::remove_if( self->begin(), self->end(), + swig::yield< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >() ), self->end() ); + return self; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg__pop(std::vector< CdiVariable > *self){ + if (self->empty()) return Qnil; + std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type x = self->back(); + self->pop_back(); + return swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( x ); + } +SWIGINTERN std::vector< CdiVariable >::value_type const std_vector_Sl_CdiVariable_Sg__push(std::vector< CdiVariable > *self,std::vector< CdiVariable >::value_type const &e){ + self->push_back( e ); + return e; + } +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg__reject(std::vector< CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::vector< CdiVariable,std::allocator< CdiVariable > >* r = new std::vector< CdiVariable,std::allocator< CdiVariable > >(); + std::remove_copy_if( self->begin(), self->end(), + std::back_inserter(*r), + swig::yield< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >() ); + return r; + } +SWIGINTERN VALUE std_vector_Sl_CdiVariable_Sg__shift(std::vector< CdiVariable > *self){ + if (self->empty()) return Qnil; + std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type x = self->front(); + self->erase( self->begin() ); + return swig::from< std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type >( x ); + } +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg__insert__SWIG_0(std::vector< CdiVariable > *self,std::vector< CdiVariable >::difference_type pos,int argc,VALUE *argv,...){ + std::size_t len = self->size(); + std::size_t i = swig::check_index( pos, len, true ); + std::vector< CdiVariable,std::allocator< CdiVariable > >::iterator start; + + VALUE elem = argv[0]; + int idx = 0; + try { + std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type val = swig::as<std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type>( elem ); + if ( i >= len ) { + self->resize(i-1, val); + return self; + } + start = self->begin(); + std::advance( start, i ); + self->insert( start++, val ); + + for ( ++idx; idx < argc; ++idx ) + { + elem = argv[idx]; + val = swig::as<std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type>( elem ); + self->insert( start++, val ); + } + + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + + + return self; + } +SWIGINTERN std::vector< CdiVariable,std::allocator< CdiVariable > > *std_vector_Sl_CdiVariable_Sg__unshift(std::vector< CdiVariable > *self,int argc,VALUE *argv,...){ + for ( int idx = argc-1; idx >= 0; --idx ) + { + std::vector< CdiVariable,std::allocator< CdiVariable > >::iterator start = self->begin(); + VALUE elem = argv[idx]; + try { + std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type val = swig::as<std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type>( elem ); + self->insert( start, val ); + } + catch(const std::invalid_argument &) + { + rb_raise( rb_eArgError, "%s", + Ruby_Format_TypeError( "", + swig::type_name<std::vector< CdiVariable,std::allocator< CdiVariable > >::value_type>(), + __FUNCTION__, idx+2, elem )); + } + } + + return self; + } +SWIGINTERN std::vector< CdiVariable >::iterator std_vector_Sl_CdiVariable_Sg__erase__SWIG_0(std::vector< CdiVariable > *self,std::vector< CdiVariable >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< CdiVariable >::iterator std_vector_Sl_CdiVariable_Sg__erase__SWIG_1(std::vector< CdiVariable > *self,std::vector< CdiVariable >::iterator first,std::vector< CdiVariable >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< CdiVariable >::iterator std_vector_Sl_CdiVariable_Sg__insert__SWIG_1(std::vector< CdiVariable > *self,std::vector< CdiVariable >::iterator pos,std::vector< CdiVariable >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_CdiVariable_Sg__insert__SWIG_2(std::vector< CdiVariable > *self,std::vector< CdiVariable >::iterator pos,std::vector< CdiVariable >::size_type n,std::vector< CdiVariable >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + + template <class T, class U > + struct traits_asval<std::pair<T,U> > { + typedef std::pair<T,U> value_type; + + static int get_pair(VALUE first, VALUE second, + std::pair<T,U> *val) + { + if (val) { + T *pfirst = &(val->first); + int res1 = swig::asval((VALUE)first, pfirst); + if (!SWIG_IsOK(res1)) return res1; + U *psecond = &(val->second); + int res2 = swig::asval((VALUE)second, psecond); + if (!SWIG_IsOK(res2)) return res2; + return res1 > res2 ? res1 : res2; + } else { + T *pfirst = 0; + int res1 = swig::asval((VALUE)first, pfirst); + if (!SWIG_IsOK(res1)) return res1; + U *psecond = 0; + int res2 = swig::asval((VALUE)second, psecond); + if (!SWIG_IsOK(res2)) return res2; + return res1 > res2 ? res1 : res2; + } + } + + static int asval(VALUE obj, std::pair<T,U> *val) { + int res = SWIG_ERROR; + if ( TYPE(obj) == T_ARRAY ) { + if (RARRAY_LEN(obj) == 2) { + VALUE first = rb_ary_entry(obj,0); + VALUE second = rb_ary_entry(obj,1); + res = get_pair(first, second, val); + } + } else { + value_type *p; + swig_type_info *descriptor = swig::type_info<value_type>(); + res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res) && val) *val = *p; + } + return res; + } + }; + + template <class T, class U > + struct traits_asptr<std::pair<T,U> > { + typedef std::pair<T,U> value_type; + + static int get_pair(VALUE first, VALUE second, + std::pair<T,U> **val) + { + if (val) { + value_type *vp = (new std::pair<T,U>()); + T *pfirst = &(vp->first); + int res1 = swig::asval((VALUE)first, pfirst); + if (!SWIG_IsOK(res1)) { + delete vp; + return res1; + } + U *psecond = &(vp->second); + int res2 = swig::asval((VALUE)second, psecond); + if (!SWIG_IsOK(res2)) { + delete vp; + return res2; + } + *val = vp; + return SWIG_AddNewMask(res1 > res2 ? res1 : res2); + } else { + T *pfirst = 0; + int res1 = swig::asval((VALUE)first, pfirst); + if (!SWIG_IsOK(res1)) return res1; + U *psecond = 0; + int res2 = swig::asval((VALUE)second, psecond); + if (!SWIG_IsOK(res2)) return res2; + return res1 > res2 ? res1 : res2; + } + } + + static int asptr(VALUE obj, std::pair<T,U> **val) { + int res = SWIG_ERROR; + if ( TYPE(obj) == T_ARRAY ) { + if ( RARRAY_LEN(obj) == 2) { + VALUE first = rb_ary_entry(obj,0); + VALUE second = rb_ary_entry(obj,1); + res = get_pair(first, second, val); + } + } else { + value_type *p; + swig_type_info *descriptor = swig::type_info<value_type>(); + res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res) && val) *val = p; + } + return res; + } + }; + + + + template <class T, class U > + struct traits_from<std::pair<T,U> > { + static VALUE _wrap_pair_second( VALUE self ) + { + std::pair< typename swig::noconst_traits<T >::noconst_type,U>* p = NULL; + swig::asptr( self, &p ); + return swig::from( p->second ); + } + + static VALUE _wrap_pair_second_eq( VALUE self, VALUE arg ) + { + std::pair< typename swig::noconst_traits<T >::noconst_type,U>* p = NULL; + swig::asptr( self, &p ); + return swig::from( p->second ); + } + + static VALUE from(const std::pair<T,U>& val) { + VALUE obj = rb_ary_new2(2); + rb_ary_push(obj, swig::from<typename swig::noconst_traits<T >::noconst_type>(val.first)); + rb_ary_push(obj, swig::from(val.second)); + rb_define_singleton_method(obj, "second", + VALUEFUNC(_wrap_pair_second), 0 ); + rb_define_singleton_method(obj, "second=", + VALUEFUNC(_wrap_pair_second_eq), 1 ); + rb_obj_freeze(obj); // treat as immutable tuple + return obj; + } + }; + + } + + + namespace swig { + template <> struct traits<std::pair< std::string, CdiVariable > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "std::string" "," "CdiVariable" " >"; + } + }; + } + + + namespace swig { + template <class ValueType> + struct from_key_oper + { + typedef const ValueType& argument_type; + typedef VALUE result_type; + result_type operator()(argument_type v) const + { + return swig::from(v.first); + } + }; + + template <class ValueType> + struct from_value_oper + { + typedef const ValueType& argument_type; + typedef VALUE result_type; + result_type operator()(argument_type v) const + { + return swig::from(v.second); + } + }; + + template<class OutIterator, class FromOper, + class ValueType = typename OutIterator::value_type> + struct MapIterator_T : ConstIteratorClosed_T<OutIterator, ValueType, FromOper> + { + MapIterator_T(OutIterator curr, OutIterator first, OutIterator last, VALUE seq) + : ConstIteratorClosed_T<OutIterator,ValueType,FromOper>(curr, first, last, seq) + { + } + }; + + + template<class OutIterator, + class FromOper = from_key_oper<typename OutIterator::value_type> > + struct MapKeyIterator_T : MapIterator_T<OutIterator, FromOper> + { + MapKeyIterator_T(OutIterator curr, OutIterator first, OutIterator last, VALUE seq) + : MapIterator_T<OutIterator, FromOper>(curr, first, last, seq) + { + } + }; + + template<typename OutIter> + inline ConstIterator* + make_output_key_iterator(const OutIter& current, const OutIter& begin, + const OutIter& end, VALUE seq = 0) + { + return new MapKeyIterator_T<OutIter>(current, begin, end, seq); + } + + template<class OutIterator, + class FromOper = from_value_oper<typename OutIterator::value_type> > + struct MapValueIterator_T : MapIterator_T<OutIterator, FromOper> + { + MapValueIterator_T(OutIterator curr, OutIterator first, OutIterator last, VALUE seq) + : MapIterator_T<OutIterator, FromOper>(curr, first, last, seq) + { + } + }; + + + template<typename OutIter> + inline ConstIterator* + make_output_value_iterator(const OutIter& current, const OutIter& begin, + const OutIter& end, VALUE seq = 0) + { + return new MapValueIterator_T<OutIter>(current, begin, end, seq); + } + } + + + namespace swig { + template <class RubySeq, class K, class T > + inline void + assign(const RubySeq& rubyseq, std::map<K,T > *map) { + typedef typename std::map<K,T>::value_type value_type; + typename RubySeq::const_iterator it = rubyseq.begin(); + for (;it != rubyseq.end(); ++it) { + map->insert(value_type(it->first, it->second)); + } + } + + template <class K, class T> + struct traits_asptr<std::map<K,T> > { + typedef std::map<K,T> map_type; + static int asptr(VALUE obj, map_type **val) { + int res = SWIG_ERROR; + if ( TYPE(obj) == T_HASH ) { + static ID id_to_a = rb_intern("to_a"); + VALUE items = rb_funcall(obj, id_to_a, 0); + res = traits_asptr_stdseq<std::map<K,T>, std::pair<K, T> >::asptr(items, val); + } else { + map_type *p; + swig_type_info *descriptor = swig::type_info<map_type>(); + res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res) && val) *val = p; + } + return res; + } + }; + + template <class K, class T > + struct traits_from<std::map<K,T> > { + typedef std::map<K,T> map_type; + typedef typename map_type::const_iterator const_iterator; + typedef typename map_type::size_type size_type; + + static VALUE from(const map_type& map) { + swig_type_info *desc = swig::type_info<map_type>(); + if (desc && desc->clientdata) { + return SWIG_NewPointerObj(new map_type(map), desc, SWIG_POINTER_OWN); + } else { + size_type size = map.size(); + int rubysize = (size <= (size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise( rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE obj = rb_hash_new(); + for (const_iterator i= map.begin(); i!= map.end(); ++i) { + VALUE key = swig::from(i->first); + VALUE val = swig::from(i->second); + rb_hash_aset(obj, key, val); + } + return obj; + } + } + }; + } + + + namespace swig { + template <> struct traits<std::map< std::string, CdiVariable, std::less< std::string >, std::allocator< std::pair< std::string const,CdiVariable > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "std::string" "," "CdiVariable" "," "std::less< std::string >" "," "std::allocator< std::pair< std::string const,CdiVariable > >" " >"; + } + }; + } + +SWIGINTERN std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *std_map_Sl_std_string_Sc_CdiVariable_Sg__dup(std::map< std::string,CdiVariable > *self){ + return new std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >(*self); + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg____delete__(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::key_type const &key){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator i = self->find(key); + if (i != self->end()) { + self->erase(i); + return swig::from( key ); + } + else { + return Qnil; + } + } +SWIGINTERN bool std_map_Sl_std_string_Sc_CdiVariable_Sg__has_key(std::map< std::string,CdiVariable > const *self,std::map< std::string,CdiVariable >::key_type const &key){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg__keys(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->first) ); + } + return ary; + } +SWIGINTERN std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *std_map_Sl_std_string_Sc_CdiVariable_Sg__each(std::map< std::string,CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE k, v; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + const std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::key_type& key = i->first; + const std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::mapped_type& val = i->second; + + k = swig::from<std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::key_type>(key); + v = swig::from<std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::mapped_type>(val); + rb_yield_values(2, k, v); + } + + return self; + } +SWIGINTERN std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *std_map_Sl_std_string_Sc_CdiVariable_Sg__select(std::map< std::string,CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >* r = new std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE k = swig::from<std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::key_type>(i->first); + VALUE v = swig::from<std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::mapped_type>(i->second); + if ( RTEST( rb_yield_values(2, k, v) ) ) + self->insert(r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg__values_at(std::map< std::string,CdiVariable > *self,int argc,VALUE *argv,...){ + + VALUE r = rb_ary_new(); + ID id = rb_intern("[]"); + swig_type_info* type = swig::type_info< std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > >(); + VALUE me = SWIG_NewPointerObj( self, type, 0 ); + for ( int i = 0; i < argc; ++i ) + { + VALUE key = argv[i]; + VALUE tmp = rb_funcall( me, id, 1, key ); + rb_ary_push( r, tmp ); + } + + return r; + } +SWIGINTERN std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *std_map_Sl_std_string_Sc_CdiVariable_Sg__each_key(std::map< std::string,CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->first ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg__values(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->second) ); + } + return ary; + } +SWIGINTERN std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *std_map_Sl_std_string_Sc_CdiVariable_Sg__each_value(std::map< std::string,CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->second ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg__entries(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from<std::pair<std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::key_type, + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::mapped_type> >(*i) ); + } + return ary; + } +SWIGINTERN bool std_map_Sl_std_string_Sc_CdiVariable_Sg____contains__(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_std_string_Sc_CdiVariable_Sg__key_iterator(std::map< std::string,CdiVariable > *self,VALUE *RUBY_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_std_string_Sc_CdiVariable_Sg__value_iterator(std::map< std::string,CdiVariable > *self,VALUE *RUBY_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg____getitem__(std::map< std::string,CdiVariable > const *self,std::map< std::string,CdiVariable >::key_type const &key){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->find(key); + if ( i != self->end() ) + return swig::from<std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::mapped_type>( i->second ); + else + return Qnil; + } +SWIGINTERN void std_map_Sl_std_string_Sc_CdiVariable_Sg____setitem__(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::key_type const &key,std::map< std::string,CdiVariable >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg__inspect(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > >(); + VALUE str = rb_str_new2( type_name ); + str = rb_str_cat2( str, " {" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::key_type >( i->first ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + str = rb_str_cat2( str, "=>" ); + tmp = swig::from< std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::mapped_type >( i->second ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "}" ); + return str; + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg__to_a(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::key_type, + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::mapped_type> >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_map_Sl_std_string_Sc_CdiVariable_Sg__to_s(std::map< std::string,CdiVariable > *self){ + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator i = self->begin(); + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::key_type, + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::mapped_type> >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN void std_map_Sl_std_string_Sc_CdiVariable_Sg__erase__SWIG_1(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_std_string_Sc_CdiVariable_Sg__erase__SWIG_2(std::map< std::string,CdiVariable > *self,std::map< std::string,CdiVariable >::iterator first,std::map< std::string,CdiVariable >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits<std::pair< int, CdiVariable > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "int" "," "CdiVariable" " >"; + } + }; + } + + + namespace swig { + template <> struct traits<std::map< int, CdiVariable, std::less< int >, std::allocator< std::pair< int const,CdiVariable > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "int" "," "CdiVariable" "," "std::less< int >" "," "std::allocator< std::pair< int const,CdiVariable > >" " >"; + } + }; + } + +SWIGINTERN std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *std_map_Sl_int_Sc_CdiVariable_Sg__dup(std::map< int,CdiVariable > *self){ + return new std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >(*self); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg____delete__(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::key_type const &key){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator i = self->find(key); + if (i != self->end()) { + self->erase(i); + return swig::from( key ); + } + else { + return Qnil; + } + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiVariable_Sg__has_key(std::map< int,CdiVariable > const *self,std::map< int,CdiVariable >::key_type const &key){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg__keys(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->first) ); + } + return ary; + } +SWIGINTERN std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *std_map_Sl_int_Sc_CdiVariable_Sg__each(std::map< int,CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE k, v; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + const std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::key_type& key = i->first; + const std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::mapped_type& val = i->second; + + k = swig::from<std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::key_type>(key); + v = swig::from<std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::mapped_type>(val); + rb_yield_values(2, k, v); + } + + return self; + } +SWIGINTERN std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *std_map_Sl_int_Sc_CdiVariable_Sg__select(std::map< int,CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >* r = new std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE k = swig::from<std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::key_type>(i->first); + VALUE v = swig::from<std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::mapped_type>(i->second); + if ( RTEST( rb_yield_values(2, k, v) ) ) + self->insert(r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg__values_at(std::map< int,CdiVariable > *self,int argc,VALUE *argv,...){ + + VALUE r = rb_ary_new(); + ID id = rb_intern("[]"); + swig_type_info* type = swig::type_info< std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > >(); + VALUE me = SWIG_NewPointerObj( self, type, 0 ); + for ( int i = 0; i < argc; ++i ) + { + VALUE key = argv[i]; + VALUE tmp = rb_funcall( me, id, 1, key ); + rb_ary_push( r, tmp ); + } + + return r; + } +SWIGINTERN std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *std_map_Sl_int_Sc_CdiVariable_Sg__each_key(std::map< int,CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->first ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg__values(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->second) ); + } + return ary; + } +SWIGINTERN std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *std_map_Sl_int_Sc_CdiVariable_Sg__each_value(std::map< int,CdiVariable > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->second ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg__entries(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from<std::pair<std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::key_type, + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::mapped_type> >(*i) ); + } + return ary; + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiVariable_Sg____contains__(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_int_Sc_CdiVariable_Sg__key_iterator(std::map< int,CdiVariable > *self,VALUE *RUBY_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_int_Sc_CdiVariable_Sg__value_iterator(std::map< int,CdiVariable > *self,VALUE *RUBY_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg____getitem__(std::map< int,CdiVariable > const *self,std::map< int,CdiVariable >::key_type const &key){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->find(key); + if ( i != self->end() ) + return swig::from<std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::mapped_type>( i->second ); + else + return Qnil; + } +SWIGINTERN void std_map_Sl_int_Sc_CdiVariable_Sg____setitem__(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::key_type const &key,std::map< int,CdiVariable >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg__inspect(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > >(); + VALUE str = rb_str_new2( type_name ); + str = rb_str_cat2( str, " {" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::key_type >( i->first ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + str = rb_str_cat2( str, "=>" ); + tmp = swig::from< std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::mapped_type >( i->second ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "}" ); + return str; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg__to_a(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::key_type, + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::mapped_type> >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiVariable_Sg__to_s(std::map< int,CdiVariable > *self){ + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator i = self->begin(); + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::key_type, + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::mapped_type> >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN void std_map_Sl_int_Sc_CdiVariable_Sg__erase__SWIG_1(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_int_Sc_CdiVariable_Sg__erase__SWIG_2(std::map< int,CdiVariable > *self,std::map< int,CdiVariable >::iterator first,std::map< int,CdiVariable >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits< CdiTaxis > { + typedef pointer_category category; + static const char* type_name() { return"CdiTaxis"; } + }; + } + + + namespace swig { + template <> struct traits<std::pair< int, CdiTaxis > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "int" "," "CdiTaxis" " >"; + } + }; + } + + + namespace swig { + template <> struct traits<std::map< int, CdiTaxis, std::less< int >, std::allocator< std::pair< int const,CdiTaxis > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "int" "," "CdiTaxis" "," "std::less< int >" "," "std::allocator< std::pair< int const,CdiTaxis > >" " >"; + } + }; + } + +SWIGINTERN std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *std_map_Sl_int_Sc_CdiTaxis_Sg__dup(std::map< int,CdiTaxis > *self){ + return new std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >(*self); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg____delete__(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::key_type const &key){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator i = self->find(key); + if (i != self->end()) { + self->erase(i); + return swig::from( key ); + } + else { + return Qnil; + } + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiTaxis_Sg__has_key(std::map< int,CdiTaxis > const *self,std::map< int,CdiTaxis >::key_type const &key){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg__keys(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->first) ); + } + return ary; + } +SWIGINTERN std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *std_map_Sl_int_Sc_CdiTaxis_Sg__each(std::map< int,CdiTaxis > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE k, v; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + const std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::key_type& key = i->first; + const std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::mapped_type& val = i->second; + + k = swig::from<std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::key_type>(key); + v = swig::from<std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::mapped_type>(val); + rb_yield_values(2, k, v); + } + + return self; + } +SWIGINTERN std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *std_map_Sl_int_Sc_CdiTaxis_Sg__select(std::map< int,CdiTaxis > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >* r = new std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE k = swig::from<std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::key_type>(i->first); + VALUE v = swig::from<std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::mapped_type>(i->second); + if ( RTEST( rb_yield_values(2, k, v) ) ) + self->insert(r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg__values_at(std::map< int,CdiTaxis > *self,int argc,VALUE *argv,...){ + + VALUE r = rb_ary_new(); + ID id = rb_intern("[]"); + swig_type_info* type = swig::type_info< std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > >(); + VALUE me = SWIG_NewPointerObj( self, type, 0 ); + for ( int i = 0; i < argc; ++i ) + { + VALUE key = argv[i]; + VALUE tmp = rb_funcall( me, id, 1, key ); + rb_ary_push( r, tmp ); + } + + return r; + } +SWIGINTERN std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *std_map_Sl_int_Sc_CdiTaxis_Sg__each_key(std::map< int,CdiTaxis > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->first ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg__values(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->second) ); + } + return ary; + } +SWIGINTERN std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *std_map_Sl_int_Sc_CdiTaxis_Sg__each_value(std::map< int,CdiTaxis > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->second ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg__entries(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from<std::pair<std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::key_type, + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::mapped_type> >(*i) ); + } + return ary; + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiTaxis_Sg____contains__(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_int_Sc_CdiTaxis_Sg__key_iterator(std::map< int,CdiTaxis > *self,VALUE *RUBY_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_int_Sc_CdiTaxis_Sg__value_iterator(std::map< int,CdiTaxis > *self,VALUE *RUBY_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg____getitem__(std::map< int,CdiTaxis > const *self,std::map< int,CdiTaxis >::key_type const &key){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->find(key); + if ( i != self->end() ) + return swig::from<std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::mapped_type>( i->second ); + else + return Qnil; + } +SWIGINTERN void std_map_Sl_int_Sc_CdiTaxis_Sg____setitem__(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::key_type const &key,std::map< int,CdiTaxis >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg__inspect(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > >(); + VALUE str = rb_str_new2( type_name ); + str = rb_str_cat2( str, " {" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::key_type >( i->first ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + str = rb_str_cat2( str, "=>" ); + tmp = swig::from< std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::mapped_type >( i->second ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "}" ); + return str; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg__to_a(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::key_type, + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::mapped_type> >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiTaxis_Sg__to_s(std::map< int,CdiTaxis > *self){ + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator i = self->begin(); + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::key_type, + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::mapped_type> >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN void std_map_Sl_int_Sc_CdiTaxis_Sg__erase__SWIG_1(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_int_Sc_CdiTaxis_Sg__erase__SWIG_2(std::map< int,CdiTaxis > *self,std::map< int,CdiTaxis >::iterator first,std::map< int,CdiTaxis >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits< CdiZaxis > { + typedef pointer_category category; + static const char* type_name() { return"CdiZaxis"; } + }; + } + + + namespace swig { + template <> struct traits<std::pair< int, CdiZaxis > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "int" "," "CdiZaxis" " >"; + } + }; + } + + + namespace swig { + template <> struct traits<std::map< int, CdiZaxis, std::less< int >, std::allocator< std::pair< int const,CdiZaxis > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "int" "," "CdiZaxis" "," "std::less< int >" "," "std::allocator< std::pair< int const,CdiZaxis > >" " >"; + } + }; + } + +SWIGINTERN std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *std_map_Sl_int_Sc_CdiZaxis_Sg__dup(std::map< int,CdiZaxis > *self){ + return new std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >(*self); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg____delete__(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::key_type const &key){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator i = self->find(key); + if (i != self->end()) { + self->erase(i); + return swig::from( key ); + } + else { + return Qnil; + } + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiZaxis_Sg__has_key(std::map< int,CdiZaxis > const *self,std::map< int,CdiZaxis >::key_type const &key){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg__keys(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->first) ); + } + return ary; + } +SWIGINTERN std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *std_map_Sl_int_Sc_CdiZaxis_Sg__each(std::map< int,CdiZaxis > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE k, v; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + const std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::key_type& key = i->first; + const std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::mapped_type& val = i->second; + + k = swig::from<std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::key_type>(key); + v = swig::from<std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::mapped_type>(val); + rb_yield_values(2, k, v); + } + + return self; + } +SWIGINTERN std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *std_map_Sl_int_Sc_CdiZaxis_Sg__select(std::map< int,CdiZaxis > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >* r = new std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE k = swig::from<std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::key_type>(i->first); + VALUE v = swig::from<std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::mapped_type>(i->second); + if ( RTEST( rb_yield_values(2, k, v) ) ) + self->insert(r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg__values_at(std::map< int,CdiZaxis > *self,int argc,VALUE *argv,...){ + + VALUE r = rb_ary_new(); + ID id = rb_intern("[]"); + swig_type_info* type = swig::type_info< std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > >(); + VALUE me = SWIG_NewPointerObj( self, type, 0 ); + for ( int i = 0; i < argc; ++i ) + { + VALUE key = argv[i]; + VALUE tmp = rb_funcall( me, id, 1, key ); + rb_ary_push( r, tmp ); + } + + return r; + } +SWIGINTERN std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *std_map_Sl_int_Sc_CdiZaxis_Sg__each_key(std::map< int,CdiZaxis > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->first ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg__values(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->second) ); + } + return ary; + } +SWIGINTERN std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *std_map_Sl_int_Sc_CdiZaxis_Sg__each_value(std::map< int,CdiZaxis > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->second ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg__entries(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from<std::pair<std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::key_type, + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::mapped_type> >(*i) ); + } + return ary; + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiZaxis_Sg____contains__(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_int_Sc_CdiZaxis_Sg__key_iterator(std::map< int,CdiZaxis > *self,VALUE *RUBY_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_int_Sc_CdiZaxis_Sg__value_iterator(std::map< int,CdiZaxis > *self,VALUE *RUBY_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg____getitem__(std::map< int,CdiZaxis > const *self,std::map< int,CdiZaxis >::key_type const &key){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->find(key); + if ( i != self->end() ) + return swig::from<std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::mapped_type>( i->second ); + else + return Qnil; + } +SWIGINTERN void std_map_Sl_int_Sc_CdiZaxis_Sg____setitem__(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::key_type const &key,std::map< int,CdiZaxis >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg__inspect(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > >(); + VALUE str = rb_str_new2( type_name ); + str = rb_str_cat2( str, " {" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::key_type >( i->first ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + str = rb_str_cat2( str, "=>" ); + tmp = swig::from< std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::mapped_type >( i->second ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "}" ); + return str; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg__to_a(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::key_type, + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::mapped_type> >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiZaxis_Sg__to_s(std::map< int,CdiZaxis > *self){ + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator i = self->begin(); + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::key_type, + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::mapped_type> >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN void std_map_Sl_int_Sc_CdiZaxis_Sg__erase__SWIG_1(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_int_Sc_CdiZaxis_Sg__erase__SWIG_2(std::map< int,CdiZaxis > *self,std::map< int,CdiZaxis >::iterator first,std::map< int,CdiZaxis >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits< CdiGrid > { + typedef pointer_category category; + static const char* type_name() { return"CdiGrid"; } + }; + } + + + namespace swig { + template <> struct traits<std::pair< int, CdiGrid > > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "int" "," "CdiGrid" " >"; + } + }; + } + + + namespace swig { + template <> struct traits<std::map< int, CdiGrid, std::less< int >, std::allocator< std::pair< int const,CdiGrid > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "int" "," "CdiGrid" "," "std::less< int >" "," "std::allocator< std::pair< int const,CdiGrid > >" " >"; + } + }; + } + +SWIGINTERN std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *std_map_Sl_int_Sc_CdiGrid_Sg__dup(std::map< int,CdiGrid > *self){ + return new std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >(*self); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg____delete__(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::key_type const &key){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator i = self->find(key); + if (i != self->end()) { + self->erase(i); + return swig::from( key ); + } + else { + return Qnil; + } + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiGrid_Sg__has_key(std::map< int,CdiGrid > const *self,std::map< int,CdiGrid >::key_type const &key){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg__keys(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->first) ); + } + return ary; + } +SWIGINTERN std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *std_map_Sl_int_Sc_CdiGrid_Sg__each(std::map< int,CdiGrid > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE k, v; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + const std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::key_type& key = i->first; + const std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::mapped_type& val = i->second; + + k = swig::from<std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::key_type>(key); + v = swig::from<std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::mapped_type>(val); + rb_yield_values(2, k, v); + } + + return self; + } +SWIGINTERN std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *std_map_Sl_int_Sc_CdiGrid_Sg__select(std::map< int,CdiGrid > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given" ); + + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >* r = new std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + VALUE k = swig::from<std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::key_type>(i->first); + VALUE v = swig::from<std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::mapped_type>(i->second); + if ( RTEST( rb_yield_values(2, k, v) ) ) + self->insert(r->end(), *i); + } + + return r; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg__values_at(std::map< int,CdiGrid > *self,int argc,VALUE *argv,...){ + + VALUE r = rb_ary_new(); + ID id = rb_intern("[]"); + swig_type_info* type = swig::type_info< std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > >(); + VALUE me = SWIG_NewPointerObj( self, type, 0 ); + for ( int i = 0; i < argc; ++i ) + { + VALUE key = argv[i]; + VALUE tmp = rb_funcall( me, id, 1, key ); + rb_ary_push( r, tmp ); + } + + return r; + } +SWIGINTERN std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *std_map_Sl_int_Sc_CdiGrid_Sg__each_key(std::map< int,CdiGrid > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->first ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg__values(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from(i->second) ); + } + return ary; + } +SWIGINTERN std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *std_map_Sl_int_Sc_CdiGrid_Sg__each_value(std::map< int,CdiGrid > *self){ + if ( !rb_block_given_p() ) + rb_raise( rb_eArgError, "no block given"); + + VALUE r; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator e = self->end(); + for ( ; i != e; ++i ) + { + r = swig::from( i->second ); + rb_yield(r); + } + + return self; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg__entries(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type size = self->size(); + int rubysize = (size <= (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::size_type) INT_MAX) ? (int) size : -1; + if (rubysize < 0) { + SWIG_RUBY_THREAD_BEGIN_BLOCK; + rb_raise(rb_eRuntimeError, "map size not valid in Ruby"); + SWIG_RUBY_THREAD_END_BLOCK; + return Qnil; + } + VALUE ary = rb_ary_new2(rubysize); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator e = self->end(); + for ( ; i != e; ++i ) { + rb_ary_push( ary, swig::from<std::pair<std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::key_type, + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::mapped_type> >(*i) ); + } + return ary; + } +SWIGINTERN bool std_map_Sl_int_Sc_CdiGrid_Sg____contains__(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_int_Sc_CdiGrid_Sg__key_iterator(std::map< int,CdiGrid > *self,VALUE *RUBY_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN swig::ConstIterator *std_map_Sl_int_Sc_CdiGrid_Sg__value_iterator(std::map< int,CdiGrid > *self,VALUE *RUBY_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), + self->end(), *RUBY_SELF); + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg____getitem__(std::map< int,CdiGrid > const *self,std::map< int,CdiGrid >::key_type const &key){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->find(key); + if ( i != self->end() ) + return swig::from<std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::mapped_type>( i->second ); + else + return Qnil; + } +SWIGINTERN void std_map_Sl_int_Sc_CdiGrid_Sg____setitem__(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::key_type const &key,std::map< int,CdiGrid >::mapped_type const &x){ + (*self)[key] = x; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg__inspect(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator e = self->end(); + const char *type_name = swig::type_name< std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > >(); + VALUE str = rb_str_new2( type_name ); + str = rb_str_cat2( str, " {" ); + bool comma = false; + VALUE tmp; + for ( ; i != e; ++i, comma = true ) + { + if (comma) str = rb_str_cat2( str, "," ); + tmp = swig::from< std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::key_type >( i->first ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + str = rb_str_cat2( str, "=>" ); + tmp = swig::from< std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::mapped_type >( i->second ); + tmp = rb_inspect( tmp ); + str = rb_str_buf_append( str, tmp ); + } + str = rb_str_cat2( str, "}" ); + return str; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg__to_a(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::const_iterator e = self->end(); + VALUE ary = rb_ary_new2( std::distance( i, e ) ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::key_type, + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::mapped_type> >( *i ); + rb_ary_push( ary, tmp ); + } + return ary; + } +SWIGINTERN VALUE std_map_Sl_int_Sc_CdiGrid_Sg__to_s(std::map< int,CdiGrid > *self){ + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator i = self->begin(); + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator e = self->end(); + VALUE str = rb_str_new2( "" ); + VALUE tmp; + for ( ; i != e; ++i ) + { + // @todo: improve -- this should just be swig::from(*i) + tmp = swig::from< std::pair<std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::key_type, + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::mapped_type> >( *i ); + tmp = rb_obj_as_string( tmp ); + str = rb_str_buf_append( str, tmp ); + } + return str; + } +SWIGINTERN void std_map_Sl_int_Sc_CdiGrid_Sg__erase__SWIG_1(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_int_Sc_CdiGrid_Sg__erase__SWIG_2(std::map< int,CdiGrid > *self,std::map< int,CdiGrid >::iterator first,std::map< int,CdiGrid >::iterator last){ self->erase(first, last); } + +SWIGINTERN int +SWIG_AsVal_bool (VALUE obj, bool *val) +{ + if (obj == Qtrue) { + if (val) *val = true; + return SWIG_OK; + } else if (obj == Qfalse) { + if (val) *val = false; + return SWIG_OK; + } else { + int res = 0; + if (SWIG_AsVal_int (obj, &res) == SWIG_OK) { + if (val) *val = res ? true : false; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsCharArray(VALUE obj, char *val, size_t size) +{ + char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; + int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); + if (SWIG_IsOK(res)) { + /* special case of single char conversion when we don't need space for NUL */ + if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; + if (csize <= size) { + if (val) { + if (csize) memcpy(val, cptr, csize*sizeof(char)); + if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); + } + if (alloc == SWIG_NEWOBJ) { + delete[] cptr; + res = SWIG_DelNewMask(res); + } + return res; + } + if (alloc == SWIG_NEWOBJ) delete[] cptr; + } + return SWIG_TypeError; +} + + +SWIGINTERN size_t +SWIG_strnlen(const char* s, size_t maxlen) +{ + const char *p; + for (p = s; maxlen-- && *p; p++) + ; + return p - s; +} + + + + + +SWIGINTERNINLINE VALUE +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + +static swig_class SwigClassGC_VALUE; + +/* + Document-method: Cdi::GC_VALUE.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_GC_VALUE_inspect(int argc, VALUE *argv, VALUE self) { + swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ; + swig::GC_VALUE r1 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + r1 = self; arg1 = &r1; + result = (VALUE)((swig::GC_VALUE const *)arg1)->inspect(); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GC_VALUE.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_GC_VALUE_to_s(int argc, VALUE *argv, VALUE self) { + swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ; + swig::GC_VALUE r1 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + r1 = self; arg1 = &r1; + result = (VALUE)((swig::GC_VALUE const *)arg1)->to_s(); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +static swig_class SwigClassConstIterator; + +SWIGINTERN void +free_swig_ConstIterator(void *self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *)self; + delete arg1; +} + +SWIGINTERN VALUE +_wrap_ConstIterator_value(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","value", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + try { + result = (VALUE)((swig::ConstIterator const *)arg1)->value(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ConstIterator.dup + + call-seq: + dup -> ConstIterator + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_ConstIterator_dup(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","dup", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->dup(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ConstIterator.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_ConstIterator_inspect(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","inspect", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + result = (VALUE)((swig::ConstIterator const *)arg1)->inspect(); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ConstIterator.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_ConstIterator_to_s(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","to_s", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + result = (VALUE)((swig::ConstIterator const *)arg1)->to_s(); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ConstIterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] )); + } + arg2 = static_cast< size_t >(val2); + result = (swig::ConstIterator *)(arg1)->next(arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ConstIterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + try { + result = (swig::ConstIterator *)(arg1)->next(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_ConstIterator_next(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ConstIterator_next__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ConstIterator_next__SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "ConstIterator.next", + " swig::ConstIterator ConstIterator.next(size_t n)\n" + " swig::ConstIterator * ConstIterator.next()\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ConstIterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] )); + } + arg2 = static_cast< size_t >(val2); + result = (swig::ConstIterator *)(arg1)->previous(arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ConstIterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + try { + result = (swig::ConstIterator *)(arg1)->previous(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_ConstIterator_previous(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ConstIterator_previous__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ConstIterator_previous__SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "ConstIterator.previous", + " swig::ConstIterator ConstIterator.previous(size_t n)\n" + " swig::ConstIterator * ConstIterator.previous()\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::ConstIterator.== + + call-seq: + ==(x) -> bool + +Equality comparison operator. +*/ +SWIGINTERN VALUE +_wrap_ConstIterator___eq__(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + swig::ConstIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator ==", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator ==", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator ==", 2, argv[0])); + } + arg2 = reinterpret_cast< swig::ConstIterator * >(argp2); + result = (bool)((swig::ConstIterator const *)arg1)->operator ==((swig::ConstIterator const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ConstIterator.+ + + call-seq: + +(n) -> ConstIterator + +Add operator. +*/ +SWIGINTERN VALUE +_wrap_ConstIterator___add__(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator +", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] )); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator +(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ConstIterator.- + + call-seq: + -(n) -> ConstIterator + -(x) -> ptrdiff_t + +Substraction operator. +*/ +SWIGINTERN VALUE +_wrap_ConstIterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] )); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator -(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ConstIterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) { + swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; + swig::ConstIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + ptrdiff_t result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self )); + } + arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator -", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator -", 2, argv[0])); + } + arg2 = reinterpret_cast< swig::ConstIterator * >(argp2); + result = ((swig::ConstIterator const *)arg1)->operator -((swig::ConstIterator const &)*arg2); + vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_ConstIterator___sub__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ConstIterator___sub____SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ConstIterator___sub____SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "ConstIterator.__sub__", + " swig::ConstIterator ConstIterator.__sub__(ptrdiff_t n)\n" + " ptrdiff_t ConstIterator.__sub__(swig::ConstIterator const &x)\n"); + + return Qnil; +} + + +static swig_class SwigClassIterator; + +SWIGINTERN VALUE +_wrap_Iterator_valuee___(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + VALUE *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE temp2 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","setValue", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + temp2 = static_cast< VALUE >(argv[0]); + arg2 = &temp2; + result = (VALUE)(arg1)->setValue((VALUE const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::Iterator.dup + + call-seq: + dup -> Iterator + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_Iterator_dup(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","dup", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + result = (swig::Iterator *)((swig::Iterator const *)arg1)->dup(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Iterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + swig::Iterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] )); + } + arg2 = static_cast< size_t >(val2); + result = (swig::Iterator *)(arg1)->next(arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Iterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + try { + result = (swig::Iterator *)(arg1)->next(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_Iterator_next(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Iterator_next__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Iterator_next__SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "Iterator.next", + " swig::Iterator Iterator.next(size_t n)\n" + " swig::Iterator * Iterator.next()\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Iterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + swig::Iterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] )); + } + arg2 = static_cast< size_t >(val2); + result = (swig::Iterator *)(arg1)->previous(arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Iterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + try { + result = (swig::Iterator *)(arg1)->previous(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_Iterator_previous(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Iterator_previous__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Iterator_previous__SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "Iterator.previous", + " swig::Iterator Iterator.previous(size_t n)\n" + " swig::Iterator * Iterator.previous()\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::Iterator.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_Iterator_inspect(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","inspect", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + result = (VALUE)((swig::Iterator const *)arg1)->inspect(); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::Iterator.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_Iterator_to_s(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","to_s", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + result = (VALUE)((swig::Iterator const *)arg1)->to_s(); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::Iterator.== + + call-seq: + ==(x) -> bool + +Equality comparison operator. +*/ +SWIGINTERN VALUE +_wrap_Iterator___eq__(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + swig::Iterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator ==", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator ==", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator ==", 2, argv[0])); + } + arg2 = reinterpret_cast< swig::Iterator * >(argp2); + result = (bool)((swig::Iterator const *)arg1)->operator ==((swig::Iterator const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::Iterator.+ + + call-seq: + +(n) -> Iterator + +Add operator. +*/ +SWIGINTERN VALUE +_wrap_Iterator___add__(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + swig::Iterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator +", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] )); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator +(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::Iterator.- + + call-seq: + -(n) -> Iterator + -(x) -> ptrdiff_t + +Substraction operator. +*/ +SWIGINTERN VALUE +_wrap_Iterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + swig::Iterator *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] )); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator -(arg2); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Ruby_ExceptionType(NULL, Qnil); + SWIG_fail; + } + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Iterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) { + swig::Iterator *arg1 = (swig::Iterator *) 0 ; + swig::Iterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + ptrdiff_t result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self )); + } + arg1 = reinterpret_cast< swig::Iterator * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator -", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator -", 2, argv[0])); + } + arg2 = reinterpret_cast< swig::Iterator * >(argp2); + result = ((swig::Iterator const *)arg1)->operator -((swig::Iterator const &)*arg2); + vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_Iterator___sub__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__Iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Iterator___sub____SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Iterator___sub____SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "Iterator.__sub__", + " swig::Iterator Iterator.__sub__(ptrdiff_t n)\n" + " ptrdiff_t Iterator.__sub__(swig::Iterator const &x)\n"); + + return Qnil; +} + + +SWIGINTERN void +free_swig_Iterator(void *self) { + swig::Iterator *arg1 = (swig::Iterator *)self; + delete arg1; +} + +static swig_class SwigClassIntVector; + +/* + Document-method: Cdi::IntVector.dup + + call-seq: + dup -> IntVector + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_IntVector_dup(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_IntVector_inspect(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (VALUE)std_vector_Sl_int_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.to_a + + call-seq: + to_a -> VALUE + +Convert IntVector to an Array. +*/ +SWIGINTERN VALUE +_wrap_IntVector_to_a(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (VALUE)std_vector_Sl_int_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_IntVector_to_s(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (VALUE)std_vector_Sl_int_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.slice + + call-seq: + slice(i, length) -> VALUE + +Return a slice (portion of) the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_slice(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","slice", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","slice", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","slice", 3, argv[1] )); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_int_Sg__slice(arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.each + + call-seq: + each -> IntVector + +Iterate thru each element in the IntVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_IntVector_each(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector___delete2__(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","__delete2__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::value_type","__delete2__", 2, argv[0] )); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + result = (VALUE)std_vector_Sl_int_Sg____delete2__(arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.select + + call-seq: + select -> IntVector + +Iterate thru each element in the IntVector and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_IntVector_select(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.delete_at + + call-seq: + delete_at(i) -> VALUE + +Delete an element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_IntVector_delete_at(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","delete_at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","delete_at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + result = (VALUE)std_vector_Sl_int_Sg__delete_at(arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.at + + call-seq: + at(i) -> VALUE + +Return element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_IntVector_at(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + result = (VALUE)std_vector_Sl_int_Sg__at((std::vector< int > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.[] + + call-seq: + [](i, length) -> VALUE + [](i) -> VALUE + [](i) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_IntVector___getitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","__getitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_int_Sg____getitem____SWIG_0((std::vector< int > const *)arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector___getitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + result = (VALUE)std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector___getitem____SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + VALUE arg2 = (VALUE) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg2 = argv[0]; + try { + result = (VALUE)std_vector_Sl_int_Sg____getitem____SWIG_2((std::vector< int > const *)arg1,arg2); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_IntVector___getitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector___getitem____SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + _v = (argv[1] != 0); + if (_v) { + return _wrap_IntVector___getitem____SWIG_2(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector___getitem____SWIG_0(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "__getitem__", + " VALUE __getitem__(std::vector< int >::difference_type i, std::vector< int >::difference_type length)\n" + " VALUE __getitem__(std::vector< int >::difference_type i)\n" + " VALUE __getitem__(VALUE i)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.[]= + + call-seq: + []=(i, x) -> VALUE + []=(i, length, v) -> VALUE + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_IntVector___setitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_int(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< int >::value_type","__setitem__", 3, argv[1] )); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + try { + result = (VALUE)std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(int const &)*arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector___setitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + std::vector< int,std::allocator< int > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","__setitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res4 = swig::asptr(argv[2], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< int,std::allocator< int > > const &","__setitem__", 4, argv[2] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< int,std::allocator< int > > const &","__setitem__", 4, argv[2])); + } + arg4 = ptr; + } + try { + result = (VALUE)std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + if (SWIG_IsNewObj(res4)) delete arg4; + return vresult; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_IntVector___setitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector___setitem____SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_IntVector___setitem____SWIG_1(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "__setitem__", + " VALUE __setitem__(std::vector< int >::difference_type i, std::vector< int >::value_type const &x)\n" + " VALUE __setitem__(std::vector< int >::difference_type i, std::vector< int >::difference_type length, std::vector< int,std::allocator< int > > const &v)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.reject! + + call-seq: + reject! -> IntVector + +Iterate thru each element in the IntVector and reject those that fail a condition. A block must be provided. IntVector is modified in place. +*/ +SWIGINTERN VALUE +_wrap_IntVector_rejectN___(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","reject_bang", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg__reject_bang(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.pop + + call-seq: + pop -> VALUE + +Remove and return element at the end of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_pop(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","pop", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (VALUE)std_vector_Sl_int_Sg__pop(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.push + + call-seq: + push(e) -> std::vector< int >::value_type const + +Add an element at the end of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_push(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","push", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::value_type","push", 2, argv[0] )); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__push(arg1,(int const &)*arg2); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.reject + + call-seq: + reject -> IntVector + +Iterate thru each element in the IntVector and reject those that fail a condition returning a new IntVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_IntVector_reject(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","reject", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg__reject(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.shift + + call-seq: + shift -> VALUE + +Remove and return element at the beginning of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_shift(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","shift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (VALUE)std_vector_Sl_int_Sg__shift(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.insert + + call-seq: + insert(pos, argc) -> IntVector + insert(pos, x) -> std::vector< int >::iterator + insert(pos, n, x) + +Insert one or more new elements in the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_insert__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + int arg3 ; + VALUE *arg4 = (VALUE *) 0 ; + void *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 2) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::difference_type","insert", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + { + arg3 = argc - 1; + arg4 = argv + 1; + } + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg__insert__SWIG_0(arg1,arg2,arg3,arg4,arg5); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.unshift + + call-seq: + unshift(argc) -> IntVector + +Add one or more elements at the beginning of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_unshift(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","unshift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg__unshift(arg1,arg2,arg3,arg4); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_IntVector__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< int > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::vector< int > *)new std::vector< int >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_IntVector__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< int > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const &","vector<(int)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< int > const &","vector<(int)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.empty? + + call-seq: + empty? -> bool + +Check if the IntVector is empty or not. +*/ +SWIGINTERN VALUE +_wrap_IntVector_emptyq___(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)((std::vector< int > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.size + + call-seq: + size -> std::vector< int >::size_type + +Size or Length of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_size(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector_swap(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< int > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< int > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::vector< int > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.begin + + call-seq: + begin -> std::vector< int >::iterator + +Return an iterator to the beginning of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_begin(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< int >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.end + + call-seq: + end -> std::vector< int >::iterator + +Return an iterator to past the end of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_end(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< int >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.rbegin + + call-seq: + rbegin -> std::vector< int >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_rbegin(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.rend + + call-seq: + rend -> std::vector< int >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_rend(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.clear + + call-seq: + clear + +Clear IntVector contents. +*/ +SWIGINTERN VALUE +_wrap_IntVector_clear(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector_get_allocator(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< int > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_IntVector__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< int >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< int > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< int >::size_type","vector<(int)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< int >::size_type >(val1); + result = (std::vector< int > *)new std::vector< int >(arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_resize__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + (arg1)->resize(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.erase + + call-seq: + erase(pos) -> std::vector< int >::iterator + erase(first, last) -> std::vector< int >::iterator + +Delete a portion of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + std::vector< int >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","erase", 2, argv[0] )); + } + } + result = std_vector_Sl_int_Sg__erase__SWIG_0(arg1,arg2); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< int >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + swig::Iterator *iter3 = 0 ; + int res3 ; + std::vector< int >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","erase", 2, argv[0] )); + } + } + res3 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter3), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","erase", 3, argv[1] )); + } else { + swig::Iterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","erase", 3, argv[1] )); + } + } + result = std_vector_Sl_int_Sg__erase__SWIG_1(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< int >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_IntVector_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_IntVector_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_IntVector_erase__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "erase", + " std::vector< int >::iterator erase(std::vector< int >::iterator pos)\n" + " std::vector< int >::iterator erase(std::vector< int >::iterator first, std::vector< int >::iterator last)\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_IntVector_allocate(VALUE self) +#else +_wrap_IntVector_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_IntVector__SWIG_3(int argc, VALUE *argv, VALUE self) { + std::vector< int >::size_type arg1 ; + std::vector< int >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::vector< int > *result = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< int >::size_type","vector<(int)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< int >::size_type >(val1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::value_type","vector<(int)>", 2, argv[1] )); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_IntVector(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[2]; + int ii; + + argc = nargs; + if (argc > 2) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_IntVector__SWIG_0(nargs, args, self); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_IntVector__SWIG_2(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_IntVector__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_IntVector__SWIG_3(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 2, "IntVector.new", + " IntVector.new()\n" + " IntVector.new(std::vector< int > const &other)\n" + " IntVector.new(std::vector< int >::size_type size)\n" + " IntVector.new(std::vector< int >::size_type size, std::vector< int >::value_type const &value)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.front + + call-seq: + front -> std::vector< int >::value_type const & + +Return the first element in IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_front(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","front", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front(); + vresult = SWIG_From_int(static_cast< int >(*result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.back + + call-seq: + back -> std::vector< int >::value_type const & + +Return the last element in IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_back(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","back", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back(); + vresult = SWIG_From_int(static_cast< int >(*result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.assign + + call-seq: + assign(n, x) + +Assign a new IntVector or portion of it. +*/ +SWIGINTERN VALUE +_wrap_IntVector_assign(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","assign", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::size_type","assign", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + ecode3 = SWIG_AsVal_int(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< int >::value_type","assign", 3, argv[1] )); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_resize__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + ecode3 = SWIG_AsVal_int(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< int >::value_type","resize", 3, argv[1] )); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_IntVector_resize(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector_resize__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector_resize__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "IntVector.resize", + " void IntVector.resize(std::vector< int >::size_type new_size)\n" + " void IntVector.resize(std::vector< int >::size_type new_size, std::vector< int >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.insert + + call-seq: + insert(pos, argc) -> IntVector + insert(pos, x) -> std::vector< int >::iterator + insert(pos, n, x) + +Insert one or more new elements in the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_insert__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + std::vector< int >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","insert", 2, argv[0] )); + } + } + ecode3 = SWIG_AsVal_int(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< int >::value_type","insert", 3, argv[1] )); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + result = std_vector_Sl_int_Sg__insert__SWIG_1(arg1,arg2,(int const &)*arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< int >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector_insert__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::size_type arg3 ; + std::vector< int >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< int >::value_type temp4 ; + int val4 ; + int ecode4 = 0 ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< int >::iterator","insert", 2, argv[0] )); + } + } + ecode3 = SWIG_AsVal_size_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< int >::size_type","insert", 3, argv[1] )); + } + arg3 = static_cast< std::vector< int >::size_type >(val3); + ecode4 = SWIG_AsVal_int(argv[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "std::vector< int >::value_type","insert", 4, argv[2] )); + } + temp4 = static_cast< std::vector< int >::value_type >(val4); + arg4 = &temp4; + std_vector_Sl_int_Sg__insert__SWIG_2(arg1,arg2,arg3,(int const &)*arg4); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_IntVector_insert(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector_insert__SWIG_1(nargs, args, self); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + if (argc <= 3) { + return _wrap_IntVector_insert__SWIG_0(nargs, args, self); + } + return _wrap_IntVector_insert__SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< int >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_IntVector_insert__SWIG_2(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "insert", + " std::vector< int,std::allocator< int > > insert(std::vector< int >::difference_type pos, int argc, VALUE *argv, ...)\n" + " std::vector< int >::iterator insert(std::vector< int >::iterator pos, std::vector< int >::value_type const &x)\n" + " void insert(std::vector< int >::iterator pos, std::vector< int >::size_type n, std::vector< int >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.reserve + + call-seq: + reserve(n) + +Reserve memory in the IntVector for a number of elements. +*/ +SWIGINTERN VALUE +_wrap_IntVector_reserve(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","reserve", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< int >::size_type","reserve", 2, argv[0] )); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + (arg1)->reserve(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.capacity + + call-seq: + capacity -> std::vector< int >::size_type + +Reserved capacity of the IntVector. +*/ +SWIGINTERN VALUE +_wrap_IntVector_capacity(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > const *","capacity", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->capacity(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_IntVector_mapN___(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","map_bang", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg__map_bang(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::IntVector.delete + + call-seq: + delete(val) -> VALUE + +Delete a matching element. +*/ +SWIGINTERN VALUE +_wrap_IntVector_delete(int argc, VALUE *argv, VALUE self) { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + int *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< int > *","__delete__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","__delete__", 2, argv[0] )); + } + temp2 = static_cast< int >(val2); + arg2 = &temp2; + result = (VALUE)std_vector_Sl_int_Sg____delete__(arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN void +free_std_vector_Sl_int_Sg_(void *self) { + std::vector< int > *arg1 = (std::vector< int > *)self; + delete arg1; +} + +static swig_class SwigClassDoubleVector; + +/* + Document-method: Cdi::DoubleVector.dup + + call-seq: + dup -> DoubleVector + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_dup(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_inspect(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (VALUE)std_vector_Sl_double_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.to_a + + call-seq: + to_a -> VALUE + +Convert DoubleVector to an Array. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_to_a(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (VALUE)std_vector_Sl_double_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_to_s(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (VALUE)std_vector_Sl_double_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.slice + + call-seq: + slice(i, length) -> VALUE + +Return a slice (portion of) the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_slice(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","slice", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","slice", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","slice", 3, argv[1] )); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_double_Sg__slice(arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.each + + call-seq: + each -> DoubleVector + +Iterate thru each element in the DoubleVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_each(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector___delete2__(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","__delete2__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_double(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::value_type","__delete2__", 2, argv[0] )); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + result = (VALUE)std_vector_Sl_double_Sg____delete2__(arg1,(double const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.select + + call-seq: + select -> DoubleVector + +Iterate thru each element in the DoubleVector and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_select(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.delete_at + + call-seq: + delete_at(i) -> VALUE + +Delete an element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_delete_at(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","delete_at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","delete_at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + result = (VALUE)std_vector_Sl_double_Sg__delete_at(arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.at + + call-seq: + at(i) -> VALUE + +Return element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_at(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + result = (VALUE)std_vector_Sl_double_Sg__at((std::vector< double > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.[] + + call-seq: + [](i, length) -> VALUE + [](i) -> VALUE + [](i) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector___getitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","__getitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_double_Sg____getitem____SWIG_0((std::vector< double > const *)arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector___getitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + result = (VALUE)std_vector_Sl_double_Sg____getitem____SWIG_1((std::vector< double > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector___getitem____SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + VALUE arg2 = (VALUE) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + arg2 = argv[0]; + try { + result = (VALUE)std_vector_Sl_double_Sg____getitem____SWIG_2((std::vector< double > const *)arg1,arg2); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleVector___getitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector___getitem____SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + _v = (argv[1] != 0); + if (_v) { + return _wrap_DoubleVector___getitem____SWIG_2(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector___getitem____SWIG_0(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "__getitem__", + " VALUE __getitem__(std::vector< double >::difference_type i, std::vector< double >::difference_type length)\n" + " VALUE __getitem__(std::vector< double >::difference_type i)\n" + " VALUE __getitem__(VALUE i)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.[]= + + call-seq: + []=(i, x) -> VALUE + []=(i, length, v) -> VALUE + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector___setitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_double(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< double >::value_type","__setitem__", 3, argv[1] )); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + try { + result = (VALUE)std_vector_Sl_double_Sg____setitem____SWIG_0(arg1,arg2,(double const &)*arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector___setitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + std::vector< double,std::allocator< double > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","__setitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res4 = swig::asptr(argv[2], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > const &","__setitem__", 4, argv[2] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< double,std::allocator< double > > const &","__setitem__", 4, argv[2])); + } + arg4 = ptr; + } + try { + result = (VALUE)std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + if (SWIG_IsNewObj(res4)) delete arg4; + return vresult; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleVector___setitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector___setitem____SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleVector___setitem____SWIG_1(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "__setitem__", + " VALUE __setitem__(std::vector< double >::difference_type i, std::vector< double >::value_type const &x)\n" + " VALUE __setitem__(std::vector< double >::difference_type i, std::vector< double >::difference_type length, std::vector< double,std::allocator< double > > const &v)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.reject! + + call-seq: + reject! -> DoubleVector + +Iterate thru each element in the DoubleVector and reject those that fail a condition. A block must be provided. DoubleVector is modified in place. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_rejectN___(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","reject_bang", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg__reject_bang(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.pop + + call-seq: + pop -> VALUE + +Remove and return element at the end of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_pop(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","pop", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (VALUE)std_vector_Sl_double_Sg__pop(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.push + + call-seq: + push(e) -> std::vector< double >::value_type const + +Add an element at the end of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_push(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","push", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_double(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::value_type","push", 2, argv[0] )); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< double >::value_type)std_vector_Sl_double_Sg__push(arg1,(double const &)*arg2); + vresult = SWIG_From_double(static_cast< double >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.reject + + call-seq: + reject -> DoubleVector + +Iterate thru each element in the DoubleVector and reject those that fail a condition returning a new DoubleVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_reject(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","reject", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg__reject(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.shift + + call-seq: + shift -> VALUE + +Remove and return element at the beginning of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_shift(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","shift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (VALUE)std_vector_Sl_double_Sg__shift(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.insert + + call-seq: + insert(pos, argc) -> DoubleVector + insert(pos, x) -> std::vector< double >::iterator + insert(pos, n, x) + +Insert one or more new elements in the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_insert__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + int arg3 ; + VALUE *arg4 = (VALUE *) 0 ; + void *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 2) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::difference_type","insert", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + { + arg3 = argc - 1; + arg4 = argv + 1; + } + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg__insert__SWIG_0(arg1,arg2,arg3,arg4,arg5); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.unshift + + call-seq: + unshift(argc) -> DoubleVector + +Add one or more elements at the beginning of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_unshift(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","unshift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg__unshift(arg1,arg2,arg3,arg4); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_DoubleVector__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< double > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::vector< double > *)new std::vector< double >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_DoubleVector__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< double > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const &","vector<(double)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< double > const &","vector<(double)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.empty? + + call-seq: + empty? -> bool + +Check if the DoubleVector is empty or not. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_emptyq___(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (bool)((std::vector< double > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.size + + call-seq: + size -> std::vector< double >::size_type + +Size or Length of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_size(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector_swap(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< double > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::vector< double > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.begin + + call-seq: + begin -> std::vector< double >::iterator + +Return an iterator to the beginning of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_begin(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< double >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.end + + call-seq: + end -> std::vector< double >::iterator + +Return an iterator to past the end of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_end(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< double >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.rbegin + + call-seq: + rbegin -> std::vector< double >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_rbegin(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.rend + + call-seq: + rend -> std::vector< double >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_rend(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.clear + + call-seq: + clear + +Clear DoubleVector contents. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_clear(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector_get_allocator(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< double > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::vector< double >::allocator_type(static_cast< const std::vector< double >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_double_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_DoubleVector__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< double >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< double > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< double >::size_type","vector<(double)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< double >::size_type >(val1); + result = (std::vector< double > *)new std::vector< double >(arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_resize__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + (arg1)->resize(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.erase + + call-seq: + erase(pos) -> std::vector< double >::iterator + erase(first, last) -> std::vector< double >::iterator + +Delete a portion of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + std::vector< double >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","erase", 2, argv[0] )); + } + } + result = std_vector_Sl_double_Sg__erase__SWIG_0(arg1,arg2); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< double >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + swig::Iterator *iter3 = 0 ; + int res3 ; + std::vector< double >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","erase", 2, argv[0] )); + } + } + res3 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter3), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","erase", 3, argv[1] )); + } else { + swig::Iterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","erase", 3, argv[1] )); + } + } + result = std_vector_Sl_double_Sg__erase__SWIG_1(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< double >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleVector_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_DoubleVector_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_DoubleVector_erase__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "erase", + " std::vector< double >::iterator erase(std::vector< double >::iterator pos)\n" + " std::vector< double >::iterator erase(std::vector< double >::iterator first, std::vector< double >::iterator last)\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_DoubleVector_allocate(VALUE self) +#else +_wrap_DoubleVector_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_DoubleVector__SWIG_3(int argc, VALUE *argv, VALUE self) { + std::vector< double >::size_type arg1 ; + std::vector< double >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + std::vector< double > *result = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< double >::size_type","vector<(double)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< double >::size_type >(val1); + ecode2 = SWIG_AsVal_double(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::value_type","vector<(double)>", 2, argv[1] )); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< double > *)new std::vector< double >(arg1,(std::vector< double >::value_type const &)*arg2); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_DoubleVector(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[2]; + int ii; + + argc = nargs; + if (argc > 2) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_DoubleVector__SWIG_0(nargs, args, self); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DoubleVector__SWIG_2(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_DoubleVector__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DoubleVector__SWIG_3(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 2, "DoubleVector.new", + " DoubleVector.new()\n" + " DoubleVector.new(std::vector< double > const &other)\n" + " DoubleVector.new(std::vector< double >::size_type size)\n" + " DoubleVector.new(std::vector< double >::size_type size, std::vector< double >::value_type const &value)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.front + + call-seq: + front -> std::vector< double >::value_type const & + +Return the first element in DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_front(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","front", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->front(); + vresult = SWIG_From_double(static_cast< double >(*result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.back + + call-seq: + back -> std::vector< double >::value_type const & + +Return the last element in DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_back(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","back", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->back(); + vresult = SWIG_From_double(static_cast< double >(*result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.assign + + call-seq: + assign(n, x) + +Assign a new DoubleVector or portion of it. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_assign(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","assign", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::size_type","assign", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + ecode3 = SWIG_AsVal_double(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< double >::value_type","assign", 3, argv[1] )); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(arg2,(std::vector< double >::value_type const &)*arg3); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_resize__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + ecode3 = SWIG_AsVal_double(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< double >::value_type","resize", 3, argv[1] )); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(arg2,(std::vector< double >::value_type const &)*arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleVector_resize(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector_resize__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector_resize__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "DoubleVector.resize", + " void DoubleVector.resize(std::vector< double >::size_type new_size)\n" + " void DoubleVector.resize(std::vector< double >::size_type new_size, std::vector< double >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.insert + + call-seq: + insert(pos, argc) -> DoubleVector + insert(pos, x) -> std::vector< double >::iterator + insert(pos, n, x) + +Insert one or more new elements in the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_insert__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + std::vector< double >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","insert", 2, argv[0] )); + } + } + ecode3 = SWIG_AsVal_double(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< double >::value_type","insert", 3, argv[1] )); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + result = std_vector_Sl_double_Sg__insert__SWIG_1(arg1,arg2,(double const &)*arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< double >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector_insert__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::size_type arg3 ; + std::vector< double >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< double >::value_type temp4 ; + double val4 ; + int ecode4 = 0 ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< double >::iterator","insert", 2, argv[0] )); + } + } + ecode3 = SWIG_AsVal_size_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< double >::size_type","insert", 3, argv[1] )); + } + arg3 = static_cast< std::vector< double >::size_type >(val3); + ecode4 = SWIG_AsVal_double(argv[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "std::vector< double >::value_type","insert", 4, argv[2] )); + } + temp4 = static_cast< std::vector< double >::value_type >(val4); + arg4 = &temp4; + std_vector_Sl_double_Sg__insert__SWIG_2(arg1,arg2,arg3,(double const &)*arg4); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleVector_insert(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector_insert__SWIG_1(nargs, args, self); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + if (argc <= 3) { + return _wrap_DoubleVector_insert__SWIG_0(nargs, args, self); + } + return _wrap_DoubleVector_insert__SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< double >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleVector_insert__SWIG_2(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "insert", + " std::vector< double,std::allocator< double > > insert(std::vector< double >::difference_type pos, int argc, VALUE *argv, ...)\n" + " std::vector< double >::iterator insert(std::vector< double >::iterator pos, std::vector< double >::value_type const &x)\n" + " void insert(std::vector< double >::iterator pos, std::vector< double >::size_type n, std::vector< double >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.reserve + + call-seq: + reserve(n) + +Reserve memory in the DoubleVector for a number of elements. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_reserve(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","reserve", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< double >::size_type","reserve", 2, argv[0] )); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + (arg1)->reserve(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.capacity + + call-seq: + capacity -> std::vector< double >::size_type + +Reserved capacity of the DoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_capacity(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > const *","capacity", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->capacity(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleVector_mapN___(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","map_bang", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg__map_bang(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleVector.delete + + call-seq: + delete(val) -> VALUE + +Delete a matching element. +*/ +SWIGINTERN VALUE +_wrap_DoubleVector_delete(int argc, VALUE *argv, VALUE self) { + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + double *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + double val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< double > *","__delete__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_double(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","__delete__", 2, argv[0] )); + } + temp2 = static_cast< double >(val2); + arg2 = &temp2; + result = (VALUE)std_vector_Sl_double_Sg____delete__(arg1,(double const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN void +free_std_vector_Sl_double_Sg_(void *self) { + std::vector< double > *arg1 = (std::vector< double > *)self; + delete arg1; +} + +static swig_class SwigClassDoubleDoubleVector; + +/* + Document-method: Cdi::DoubleDoubleVector.dup + + call-seq: + dup -> DoubleDoubleVector + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_dup(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_inspect(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.to_a + + call-seq: + to_a -> VALUE + +Convert DoubleDoubleVector to an Array. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_to_a(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_to_s(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.slice + + call-seq: + slice(i, length) -> VALUE + +Return a slice (portion of) the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_slice(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","slice", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","slice", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","slice", 3, argv[1] )); + } + arg3 = static_cast< std::vector< std::vector< double > >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg__slice(arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.each + + call-seq: + each -> DoubleDoubleVector + +Iterate thru each element in the DoubleDoubleVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_each(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleDoubleVector___delete2__(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","__delete2__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res2 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::value_type const &","__delete2__", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double > >::value_type const &","__delete2__", 2, argv[0])); + } + arg2 = ptr; + } + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg____delete2__(arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + vresult = result; + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.select + + call-seq: + select -> DoubleDoubleVector + +Iterate thru each element in the DoubleDoubleVector and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_select(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.delete_at + + call-seq: + delete_at(i) -> VALUE + +Delete an element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_delete_at(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","delete_at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","delete_at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg__delete_at(arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.at + + call-seq: + at(i) -> VALUE + +Return element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_at(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg__at((std::vector< std::vector< double > > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.[] + + call-seq: + [](i, length) -> VALUE + [](i) -> VALUE + [](i) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector___getitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","__getitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< std::vector< double > >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0((std::vector< std::vector< double > > const *)arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleDoubleVector___getitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< std::vector< double > > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleDoubleVector___getitem____SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + VALUE arg2 = (VALUE) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + arg2 = argv[0]; + try { + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_2((std::vector< std::vector< double > > const *)arg1,arg2); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleDoubleVector___getitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleDoubleVector___getitem____SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + _v = (argv[1] != 0); + if (_v) { + return _wrap_DoubleDoubleVector___getitem____SWIG_2(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleDoubleVector___getitem____SWIG_0(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "__getitem__", + " VALUE __getitem__(std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type length)\n" + " VALUE __getitem__(std::vector< std::vector< double > >::difference_type i)\n" + " VALUE __getitem__(VALUE i)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.[]= + + call-seq: + []=(i, x) -> VALUE + []=(i, length, v) -> VALUE + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector___setitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(argv[1], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::value_type const &","__setitem__", 3, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double > >::value_type const &","__setitem__", 3, argv[1])); + } + arg3 = ptr; + } + try { + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + vresult = result; + if (SWIG_IsNewObj(res3)) delete arg3; + return vresult; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleDoubleVector___setitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + std::vector< std::vector< double > >::difference_type arg3 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","__setitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< std::vector< double > >::difference_type >(val3); + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; + res4 = swig::asptr(argv[2], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &","__setitem__", 4, argv[2] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &","__setitem__", 4, argv[2])); + } + arg4 = ptr; + } + try { + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2,arg3,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg4); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + if (SWIG_IsNewObj(res4)) delete arg4; + return vresult; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleDoubleVector___setitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector___setitem____SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector___setitem____SWIG_1(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "__setitem__", + " VALUE __setitem__(std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::value_type const &x)\n" + " VALUE __setitem__(std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type length, std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.reject! + + call-seq: + reject! -> DoubleDoubleVector + +Iterate thru each element in the DoubleDoubleVector and reject those that fail a condition. A block must be provided. DoubleDoubleVector is modified in place. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_rejectN___(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","reject_bang", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg__reject_bang(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.pop + + call-seq: + pop -> VALUE + +Remove and return element at the end of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_pop(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","pop", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg__pop(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.push + + call-seq: + push(e) -> DoubleVector + +Add an element at the end of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_push(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::vector< std::vector< double > >::value_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","push", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res2 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::value_type const &","push", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double > >::value_type const &","push", 2, argv[0])); + } + arg2 = ptr; + } + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg__push(arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + vresult = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.reject + + call-seq: + reject -> DoubleDoubleVector + +Iterate thru each element in the DoubleDoubleVector and reject those that fail a condition returning a new DoubleDoubleVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_reject(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","reject", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg__reject(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.shift + + call-seq: + shift -> VALUE + +Remove and return element at the beginning of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_shift(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","shift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (VALUE)std_vector_Sl_std_vector_Sl_double_Sg__Sg__shift(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.insert + + call-seq: + insert(pos, argc) -> DoubleDoubleVector + insert(pos, x) -> std::vector< std::vector< double > >::iterator + insert(pos, n, x) + +Insert one or more new elements in the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_insert__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::difference_type arg2 ; + int arg3 ; + VALUE *arg4 = (VALUE *) 0 ; + void *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 2) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::difference_type","insert", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::difference_type >(val2); + { + arg3 = argc - 1; + arg4 = argv + 1; + } + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_0(arg1,arg2,arg3,arg4,arg5); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.unshift + + call-seq: + unshift(argc) -> DoubleDoubleVector + +Add one or more elements at the beginning of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_unshift(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","unshift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg__unshift(arg1,arg2,arg3,arg4); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_DoubleDoubleVector__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::vector< std::vector< double > > *)new std::vector< std::vector< double > >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_DoubleDoubleVector__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double,std::allocator< double > > > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< std::vector< double > > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double,std::allocator< double > > > const &","vector<(std::vector<(double)>)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double,std::allocator< double > > > const &","vector<(std::vector<(double)>)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::vector< std::vector< double > > *)new std::vector< std::vector< double > >((std::vector< std::vector< double,std::allocator< double > > > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.empty? + + call-seq: + empty? -> bool + +Check if the DoubleDoubleVector is empty or not. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_emptyq___(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (bool)((std::vector< std::vector< double > > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.size + + call-seq: + size -> std::vector< std::vector< double > >::size_type + +Size or Length of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_size(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double > >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = ((std::vector< std::vector< double > > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_swap(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double,std::allocator< double > > > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::vector< double,std::allocator< double > > > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double,std::allocator< double > > > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::vector< std::vector< double,std::allocator< double > > > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.begin + + call-seq: + begin -> std::vector< std::vector< double > >::iterator + +Return an iterator to the beginning of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_begin(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double > >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.end + + call-seq: + end -> std::vector< std::vector< double > >::iterator + +Return an iterator to past the end of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_end(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double > >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.rbegin + + call-seq: + rbegin -> std::vector< std::vector< double > >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_rbegin(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double > >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::vector< double > >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.rend + + call-seq: + rend -> std::vector< std::vector< double > >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_rend(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double > >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::vector< double > >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.clear + + call-seq: + clear + +Clear DoubleDoubleVector contents. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_clear(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_get_allocator(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< std::vector< double,std::allocator< double > > > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = ((std::vector< std::vector< double > > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::vector< std::vector< double > >::allocator_type(static_cast< const std::vector< std::vector< double > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_DoubleDoubleVector__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< std::vector< double > > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::size_type","vector<(std::vector<(double)>)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< std::vector< double > >::size_type >(val1); + result = (std::vector< std::vector< double > > *)new std::vector< std::vector< double > >(arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_resize__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::size_type >(val2); + (arg1)->resize(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.erase + + call-seq: + erase(pos) -> std::vector< std::vector< double > >::iterator + erase(first, last) -> std::vector< std::vector< double > >::iterator + +Delete a portion of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + std::vector< std::vector< double > >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","erase", 2, argv[0] )); + } + } + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_0(arg1,arg2); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::iterator arg2 ; + std::vector< std::vector< double > >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + swig::Iterator *iter3 = 0 ; + int res3 ; + std::vector< std::vector< double > >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","erase", 2, argv[0] )); + } + } + res3 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter3), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","erase", 3, argv[1] )); + } else { + swig::Iterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","erase", 3, argv[1] )); + } + } + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_1(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleDoubleVector_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_DoubleDoubleVector_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_DoubleDoubleVector_erase__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "erase", + " std::vector< std::vector< double > >::iterator erase(std::vector< std::vector< double > >::iterator pos)\n" + " std::vector< std::vector< double > >::iterator erase(std::vector< std::vector< double > >::iterator first, std::vector< std::vector< double > >::iterator last)\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_DoubleDoubleVector_allocate(VALUE self) +#else +_wrap_DoubleDoubleVector_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_DoubleDoubleVector__SWIG_3(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > >::size_type arg1 ; + std::vector< std::vector< double > >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::vector< std::vector< double > > *result = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::size_type","vector<(std::vector<(double)>)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< std::vector< double > >::size_type >(val1); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res2 = swig::asptr(argv[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::value_type const &","vector<(std::vector<(double)>)>", 2, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double > >::value_type const &","vector<(std::vector<(double)>)>", 2, argv[1])); + } + arg2 = ptr; + } + result = (std::vector< std::vector< double > > *)new std::vector< std::vector< double > >(arg1,(std::vector< std::vector< double > >::value_type const &)*arg2); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res2)) delete arg2; + return self; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_DoubleDoubleVector(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[2]; + int ii; + + argc = nargs; + if (argc > 2) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_DoubleDoubleVector__SWIG_0(nargs, args, self); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DoubleDoubleVector__SWIG_2(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_DoubleDoubleVector__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[1], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_DoubleDoubleVector__SWIG_3(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 2, "DoubleDoubleVector.new", + " DoubleDoubleVector.new()\n" + " DoubleDoubleVector.new(std::vector< std::vector< double,std::allocator< double > > > const &other)\n" + " DoubleDoubleVector.new(std::vector< std::vector< double > >::size_type size)\n" + " DoubleDoubleVector.new(std::vector< std::vector< double > >::size_type size, std::vector< std::vector< double > >::value_type const &value)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.front + + call-seq: + front -> DoubleVector + +Return the first element in DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_front(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double > >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","front", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double > >::value_type *) &((std::vector< std::vector< double > > const *)arg1)->front(); + vresult = swig::from(static_cast< std::vector< double,std::allocator< double > > >(*result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.back + + call-seq: + back -> DoubleVector + +Return the last element in DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_back(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double > >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","back", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = (std::vector< std::vector< double > >::value_type *) &((std::vector< std::vector< double > > const *)arg1)->back(); + vresult = swig::from(static_cast< std::vector< double,std::allocator< double > > >(*result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.assign + + call-seq: + assign(n, x) + +Assign a new DoubleDoubleVector or portion of it. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_assign(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::size_type arg2 ; + std::vector< std::vector< double > >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","assign", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::size_type","assign", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::size_type >(val2); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(argv[1], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::value_type const &","assign", 3, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double > >::value_type const &","assign", 3, argv[1])); + } + arg3 = ptr; + } + (arg1)->assign(arg2,(std::vector< std::vector< double > >::value_type const &)*arg3); + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_resize__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::size_type arg2 ; + std::vector< std::vector< double > >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::size_type >(val2); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(argv[1], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::value_type const &","resize", 3, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double > >::value_type const &","resize", 3, argv[1])); + } + arg3 = ptr; + } + (arg1)->resize(arg2,(std::vector< std::vector< double > >::value_type const &)*arg3); + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleDoubleVector_resize(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_DoubleDoubleVector_resize__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector_resize__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "DoubleDoubleVector.resize", + " void DoubleDoubleVector.resize(std::vector< std::vector< double > >::size_type new_size)\n" + " void DoubleDoubleVector.resize(std::vector< std::vector< double > >::size_type new_size, std::vector< std::vector< double > >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.insert + + call-seq: + insert(pos, argc) -> DoubleDoubleVector + insert(pos, x) -> std::vector< std::vector< double > >::iterator + insert(pos, n, x) + +Insert one or more new elements in the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_insert__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::iterator arg2 ; + std::vector< std::vector< double > >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + int res3 = SWIG_OLDOBJ ; + std::vector< std::vector< double > >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","insert", 2, argv[0] )); + } + } + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(argv[1], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::value_type const &","insert", 3, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double > >::value_type const &","insert", 3, argv[1])); + } + arg3 = ptr; + } + result = std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_1(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::vector< double > >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + if (SWIG_IsNewObj(res3)) delete arg3; + return vresult; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_insert__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::iterator arg2 ; + std::vector< std::vector< double > >::size_type arg3 ; + std::vector< std::vector< double > >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< std::vector< double > >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::iterator","insert", 2, argv[0] )); + } + } + ecode3 = SWIG_AsVal_size_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::size_type","insert", 3, argv[1] )); + } + arg3 = static_cast< std::vector< std::vector< double > >::size_type >(val3); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res4 = swig::asptr(argv[2], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::value_type const &","insert", 4, argv[2] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::vector< double > >::value_type const &","insert", 4, argv[2])); + } + arg4 = ptr; + } + std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_2(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4); + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_DoubleDoubleVector_insert(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector_insert__SWIG_1(nargs, args, self); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + if (argc <= 3) { + return _wrap_DoubleDoubleVector_insert__SWIG_0(nargs, args, self); + } + return _wrap_DoubleDoubleVector_insert__SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::vector< double > >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_DoubleDoubleVector_insert__SWIG_2(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "insert", + " std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > insert(std::vector< std::vector< double > >::difference_type pos, int argc, VALUE *argv, ...)\n" + " std::vector< std::vector< double > >::iterator insert(std::vector< std::vector< double > >::iterator pos, std::vector< std::vector< double > >::value_type const &x)\n" + " void insert(std::vector< std::vector< double > >::iterator pos, std::vector< std::vector< double > >::size_type n, std::vector< std::vector< double > >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.reserve + + call-seq: + reserve(n) + +Reserve memory in the DoubleDoubleVector for a number of elements. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_reserve(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + std::vector< std::vector< double > >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > *","reserve", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::vector< double > >::size_type","reserve", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::vector< double > >::size_type >(val2); + (arg1)->reserve(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::DoubleDoubleVector.capacity + + call-seq: + capacity -> std::vector< std::vector< double > >::size_type + +Reserved capacity of the DoubleDoubleVector. +*/ +SWIGINTERN VALUE +_wrap_DoubleDoubleVector_capacity(int argc, VALUE *argv, VALUE self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double > >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::vector< double > > const *","capacity", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); + result = ((std::vector< std::vector< double > > const *)arg1)->capacity(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN void +free_std_vector_Sl_std_vector_Sl_double_Sg__Sg_(void *self) { + std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *)self; + delete arg1; +} + +static swig_class SwigClassStringVector; + +/* + Document-method: Cdi::StringVector.dup + + call-seq: + dup -> StringVector + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_StringVector_dup(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_StringVector_inspect(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (VALUE)std_vector_Sl_std_string_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.to_a + + call-seq: + to_a -> VALUE + +Convert StringVector to an Array. +*/ +SWIGINTERN VALUE +_wrap_StringVector_to_a(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (VALUE)std_vector_Sl_std_string_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_StringVector_to_s(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (VALUE)std_vector_Sl_std_string_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.slice + + call-seq: + slice(i, length) -> VALUE + +Return a slice (portion of) the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_slice(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","slice", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","slice", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","slice", 3, argv[1] )); + } + arg3 = static_cast< std::vector< std::string >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_std_string_Sg__slice(arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.each + + call-seq: + each -> StringVector + +Iterate thru each element in the StringVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_StringVector_each(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector___delete2__(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","__delete2__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::string >::value_type const &","__delete2__", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string >::value_type const &","__delete2__", 2, argv[0])); + } + arg2 = ptr; + } + result = (VALUE)std_vector_Sl_std_string_Sg____delete2__(arg1,(std::string const &)*arg2); + vresult = result; + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.select + + call-seq: + select -> StringVector + +Iterate thru each element in the StringVector and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_StringVector_select(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.delete_at + + call-seq: + delete_at(i) -> VALUE + +Delete an element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_StringVector_delete_at(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","delete_at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","delete_at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + result = (VALUE)std_vector_Sl_std_string_Sg__delete_at(arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.at + + call-seq: + at(i) -> VALUE + +Return element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_StringVector_at(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + result = (VALUE)std_vector_Sl_std_string_Sg__at((std::vector< std::string > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.[] + + call-seq: + [](i, length) -> VALUE + [](i) -> VALUE + [](i) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_StringVector___getitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","__getitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< std::string >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_std_string_Sg____getitem____SWIG_0((std::vector< std::string > const *)arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector___getitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + result = (VALUE)std_vector_Sl_std_string_Sg____getitem____SWIG_1((std::vector< std::string > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector___getitem____SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + VALUE arg2 = (VALUE) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + arg2 = argv[0]; + try { + result = (VALUE)std_vector_Sl_std_string_Sg____getitem____SWIG_2((std::vector< std::string > const *)arg1,arg2); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_StringVector___getitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StringVector___getitem____SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + _v = (argv[1] != 0); + if (_v) { + return _wrap_StringVector___getitem____SWIG_2(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StringVector___getitem____SWIG_0(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "__getitem__", + " VALUE __getitem__(std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type length)\n" + " VALUE __getitem__(std::vector< std::string >::difference_type i)\n" + " VALUE __getitem__(VALUE i)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.[]= + + call-seq: + []=(i, x) -> VALUE + []=(i, length, v) -> VALUE + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_StringVector___setitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(argv[1], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::string >::value_type const &","__setitem__", 3, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string >::value_type const &","__setitem__", 3, argv[1])); + } + arg3 = ptr; + } + try { + result = (VALUE)std_vector_Sl_std_string_Sg____setitem____SWIG_0(arg1,arg2,(std::string const &)*arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + vresult = result; + if (SWIG_IsNewObj(res3)) delete arg3; + return vresult; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector___setitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + std::vector< std::string >::difference_type arg3 ; + std::vector< std::string,std::allocator< std::string > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","__setitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< std::string >::difference_type >(val3); + { + std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; + res4 = swig::asptr(argv[2], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< std::string,std::allocator< std::string > > const &","__setitem__", 4, argv[2] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string,std::allocator< std::string > > const &","__setitem__", 4, argv[2])); + } + arg4 = ptr; + } + try { + result = (VALUE)std_vector_Sl_std_string_Sg____setitem____SWIG_1(arg1,arg2,arg3,(std::vector< std::string,std::allocator< std::string > > const &)*arg4); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + if (SWIG_IsNewObj(res4)) delete arg4; + return vresult; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_StringVector___setitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector___setitem____SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector___setitem____SWIG_1(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "__setitem__", + " VALUE __setitem__(std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const &x)\n" + " VALUE __setitem__(std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type length, std::vector< std::string,std::allocator< std::string > > const &v)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.reject! + + call-seq: + reject! -> StringVector + +Iterate thru each element in the StringVector and reject those that fail a condition. A block must be provided. StringVector is modified in place. +*/ +SWIGINTERN VALUE +_wrap_StringVector_rejectN___(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","reject_bang", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg__reject_bang(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.pop + + call-seq: + pop -> VALUE + +Remove and return element at the end of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_pop(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","pop", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (VALUE)std_vector_Sl_std_string_Sg__pop(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.push + + call-seq: + push(e) -> std::vector< std::string >::value_type const + +Add an element at the end of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_push(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::vector< std::string >::value_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","push", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::string >::value_type const &","push", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string >::value_type const &","push", 2, argv[0])); + } + arg2 = ptr; + } + result = std_vector_Sl_std_string_Sg__push(arg1,(std::string const &)*arg2); + vresult = SWIG_From_std_string(static_cast< std::string >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.reject + + call-seq: + reject -> StringVector + +Iterate thru each element in the StringVector and reject those that fail a condition returning a new StringVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_StringVector_reject(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","reject", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg__reject(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.shift + + call-seq: + shift -> VALUE + +Remove and return element at the beginning of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_shift(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","shift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (VALUE)std_vector_Sl_std_string_Sg__shift(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.insert + + call-seq: + insert(pos, argc) -> StringVector + insert(pos, x) -> std::vector< std::string >::iterator + insert(pos, n, x) + +Insert one or more new elements in the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_insert__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::difference_type arg2 ; + int arg3 ; + VALUE *arg4 = (VALUE *) 0 ; + void *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 2) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::difference_type","insert", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::difference_type >(val2); + { + arg3 = argc - 1; + arg4 = argv + 1; + } + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg__insert__SWIG_0(arg1,arg2,arg3,arg4,arg5); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.unshift + + call-seq: + unshift(argc) -> StringVector + +Add one or more elements at the beginning of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_unshift(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","unshift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg__unshift(arg1,arg2,arg3,arg4); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_StringVector__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::vector< std::string > *)new std::vector< std::string >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_StringVector__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< std::string > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const &","vector<(std::string)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string > const &","vector<(std::string)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::vector< std::string > *)new std::vector< std::string >((std::vector< std::string > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.empty? + + call-seq: + empty? -> bool + +Check if the StringVector is empty or not. +*/ +SWIGINTERN VALUE +_wrap_StringVector_emptyq___(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (bool)((std::vector< std::string > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.size + + call-seq: + size -> std::vector< std::string >::size_type + +Size or Length of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_size(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = ((std::vector< std::string > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector_swap(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::string > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::vector< std::string > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.begin + + call-seq: + begin -> std::vector< std::string >::iterator + +Return an iterator to the beginning of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_begin(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::string >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.end + + call-seq: + end -> std::vector< std::string >::iterator + +Return an iterator to past the end of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_end(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::string >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.rbegin + + call-seq: + rbegin -> std::vector< std::string >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_rbegin(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::string >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.rend + + call-seq: + rend -> std::vector< std::string >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_rend(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::string >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.clear + + call-seq: + clear + +Clear StringVector contents. +*/ +SWIGINTERN VALUE +_wrap_StringVector_clear(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector_get_allocator(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< std::string > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = ((std::vector< std::string > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::vector< std::string >::allocator_type(static_cast< const std::vector< std::string >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__string_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_StringVector__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< std::string >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< std::string > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< std::string >::size_type","vector<(std::string)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< std::string >::size_type >(val1); + result = (std::vector< std::string > *)new std::vector< std::string >(arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_resize__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::size_type >(val2); + (arg1)->resize(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.erase + + call-seq: + erase(pos) -> std::vector< std::string >::iterator + erase(first, last) -> std::vector< std::string >::iterator + +Delete a portion of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + std::vector< std::string >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","erase", 2, argv[0] )); + } + } + result = std_vector_Sl_std_string_Sg__erase__SWIG_0(arg1,arg2); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::string >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::iterator arg2 ; + std::vector< std::string >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + swig::Iterator *iter3 = 0 ; + int res3 ; + std::vector< std::string >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","erase", 2, argv[0] )); + } + } + res3 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter3), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","erase", 3, argv[1] )); + } else { + swig::Iterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","erase", 3, argv[1] )); + } + } + result = std_vector_Sl_std_string_Sg__erase__SWIG_1(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::string >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_StringVector_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_StringVector_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_StringVector_erase__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "erase", + " std::vector< std::string >::iterator erase(std::vector< std::string >::iterator pos)\n" + " std::vector< std::string >::iterator erase(std::vector< std::string >::iterator first, std::vector< std::string >::iterator last)\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_StringVector_allocate(VALUE self) +#else +_wrap_StringVector_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_StringVector__SWIG_3(int argc, VALUE *argv, VALUE self) { + std::vector< std::string >::size_type arg1 ; + std::vector< std::string >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::vector< std::string > *result = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< std::string >::size_type","vector<(std::string)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< std::string >::size_type >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::string >::value_type const &","vector<(std::string)>", 2, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string >::value_type const &","vector<(std::string)>", 2, argv[1])); + } + arg2 = ptr; + } + result = (std::vector< std::string > *)new std::vector< std::string >(arg1,(std::vector< std::string >::value_type const &)*arg2); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res2)) delete arg2; + return self; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_StringVector(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[2]; + int ii; + + argc = nargs; + if (argc > 2) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_StringVector__SWIG_0(nargs, args, self); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_StringVector__SWIG_2(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StringVector__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StringVector__SWIG_3(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 2, "StringVector.new", + " StringVector.new()\n" + " StringVector.new(std::vector< std::string > const &other)\n" + " StringVector.new(std::vector< std::string >::size_type size)\n" + " StringVector.new(std::vector< std::string >::size_type size, std::vector< std::string >::value_type const &value)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.front + + call-seq: + front -> std::vector< std::string >::value_type const & + +Return the first element in StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_front(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","front", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string >::value_type *) &((std::vector< std::string > const *)arg1)->front(); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.back + + call-seq: + back -> std::vector< std::string >::value_type const & + +Return the last element in StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_back(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","back", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string >::value_type *) &((std::vector< std::string > const *)arg1)->back(); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.assign + + call-seq: + assign(n, x) + +Assign a new StringVector or portion of it. +*/ +SWIGINTERN VALUE +_wrap_StringVector_assign(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::size_type arg2 ; + std::vector< std::string >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","assign", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::size_type","assign", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::size_type >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(argv[1], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::string >::value_type const &","assign", 3, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string >::value_type const &","assign", 3, argv[1])); + } + arg3 = ptr; + } + (arg1)->assign(arg2,(std::vector< std::string >::value_type const &)*arg3); + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_resize__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::size_type arg2 ; + std::vector< std::string >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::size_type >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(argv[1], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::string >::value_type const &","resize", 3, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string >::value_type const &","resize", 3, argv[1])); + } + arg3 = ptr; + } + (arg1)->resize(arg2,(std::vector< std::string >::value_type const &)*arg3); + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_StringVector_resize(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StringVector_resize__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector_resize__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "StringVector.resize", + " void StringVector.resize(std::vector< std::string >::size_type new_size)\n" + " void StringVector.resize(std::vector< std::string >::size_type new_size, std::vector< std::string >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.insert + + call-seq: + insert(pos, argc) -> StringVector + insert(pos, x) -> std::vector< std::string >::iterator + insert(pos, n, x) + +Insert one or more new elements in the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_insert__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::iterator arg2 ; + std::vector< std::string >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + int res3 = SWIG_OLDOBJ ; + std::vector< std::string >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","insert", 2, argv[0] )); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(argv[1], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::string >::value_type const &","insert", 3, argv[1] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string >::value_type const &","insert", 3, argv[1])); + } + arg3 = ptr; + } + result = std_vector_Sl_std_string_Sg__insert__SWIG_1(arg1,arg2,(std::string const &)*arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::string >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + if (SWIG_IsNewObj(res3)) delete arg3; + return vresult; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector_insert__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::iterator arg2 ; + std::vector< std::string >::size_type arg3 ; + std::vector< std::string >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< std::string >::iterator","insert", 2, argv[0] )); + } + } + ecode3 = SWIG_AsVal_size_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::string >::size_type","insert", 3, argv[1] )); + } + arg3 = static_cast< std::vector< std::string >::size_type >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string(argv[2], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< std::string >::value_type const &","insert", 4, argv[2] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::string >::value_type const &","insert", 4, argv[2])); + } + arg4 = ptr; + } + std_vector_Sl_std_string_Sg__insert__SWIG_2(arg1,arg2,arg3,(std::string const &)*arg4); + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_StringVector_insert(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector_insert__SWIG_1(nargs, args, self); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + if (argc <= 3) { + return _wrap_StringVector_insert__SWIG_0(nargs, args, self); + } + return _wrap_StringVector_insert__SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::string >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StringVector_insert__SWIG_2(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "insert", + " std::vector< std::string,std::allocator< std::string > > insert(std::vector< std::string >::difference_type pos, int argc, VALUE *argv, ...)\n" + " std::vector< std::string >::iterator insert(std::vector< std::string >::iterator pos, std::vector< std::string >::value_type const &x)\n" + " void insert(std::vector< std::string >::iterator pos, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.reserve + + call-seq: + reserve(n) + +Reserve memory in the StringVector for a number of elements. +*/ +SWIGINTERN VALUE +_wrap_StringVector_reserve(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","reserve", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::string >::size_type","reserve", 2, argv[0] )); + } + arg2 = static_cast< std::vector< std::string >::size_type >(val2); + (arg1)->reserve(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.capacity + + call-seq: + capacity -> std::vector< std::string >::size_type + +Reserved capacity of the StringVector. +*/ +SWIGINTERN VALUE +_wrap_StringVector_capacity(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > const *","capacity", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = ((std::vector< std::string > const *)arg1)->capacity(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_StringVector_mapN___(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","map_bang", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg__map_bang(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::StringVector.delete + + call-seq: + delete(val) -> VALUE + +Delete a matching element. +*/ +SWIGINTERN VALUE +_wrap_StringVector_delete(int argc, VALUE *argv, VALUE self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::string > *","__delete__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","__delete__", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","__delete__", 2, argv[0])); + } + arg2 = ptr; + } + result = (VALUE)std_vector_Sl_std_string_Sg____delete__(arg1,(std::string const &)*arg2); + vresult = result; + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN void +free_std_vector_Sl_std_string_Sg_(void *self) { + std::vector< std::string > *arg1 = (std::vector< std::string > *)self; + delete arg1; +} + +static swig_class SwigClassVarsVector; + +/* + Document-method: Cdi::VarsVector.dup + + call-seq: + dup -> VarsVector + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_dup(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_inspect(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (VALUE)std_vector_Sl_CdiVariable_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.to_a + + call-seq: + to_a -> VALUE + +Convert VarsVector to an Array. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_to_a(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (VALUE)std_vector_Sl_CdiVariable_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_to_s(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (VALUE)std_vector_Sl_CdiVariable_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.slice + + call-seq: + slice(i, length) -> VALUE + +Return a slice (portion of) the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_slice(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","slice", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","slice", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","slice", 3, argv[1] )); + } + arg3 = static_cast< std::vector< CdiVariable >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_CdiVariable_Sg__slice(arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.each + + call-seq: + each -> VarsVector + +Iterate thru each element in the VarsVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_each(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsVector___delete2__(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","__delete2__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::value_type const &","__delete2__", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable >::value_type const &","__delete2__", 2, argv[0])); + } + arg2 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp2); + result = (VALUE)std_vector_Sl_CdiVariable_Sg____delete2__(arg1,(CdiVariable const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.select + + call-seq: + select -> VarsVector + +Iterate thru each element in the VarsVector and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_select(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.delete_at + + call-seq: + delete_at(i) -> VALUE + +Delete an element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_delete_at(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","delete_at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","delete_at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + result = (VALUE)std_vector_Sl_CdiVariable_Sg__delete_at(arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.at + + call-seq: + at(i) -> VALUE + +Return element at a certain index. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_at(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","at", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","at", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + result = (VALUE)std_vector_Sl_CdiVariable_Sg__at((std::vector< CdiVariable > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.[] + + call-seq: + [](i, length) -> VALUE + [](i) -> VALUE + [](i) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_VarsVector___getitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","__getitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< CdiVariable >::difference_type >(val3); + try { + result = (VALUE)std_vector_Sl_CdiVariable_Sg____getitem____SWIG_0((std::vector< CdiVariable > const *)arg1,arg2,arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsVector___getitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","__getitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + result = (VALUE)std_vector_Sl_CdiVariable_Sg____getitem____SWIG_1((std::vector< CdiVariable > const *)arg1,arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsVector___getitem____SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + VALUE arg2 = (VALUE) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + arg2 = argv[0]; + try { + result = (VALUE)std_vector_Sl_CdiVariable_Sg____getitem____SWIG_2((std::vector< CdiVariable > const *)arg1,arg2); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_VarsVector___getitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsVector___getitem____SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + _v = (argv[1] != 0); + if (_v) { + return _wrap_VarsVector___getitem____SWIG_2(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsVector___getitem____SWIG_0(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "__getitem__", + " VALUE __getitem__(std::vector< CdiVariable >::difference_type i, std::vector< CdiVariable >::difference_type length)\n" + " VALUE __getitem__(std::vector< CdiVariable >::difference_type i)\n" + " VALUE __getitem__(VALUE i)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.[]= + + call-seq: + []=(i, x) -> VALUE + []=(i, length, v) -> VALUE + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_VarsVector___setitem____SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::value_type const &","__setitem__", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable >::value_type const &","__setitem__", 3, argv[1])); + } + arg3 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp3); + try { + result = (VALUE)std_vector_Sl_CdiVariable_Sg____setitem____SWIG_0(arg1,arg2,(CdiVariable const &)*arg3); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsVector___setitem____SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + std::vector< CdiVariable >::difference_type arg3 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","__setitem__", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","__setitem__", 3, argv[1] )); + } + arg3 = static_cast< std::vector< CdiVariable >::difference_type >(val3); + { + std::vector< CdiVariable,std::allocator< CdiVariable > > *ptr = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)0; + res4 = swig::asptr(argv[2], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< CdiVariable,std::allocator< CdiVariable > > const &","__setitem__", 4, argv[2] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable,std::allocator< CdiVariable > > const &","__setitem__", 4, argv[2])); + } + arg4 = ptr; + } + try { + result = (VALUE)std_vector_Sl_CdiVariable_Sg____setitem____SWIG_1(arg1,arg2,arg3,(std::vector< CdiVariable,std::allocator< CdiVariable > > const &)*arg4); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + vresult = result; + if (SWIG_IsNewObj(res4)) delete arg4; + return vresult; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_VarsVector___setitem__(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector___setitem____SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = swig::asptr(argv[3], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector___setitem____SWIG_1(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "__setitem__", + " VALUE __setitem__(std::vector< CdiVariable >::difference_type i, std::vector< CdiVariable >::value_type const &x)\n" + " VALUE __setitem__(std::vector< CdiVariable >::difference_type i, std::vector< CdiVariable >::difference_type length, std::vector< CdiVariable,std::allocator< CdiVariable > > const &v)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.reject! + + call-seq: + reject! -> VarsVector + +Iterate thru each element in the VarsVector and reject those that fail a condition. A block must be provided. VarsVector is modified in place. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_rejectN___(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","reject_bang", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg__reject_bang(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.pop + + call-seq: + pop -> VALUE + +Remove and return element at the end of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_pop(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","pop", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (VALUE)std_vector_Sl_CdiVariable_Sg__pop(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.push + + call-seq: + push(e) -> CdiVariable + +Add an element at the end of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_push(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + std::vector< CdiVariable >::value_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","push", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::value_type const &","push", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable >::value_type const &","push", 2, argv[0])); + } + arg2 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp2); + result = std_vector_Sl_CdiVariable_Sg__push(arg1,(CdiVariable const &)*arg2); + vresult = SWIG_NewPointerObj((new std::vector< CdiVariable >::value_type(static_cast< const std::vector< CdiVariable >::value_type& >(result))), SWIGTYPE_p_CdiVariable, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.reject + + call-seq: + reject -> VarsVector + +Iterate thru each element in the VarsVector and reject those that fail a condition returning a new VarsVector. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_reject(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","reject", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg__reject(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.shift + + call-seq: + shift -> VALUE + +Remove and return element at the beginning of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_shift(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","shift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (VALUE)std_vector_Sl_CdiVariable_Sg__shift(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.insert + + call-seq: + insert(pos, argc) -> VarsVector + insert(pos, x) -> std::vector< CdiVariable >::iterator + insert(pos, n, x) + +Insert one or more new elements in the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_insert__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::difference_type arg2 ; + int arg3 ; + VALUE *arg4 = (VALUE *) 0 ; + void *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 2) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::difference_type","insert", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::difference_type >(val2); + { + arg3 = argc - 1; + arg4 = argv + 1; + } + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg__insert__SWIG_0(arg1,arg2,arg3,arg4,arg5); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.unshift + + call-seq: + unshift(argc) -> VarsVector + +Add one or more elements at the beginning of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_unshift(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","unshift", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)std_vector_Sl_CdiVariable_Sg__unshift(arg1,arg2,arg3,arg4); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_VarsVector__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::vector< CdiVariable > *)new std::vector< CdiVariable >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_VarsVector__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< CdiVariable > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::vector< CdiVariable,std::allocator< CdiVariable > > *ptr = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const &","vector<(CdiVariable)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable > const &","vector<(CdiVariable)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::vector< CdiVariable > *)new std::vector< CdiVariable >((std::vector< CdiVariable > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.empty? + + call-seq: + empty? -> bool + +Check if the VarsVector is empty or not. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_emptyq___(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (bool)((std::vector< CdiVariable > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.size + + call-seq: + size -> std::vector< CdiVariable >::size_type + +Size or Length of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_size(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = ((std::vector< CdiVariable > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsVector_swap(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< CdiVariable > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::vector< CdiVariable > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.begin + + call-seq: + begin -> std::vector< CdiVariable >::iterator + +Return an iterator to the beginning of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_begin(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.end + + call-seq: + end -> std::vector< CdiVariable >::iterator + +Return an iterator to past the end of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_end(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.rbegin + + call-seq: + rbegin -> std::vector< CdiVariable >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_rbegin(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< CdiVariable >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.rend + + call-seq: + rend -> std::vector< CdiVariable >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_rend(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< CdiVariable >::reverse_iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.clear + + call-seq: + clear + +Clear VarsVector contents. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_clear(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsVector_get_allocator(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< CdiVariable > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = ((std::vector< CdiVariable > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::vector< CdiVariable >::allocator_type(static_cast< const std::vector< CdiVariable >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_CdiVariable_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_VarsVector__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< CdiVariable > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::size_type","vector<(CdiVariable)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< CdiVariable >::size_type >(val1); + result = (std::vector< CdiVariable > *)new std::vector< CdiVariable >(arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_resize__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::size_type >(val2); + (arg1)->resize(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.erase + + call-seq: + erase(pos) -> std::vector< CdiVariable >::iterator + erase(first, last) -> std::vector< CdiVariable >::iterator + +Delete a portion of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + std::vector< CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","erase", 2, argv[0] )); + } + } + result = std_vector_Sl_CdiVariable_Sg__erase__SWIG_0(arg1,arg2); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsVector_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::iterator arg2 ; + std::vector< CdiVariable >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + swig::Iterator *iter3 = 0 ; + int res3 ; + std::vector< CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","erase", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","erase", 2, argv[0] )); + } + } + res3 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter3), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","erase", 3, argv[1] )); + } else { + swig::Iterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","erase", 3, argv[1] )); + } + } + result = std_vector_Sl_CdiVariable_Sg__erase__SWIG_1(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_VarsVector_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_VarsVector_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_VarsVector_erase__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "erase", + " std::vector< CdiVariable >::iterator erase(std::vector< CdiVariable >::iterator pos)\n" + " std::vector< CdiVariable >::iterator erase(std::vector< CdiVariable >::iterator first, std::vector< CdiVariable >::iterator last)\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_VarsVector_allocate(VALUE self) +#else +_wrap_VarsVector_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_VarsVector__SWIG_3(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable >::size_type arg1 ; + std::vector< CdiVariable >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 ; + int res2 = 0 ; + std::vector< CdiVariable > *result = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::size_type","vector<(CdiVariable)>", 1, argv[0] )); + } + arg1 = static_cast< std::vector< CdiVariable >::size_type >(val1); + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::value_type const &","vector<(CdiVariable)>", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable >::value_type const &","vector<(CdiVariable)>", 2, argv[1])); + } + arg2 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp2); + result = (std::vector< CdiVariable > *)new std::vector< CdiVariable >(arg1,(std::vector< CdiVariable >::value_type const &)*arg2); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_VarsVector(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[2]; + int ii; + + argc = nargs; + if (argc > 2) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_VarsVector__SWIG_0(nargs, args, self); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_VarsVector__SWIG_2(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsVector__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsVector__SWIG_3(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 2, "VarsVector.new", + " VarsVector.new()\n" + " VarsVector.new(std::vector< CdiVariable > const &other)\n" + " VarsVector.new(std::vector< CdiVariable >::size_type size)\n" + " VarsVector.new(std::vector< CdiVariable >::size_type size, std::vector< CdiVariable >::value_type const &value)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.front + + call-seq: + front -> CdiVariable + +Return the first element in VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_front(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","front", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable >::value_type *) &((std::vector< CdiVariable > const *)arg1)->front(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.back + + call-seq: + back -> CdiVariable + +Return the last element in VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_back(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable >::value_type *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","back", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = (std::vector< CdiVariable >::value_type *) &((std::vector< CdiVariable > const *)arg1)->back(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiVariable, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.assign + + call-seq: + assign(n, x) + +Assign a new VarsVector or portion of it. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_assign(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::size_type arg2 ; + std::vector< CdiVariable >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","assign", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::size_type","assign", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::size_type >(val2); + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::value_type const &","assign", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable >::value_type const &","assign", 3, argv[1])); + } + arg3 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp3); + (arg1)->assign(arg2,(std::vector< CdiVariable >::value_type const &)*arg3); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.resize + + call-seq: + resize(new_size) + resize(new_size, x) + +Resize the size of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_resize__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::size_type arg2 ; + std::vector< CdiVariable >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","resize", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::size_type","resize", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::size_type >(val2); + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::value_type const &","resize", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable >::value_type const &","resize", 3, argv[1])); + } + arg3 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp3); + (arg1)->resize(arg2,(std::vector< CdiVariable >::value_type const &)*arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_VarsVector_resize(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsVector_resize__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector_resize__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "VarsVector.resize", + " void VarsVector.resize(std::vector< CdiVariable >::size_type new_size)\n" + " void VarsVector.resize(std::vector< CdiVariable >::size_type new_size, std::vector< CdiVariable >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.insert + + call-seq: + insert(pos, argc) -> VarsVector + insert(pos, x) -> std::vector< CdiVariable >::iterator + insert(pos, n, x) + +Insert one or more new elements in the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_insert__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::iterator arg2 ; + std::vector< CdiVariable >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + void *argp3 ; + int res3 = 0 ; + std::vector< CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","insert", 2, argv[0] )); + } + } + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::value_type const &","insert", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable >::value_type const &","insert", 3, argv[1])); + } + arg3 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp3); + result = std_vector_Sl_CdiVariable_Sg__insert__SWIG_1(arg1,arg2,(CdiVariable const &)*arg3); + vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< CdiVariable >::iterator & >(result), + self), + swig::Iterator::descriptor(),SWIG_POINTER_OWN); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsVector_insert__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::iterator arg2 ; + std::vector< CdiVariable >::size_type arg3 ; + std::vector< CdiVariable >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::Iterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 ; + int res4 = 0 ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","insert", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&iter2), swig::Iterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","insert", 2, argv[0] )); + } else { + swig::Iterator_T<std::vector< CdiVariable >::iterator > *iter_t = dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::iterator","insert", 2, argv[0] )); + } + } + ecode3 = SWIG_AsVal_size_t(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::size_type","insert", 3, argv[1] )); + } + arg3 = static_cast< std::vector< CdiVariable >::size_type >(val3); + res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::value_type const &","insert", 4, argv[2] )); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CdiVariable >::value_type const &","insert", 4, argv[2])); + } + arg4 = reinterpret_cast< std::vector< CdiVariable >::value_type * >(argp4); + std_vector_Sl_CdiVariable_Sg__insert__SWIG_2(arg1,arg2,arg3,(CdiVariable const &)*arg4); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_VarsVector_insert(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[5]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 5) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector_insert__SWIG_1(nargs, args, self); + } + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + if (argc <= 3) { + return _wrap_VarsVector_insert__SWIG_0(nargs, args, self); + } + return _wrap_VarsVector_insert__SWIG_0(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector< CdiVariable,std::allocator< CdiVariable > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::ConstIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< CdiVariable >::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_CdiVariable, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsVector_insert__SWIG_2(nargs, args, self); + } + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 5, "insert", + " std::vector< CdiVariable,std::allocator< CdiVariable > > insert(std::vector< CdiVariable >::difference_type pos, int argc, VALUE *argv, ...)\n" + " std::vector< CdiVariable >::iterator insert(std::vector< CdiVariable >::iterator pos, std::vector< CdiVariable >::value_type const &x)\n" + " void insert(std::vector< CdiVariable >::iterator pos, std::vector< CdiVariable >::size_type n, std::vector< CdiVariable >::value_type const &x)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.reserve + + call-seq: + reserve(n) + +Reserve memory in the VarsVector for a number of elements. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_reserve(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + std::vector< CdiVariable >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > *","reserve", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< CdiVariable >::size_type","reserve", 2, argv[0] )); + } + arg2 = static_cast< std::vector< CdiVariable >::size_type >(val2); + (arg1)->reserve(arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsVector.capacity + + call-seq: + capacity -> std::vector< CdiVariable >::size_type + +Reserved capacity of the VarsVector. +*/ +SWIGINTERN VALUE +_wrap_VarsVector_capacity(int argc, VALUE *argv, VALUE self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CdiVariable > const *","capacity", 1, self )); + } + arg1 = reinterpret_cast< std::vector< CdiVariable > * >(argp1); + result = ((std::vector< CdiVariable > const *)arg1)->capacity(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN void +free_std_vector_Sl_CdiVariable_Sg_(void *self) { + std::vector< CdiVariable > *arg1 = (std::vector< CdiVariable > *)self; + delete arg1; +} + +static swig_class SwigClassVarsMap; + +SWIGINTERN VALUE +_wrap_new_VarsMap__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::less< std::string > *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + std::map< std::string,CdiVariable > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__lessT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::less< std::string > const &","map<(std::string,CdiVariable)>", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::less< std::string > const &","map<(std::string,CdiVariable)>", 1, argv[0])); + } + arg1 = reinterpret_cast< std::less< std::string > * >(argp1); + result = (std::map< std::string,CdiVariable > *)new std::map< std::string,CdiVariable >((std::less< std::string > const &)*arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.dup + + call-seq: + dup -> VarsMap + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_dup(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)std_map_Sl_std_string_Sc_CdiVariable_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.delete + + call-seq: + delete(key) -> VALUE + +Delete a matching element. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_delete(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","__delete__", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","__delete__", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","__delete__", 2, argv[0])); + } + arg2 = ptr; + } + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg____delete__(arg1,(std::string const &)*arg2); + vresult = result; + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_has_keyq___(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > const *","has_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","has_key", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","has_key", 2, argv[0])); + } + arg2 = ptr; + } + result = (bool)std_map_Sl_std_string_Sc_CdiVariable_Sg__has_key((std::map< std::string,CdiVariable > const *)arg1,(std::string const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.keys + + call-seq: + keys -> VALUE + +Return an Array of key elements. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_keys(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","keys", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg__keys(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.each + + call-seq: + each -> VarsMap + +Iterate thru each element in the VarsMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_each(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)std_map_Sl_std_string_Sc_CdiVariable_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.select + + call-seq: + select -> VarsMap + +Iterate thru each element in the VarsMap and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_select(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)std_map_Sl_std_string_Sc_CdiVariable_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.values_at + + call-seq: + values_at(argc) -> VALUE + +Return an Array of value elements matching the conditions. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_values_at(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","values_at", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg__values_at(arg1,arg2,arg3,arg4); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.each_key + + call-seq: + each_key -> VarsMap + +Iterate thru each key element in the VarsMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_each_key(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","each_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)std_map_Sl_std_string_Sc_CdiVariable_Sg__each_key(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.values + + call-seq: + values -> VALUE + +Return an Array of value elements. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_values(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","values", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg__values(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.each_value + + call-seq: + each_value -> VarsMap + +Iterate thru each key element in the VarsMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_each_value(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","each_value", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)std_map_Sl_std_string_Sc_CdiVariable_Sg__each_value(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_entries(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","entries", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg__entries(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_includeq___(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","__contains__", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","__contains__", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","__contains__", 2, argv[0])); + } + arg2 = ptr; + } + result = (bool)std_map_Sl_std_string_Sc_CdiVariable_Sg____contains__(arg1,(std::string const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_key_iterator(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","key_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_std_string_Sc_CdiVariable_Sg__key_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_value_iterator(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","value_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_std_string_Sc_CdiVariable_Sg__value_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.[] + + call-seq: + [](key) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_VarsMap___getitem__(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","__getitem__", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","__getitem__", 2, argv[0])); + } + arg2 = ptr; + } + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg____getitem__((std::map< std::string,CdiVariable > const *)arg1,(std::string const &)*arg2); + vresult = result; + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.[]= + + call-seq: + []=(key, x) + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_VarsMap___setitem__(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + std::map< std::string,CdiVariable >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","__setitem__", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","__setitem__", 2, argv[0])); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::mapped_type const &","__setitem__", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::mapped_type const &","__setitem__", 3, argv[1])); + } + arg3 = reinterpret_cast< std::map< std::string,CdiVariable >::mapped_type * >(argp3); + try { + std_map_Sl_std_string_Sc_CdiVariable_Sg____setitem__(arg1,(std::string const &)*arg2,(CdiVariable const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_inspect(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.to_a + + call-seq: + to_a -> VALUE + +Convert VarsMap to an Array. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_to_a(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_to_s(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_std_string_Sc_CdiVariable_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_VarsMap__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::map< std::string,CdiVariable > *)new std::map< std::string,CdiVariable >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_VarsMap_allocate(VALUE self) +#else +_wrap_VarsMap_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_VarsMap__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< std::string,CdiVariable > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *ptr = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > const &","map<(std::string,CdiVariable)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable > const &","map<(std::string,CdiVariable)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::map< std::string,CdiVariable > *)new std::map< std::string,CdiVariable >((std::map< std::string,CdiVariable > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_VarsMap(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[1]; + int ii; + + argc = nargs; + if (argc > 1) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_VarsMap__SWIG_1(nargs, args, self); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__lessT_std__string_t, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsMap__SWIG_0(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsMap__SWIG_2(nargs, args, self); + } + } + +fail: + Ruby_Format_OverloadedError( argc, 1, "VarsMap.new", + " VarsMap.new(std::less< std::string > const &other)\n" + " VarsMap.new()\n" + " VarsMap.new(std::map< std::string,CdiVariable > const &other)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.empty? + + call-seq: + empty? -> bool + +Check if the VarsMap is empty or not. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_emptyq___(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (bool)((std::map< std::string,CdiVariable > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.size + + call-seq: + size -> std::map< std::string,CdiVariable >::size_type + +Size or Length of the VarsMap. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_size(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = ((std::map< std::string,CdiVariable > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_swap(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.begin + + call-seq: + begin -> std::map< std::string,CdiVariable >::iterator + +Return an iterator to the beginning of the VarsMap. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_begin(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::iterator(static_cast< const std::map< std::string,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.end + + call-seq: + end -> std::map< std::string,CdiVariable >::iterator + +Return an iterator to past the end of the VarsMap. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_end(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::iterator(static_cast< const std::map< std::string,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.rbegin + + call-seq: + rbegin -> std::map< std::string,CdiVariable >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the VarsMap. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_rbegin(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::reverse_iterator(static_cast< const std::map< std::string,CdiVariable >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.rend + + call-seq: + rend -> std::map< std::string,CdiVariable >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the VarsMap. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_rend(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::reverse_iterator(static_cast< const std::map< std::string,CdiVariable >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.clear + + call-seq: + clear + +Clear VarsMap contents. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_clear(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_get_allocator(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< std::pair< std::string const,CdiVariable > > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + result = ((std::map< std::string,CdiVariable > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::allocator_type(static_cast< const std::map< std::string,CdiVariable >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.erase + + call-seq: + erase(x) -> std::map< std::string,CdiVariable >::size_type + erase(position) + erase(first, last) + +Delete a portion of the VarsMap. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::map< std::string,CdiVariable >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","erase", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","erase", 2, argv[0])); + } + arg2 = ptr; + } + result = (arg1)->erase((std::map< std::string,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_count(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::map< std::string,CdiVariable >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > const *","count", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","count", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","count", 2, argv[0])); + } + arg2 = ptr; + } + result = ((std::map< std::string,CdiVariable > const *)arg1)->count((std::map< std::string,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< std::string,CdiVariable >::iterator * >(argp2)); + } + } + std_map_Sl_std_string_Sc_CdiVariable_Sg__erase__SWIG_1(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_erase__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::iterator arg2 ; + std::map< std::string,CdiVariable >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< std::string,CdiVariable >::iterator * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::iterator","erase", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::iterator","erase", 3, argv[1])); + } else { + arg3 = *(reinterpret_cast< std::map< std::string,CdiVariable >::iterator * >(argp3)); + } + } + std_map_Sl_std_string_Sc_CdiVariable_Sg__erase__SWIG_2(arg1,arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_VarsMap_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsMap_erase__SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsMap_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsMap_erase__SWIG_2(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "VarsMap.erase", + " std::map< std::string,CdiVariable >::size_type VarsMap.erase(std::map< std::string,CdiVariable >::key_type const &x)\n" + " void VarsMap.erase(std::map< std::string,CdiVariable >::iterator position)\n" + " void VarsMap.erase(std::map< std::string,CdiVariable >::iterator first, std::map< std::string,CdiVariable >::iterator last)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsMap.find + + call-seq: + find(x) -> std::map< std::string,CdiVariable >::iterator + +Find an element in the class. +*/ +SWIGINTERN VALUE +_wrap_VarsMap_find(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::map< std::string,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","find", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","find", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","find", 2, argv[0])); + } + arg2 = ptr; + } + result = (arg1)->find((std::map< std::string,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::iterator(static_cast< const std::map< std::string,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_lower_bound(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::map< std::string,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","lower_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","lower_bound", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","lower_bound", 2, argv[0])); + } + arg2 = ptr; + } + result = (arg1)->lower_bound((std::map< std::string,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::iterator(static_cast< const std::map< std::string,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsMap_upper_bound(int argc, VALUE *argv, VALUE self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *) 0 ; + std::map< std::string,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + std::map< std::string,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable > *","upper_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< std::string,CdiVariable > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable >::key_type const &","upper_bound", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< std::string,CdiVariable >::key_type const &","upper_bound", 2, argv[0])); + } + arg2 = ptr; + } + result = (arg1)->upper_bound((std::map< std::string,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< std::string,CdiVariable >::iterator(static_cast< const std::map< std::string,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + if (SWIG_IsNewObj(res2)) delete arg2; + return vresult; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN void +free_std_map_Sl_std_string_Sc_CdiVariable_Sg_(void *self) { + std::map< std::string,CdiVariable > *arg1 = (std::map< std::string,CdiVariable > *)self; + delete arg1; +} + +static swig_class SwigClassVarsByCode; + +SWIGINTERN VALUE +_wrap_new_VarsByCode__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::less< int > *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + std::map< int,CdiVariable > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__lessT_int_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::less< int > const &","map<(int,CdiVariable)>", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::less< int > const &","map<(int,CdiVariable)>", 1, argv[0])); + } + arg1 = reinterpret_cast< std::less< int > * >(argp1); + result = (std::map< int,CdiVariable > *)new std::map< int,CdiVariable >((std::less< int > const &)*arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.dup + + call-seq: + dup -> VarsByCode + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_dup(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)std_map_Sl_int_Sc_CdiVariable_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.delete + + call-seq: + delete(key) -> VALUE + +Delete a matching element. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_delete(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","__delete__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","__delete__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg____delete__(arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_has_keyq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > const *","has_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","has_key", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiVariable_Sg__has_key((std::map< int,CdiVariable > const *)arg1,(int const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.keys + + call-seq: + keys -> VALUE + +Return an Array of key elements. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_keys(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","keys", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg__keys(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.each + + call-seq: + each -> VarsByCode + +Iterate thru each element in the VarsByCode. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_each(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)std_map_Sl_int_Sc_CdiVariable_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.select + + call-seq: + select -> VarsByCode + +Iterate thru each element in the VarsByCode and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_select(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)std_map_Sl_int_Sc_CdiVariable_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.values_at + + call-seq: + values_at(argc) -> VALUE + +Return an Array of value elements matching the conditions. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_values_at(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","values_at", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg__values_at(arg1,arg2,arg3,arg4); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.each_key + + call-seq: + each_key -> VarsByCode + +Iterate thru each key element in the VarsByCode. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_each_key(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","each_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)std_map_Sl_int_Sc_CdiVariable_Sg__each_key(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.values + + call-seq: + values -> VALUE + +Return an Array of value elements. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_values(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","values", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg__values(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.each_value + + call-seq: + each_value -> VarsByCode + +Iterate thru each key element in the VarsByCode. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_each_value(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","each_value", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)std_map_Sl_int_Sc_CdiVariable_Sg__each_value(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_entries(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","entries", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg__entries(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_includeq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","__contains__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","__contains__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiVariable_Sg____contains__(arg1,(int const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_key_iterator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","key_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_int_Sc_CdiVariable_Sg__key_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_value_iterator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","value_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_int_Sc_CdiVariable_Sg__value_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.[] + + call-seq: + [](key) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode___getitem__(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","__getitem__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg____getitem__((std::map< int,CdiVariable > const *)arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.[]= + + call-seq: + []=(key, x) + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode___setitem__(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + std::map< int,CdiVariable >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","__setitem__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiVariable, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::mapped_type const &","__setitem__", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiVariable >::mapped_type const &","__setitem__", 3, argv[1])); + } + arg3 = reinterpret_cast< std::map< int,CdiVariable >::mapped_type * >(argp3); + try { + std_map_Sl_int_Sc_CdiVariable_Sg____setitem__(arg1,(int const &)*arg2,(CdiVariable const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_inspect(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.to_a + + call-seq: + to_a -> VALUE + +Convert VarsByCode to an Array. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_to_a(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_to_s(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiVariable_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_VarsByCode__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::map< int,CdiVariable > *)new std::map< int,CdiVariable >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_VarsByCode_allocate(VALUE self) +#else +_wrap_VarsByCode_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_VarsByCode__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< int,CdiVariable > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *ptr = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > const &","map<(int,CdiVariable)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiVariable > const &","map<(int,CdiVariable)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::map< int,CdiVariable > *)new std::map< int,CdiVariable >((std::map< int,CdiVariable > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_VarsByCode(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[1]; + int ii; + + argc = nargs; + if (argc > 1) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_VarsByCode__SWIG_1(nargs, args, self); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__lessT_int_t, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsByCode__SWIG_0(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_VarsByCode__SWIG_2(nargs, args, self); + } + } + +fail: + Ruby_Format_OverloadedError( argc, 1, "VarsByCode.new", + " VarsByCode.new(std::less< int > const &other)\n" + " VarsByCode.new()\n" + " VarsByCode.new(std::map< int,CdiVariable > const &other)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.empty? + + call-seq: + empty? -> bool + +Check if the VarsByCode is empty or not. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_emptyq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (bool)((std::map< int,CdiVariable > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.size + + call-seq: + size -> std::map< int,CdiVariable >::size_type + +Size or Length of the VarsByCode. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_size(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = ((std::map< int,CdiVariable > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_swap(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiVariable > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::map< int,CdiVariable > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.begin + + call-seq: + begin -> std::map< int,CdiVariable >::iterator + +Return an iterator to the beginning of the VarsByCode. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_begin(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiVariable >::iterator(static_cast< const std::map< int,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.end + + call-seq: + end -> std::map< int,CdiVariable >::iterator + +Return an iterator to past the end of the VarsByCode. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_end(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiVariable >::iterator(static_cast< const std::map< int,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.rbegin + + call-seq: + rbegin -> std::map< int,CdiVariable >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the VarsByCode. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_rbegin(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiVariable >::reverse_iterator(static_cast< const std::map< int,CdiVariable >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.rend + + call-seq: + rend -> std::map< int,CdiVariable >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the VarsByCode. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_rend(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiVariable >::reverse_iterator(static_cast< const std::map< int,CdiVariable >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.clear + + call-seq: + clear + +Clear VarsByCode contents. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_clear(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_get_allocator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< std::pair< int const,CdiVariable > > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + result = ((std::map< int,CdiVariable > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiVariable >::allocator_type(static_cast< const std::map< int,CdiVariable >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.erase + + call-seq: + erase(x) -> std::map< int,CdiVariable >::size_type + erase(position) + erase(first, last) + +Delete a portion of the VarsByCode. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiVariable >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","erase", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->erase((std::map< int,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_count(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiVariable >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > const *","count", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","count", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = ((std::map< int,CdiVariable > const *)arg1)->count((std::map< int,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiVariable >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< int,CdiVariable >::iterator * >(argp2)); + } + } + std_map_Sl_int_Sc_CdiVariable_Sg__erase__SWIG_1(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_erase__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::iterator arg2 ; + std::map< int,CdiVariable >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiVariable >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< int,CdiVariable >::iterator * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::iterator","erase", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiVariable >::iterator","erase", 3, argv[1])); + } else { + arg3 = *(reinterpret_cast< std::map< int,CdiVariable >::iterator * >(argp3)); + } + } + std_map_Sl_int_Sc_CdiVariable_Sg__erase__SWIG_2(arg1,arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_VarsByCode_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsByCode_erase__SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_VarsByCode_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_VarsByCode_erase__SWIG_2(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "VarsByCode.erase", + " std::map< int,CdiVariable >::size_type VarsByCode.erase(std::map< int,CdiVariable >::key_type const &x)\n" + " void VarsByCode.erase(std::map< int,CdiVariable >::iterator position)\n" + " void VarsByCode.erase(std::map< int,CdiVariable >::iterator first, std::map< int,CdiVariable >::iterator last)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::VarsByCode.find + + call-seq: + find(x) -> std::map< int,CdiVariable >::iterator + +Find an element in the class. +*/ +SWIGINTERN VALUE +_wrap_VarsByCode_find(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","find", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","find", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->find((std::map< int,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiVariable >::iterator(static_cast< const std::map< int,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_lower_bound(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","lower_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","lower_bound", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->lower_bound((std::map< int,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiVariable >::iterator(static_cast< const std::map< int,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_VarsByCode_upper_bound(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *) 0 ; + std::map< int,CdiVariable >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiVariable >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiVariable > *","upper_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiVariable > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable >::key_type","upper_bound", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiVariable >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->upper_bound((std::map< int,CdiVariable >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiVariable >::iterator(static_cast< const std::map< int,CdiVariable >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN void +free_std_map_Sl_int_Sc_CdiVariable_Sg_(void *self) { + std::map< int,CdiVariable > *arg1 = (std::map< int,CdiVariable > *)self; + delete arg1; +} + +static swig_class SwigClassTaxesMap; + +SWIGINTERN VALUE +_wrap_new_TaxesMap__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::less< int > *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + std::map< int,CdiTaxis > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__lessT_int_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::less< int > const &","map<(int,CdiTaxis)>", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::less< int > const &","map<(int,CdiTaxis)>", 1, argv[0])); + } + arg1 = reinterpret_cast< std::less< int > * >(argp1); + result = (std::map< int,CdiTaxis > *)new std::map< int,CdiTaxis >((std::less< int > const &)*arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.dup + + call-seq: + dup -> TaxesMap + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_dup(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)std_map_Sl_int_Sc_CdiTaxis_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.delete + + call-seq: + delete(key) -> VALUE + +Delete a matching element. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_delete(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","__delete__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","__delete__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg____delete__(arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_has_keyq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > const *","has_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","has_key", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiTaxis_Sg__has_key((std::map< int,CdiTaxis > const *)arg1,(int const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.keys + + call-seq: + keys -> VALUE + +Return an Array of key elements. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_keys(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","keys", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg__keys(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.each + + call-seq: + each -> TaxesMap + +Iterate thru each element in the TaxesMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_each(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)std_map_Sl_int_Sc_CdiTaxis_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.select + + call-seq: + select -> TaxesMap + +Iterate thru each element in the TaxesMap and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_select(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)std_map_Sl_int_Sc_CdiTaxis_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.values_at + + call-seq: + values_at(argc) -> VALUE + +Return an Array of value elements matching the conditions. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_values_at(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","values_at", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg__values_at(arg1,arg2,arg3,arg4); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.each_key + + call-seq: + each_key -> TaxesMap + +Iterate thru each key element in the TaxesMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_each_key(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","each_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)std_map_Sl_int_Sc_CdiTaxis_Sg__each_key(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.values + + call-seq: + values -> VALUE + +Return an Array of value elements. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_values(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","values", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg__values(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.each_value + + call-seq: + each_value -> TaxesMap + +Iterate thru each key element in the TaxesMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_each_value(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","each_value", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)std_map_Sl_int_Sc_CdiTaxis_Sg__each_value(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_entries(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","entries", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg__entries(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_includeq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","__contains__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","__contains__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiTaxis_Sg____contains__(arg1,(int const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_key_iterator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","key_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_int_Sc_CdiTaxis_Sg__key_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_value_iterator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","value_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_int_Sc_CdiTaxis_Sg__value_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.[] + + call-seq: + [](key) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap___getitem__(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","__getitem__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg____getitem__((std::map< int,CdiTaxis > const *)arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.[]= + + call-seq: + []=(key, x) + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap___setitem__(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + std::map< int,CdiTaxis >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","__setitem__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiTaxis, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::mapped_type const &","__setitem__", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiTaxis >::mapped_type const &","__setitem__", 3, argv[1])); + } + arg3 = reinterpret_cast< std::map< int,CdiTaxis >::mapped_type * >(argp3); + try { + std_map_Sl_int_Sc_CdiTaxis_Sg____setitem__(arg1,(int const &)*arg2,(CdiTaxis const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_inspect(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.to_a + + call-seq: + to_a -> VALUE + +Convert TaxesMap to an Array. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_to_a(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_to_s(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiTaxis_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_TaxesMap__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::map< int,CdiTaxis > *)new std::map< int,CdiTaxis >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_TaxesMap_allocate(VALUE self) +#else +_wrap_TaxesMap_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_TaxesMap__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< int,CdiTaxis > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *ptr = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > const &","map<(int,CdiTaxis)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiTaxis > const &","map<(int,CdiTaxis)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::map< int,CdiTaxis > *)new std::map< int,CdiTaxis >((std::map< int,CdiTaxis > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_TaxesMap(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[1]; + int ii; + + argc = nargs; + if (argc > 1) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_TaxesMap__SWIG_1(nargs, args, self); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__lessT_int_t, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_TaxesMap__SWIG_0(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_TaxesMap__SWIG_2(nargs, args, self); + } + } + +fail: + Ruby_Format_OverloadedError( argc, 1, "TaxesMap.new", + " TaxesMap.new(std::less< int > const &other)\n" + " TaxesMap.new()\n" + " TaxesMap.new(std::map< int,CdiTaxis > const &other)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.empty? + + call-seq: + empty? -> bool + +Check if the TaxesMap is empty or not. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_emptyq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (bool)((std::map< int,CdiTaxis > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.size + + call-seq: + size -> std::map< int,CdiTaxis >::size_type + +Size or Length of the TaxesMap. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_size(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = ((std::map< int,CdiTaxis > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_swap(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiTaxis > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.begin + + call-seq: + begin -> std::map< int,CdiTaxis >::iterator + +Return an iterator to the beginning of the TaxesMap. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_begin(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::iterator(static_cast< const std::map< int,CdiTaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.end + + call-seq: + end -> std::map< int,CdiTaxis >::iterator + +Return an iterator to past the end of the TaxesMap. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_end(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::iterator(static_cast< const std::map< int,CdiTaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.rbegin + + call-seq: + rbegin -> std::map< int,CdiTaxis >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the TaxesMap. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_rbegin(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::reverse_iterator(static_cast< const std::map< int,CdiTaxis >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.rend + + call-seq: + rend -> std::map< int,CdiTaxis >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the TaxesMap. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_rend(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::reverse_iterator(static_cast< const std::map< int,CdiTaxis >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.clear + + call-seq: + clear + +Clear TaxesMap contents. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_clear(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_get_allocator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< std::pair< int const,CdiTaxis > > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + result = ((std::map< int,CdiTaxis > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::allocator_type(static_cast< const std::map< int,CdiTaxis >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.erase + + call-seq: + erase(x) -> std::map< int,CdiTaxis >::size_type + erase(position) + erase(first, last) + +Delete a portion of the TaxesMap. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiTaxis >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","erase", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->erase((std::map< int,CdiTaxis >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_count(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiTaxis >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > const *","count", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","count", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = ((std::map< int,CdiTaxis > const *)arg1)->count((std::map< int,CdiTaxis >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiTaxis >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< int,CdiTaxis >::iterator * >(argp2)); + } + } + std_map_Sl_int_Sc_CdiTaxis_Sg__erase__SWIG_1(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_erase__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::iterator arg2 ; + std::map< int,CdiTaxis >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiTaxis >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< int,CdiTaxis >::iterator * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::iterator","erase", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiTaxis >::iterator","erase", 3, argv[1])); + } else { + arg3 = *(reinterpret_cast< std::map< int,CdiTaxis >::iterator * >(argp3)); + } + } + std_map_Sl_int_Sc_CdiTaxis_Sg__erase__SWIG_2(arg1,arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_TaxesMap_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TaxesMap_erase__SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_TaxesMap_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TaxesMap_erase__SWIG_2(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "TaxesMap.erase", + " std::map< int,CdiTaxis >::size_type TaxesMap.erase(std::map< int,CdiTaxis >::key_type const &x)\n" + " void TaxesMap.erase(std::map< int,CdiTaxis >::iterator position)\n" + " void TaxesMap.erase(std::map< int,CdiTaxis >::iterator first, std::map< int,CdiTaxis >::iterator last)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::TaxesMap.find + + call-seq: + find(x) -> std::map< int,CdiTaxis >::iterator + +Find an element in the class. +*/ +SWIGINTERN VALUE +_wrap_TaxesMap_find(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiTaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","find", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","find", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->find((std::map< int,CdiTaxis >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::iterator(static_cast< const std::map< int,CdiTaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_lower_bound(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiTaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","lower_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","lower_bound", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->lower_bound((std::map< int,CdiTaxis >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::iterator(static_cast< const std::map< int,CdiTaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_TaxesMap_upper_bound(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *) 0 ; + std::map< int,CdiTaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiTaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis > *","upper_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiTaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis >::key_type","upper_bound", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiTaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->upper_bound((std::map< int,CdiTaxis >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiTaxis >::iterator(static_cast< const std::map< int,CdiTaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN void +free_std_map_Sl_int_Sc_CdiTaxis_Sg_(void *self) { + std::map< int,CdiTaxis > *arg1 = (std::map< int,CdiTaxis > *)self; + delete arg1; +} + +static swig_class SwigClassZaxesMap; + +SWIGINTERN VALUE +_wrap_new_ZaxesMap__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::less< int > *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + std::map< int,CdiZaxis > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__lessT_int_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::less< int > const &","map<(int,CdiZaxis)>", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::less< int > const &","map<(int,CdiZaxis)>", 1, argv[0])); + } + arg1 = reinterpret_cast< std::less< int > * >(argp1); + result = (std::map< int,CdiZaxis > *)new std::map< int,CdiZaxis >((std::less< int > const &)*arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.dup + + call-seq: + dup -> ZaxesMap + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_dup(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)std_map_Sl_int_Sc_CdiZaxis_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.delete + + call-seq: + delete(key) -> VALUE + +Delete a matching element. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_delete(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","__delete__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","__delete__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg____delete__(arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_has_keyq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > const *","has_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","has_key", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiZaxis_Sg__has_key((std::map< int,CdiZaxis > const *)arg1,(int const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.keys + + call-seq: + keys -> VALUE + +Return an Array of key elements. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_keys(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","keys", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg__keys(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.each + + call-seq: + each -> ZaxesMap + +Iterate thru each element in the ZaxesMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_each(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)std_map_Sl_int_Sc_CdiZaxis_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.select + + call-seq: + select -> ZaxesMap + +Iterate thru each element in the ZaxesMap and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_select(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)std_map_Sl_int_Sc_CdiZaxis_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.values_at + + call-seq: + values_at(argc) -> VALUE + +Return an Array of value elements matching the conditions. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_values_at(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","values_at", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg__values_at(arg1,arg2,arg3,arg4); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.each_key + + call-seq: + each_key -> ZaxesMap + +Iterate thru each key element in the ZaxesMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_each_key(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","each_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)std_map_Sl_int_Sc_CdiZaxis_Sg__each_key(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.values + + call-seq: + values -> VALUE + +Return an Array of value elements. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_values(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","values", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg__values(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.each_value + + call-seq: + each_value -> ZaxesMap + +Iterate thru each key element in the ZaxesMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_each_value(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","each_value", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)std_map_Sl_int_Sc_CdiZaxis_Sg__each_value(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_entries(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","entries", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg__entries(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_includeq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","__contains__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","__contains__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiZaxis_Sg____contains__(arg1,(int const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_key_iterator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","key_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_int_Sc_CdiZaxis_Sg__key_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_value_iterator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","value_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_int_Sc_CdiZaxis_Sg__value_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.[] + + call-seq: + [](key) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap___getitem__(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","__getitem__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg____getitem__((std::map< int,CdiZaxis > const *)arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.[]= + + call-seq: + []=(key, x) + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap___setitem__(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + std::map< int,CdiZaxis >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","__setitem__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiZaxis, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::mapped_type const &","__setitem__", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiZaxis >::mapped_type const &","__setitem__", 3, argv[1])); + } + arg3 = reinterpret_cast< std::map< int,CdiZaxis >::mapped_type * >(argp3); + try { + std_map_Sl_int_Sc_CdiZaxis_Sg____setitem__(arg1,(int const &)*arg2,(CdiZaxis const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_inspect(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.to_a + + call-seq: + to_a -> VALUE + +Convert ZaxesMap to an Array. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_to_a(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_to_s(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiZaxis_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_ZaxesMap__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::map< int,CdiZaxis > *)new std::map< int,CdiZaxis >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ZaxesMap_allocate(VALUE self) +#else +_wrap_ZaxesMap_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ZaxesMap__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< int,CdiZaxis > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *ptr = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > const &","map<(int,CdiZaxis)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiZaxis > const &","map<(int,CdiZaxis)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::map< int,CdiZaxis > *)new std::map< int,CdiZaxis >((std::map< int,CdiZaxis > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_ZaxesMap(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[1]; + int ii; + + argc = nargs; + if (argc > 1) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_ZaxesMap__SWIG_1(nargs, args, self); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__lessT_int_t, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ZaxesMap__SWIG_0(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ZaxesMap__SWIG_2(nargs, args, self); + } + } + +fail: + Ruby_Format_OverloadedError( argc, 1, "ZaxesMap.new", + " ZaxesMap.new(std::less< int > const &other)\n" + " ZaxesMap.new()\n" + " ZaxesMap.new(std::map< int,CdiZaxis > const &other)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.empty? + + call-seq: + empty? -> bool + +Check if the ZaxesMap is empty or not. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_emptyq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (bool)((std::map< int,CdiZaxis > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.size + + call-seq: + size -> std::map< int,CdiZaxis >::size_type + +Size or Length of the ZaxesMap. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_size(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = ((std::map< int,CdiZaxis > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_swap(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiZaxis > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.begin + + call-seq: + begin -> std::map< int,CdiZaxis >::iterator + +Return an iterator to the beginning of the ZaxesMap. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_begin(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::iterator(static_cast< const std::map< int,CdiZaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.end + + call-seq: + end -> std::map< int,CdiZaxis >::iterator + +Return an iterator to past the end of the ZaxesMap. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_end(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::iterator(static_cast< const std::map< int,CdiZaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.rbegin + + call-seq: + rbegin -> std::map< int,CdiZaxis >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the ZaxesMap. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_rbegin(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::reverse_iterator(static_cast< const std::map< int,CdiZaxis >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.rend + + call-seq: + rend -> std::map< int,CdiZaxis >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the ZaxesMap. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_rend(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::reverse_iterator(static_cast< const std::map< int,CdiZaxis >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.clear + + call-seq: + clear + +Clear ZaxesMap contents. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_clear(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_get_allocator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< std::pair< int const,CdiZaxis > > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + result = ((std::map< int,CdiZaxis > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::allocator_type(static_cast< const std::map< int,CdiZaxis >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.erase + + call-seq: + erase(x) -> std::map< int,CdiZaxis >::size_type + erase(position) + erase(first, last) + +Delete a portion of the ZaxesMap. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiZaxis >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","erase", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->erase((std::map< int,CdiZaxis >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_count(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiZaxis >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > const *","count", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","count", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = ((std::map< int,CdiZaxis > const *)arg1)->count((std::map< int,CdiZaxis >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiZaxis >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< int,CdiZaxis >::iterator * >(argp2)); + } + } + std_map_Sl_int_Sc_CdiZaxis_Sg__erase__SWIG_1(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_erase__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::iterator arg2 ; + std::map< int,CdiZaxis >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiZaxis >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< int,CdiZaxis >::iterator * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::iterator","erase", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiZaxis >::iterator","erase", 3, argv[1])); + } else { + arg3 = *(reinterpret_cast< std::map< int,CdiZaxis >::iterator * >(argp3)); + } + } + std_map_Sl_int_Sc_CdiZaxis_Sg__erase__SWIG_2(arg1,arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_ZaxesMap_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ZaxesMap_erase__SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ZaxesMap_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ZaxesMap_erase__SWIG_2(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "ZaxesMap.erase", + " std::map< int,CdiZaxis >::size_type ZaxesMap.erase(std::map< int,CdiZaxis >::key_type const &x)\n" + " void ZaxesMap.erase(std::map< int,CdiZaxis >::iterator position)\n" + " void ZaxesMap.erase(std::map< int,CdiZaxis >::iterator first, std::map< int,CdiZaxis >::iterator last)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::ZaxesMap.find + + call-seq: + find(x) -> std::map< int,CdiZaxis >::iterator + +Find an element in the class. +*/ +SWIGINTERN VALUE +_wrap_ZaxesMap_find(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiZaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","find", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","find", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->find((std::map< int,CdiZaxis >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::iterator(static_cast< const std::map< int,CdiZaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_lower_bound(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiZaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","lower_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","lower_bound", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->lower_bound((std::map< int,CdiZaxis >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::iterator(static_cast< const std::map< int,CdiZaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ZaxesMap_upper_bound(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *) 0 ; + std::map< int,CdiZaxis >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiZaxis >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis > *","upper_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiZaxis > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis >::key_type","upper_bound", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiZaxis >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->upper_bound((std::map< int,CdiZaxis >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiZaxis >::iterator(static_cast< const std::map< int,CdiZaxis >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN void +free_std_map_Sl_int_Sc_CdiZaxis_Sg_(void *self) { + std::map< int,CdiZaxis > *arg1 = (std::map< int,CdiZaxis > *)self; + delete arg1; +} + +static swig_class SwigClassGridsMap; + +SWIGINTERN VALUE +_wrap_new_GridsMap__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::less< int > *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + std::map< int,CdiGrid > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__lessT_int_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::less< int > const &","map<(int,CdiGrid)>", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::less< int > const &","map<(int,CdiGrid)>", 1, argv[0])); + } + arg1 = reinterpret_cast< std::less< int > * >(argp1); + result = (std::map< int,CdiGrid > *)new std::map< int,CdiGrid >((std::less< int > const &)*arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.dup + + call-seq: + dup -> GridsMap + +Create a duplicate of the class and unfreeze it if needed. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_dup(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","dup", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)std_map_Sl_int_Sc_CdiGrid_Sg__dup(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.delete + + call-seq: + delete(key) -> VALUE + +Delete a matching element. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_delete(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","__delete__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","__delete__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg____delete__(arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_has_keyq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > const *","has_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","has_key", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiGrid_Sg__has_key((std::map< int,CdiGrid > const *)arg1,(int const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.keys + + call-seq: + keys -> VALUE + +Return an Array of key elements. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_keys(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","keys", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg__keys(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.each + + call-seq: + each -> GridsMap + +Iterate thru each element in the GridsMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_each(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","each", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)std_map_Sl_int_Sc_CdiGrid_Sg__each(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.select + + call-seq: + select -> GridsMap + +Iterate thru each element in the GridsMap and select those that match a condition. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_select(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","select", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)std_map_Sl_int_Sc_CdiGrid_Sg__select(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.values_at + + call-seq: + values_at(argc) -> VALUE + +Return an Array of value elements matching the conditions. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_values_at(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + int arg2 ; + VALUE *arg3 = (VALUE *) 0 ; + void *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","values_at", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + { + arg2 = argc; + arg3 = argv; + } + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg__values_at(arg1,arg2,arg3,arg4); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.each_key + + call-seq: + each_key -> GridsMap + +Iterate thru each key element in the GridsMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_each_key(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","each_key", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)std_map_Sl_int_Sc_CdiGrid_Sg__each_key(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.values + + call-seq: + values -> VALUE + +Return an Array of value elements. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_values(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","values", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg__values(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.each_value + + call-seq: + each_value -> GridsMap + +Iterate thru each key element in the GridsMap. A block must be provided. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_each_value(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","each_value", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)std_map_Sl_int_Sc_CdiGrid_Sg__each_value(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_entries(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","entries", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg__entries(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_includeq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","__contains__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","__contains__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (bool)std_map_Sl_int_Sc_CdiGrid_Sg____contains__(arg1,(int const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_key_iterator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","key_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_int_Sc_CdiGrid_Sg__key_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_value_iterator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + VALUE *arg2 = (VALUE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::ConstIterator *result = 0 ; + VALUE vresult = Qnil; + + arg2 = &self; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","value_iterator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (swig::ConstIterator *)std_map_Sl_int_Sc_CdiGrid_Sg__value_iterator(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.[] + + call-seq: + [](key) -> VALUE + +Element accessor/slicing. +*/ +SWIGINTERN VALUE +_wrap_GridsMap___getitem__(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > const *","__getitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","__getitem__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg____getitem__((std::map< int,CdiGrid > const *)arg1,(int const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.[]= + + call-seq: + []=(key, x) + +Element setter/slicing. +*/ +SWIGINTERN VALUE +_wrap_GridsMap___setitem__(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + std::map< int,CdiGrid >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","__setitem__", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","__setitem__", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_CdiGrid, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::mapped_type const &","__setitem__", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiGrid >::mapped_type const &","__setitem__", 3, argv[1])); + } + arg3 = reinterpret_cast< std::map< int,CdiGrid >::mapped_type * >(argp3); + try { + std_map_Sl_int_Sc_CdiGrid_Sg____setitem__(arg1,(int const &)*arg2,(CdiGrid const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.inspect + + call-seq: + inspect -> VALUE + +Inspect class and its contents. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_inspect(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","inspect", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg__inspect(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.to_a + + call-seq: + to_a -> VALUE + +Convert GridsMap to an Array. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_to_a(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","to_a", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg__to_a(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.to_s + + call-seq: + to_s -> VALUE + +Convert class to a String representation. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_to_s(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","to_s", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (VALUE)std_map_Sl_int_Sc_CdiGrid_Sg__to_s(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_GridsMap__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (std::map< int,CdiGrid > *)new std::map< int,CdiGrid >(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_GridsMap_allocate(VALUE self) +#else +_wrap_GridsMap_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_GridsMap__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< int,CdiGrid > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *ptr = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)0; + res1 = swig::asptr(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > const &","map<(int,CdiGrid)>", 1, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiGrid > const &","map<(int,CdiGrid)>", 1, argv[0])); + } + arg1 = ptr; + } + result = (std::map< int,CdiGrid > *)new std::map< int,CdiGrid >((std::map< int,CdiGrid > const &)*arg1); + DATA_PTR(self) = result; + if (SWIG_IsNewObj(res1)) delete arg1; + return self; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_GridsMap(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[1]; + int ii; + + argc = nargs; + if (argc > 1) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_GridsMap__SWIG_1(nargs, args, self); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__lessT_int_t, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_GridsMap__SWIG_0(nargs, args, self); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_GridsMap__SWIG_2(nargs, args, self); + } + } + +fail: + Ruby_Format_OverloadedError( argc, 1, "GridsMap.new", + " GridsMap.new(std::less< int > const &other)\n" + " GridsMap.new()\n" + " GridsMap.new(std::map< int,CdiGrid > const &other)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.empty? + + call-seq: + empty? -> bool + +Check if the GridsMap is empty or not. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_emptyq___(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > const *","empty", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (bool)((std::map< int,CdiGrid > const *)arg1)->empty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.size + + call-seq: + size -> std::map< int,CdiGrid >::size_type + +Size or Length of the GridsMap. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_size(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > const *","size", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = ((std::map< int,CdiGrid > const *)arg1)->size(); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_swap(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","swap", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiGrid > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< std::map< int,CdiGrid > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.begin + + call-seq: + begin -> std::map< int,CdiGrid >::iterator + +Return an iterator to the beginning of the GridsMap. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_begin(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","begin", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (arg1)->begin(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiGrid >::iterator(static_cast< const std::map< int,CdiGrid >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.end + + call-seq: + end -> std::map< int,CdiGrid >::iterator + +Return an iterator to past the end of the GridsMap. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_end(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","end", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (arg1)->end(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiGrid >::iterator(static_cast< const std::map< int,CdiGrid >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.rbegin + + call-seq: + rbegin -> std::map< int,CdiGrid >::reverse_iterator + +Return a reverse iterator to the beginning (the end) of the GridsMap. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_rbegin(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","rbegin", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (arg1)->rbegin(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiGrid >::reverse_iterator(static_cast< const std::map< int,CdiGrid >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.rend + + call-seq: + rend -> std::map< int,CdiGrid >::reverse_iterator + +Return a reverse iterator to past the end (past the beginning) of the GridsMap. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_rend(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::reverse_iterator result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","rend", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = (arg1)->rend(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiGrid >::reverse_iterator(static_cast< const std::map< int,CdiGrid >::reverse_iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.clear + + call-seq: + clear + +Clear GridsMap contents. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_clear(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","clear", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + (arg1)->clear(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_get_allocator(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::allocator< std::pair< int const,CdiGrid > > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > const *","get_allocator", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + result = ((std::map< int,CdiGrid > const *)arg1)->get_allocator(); + vresult = SWIG_NewPointerObj((new std::map< int,CdiGrid >::allocator_type(static_cast< const std::map< int,CdiGrid >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.erase + + call-seq: + erase(x) -> std::map< int,CdiGrid >::size_type + erase(position) + erase(first, last) + +Delete a portion of the GridsMap. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_erase__SWIG_0(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiGrid >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","erase", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->erase((std::map< int,CdiGrid >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_count(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiGrid >::size_type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > const *","count", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","count", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = ((std::map< int,CdiGrid > const *)arg1)->count((std::map< int,CdiGrid >::key_type const &)*arg2); + vresult = SWIG_From_size_t(static_cast< size_t >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_erase__SWIG_1(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiGrid >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< int,CdiGrid >::iterator * >(argp2)); + } + } + std_map_Sl_int_Sc_CdiGrid_Sg__erase__SWIG_1(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_erase__SWIG_2(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::iterator arg2 ; + std::map< int,CdiGrid >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","erase", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::iterator","erase", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiGrid >::iterator","erase", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< std::map< int,CdiGrid >::iterator * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::iterator","erase", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::map< int,CdiGrid >::iterator","erase", 3, argv[1])); + } else { + arg3 = *(reinterpret_cast< std::map< int,CdiGrid >::iterator * >(argp3)); + } + } + std_map_Sl_int_Sc_CdiGrid_Sg__erase__SWIG_2(arg1,arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_GridsMap_erase(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_GridsMap_erase__SWIG_1(nargs, args, self); + } + } + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_GridsMap_erase__SWIG_0(nargs, args, self); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_GridsMap_erase__SWIG_2(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 4, "GridsMap.erase", + " std::map< int,CdiGrid >::size_type GridsMap.erase(std::map< int,CdiGrid >::key_type const &x)\n" + " void GridsMap.erase(std::map< int,CdiGrid >::iterator position)\n" + " void GridsMap.erase(std::map< int,CdiGrid >::iterator first, std::map< int,CdiGrid >::iterator last)\n"); + + return Qnil; +} + + +/* + Document-method: Cdi::GridsMap.find + + call-seq: + find(x) -> std::map< int,CdiGrid >::iterator + +Find an element in the class. +*/ +SWIGINTERN VALUE +_wrap_GridsMap_find(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiGrid >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","find", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","find", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->find((std::map< int,CdiGrid >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiGrid >::iterator(static_cast< const std::map< int,CdiGrid >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_lower_bound(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiGrid >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","lower_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","lower_bound", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->lower_bound((std::map< int,CdiGrid >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiGrid >::iterator(static_cast< const std::map< int,CdiGrid >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_GridsMap_upper_bound(int argc, VALUE *argv, VALUE self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *) 0 ; + std::map< int,CdiGrid >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid >::key_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::map< int,CdiGrid >::iterator result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::map< int,CdiGrid > *","upper_bound", 1, self )); + } + arg1 = reinterpret_cast< std::map< int,CdiGrid > * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid >::key_type","upper_bound", 2, argv[0] )); + } + temp2 = static_cast< std::map< int,CdiGrid >::key_type >(val2); + arg2 = &temp2; + result = (arg1)->upper_bound((std::map< int,CdiGrid >::key_type const &)*arg2); + vresult = SWIG_NewPointerObj((new std::map< int,CdiGrid >::iterator(static_cast< const std::map< int,CdiGrid >::iterator& >(result))), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN void +free_std_map_Sl_int_Sc_CdiGrid_Sg_(void *self) { + std::map< int,CdiGrid > *arg1 = (std::map< int,CdiGrid > *)self; + delete arg1; +} + +static swig_class SwigClassCdiGrid; + +SWIGINTERN VALUE +_wrap_new_CdiGrid__SWIG_0(int argc, VALUE *argv, VALUE self) { + CdiGrid *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (CdiGrid *)new CdiGrid(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_CdiGrid_allocate(VALUE self) +#else +_wrap_CdiGrid_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_CdiGrid); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_CdiGrid__SWIG_1(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + CdiGrid *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","CdiGrid", 1, argv[0] )); + } + arg1 = static_cast< int >(val1); + result = (CdiGrid *)new CdiGrid(arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_CdiGrid(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[1]; + int ii; + + argc = nargs; + if (argc > 1) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_CdiGrid__SWIG_0(nargs, args, self); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CdiGrid__SWIG_1(nargs, args, self); + } + } + +fail: + Ruby_Format_OverloadedError( argc, 1, "CdiGrid.new", + " CdiGrid.new()\n" + " CdiGrid.new(int gridid)\n"); + + return Qnil; +} + + +SWIGINTERN void +free_CdiGrid(void *self) { + CdiGrid *arg1 = (CdiGrid *)self; + delete arg1; +} + +SWIGINTERN VALUE +_wrap_CdiGrid_gridID_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","gridID", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","gridID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->gridID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_gridID_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","gridID", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->gridID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_type_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","type", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","type", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->type = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_type_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","type", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->type); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::CdiGrid.size + + call-seq: + size -> int + +Size or Length of the CdiGrid. +*/ +/* + Document-method: Cdi::CdiGrid.size= + + call-seq: + size=(x) -> int + +Size or Length of the CdiGrid. +*/ +SWIGINTERN VALUE +_wrap_CdiGrid_size_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","size", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","size", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->size = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_size_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","size", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->size); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xsize_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xsize", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","xsize", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->xsize = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xsize_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xsize", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->xsize); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ysize_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ysize", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","ysize", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ysize = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ysize_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ysize", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->ysize); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_prec_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","prec", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","prec", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->prec = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_prec_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","prec", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->prec); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ncorner_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ncorner", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","ncorner", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ncorner = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ncorner_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ncorner", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (int) ((arg1)->ncorner); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_hasXValues_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","hasXValues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","hasXValues", 2, argv[0] )); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->hasXValues = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_hasXValues_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","hasXValues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (bool) ((arg1)->hasXValues); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_hasYValues_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","hasYValues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","hasYValues", 2, argv[0] )); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->hasYValues = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_hasYValues_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","hasYValues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (bool) ((arg1)->hasYValues); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_hasBounds_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","hasBounds", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","hasBounds", 2, argv[0] )); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->hasBounds = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_hasBounds_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","hasBounds", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (bool) ((arg1)->hasBounds); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xvalues_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xvalues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","xvalues", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->xvalues = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xvalues_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xvalues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->xvalues); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_yvalues_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","yvalues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","yvalues", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->yvalues = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_yvalues_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","yvalues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->yvalues); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xbounds_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xbounds", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","xbounds", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->xbounds = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xbounds_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xbounds", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->xbounds); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ybounds_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ybounds", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","ybounds", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->ybounds = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ybounds_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ybounds", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->ybounds); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xname_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","xname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","xname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->xname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xname_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->xname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xlongname_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xlongname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","xlongname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","xlongname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->xlongname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xlongname_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xlongname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->xlongname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xstdname_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xstdname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","xstdname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","xstdname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->xstdname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xstdname_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xstdname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->xstdname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xunits_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xunits", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","xunits", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","xunits", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->xunits = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_xunits_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","xunits", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->xunits); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_yname_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","yname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","yname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","yname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->yname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_yname_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","yname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->yname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ylongname_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ylongname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","ylongname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","ylongname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->ylongname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ylongname_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ylongname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->ylongname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ystdname_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ystdname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","ystdname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","ystdname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->ystdname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_ystdname_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","ystdname", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->ystdname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_yunits_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","yunits", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","yunits", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","yunits", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->yunits = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_yunits_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","yunits", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->yunits); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_name_set(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","name", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","name", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","name", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_name_get(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","name", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + result = (std::string *) & ((arg1)->name); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_getValues(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","getValues", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + (arg1)->getValues(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_getBounds(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","getBounds", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + (arg1)->getBounds(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_getValuesAsPointer(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","getValuesAsPointer", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","getValuesAsPointer", 2, argv[0] )); + } + arg2 = reinterpret_cast< double * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "double *","getValuesAsPointer", 3, argv[1] )); + } + arg3 = reinterpret_cast< double * >(argp3); + (arg1)->getValuesAsPointer(arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_getBoundsAsPointer(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","getBoundsAsPointer", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","getBoundsAsPointer", 2, argv[0] )); + } + arg2 = reinterpret_cast< double * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "double *","getBoundsAsPointer", 3, argv[1] )); + } + arg3 = reinterpret_cast< double * >(argp3); + (arg1)->getBoundsAsPointer(arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_getFloatVals(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + float *arg2 = (float *) 0 ; + float *arg3 = (float *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","getFloatVals", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "float *","getFloatVals", 2, argv[0] )); + } + arg2 = reinterpret_cast< float * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "float *","getFloatVals", 3, argv[1] )); + } + arg3 = reinterpret_cast< float * >(argp3); + (arg1)->getFloatVals(arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiGrid_getFloatBounds(int argc, VALUE *argv, VALUE self) { + CdiGrid *arg1 = (CdiGrid *) 0 ; + float *arg2 = (float *) 0 ; + float *arg3 = (float *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiGrid *","getFloatBounds", 1, self )); + } + arg1 = reinterpret_cast< CdiGrid * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "float *","getFloatBounds", 2, argv[0] )); + } + arg2 = reinterpret_cast< float * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "float *","getFloatBounds", 3, argv[1] )); + } + arg3 = reinterpret_cast< float * >(argp3); + (arg1)->getFloatBounds(arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +static swig_class SwigClassCdiTaxis; + +SWIGINTERN VALUE +_wrap_new_CdiTaxis__SWIG_0(int argc, VALUE *argv, VALUE self) { + CdiTaxis *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (CdiTaxis *)new CdiTaxis(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_CdiTaxis_allocate(VALUE self) +#else +_wrap_CdiTaxis_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_CdiTaxis); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_CdiTaxis__SWIG_1(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + CdiTaxis *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","CdiTaxis", 1, argv[0] )); + } + arg1 = static_cast< int >(val1); + result = (CdiTaxis *)new CdiTaxis(arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_CdiTaxis(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[1]; + int ii; + + argc = nargs; + if (argc > 1) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_CdiTaxis__SWIG_0(nargs, args, self); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CdiTaxis__SWIG_1(nargs, args, self); + } + } + +fail: + Ruby_Format_OverloadedError( argc, 1, "CdiTaxis.new", + " CdiTaxis.new()\n" + " CdiTaxis.new(int vlistID)\n"); + + return Qnil; +} + + +SWIGINTERN void +free_CdiTaxis(void *self) { + CdiTaxis *arg1 = (CdiTaxis *)self; + delete arg1; +} + +SWIGINTERN VALUE +_wrap_CdiTaxis_taxisID_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","taxisID", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","taxisID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->taxisID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_taxisID_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","taxisID", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->taxisID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_ntsteps_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","ntsteps", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","ntsteps", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ntsteps = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_ntsteps_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","ntsteps", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->ntsteps); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_unit_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","unit", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","unit", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->unit = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_unit_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","unit", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->unit); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_rdate_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","rdate", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","rdate", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->rdate = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_rdate_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","rdate", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->rdate); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_rtime_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","rtime", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","rtime", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->rtime = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_rtime_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","rtime", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->rtime); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_vdate_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","vdate", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","vdate", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->vdate = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_vdate_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","vdate", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->vdate); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_vtime_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","vtime", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","vtime", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->vtime = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_vtime_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","vtime", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->vtime); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_type_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","type", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","type", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->type = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_type_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","type", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->type); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_calendar_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","calendar", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","calendar", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->calendar = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_calendar_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","calendar", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->calendar); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_hasBounds_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","hasBounds", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","hasBounds", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->hasBounds = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_hasBounds_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","hasBounds", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (int) ((arg1)->hasBounds); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_name_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + char *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + char temp2[CDI_MAX_NAME] ; + int res2 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","name", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + res2 = SWIG_AsCharArray(argv[0], temp2, CDI_MAX_NAME); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [CDI_MAX_NAME]","name", 2, argv[0] )); + } + arg2 = reinterpret_cast< char * >(temp2); + if (arg2) memcpy(arg1->name,arg2,CDI_MAX_NAME*sizeof(char)); + else memset(arg1->name,0,CDI_MAX_NAME*sizeof(char)); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_name_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","name", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (char *)(char *) ((arg1)->name); + { + size_t size = SWIG_strnlen(result, CDI_MAX_NAME); + + + + vresult = SWIG_FromCharPtrAndSize(result, size); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_unitname_set(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","unitname", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","unitname", 2, argv[0] )); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(reinterpret_cast< const char * >(arg2))) + 1; + arg1->unitname = (char const *)reinterpret_cast< char* >(memcpy(new char[size], arg2, sizeof(char)*(size))); + } else { + arg1->unitname = 0; + } + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiTaxis_unitname_get(int argc, VALUE *argv, VALUE self) { + CdiTaxis *arg1 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","unitname", 1, self )); + } + arg1 = reinterpret_cast< CdiTaxis * >(argp1); + result = (char *) ((arg1)->unitname); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +static swig_class SwigClassCdiZaxis; + +SWIGINTERN VALUE +_wrap_new_CdiZaxis__SWIG_0(int argc, VALUE *argv, VALUE self) { + CdiZaxis *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (CdiZaxis *)new CdiZaxis(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_CdiZaxis_allocate(VALUE self) +#else +_wrap_CdiZaxis_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_CdiZaxis); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_CdiZaxis__SWIG_1(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + CdiZaxis *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","CdiZaxis", 1, argv[0] )); + } + arg1 = static_cast< int >(val1); + result = (CdiZaxis *)new CdiZaxis(arg1); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_CdiZaxis(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[1]; + int ii; + + argc = nargs; + if (argc > 1) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_CdiZaxis__SWIG_0(nargs, args, self); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CdiZaxis__SWIG_1(nargs, args, self); + } + } + +fail: + Ruby_Format_OverloadedError( argc, 1, "CdiZaxis.new", + " CdiZaxis.new()\n" + " CdiZaxis.new(int zaxisid)\n"); + + return Qnil; +} + + +SWIGINTERN void +free_CdiZaxis(void *self) { + CdiZaxis *arg1 = (CdiZaxis *)self; + delete arg1; +} + +SWIGINTERN VALUE +_wrap_CdiZaxis_zaxisID_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","zaxisID", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","zaxisID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->zaxisID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_zaxisID_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","zaxisID", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->zaxisID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_type_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","type", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","type", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->type = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_type_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","type", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->type); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_ltype_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","ltype", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","ltype", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ltype = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_ltype_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","ltype", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->ltype); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::CdiZaxis.size + + call-seq: + size -> int + +Size or Length of the CdiZaxis. +*/ +/* + Document-method: Cdi::CdiZaxis.size= + + call-seq: + size=(x) -> int + +Size or Length of the CdiZaxis. +*/ +SWIGINTERN VALUE +_wrap_CdiZaxis_size_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","size", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","size", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->size = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_size_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","size", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->size); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_prec_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","prec", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","prec", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->prec = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_prec_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","prec", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (int) ((arg1)->prec); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_plevels_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","plevels", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","plevels", 2, argv[0] )); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->plevels = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_plevels_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","plevels", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (double *) ((arg1)->plevels); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_plbounds_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","plbounds", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","plbounds", 2, argv[0] )); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->plbounds = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_plbounds_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","plbounds", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (double *) ((arg1)->plbounds); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_pubounds_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","pubounds", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","pubounds", 2, argv[0] )); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->pubounds = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_pubounds_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","pubounds", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (double *) ((arg1)->pubounds); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_pweights_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","pweights", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","pweights", 2, argv[0] )); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->pweights = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_pweights_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","pweights", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (double *) ((arg1)->pweights); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_levels_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","levels", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","levels", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->levels = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_levels_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","levels", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->levels); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_lbounds_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","lbounds", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","lbounds", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->lbounds = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_lbounds_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","lbounds", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->lbounds); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_ubounds_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","ubounds", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","ubounds", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->ubounds = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_ubounds_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","ubounds", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->ubounds); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_weights_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","weights", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","weights", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->weights = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_weights_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","weights", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->weights); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_name_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","name", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","name", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","name", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_name_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","name", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::string *) & ((arg1)->name); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_longname_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","longname", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","longname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","longname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->longname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_longname_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","longname", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::string *) & ((arg1)->longname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_units_set(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","units", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","units", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","units", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->units = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiZaxis_units_get(int argc, VALUE *argv, VALUE self) { + CdiZaxis *arg1 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiZaxis *","units", 1, self )); + } + arg1 = reinterpret_cast< CdiZaxis * >(argp1); + result = (std::string *) & ((arg1)->units); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +static swig_class SwigClassCdiVariable; + +SWIGINTERN VALUE +_wrap_new_CdiVariable__SWIG_0(int argc, VALUE *argv, VALUE self) { + CdiVariable *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (CdiVariable *)new CdiVariable(); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_CdiVariable_allocate(VALUE self) +#else +_wrap_CdiVariable_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_CdiVariable); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_CdiVariable__SWIG_1(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int arg2 ; + int arg3 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + CdiVariable *result = 0 ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","CdiVariable", 1, argv[0] )); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","CdiVariable", 2, argv[1] )); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","CdiVariable", 3, argv[2] )); + } + arg3 = static_cast< int >(val3); + result = (CdiVariable *)new CdiVariable(arg1,arg2,arg3); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_new_CdiVariable(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs; + if (argc > 3) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; + } + if (argc == 0) { + return _wrap_new_CdiVariable__SWIG_0(nargs, args, self); + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CdiVariable__SWIG_1(nargs, args, self); + } + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "CdiVariable.new", + " CdiVariable.new()\n" + " CdiVariable.new(int streamid, int vlistid, int varid)\n"); + + return Qnil; +} + + +SWIGINTERN void +free_CdiVariable(void *self) { + CdiVariable *arg1 = (CdiVariable *)self; + delete arg1; +} + +SWIGINTERN VALUE +_wrap_CdiVariable_varID_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","varID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","varID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->varID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_varID_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","varID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->varID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_zaxisID_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","zaxisID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","zaxisID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->zaxisID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_zaxisID_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","zaxisID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->zaxisID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_gridID_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","gridID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","gridID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->gridID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_gridID_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","gridID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->gridID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_taxisID_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","taxisID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","taxisID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->taxisID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_taxisID_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","taxisID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->taxisID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_timeID_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","timeID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","timeID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->timeID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_timeID_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","timeID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->timeID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_vlistID_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","vlistID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","vlistID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->vlistID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_vlistID_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","vlistID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->vlistID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::CdiVariable.size + + call-seq: + size -> int + +Size or Length of the CdiVariable. +*/ +/* + Document-method: Cdi::CdiVariable.size= + + call-seq: + size=(x) -> int + +Size or Length of the CdiVariable. +*/ +SWIGINTERN VALUE +_wrap_CdiVariable_size_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","size", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","size", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->size = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_size_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","size", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->size); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_code_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","code", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","code", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->code = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_code_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","code", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->code); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_datatype_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","datatype", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","datatype", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->datatype = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_datatype_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","datatype", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->datatype); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_streamID_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","streamID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","streamID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->streamID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_streamID_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","streamID", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (int) ((arg1)->streamID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_name_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","name", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","name", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","name", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_name_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","name", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::string *) & ((arg1)->name); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_longname_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","longname", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","longname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","longname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->longname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_longname_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","longname", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::string *) & ((arg1)->longname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_units_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","units", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","units", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","units", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->units = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_units_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","units", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::string *) & ((arg1)->units); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_stdname_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","stdname", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(argv[0], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","stdname", 2, argv[0] )); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","stdname", 2, argv[0])); + } + arg2 = ptr; + } + if (arg1) (arg1)->stdname = *arg2; + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_stdname_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","stdname", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::string *) & ((arg1)->stdname); + vresult = SWIG_From_std_string(static_cast< std::string >(*result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_missval_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","missval", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_double(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","missval", 2, argv[0] )); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->missval = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_missval_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","missval", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (double) ((arg1)->missval); + vresult = SWIG_From_double(static_cast< double >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Cdi::CdiVariable.values + + call-seq: + values -> DoubleVector + +Return an Array of value elements. +*/ +/* + Document-method: Cdi::CdiVariable.values= + + call-seq: + values=(x) -> DoubleVector + +Return an Array of value elements. +*/ +SWIGINTERN VALUE +_wrap_CdiVariable_values_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","values", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< double,std::allocator< double > > *","values", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2); + if (arg1) (arg1)->values = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_values_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","values", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::vector< double,std::allocator< double > > *)& ((arg1)->values); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_valuesWithLevel_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg2 = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","valuesWithLevel", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *","valuesWithLevel", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > * >(argp2); + if (arg1) (arg1)->valuesWithLevel = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_valuesWithLevel_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","valuesWithLevel", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)& ((arg1)->valuesWithLevel); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_grid_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + CdiGrid *arg2 = (CdiGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","grid", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CdiGrid, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CdiGrid *","grid", 2, argv[0] )); + } + arg2 = reinterpret_cast< CdiGrid * >(argp2); + if (arg1) (arg1)->grid = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_grid_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + CdiGrid *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","grid", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (CdiGrid *)& ((arg1)->grid); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiGrid, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_zaxis_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + CdiZaxis *arg2 = (CdiZaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","zaxis", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CdiZaxis, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CdiZaxis *","zaxis", 2, argv[0] )); + } + arg2 = reinterpret_cast< CdiZaxis * >(argp2); + if (arg1) (arg1)->zaxis = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_zaxis_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + CdiZaxis *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","zaxis", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (CdiZaxis *)& ((arg1)->zaxis); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiZaxis, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_taxis_set(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + CdiTaxis *arg2 = (CdiTaxis *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","taxis", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CdiTaxis, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CdiTaxis *","taxis", 2, argv[0] )); + } + arg2 = reinterpret_cast< CdiTaxis * >(argp2); + if (arg1) (arg1)->taxis = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_taxis_get(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + CdiTaxis *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","taxis", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (CdiTaxis *)& ((arg1)->taxis); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdiTaxis, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_sinfo(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","sinfo", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + (arg1)->sinfo(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getValues(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getValues", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + (arg1)->getValues(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getValuesWithLevel__SWIG_0(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getValuesWithLevel", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","getValuesWithLevel", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + (arg1)->getValuesWithLevel(arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getValuesWithLevel__SWIG_1(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getValuesWithLevel", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + (arg1)->getValuesWithLevel(); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_CdiVariable_getValuesWithLevel(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CdiVariable_getValuesWithLevel__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CdiVariable_getValuesWithLevel__SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "CdiVariable.getValuesWithLevel", + " void CdiVariable.getValuesWithLevel(int tsID)\n" + " void CdiVariable.getValuesWithLevel()\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getFValues(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::vector< float,std::allocator< float > > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getFValues", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (arg1)->getFValues(); + vresult = SWIG_NewPointerObj((new std::vector< float,std::allocator< float > >(static_cast< const std::vector< float,std::allocator< float > >& >(result))), SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getFValuesWithLevel__SWIG_0(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + SwigValueWrapper< std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > > > result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getFValuesWithLevel", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","getFValuesWithLevel", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + result = (arg1)->getFValuesWithLevel(arg2); + vresult = SWIG_NewPointerObj((new std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > >(static_cast< const std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > >& >(result))), SWIGTYPE_p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getFValuesWithLevel__SWIG_1(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > > > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getFValuesWithLevel", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (arg1)->getFValuesWithLevel(); + vresult = SWIG_NewPointerObj((new std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > >(static_cast< const std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > >& >(result))), SWIGTYPE_p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_CdiVariable_getFValuesWithLevel(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CdiVariable_getFValuesWithLevel__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CdiVariable_getFValuesWithLevel__SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "CdiVariable.getFValuesWithLevel", + " std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > > CdiVariable.getFValuesWithLevel(int tsID)\n" + " std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > > CdiVariable.getFValuesWithLevel()\n"); + + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getValuesAsPointer(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getValuesAsPointer", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (double *)(arg1)->getValuesAsPointer(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getValuesWithLevelAsPointer__SWIG_0(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double **result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getValuesWithLevelAsPointer", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","getValuesWithLevelAsPointer", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + result = (double **)(arg1)->getValuesWithLevelAsPointer(arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_CdiVariable_getValuesWithLevelAsPointer__SWIG_1(int argc, VALUE *argv, VALUE self) { + CdiVariable *arg1 = (CdiVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double **result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","getValuesWithLevelAsPointer", 1, self )); + } + arg1 = reinterpret_cast< CdiVariable * >(argp1); + result = (double **)(arg1)->getValuesWithLevelAsPointer(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_CdiVariable_getValuesWithLevelAsPointer(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CdiVariable_getValuesWithLevelAsPointer__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CdiVariable, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CdiVariable_getValuesWithLevelAsPointer__SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "CdiVariable.getValuesWithLevelAsPointer", + " double CdiVariable.getValuesWithLevelAsPointer(int tsID)\n" + " double ** CdiVariable.getValuesWithLevelAsPointer()\n"); + + return Qnil; +} + + +static swig_class SwigClassCdi; + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_Cdi_allocate(VALUE self) +#else +_wrap_Cdi_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Cdi); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_Cdi(int argc, VALUE *argv, VALUE self) { + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + Cdi *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Cdi", 1, argv[0] )); + } + arg1 = reinterpret_cast< char * >(buf1); + result = (Cdi *)new Cdi((char const *)arg1); + DATA_PTR(self) = result; + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return self; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return Qnil; +} + + +SWIGINTERN void +free_Cdi(void *self) { + Cdi *arg1 = (Cdi *)self; + delete arg1; +} + +SWIGINTERN VALUE +_wrap_Cdi_streamID_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","streamID", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","streamID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->streamID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_streamID_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","streamID", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->streamID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_vlistID_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","vlistID", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","vlistID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->vlistID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_vlistID_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","vlistID", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->vlistID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_nvars_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","nvars", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","nvars", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->nvars = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_nvars_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","nvars", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->nvars); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_nzaxes_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","nzaxes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","nzaxes", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->nzaxes = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_nzaxes_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","nzaxes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->nzaxes); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_ngrids_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","ngrids", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","ngrids", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ngrids = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_ngrids_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","ngrids", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->ngrids); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_ntaxes_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","ntaxes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","ntaxes", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ntaxes = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_ntaxes_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","ntaxes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->ntaxes); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_taxisID_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","taxisID", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","taxisID", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->taxisID = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_taxisID_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","taxisID", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (int) ((arg1)->taxisID); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_varnames_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + std::vector< std::string,std::allocator< std::string > > *arg2 = (std::vector< std::string,std::allocator< std::string > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","varnames", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::string,std::allocator< std::string > > *","varnames", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< std::string,std::allocator< std::string > > * >(argp2); + if (arg1) (arg1)->varnames = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_varnames_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::string,std::allocator< std::string > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","varnames", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::vector< std::string,std::allocator< std::string > > *)& ((arg1)->varnames); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_codes_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + std::vector< int,std::allocator< int > > *arg2 = (std::vector< int,std::allocator< int > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","codes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< int,std::allocator< int > > *","codes", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< int,std::allocator< int > > * >(argp2); + if (arg1) (arg1)->codes = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_codes_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","codes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::vector< int,std::allocator< int > > *)& ((arg1)->codes); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_variables_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *arg2 = (std::vector< CdiVariable,std::allocator< CdiVariable > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","variables", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< CdiVariable,std::allocator< CdiVariable > > *","variables", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::vector< CdiVariable,std::allocator< CdiVariable > > * >(argp2); + if (arg1) (arg1)->variables = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_variables_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< CdiVariable,std::allocator< CdiVariable > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","variables", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::vector< CdiVariable,std::allocator< CdiVariable > > *)& ((arg1)->variables); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_var_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *arg2 = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","var", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *","var", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > * >(argp2); + if (arg1) (arg1)->var = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_var_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","var", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *)& ((arg1)->var); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_varByCode_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *arg2 = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","varByCode", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *","varByCode", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > * >(argp2); + if (arg1) (arg1)->varByCode = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_varByCode_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","varByCode", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *)& ((arg1)->varByCode); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_taxes_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *arg2 = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","taxes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *","taxes", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > * >(argp2); + if (arg1) (arg1)->taxes = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_taxes_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","taxes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *)& ((arg1)->taxes); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_zaxes_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *arg2 = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","zaxes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *","zaxes", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > * >(argp2); + if (arg1) (arg1)->zaxes = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_zaxes_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","zaxes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *)& ((arg1)->zaxes); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_grids_set(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *arg2 = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","grids", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *","grids", 2, argv[0] )); + } + arg2 = reinterpret_cast< std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > * >(argp2); + if (arg1) (arg1)->grids = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_grids_get(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","grids", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + result = (std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *)& ((arg1)->grids); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Cdi_griddes(int argc, VALUE *argv, VALUE self) { + Cdi *arg1 = (Cdi *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Cdi, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cdi *","griddes", 1, self )); + } + arg1 = reinterpret_cast< Cdi * >(argp1); + (arg1)->griddes(); + return Qnil; +fail: + return Qnil; +} + + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_swig__IteratorTo_p_swig__ConstIterator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((swig::ConstIterator *) ((swig::Iterator *) x)); +} +static swig_type_info _swigt__p_Cdi = {"_p_Cdi", "Cdi *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CdiGrid = {"_p_CdiGrid", "std::map< int,CdiGrid >::mapped_type *|CdiGrid *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CdiTaxis = {"_p_CdiTaxis", "std::map< int,CdiTaxis >::mapped_type *|CdiTaxis *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CdiVariable = {"_p_CdiVariable", "std::map< std::string,CdiVariable >::mapped_type *|std::vector< CdiVariable >::value_type *|std::map< int,CdiVariable >::mapped_type *|CdiVariable *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CdiZaxis = {"_p_CdiZaxis", "std::map< int,CdiZaxis >::mapped_type *|CdiZaxis *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_mapped_type = {"_p_mapped_type", "mapped_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **|VALUE *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_CdiVariable_t = {"_p_std__allocatorT_CdiVariable_t", "std::vector< CdiVariable >::allocator_type *|std::allocator< CdiVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_double_t = {"_p_std__allocatorT_double_t", "std::vector< double >::allocator_type *|std::allocator< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_int_t = {"_p_std__allocatorT_int_t", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t = {"_p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t", "std::map< int,CdiGrid >::allocator_type *|std::allocator< std::pair< int const,CdiGrid > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t = {"_p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t", "std::map< int,CdiTaxis >::allocator_type *|std::allocator< std::pair< int const,CdiTaxis > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t = {"_p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t", "std::map< int,CdiVariable >::allocator_type *|std::allocator< std::pair< int const,CdiVariable > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t = {"_p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t", "std::map< int,CdiZaxis >::allocator_type *|std::allocator< std::pair< int const,CdiZaxis > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t = {"_p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t", "std::allocator< std::pair< std::string const,CdiVariable > > *|std::map< std::string,CdiVariable >::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__string_t = {"_p_std__allocatorT_std__string_t", "std::vector< std::string >::allocator_type *|std::allocator< std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t = {"_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t", "std::vector< std::vector< double > >::allocator_type *|std::allocator< std::vector< double,std::allocator< double > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__lessT_int_t = {"_p_std__lessT_int_t", "std::less< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__lessT_std__string_t = {"_p_std__lessT_std__string_t", "std::less< std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t = {"_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t", "std::map< int,CdiGrid > *|std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator = {"_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator", "std::map< int,CdiGrid >::iterator *|std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator = {"_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator", "std::map< int,CdiGrid >::reverse_iterator *|std::map< int,CdiGrid,std::less< int >,std::allocator< std::pair< int const,CdiGrid > > >::reverse_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t = {"_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t", "std::map< int,CdiTaxis > *|std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator = {"_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator", "std::map< int,CdiTaxis >::iterator *|std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator = {"_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator", "std::map< int,CdiTaxis >::reverse_iterator *|std::map< int,CdiTaxis,std::less< int >,std::allocator< std::pair< int const,CdiTaxis > > >::reverse_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t = {"_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t", "std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > > *|std::map< int,CdiVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator = {"_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator", "std::map< int,CdiVariable >::iterator *|std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator = {"_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator", "std::map< int,CdiVariable >::reverse_iterator *|std::map< int,CdiVariable,std::less< int >,std::allocator< std::pair< int const,CdiVariable > > >::reverse_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t = {"_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t", "std::map< int,CdiZaxis > *|std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator = {"_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator", "std::map< int,CdiZaxis >::iterator *|std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator = {"_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator", "std::map< int,CdiZaxis >::reverse_iterator *|std::map< int,CdiZaxis,std::less< int >,std::allocator< std::pair< int const,CdiZaxis > > >::reverse_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t = {"_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t", "std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > > *|std::map< std::string,CdiVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator = {"_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator", "std::map< std::string,CdiVariable >::iterator *|std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator = {"_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator", "std::map< std::string,CdiVariable >::reverse_iterator *|std::map< std::string,CdiVariable,std::less< std::string >,std::allocator< std::pair< std::string const,CdiVariable > > >::reverse_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t = {"_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t", "std::vector< CdiVariable,std::allocator< CdiVariable > > *|std::vector< CdiVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_double_std__allocatorT_double_t_t = {"_p_std__vectorT_double_std__allocatorT_double_t_t", "std::vector< double,std::allocator< double > > *|std::vector< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_float_std__allocatorT_float_t_t = {"_p_std__vectorT_float_std__allocatorT_float_t_t", "std::vector< float,std::allocator< float > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t = {"_p_std__vectorT_std__string_std__allocatorT_std__string_t_t", "std::vector< std::string,std::allocator< std::string > > *|std::vector< std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t = {"_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t", "std::vector< std::vector< double > > *|std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *|std::vector< std::vector< double,std::allocator< double > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t = {"_p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t", "std::vector< std::vector< float,std::allocator< float > >,std::allocator< std::vector< float,std::allocator< float > > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_swig__ConstIterator = {"_p_swig__ConstIterator", "swig::ConstIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_swig__GC_VALUE = {"_p_swig__GC_VALUE", "swig::GC_VALUE *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_swig__Iterator = {"_p_swig__Iterator", "swig::Iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "VALUE|void *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_Cdi, + &_swigt__p_CdiGrid, + &_swigt__p_CdiTaxis, + &_swigt__p_CdiVariable, + &_swigt__p_CdiZaxis, + &_swigt__p_allocator_type, + &_swigt__p_char, + &_swigt__p_difference_type, + &_swigt__p_double, + &_swigt__p_float, + &_swigt__p_key_type, + &_swigt__p_mapped_type, + &_swigt__p_p_double, + &_swigt__p_p_void, + &_swigt__p_size_type, + &_swigt__p_std__allocatorT_CdiVariable_t, + &_swigt__p_std__allocatorT_double_t, + &_swigt__p_std__allocatorT_int_t, + &_swigt__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t, + &_swigt__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t, + &_swigt__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t, + &_swigt__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t, + &_swigt__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t, + &_swigt__p_std__allocatorT_std__string_t, + &_swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, + &_swigt__p_std__lessT_int_t, + &_swigt__p_std__lessT_std__string_t, + &_swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, + &_swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, + &_swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator, + &_swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, + &_swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, + &_swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator, + &_swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, + &_swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, + &_swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator, + &_swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, + &_swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, + &_swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator, + &_swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, + &_swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, + &_swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator, + &_swigt__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, + &_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, + &_swigt__p_std__vectorT_float_std__allocatorT_float_t_t, + &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, + &_swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, + &_swigt__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, + &_swigt__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, + &_swigt__p_swig__ConstIterator, + &_swigt__p_swig__GC_VALUE, + &_swigt__p_swig__Iterator, + &_swigt__p_value_type, + &_swigt__p_void, +}; + +static swig_cast_info _swigc__p_Cdi[] = { {&_swigt__p_Cdi, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CdiGrid[] = { {&_swigt__p_CdiGrid, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CdiTaxis[] = { {&_swigt__p_CdiTaxis, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CdiVariable[] = { {&_swigt__p_CdiVariable, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CdiZaxis[] = { {&_swigt__p_CdiZaxis, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_key_type[] = { {&_swigt__p_key_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_mapped_type[] = { {&_swigt__p_mapped_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_CdiVariable_t[] = { {&_swigt__p_std__allocatorT_CdiVariable_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_double_t[] = { {&_swigt__p_std__allocatorT_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_int_t[] = { {&_swigt__p_std__allocatorT_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__string_t[] = { {&_swigt__p_std__allocatorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t[] = { {&_swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__lessT_int_t[] = { {&_swigt__p_std__lessT_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__lessT_std__string_t[] = { {&_swigt__p_std__lessT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t[] = { {&_swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator[] = { {&_swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator[] = { {&_swigt__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t[] = { {&_swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator[] = { {&_swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator[] = { {&_swigt__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t[] = { {&_swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator[] = { {&_swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator[] = { {&_swigt__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t[] = { {&_swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator[] = { {&_swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator[] = { {&_swigt__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t[] = { {&_swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator[] = { {&_swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator[] = { {&_swigt__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t[] = { {&_swigt__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_double_std__allocatorT_double_t_t[] = { {&_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_float_std__allocatorT_float_t_t[] = { {&_swigt__p_std__vectorT_float_std__allocatorT_float_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__string_std__allocatorT_std__string_t_t[] = { {&_swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swig__ConstIterator[] = { {&_swigt__p_swig__ConstIterator, 0, 0, 0}, {&_swigt__p_swig__Iterator, _p_swig__IteratorTo_p_swig__ConstIterator, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swig__GC_VALUE[] = { {&_swigt__p_swig__GC_VALUE, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swig__Iterator[] = { {&_swigt__p_swig__Iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_Cdi, + _swigc__p_CdiGrid, + _swigc__p_CdiTaxis, + _swigc__p_CdiVariable, + _swigc__p_CdiZaxis, + _swigc__p_allocator_type, + _swigc__p_char, + _swigc__p_difference_type, + _swigc__p_double, + _swigc__p_float, + _swigc__p_key_type, + _swigc__p_mapped_type, + _swigc__p_p_double, + _swigc__p_p_void, + _swigc__p_size_type, + _swigc__p_std__allocatorT_CdiVariable_t, + _swigc__p_std__allocatorT_double_t, + _swigc__p_std__allocatorT_int_t, + _swigc__p_std__allocatorT_std__pairT_int_const_CdiGrid_t_t, + _swigc__p_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t, + _swigc__p_std__allocatorT_std__pairT_int_const_CdiVariable_t_t, + _swigc__p_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t, + _swigc__p_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t, + _swigc__p_std__allocatorT_std__string_t, + _swigc__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, + _swigc__p_std__lessT_int_t, + _swigc__p_std__lessT_std__string_t, + _swigc__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, + _swigc__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__iterator, + _swigc__p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t__reverse_iterator, + _swigc__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, + _swigc__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__iterator, + _swigc__p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t__reverse_iterator, + _swigc__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, + _swigc__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__iterator, + _swigc__p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t__reverse_iterator, + _swigc__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, + _swigc__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__iterator, + _swigc__p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t__reverse_iterator, + _swigc__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, + _swigc__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__iterator, + _swigc__p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t__reverse_iterator, + _swigc__p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, + _swigc__p_std__vectorT_double_std__allocatorT_double_t_t, + _swigc__p_std__vectorT_float_std__allocatorT_float_t_t, + _swigc__p_std__vectorT_int_std__allocatorT_int_t_t, + _swigc__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, + _swigc__p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, + _swigc__p_std__vectorT_std__vectorT_float_std__allocatorT_float_t_t_std__allocatorT_std__vectorT_float_std__allocatorT_float_t_t_t_t, + _swigc__p_swig__ConstIterator, + _swigc__p_swig__GC_VALUE, + _swigc__p_swig__Iterator, + _swigc__p_value_type, + _swigc__p_void, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ /* c-mode */ +#endif +} +#endif + +/* + +*/ +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void Init_Cdi(void) { + size_t i; + + SWIG_InitRuntime(); + + SWIG_InitializeModule(0); + for (i = 0; i < swig_module.size; i++) { + SWIG_define_class(swig_module.types[i]); + } + + SWIG_RubyInitializeTrackings(); + + SwigClassGC_VALUE.klass = rb_define_class("GC_VALUE", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_swig__GC_VALUE, (void *) &SwigClassGC_VALUE); + rb_undef_alloc_func(SwigClassGC_VALUE.klass); + rb_define_method(SwigClassGC_VALUE.klass, "inspect", VALUEFUNC(_wrap_GC_VALUE_inspect), -1); + rb_define_method(SwigClassGC_VALUE.klass, "to_s", VALUEFUNC(_wrap_GC_VALUE_to_s), -1); + SwigClassGC_VALUE.mark = 0; + SwigClassGC_VALUE.trackObjects = 0; + + swig::SwigGCReferences::initialize(); + + + SwigClassConstIterator.klass = rb_define_class("ConstIterator", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_swig__ConstIterator, (void *) &SwigClassConstIterator); + rb_undef_alloc_func(SwigClassConstIterator.klass); + rb_define_method(SwigClassConstIterator.klass, "value", VALUEFUNC(_wrap_ConstIterator_value), -1); + rb_define_method(SwigClassConstIterator.klass, "dup", VALUEFUNC(_wrap_ConstIterator_dup), -1); + rb_define_method(SwigClassConstIterator.klass, "inspect", VALUEFUNC(_wrap_ConstIterator_inspect), -1); + rb_define_method(SwigClassConstIterator.klass, "to_s", VALUEFUNC(_wrap_ConstIterator_to_s), -1); + rb_define_method(SwigClassConstIterator.klass, "next", VALUEFUNC(_wrap_ConstIterator_next), -1); + rb_define_method(SwigClassConstIterator.klass, "previous", VALUEFUNC(_wrap_ConstIterator_previous), -1); + rb_define_method(SwigClassConstIterator.klass, "==", VALUEFUNC(_wrap_ConstIterator___eq__), -1); + rb_define_method(SwigClassConstIterator.klass, "+", VALUEFUNC(_wrap_ConstIterator___add__), -1); + rb_define_method(SwigClassConstIterator.klass, "-", VALUEFUNC(_wrap_ConstIterator___sub__), -1); + SwigClassConstIterator.mark = 0; + SwigClassConstIterator.destroy = (void (*)(void *)) free_swig_ConstIterator; + SwigClassConstIterator.trackObjects = 0; + + SwigClassIterator.klass = rb_define_class("Iterator", ((swig_class *) SWIGTYPE_p_swig__ConstIterator->clientdata)->klass); + SWIG_TypeClientData(SWIGTYPE_p_swig__Iterator, (void *) &SwigClassIterator); + rb_undef_alloc_func(SwigClassIterator.klass); + rb_define_method(SwigClassIterator.klass, "value=", VALUEFUNC(_wrap_Iterator_valuee___), -1); + rb_define_method(SwigClassIterator.klass, "dup", VALUEFUNC(_wrap_Iterator_dup), -1); + rb_define_method(SwigClassIterator.klass, "next", VALUEFUNC(_wrap_Iterator_next), -1); + rb_define_method(SwigClassIterator.klass, "previous", VALUEFUNC(_wrap_Iterator_previous), -1); + rb_define_method(SwigClassIterator.klass, "inspect", VALUEFUNC(_wrap_Iterator_inspect), -1); + rb_define_method(SwigClassIterator.klass, "to_s", VALUEFUNC(_wrap_Iterator_to_s), -1); + rb_define_method(SwigClassIterator.klass, "==", VALUEFUNC(_wrap_Iterator___eq__), -1); + rb_define_method(SwigClassIterator.klass, "+", VALUEFUNC(_wrap_Iterator___add__), -1); + rb_define_method(SwigClassIterator.klass, "-", VALUEFUNC(_wrap_Iterator___sub__), -1); + SwigClassIterator.mark = 0; + SwigClassIterator.destroy = (void (*)(void *)) free_swig_Iterator; + SwigClassIterator.trackObjects = 0; + + SwigClassIntVector.klass = rb_define_class("IntVector", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, (void *) &SwigClassIntVector); + rb_include_module(SwigClassIntVector.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassIntVector.klass, _wrap_IntVector_allocate); + rb_define_method(SwigClassIntVector.klass, "initialize", VALUEFUNC(_wrap_new_IntVector), -1); + rb_define_method(SwigClassIntVector.klass, "dup", VALUEFUNC(_wrap_IntVector_dup), -1); + rb_define_method(SwigClassIntVector.klass, "inspect", VALUEFUNC(_wrap_IntVector_inspect), -1); + rb_define_method(SwigClassIntVector.klass, "to_a", VALUEFUNC(_wrap_IntVector_to_a), -1); + rb_define_method(SwigClassIntVector.klass, "to_s", VALUEFUNC(_wrap_IntVector_to_s), -1); + rb_define_method(SwigClassIntVector.klass, "slice", VALUEFUNC(_wrap_IntVector_slice), -1); + rb_define_method(SwigClassIntVector.klass, "each", VALUEFUNC(_wrap_IntVector_each), -1); + rb_define_method(SwigClassIntVector.klass, "__delete2__", VALUEFUNC(_wrap_IntVector___delete2__), -1); + rb_define_method(SwigClassIntVector.klass, "select", VALUEFUNC(_wrap_IntVector_select), -1); + rb_define_method(SwigClassIntVector.klass, "delete_at", VALUEFUNC(_wrap_IntVector_delete_at), -1); + rb_define_method(SwigClassIntVector.klass, "at", VALUEFUNC(_wrap_IntVector_at), -1); + rb_define_method(SwigClassIntVector.klass, "[]", VALUEFUNC(_wrap_IntVector___getitem__), -1); + rb_define_method(SwigClassIntVector.klass, "[]=", VALUEFUNC(_wrap_IntVector___setitem__), -1); + rb_define_method(SwigClassIntVector.klass, "reject!", VALUEFUNC(_wrap_IntVector_rejectN___), -1); + rb_define_alias(SwigClassIntVector.klass, "delete_if", "reject!"); + rb_define_method(SwigClassIntVector.klass, "pop", VALUEFUNC(_wrap_IntVector_pop), -1); + rb_define_method(SwigClassIntVector.klass, "push", VALUEFUNC(_wrap_IntVector_push), -1); + rb_define_alias(SwigClassIntVector.klass, "<<", "push"); + rb_define_method(SwigClassIntVector.klass, "reject", VALUEFUNC(_wrap_IntVector_reject), -1); + rb_define_method(SwigClassIntVector.klass, "shift", VALUEFUNC(_wrap_IntVector_shift), -1); + rb_define_method(SwigClassIntVector.klass, "unshift", VALUEFUNC(_wrap_IntVector_unshift), -1); + rb_define_method(SwigClassIntVector.klass, "empty?", VALUEFUNC(_wrap_IntVector_emptyq___), -1); + rb_define_method(SwigClassIntVector.klass, "size", VALUEFUNC(_wrap_IntVector_size), -1); + rb_define_method(SwigClassIntVector.klass, "swap", VALUEFUNC(_wrap_IntVector_swap), -1); + rb_define_method(SwigClassIntVector.klass, "begin", VALUEFUNC(_wrap_IntVector_begin), -1); + rb_define_method(SwigClassIntVector.klass, "end", VALUEFUNC(_wrap_IntVector_end), -1); + rb_define_method(SwigClassIntVector.klass, "rbegin", VALUEFUNC(_wrap_IntVector_rbegin), -1); + rb_define_method(SwigClassIntVector.klass, "rend", VALUEFUNC(_wrap_IntVector_rend), -1); + rb_define_method(SwigClassIntVector.klass, "clear", VALUEFUNC(_wrap_IntVector_clear), -1); + rb_define_method(SwigClassIntVector.klass, "get_allocator", VALUEFUNC(_wrap_IntVector_get_allocator), -1); + rb_define_method(SwigClassIntVector.klass, "erase", VALUEFUNC(_wrap_IntVector_erase), -1); + rb_define_method(SwigClassIntVector.klass, "front", VALUEFUNC(_wrap_IntVector_front), -1); + rb_define_method(SwigClassIntVector.klass, "back", VALUEFUNC(_wrap_IntVector_back), -1); + rb_define_method(SwigClassIntVector.klass, "assign", VALUEFUNC(_wrap_IntVector_assign), -1); + rb_define_method(SwigClassIntVector.klass, "resize", VALUEFUNC(_wrap_IntVector_resize), -1); + rb_define_method(SwigClassIntVector.klass, "insert", VALUEFUNC(_wrap_IntVector_insert), -1); + rb_define_method(SwigClassIntVector.klass, "reserve", VALUEFUNC(_wrap_IntVector_reserve), -1); + rb_define_method(SwigClassIntVector.klass, "capacity", VALUEFUNC(_wrap_IntVector_capacity), -1); + rb_define_method(SwigClassIntVector.klass, "map!", VALUEFUNC(_wrap_IntVector_mapN___), -1); + rb_define_method(SwigClassIntVector.klass, "delete", VALUEFUNC(_wrap_IntVector_delete), -1); + SwigClassIntVector.mark = 0; + SwigClassIntVector.destroy = (void (*)(void *)) free_std_vector_Sl_int_Sg_; + SwigClassIntVector.trackObjects = 0; + + SwigClassDoubleVector.klass = rb_define_class("DoubleVector", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, (void *) &SwigClassDoubleVector); + rb_include_module(SwigClassDoubleVector.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassDoubleVector.klass, _wrap_DoubleVector_allocate); + rb_define_method(SwigClassDoubleVector.klass, "initialize", VALUEFUNC(_wrap_new_DoubleVector), -1); + rb_define_method(SwigClassDoubleVector.klass, "dup", VALUEFUNC(_wrap_DoubleVector_dup), -1); + rb_define_method(SwigClassDoubleVector.klass, "inspect", VALUEFUNC(_wrap_DoubleVector_inspect), -1); + rb_define_method(SwigClassDoubleVector.klass, "to_a", VALUEFUNC(_wrap_DoubleVector_to_a), -1); + rb_define_method(SwigClassDoubleVector.klass, "to_s", VALUEFUNC(_wrap_DoubleVector_to_s), -1); + rb_define_method(SwigClassDoubleVector.klass, "slice", VALUEFUNC(_wrap_DoubleVector_slice), -1); + rb_define_method(SwigClassDoubleVector.klass, "each", VALUEFUNC(_wrap_DoubleVector_each), -1); + rb_define_method(SwigClassDoubleVector.klass, "__delete2__", VALUEFUNC(_wrap_DoubleVector___delete2__), -1); + rb_define_method(SwigClassDoubleVector.klass, "select", VALUEFUNC(_wrap_DoubleVector_select), -1); + rb_define_method(SwigClassDoubleVector.klass, "delete_at", VALUEFUNC(_wrap_DoubleVector_delete_at), -1); + rb_define_method(SwigClassDoubleVector.klass, "at", VALUEFUNC(_wrap_DoubleVector_at), -1); + rb_define_method(SwigClassDoubleVector.klass, "[]", VALUEFUNC(_wrap_DoubleVector___getitem__), -1); + rb_define_method(SwigClassDoubleVector.klass, "[]=", VALUEFUNC(_wrap_DoubleVector___setitem__), -1); + rb_define_method(SwigClassDoubleVector.klass, "reject!", VALUEFUNC(_wrap_DoubleVector_rejectN___), -1); + rb_define_alias(SwigClassDoubleVector.klass, "delete_if", "reject!"); + rb_define_method(SwigClassDoubleVector.klass, "pop", VALUEFUNC(_wrap_DoubleVector_pop), -1); + rb_define_method(SwigClassDoubleVector.klass, "push", VALUEFUNC(_wrap_DoubleVector_push), -1); + rb_define_alias(SwigClassDoubleVector.klass, "<<", "push"); + rb_define_method(SwigClassDoubleVector.klass, "reject", VALUEFUNC(_wrap_DoubleVector_reject), -1); + rb_define_method(SwigClassDoubleVector.klass, "shift", VALUEFUNC(_wrap_DoubleVector_shift), -1); + rb_define_method(SwigClassDoubleVector.klass, "unshift", VALUEFUNC(_wrap_DoubleVector_unshift), -1); + rb_define_method(SwigClassDoubleVector.klass, "empty?", VALUEFUNC(_wrap_DoubleVector_emptyq___), -1); + rb_define_method(SwigClassDoubleVector.klass, "size", VALUEFUNC(_wrap_DoubleVector_size), -1); + rb_define_method(SwigClassDoubleVector.klass, "swap", VALUEFUNC(_wrap_DoubleVector_swap), -1); + rb_define_method(SwigClassDoubleVector.klass, "begin", VALUEFUNC(_wrap_DoubleVector_begin), -1); + rb_define_method(SwigClassDoubleVector.klass, "end", VALUEFUNC(_wrap_DoubleVector_end), -1); + rb_define_method(SwigClassDoubleVector.klass, "rbegin", VALUEFUNC(_wrap_DoubleVector_rbegin), -1); + rb_define_method(SwigClassDoubleVector.klass, "rend", VALUEFUNC(_wrap_DoubleVector_rend), -1); + rb_define_method(SwigClassDoubleVector.klass, "clear", VALUEFUNC(_wrap_DoubleVector_clear), -1); + rb_define_method(SwigClassDoubleVector.klass, "get_allocator", VALUEFUNC(_wrap_DoubleVector_get_allocator), -1); + rb_define_method(SwigClassDoubleVector.klass, "erase", VALUEFUNC(_wrap_DoubleVector_erase), -1); + rb_define_method(SwigClassDoubleVector.klass, "front", VALUEFUNC(_wrap_DoubleVector_front), -1); + rb_define_method(SwigClassDoubleVector.klass, "back", VALUEFUNC(_wrap_DoubleVector_back), -1); + rb_define_method(SwigClassDoubleVector.klass, "assign", VALUEFUNC(_wrap_DoubleVector_assign), -1); + rb_define_method(SwigClassDoubleVector.klass, "resize", VALUEFUNC(_wrap_DoubleVector_resize), -1); + rb_define_method(SwigClassDoubleVector.klass, "insert", VALUEFUNC(_wrap_DoubleVector_insert), -1); + rb_define_method(SwigClassDoubleVector.klass, "reserve", VALUEFUNC(_wrap_DoubleVector_reserve), -1); + rb_define_method(SwigClassDoubleVector.klass, "capacity", VALUEFUNC(_wrap_DoubleVector_capacity), -1); + rb_define_method(SwigClassDoubleVector.klass, "map!", VALUEFUNC(_wrap_DoubleVector_mapN___), -1); + rb_define_method(SwigClassDoubleVector.klass, "delete", VALUEFUNC(_wrap_DoubleVector_delete), -1); + SwigClassDoubleVector.mark = 0; + SwigClassDoubleVector.destroy = (void (*)(void *)) free_std_vector_Sl_double_Sg_; + SwigClassDoubleVector.trackObjects = 0; + + SwigClassDoubleDoubleVector.klass = rb_define_class("DoubleDoubleVector", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t, (void *) &SwigClassDoubleDoubleVector); + rb_include_module(SwigClassDoubleDoubleVector.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassDoubleDoubleVector.klass, _wrap_DoubleDoubleVector_allocate); + rb_define_method(SwigClassDoubleDoubleVector.klass, "initialize", VALUEFUNC(_wrap_new_DoubleDoubleVector), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "dup", VALUEFUNC(_wrap_DoubleDoubleVector_dup), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "inspect", VALUEFUNC(_wrap_DoubleDoubleVector_inspect), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "to_a", VALUEFUNC(_wrap_DoubleDoubleVector_to_a), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "to_s", VALUEFUNC(_wrap_DoubleDoubleVector_to_s), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "slice", VALUEFUNC(_wrap_DoubleDoubleVector_slice), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "each", VALUEFUNC(_wrap_DoubleDoubleVector_each), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "__delete2__", VALUEFUNC(_wrap_DoubleDoubleVector___delete2__), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "select", VALUEFUNC(_wrap_DoubleDoubleVector_select), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "delete_at", VALUEFUNC(_wrap_DoubleDoubleVector_delete_at), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "at", VALUEFUNC(_wrap_DoubleDoubleVector_at), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "[]", VALUEFUNC(_wrap_DoubleDoubleVector___getitem__), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "[]=", VALUEFUNC(_wrap_DoubleDoubleVector___setitem__), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "reject!", VALUEFUNC(_wrap_DoubleDoubleVector_rejectN___), -1); + rb_define_alias(SwigClassDoubleDoubleVector.klass, "delete_if", "reject!"); + rb_define_method(SwigClassDoubleDoubleVector.klass, "pop", VALUEFUNC(_wrap_DoubleDoubleVector_pop), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "push", VALUEFUNC(_wrap_DoubleDoubleVector_push), -1); + rb_define_alias(SwigClassDoubleDoubleVector.klass, "<<", "push"); + rb_define_method(SwigClassDoubleDoubleVector.klass, "reject", VALUEFUNC(_wrap_DoubleDoubleVector_reject), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "shift", VALUEFUNC(_wrap_DoubleDoubleVector_shift), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "unshift", VALUEFUNC(_wrap_DoubleDoubleVector_unshift), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "empty?", VALUEFUNC(_wrap_DoubleDoubleVector_emptyq___), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "size", VALUEFUNC(_wrap_DoubleDoubleVector_size), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "swap", VALUEFUNC(_wrap_DoubleDoubleVector_swap), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "begin", VALUEFUNC(_wrap_DoubleDoubleVector_begin), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "end", VALUEFUNC(_wrap_DoubleDoubleVector_end), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "rbegin", VALUEFUNC(_wrap_DoubleDoubleVector_rbegin), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "rend", VALUEFUNC(_wrap_DoubleDoubleVector_rend), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "clear", VALUEFUNC(_wrap_DoubleDoubleVector_clear), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "get_allocator", VALUEFUNC(_wrap_DoubleDoubleVector_get_allocator), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "erase", VALUEFUNC(_wrap_DoubleDoubleVector_erase), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "front", VALUEFUNC(_wrap_DoubleDoubleVector_front), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "back", VALUEFUNC(_wrap_DoubleDoubleVector_back), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "assign", VALUEFUNC(_wrap_DoubleDoubleVector_assign), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "resize", VALUEFUNC(_wrap_DoubleDoubleVector_resize), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "insert", VALUEFUNC(_wrap_DoubleDoubleVector_insert), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "reserve", VALUEFUNC(_wrap_DoubleDoubleVector_reserve), -1); + rb_define_method(SwigClassDoubleDoubleVector.klass, "capacity", VALUEFUNC(_wrap_DoubleDoubleVector_capacity), -1); + SwigClassDoubleDoubleVector.mark = 0; + SwigClassDoubleDoubleVector.destroy = (void (*)(void *)) free_std_vector_Sl_std_vector_Sl_double_Sg__Sg_; + SwigClassDoubleDoubleVector.trackObjects = 0; + + SwigClassStringVector.klass = rb_define_class("StringVector", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, (void *) &SwigClassStringVector); + rb_include_module(SwigClassStringVector.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassStringVector.klass, _wrap_StringVector_allocate); + rb_define_method(SwigClassStringVector.klass, "initialize", VALUEFUNC(_wrap_new_StringVector), -1); + rb_define_method(SwigClassStringVector.klass, "dup", VALUEFUNC(_wrap_StringVector_dup), -1); + rb_define_method(SwigClassStringVector.klass, "inspect", VALUEFUNC(_wrap_StringVector_inspect), -1); + rb_define_method(SwigClassStringVector.klass, "to_a", VALUEFUNC(_wrap_StringVector_to_a), -1); + rb_define_method(SwigClassStringVector.klass, "to_s", VALUEFUNC(_wrap_StringVector_to_s), -1); + rb_define_method(SwigClassStringVector.klass, "slice", VALUEFUNC(_wrap_StringVector_slice), -1); + rb_define_method(SwigClassStringVector.klass, "each", VALUEFUNC(_wrap_StringVector_each), -1); + rb_define_method(SwigClassStringVector.klass, "__delete2__", VALUEFUNC(_wrap_StringVector___delete2__), -1); + rb_define_method(SwigClassStringVector.klass, "select", VALUEFUNC(_wrap_StringVector_select), -1); + rb_define_method(SwigClassStringVector.klass, "delete_at", VALUEFUNC(_wrap_StringVector_delete_at), -1); + rb_define_method(SwigClassStringVector.klass, "at", VALUEFUNC(_wrap_StringVector_at), -1); + rb_define_method(SwigClassStringVector.klass, "[]", VALUEFUNC(_wrap_StringVector___getitem__), -1); + rb_define_method(SwigClassStringVector.klass, "[]=", VALUEFUNC(_wrap_StringVector___setitem__), -1); + rb_define_method(SwigClassStringVector.klass, "reject!", VALUEFUNC(_wrap_StringVector_rejectN___), -1); + rb_define_alias(SwigClassStringVector.klass, "delete_if", "reject!"); + rb_define_method(SwigClassStringVector.klass, "pop", VALUEFUNC(_wrap_StringVector_pop), -1); + rb_define_method(SwigClassStringVector.klass, "push", VALUEFUNC(_wrap_StringVector_push), -1); + rb_define_alias(SwigClassStringVector.klass, "<<", "push"); + rb_define_method(SwigClassStringVector.klass, "reject", VALUEFUNC(_wrap_StringVector_reject), -1); + rb_define_method(SwigClassStringVector.klass, "shift", VALUEFUNC(_wrap_StringVector_shift), -1); + rb_define_method(SwigClassStringVector.klass, "unshift", VALUEFUNC(_wrap_StringVector_unshift), -1); + rb_define_method(SwigClassStringVector.klass, "empty?", VALUEFUNC(_wrap_StringVector_emptyq___), -1); + rb_define_method(SwigClassStringVector.klass, "size", VALUEFUNC(_wrap_StringVector_size), -1); + rb_define_method(SwigClassStringVector.klass, "swap", VALUEFUNC(_wrap_StringVector_swap), -1); + rb_define_method(SwigClassStringVector.klass, "begin", VALUEFUNC(_wrap_StringVector_begin), -1); + rb_define_method(SwigClassStringVector.klass, "end", VALUEFUNC(_wrap_StringVector_end), -1); + rb_define_method(SwigClassStringVector.klass, "rbegin", VALUEFUNC(_wrap_StringVector_rbegin), -1); + rb_define_method(SwigClassStringVector.klass, "rend", VALUEFUNC(_wrap_StringVector_rend), -1); + rb_define_method(SwigClassStringVector.klass, "clear", VALUEFUNC(_wrap_StringVector_clear), -1); + rb_define_method(SwigClassStringVector.klass, "get_allocator", VALUEFUNC(_wrap_StringVector_get_allocator), -1); + rb_define_method(SwigClassStringVector.klass, "erase", VALUEFUNC(_wrap_StringVector_erase), -1); + rb_define_method(SwigClassStringVector.klass, "front", VALUEFUNC(_wrap_StringVector_front), -1); + rb_define_method(SwigClassStringVector.klass, "back", VALUEFUNC(_wrap_StringVector_back), -1); + rb_define_method(SwigClassStringVector.klass, "assign", VALUEFUNC(_wrap_StringVector_assign), -1); + rb_define_method(SwigClassStringVector.klass, "resize", VALUEFUNC(_wrap_StringVector_resize), -1); + rb_define_method(SwigClassStringVector.klass, "insert", VALUEFUNC(_wrap_StringVector_insert), -1); + rb_define_method(SwigClassStringVector.klass, "reserve", VALUEFUNC(_wrap_StringVector_reserve), -1); + rb_define_method(SwigClassStringVector.klass, "capacity", VALUEFUNC(_wrap_StringVector_capacity), -1); + rb_define_method(SwigClassStringVector.klass, "map!", VALUEFUNC(_wrap_StringVector_mapN___), -1); + rb_define_method(SwigClassStringVector.klass, "delete", VALUEFUNC(_wrap_StringVector_delete), -1); + SwigClassStringVector.mark = 0; + SwigClassStringVector.destroy = (void (*)(void *)) free_std_vector_Sl_std_string_Sg_; + SwigClassStringVector.trackObjects = 0; + + SwigClassVarsVector.klass = rb_define_class("VarsVector", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_CdiVariable_std__allocatorT_CdiVariable_t_t, (void *) &SwigClassVarsVector); + rb_include_module(SwigClassVarsVector.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassVarsVector.klass, _wrap_VarsVector_allocate); + rb_define_method(SwigClassVarsVector.klass, "initialize", VALUEFUNC(_wrap_new_VarsVector), -1); + rb_define_method(SwigClassVarsVector.klass, "dup", VALUEFUNC(_wrap_VarsVector_dup), -1); + rb_define_method(SwigClassVarsVector.klass, "inspect", VALUEFUNC(_wrap_VarsVector_inspect), -1); + rb_define_method(SwigClassVarsVector.klass, "to_a", VALUEFUNC(_wrap_VarsVector_to_a), -1); + rb_define_method(SwigClassVarsVector.klass, "to_s", VALUEFUNC(_wrap_VarsVector_to_s), -1); + rb_define_method(SwigClassVarsVector.klass, "slice", VALUEFUNC(_wrap_VarsVector_slice), -1); + rb_define_method(SwigClassVarsVector.klass, "each", VALUEFUNC(_wrap_VarsVector_each), -1); + rb_define_method(SwigClassVarsVector.klass, "__delete2__", VALUEFUNC(_wrap_VarsVector___delete2__), -1); + rb_define_method(SwigClassVarsVector.klass, "select", VALUEFUNC(_wrap_VarsVector_select), -1); + rb_define_method(SwigClassVarsVector.klass, "delete_at", VALUEFUNC(_wrap_VarsVector_delete_at), -1); + rb_define_method(SwigClassVarsVector.klass, "at", VALUEFUNC(_wrap_VarsVector_at), -1); + rb_define_method(SwigClassVarsVector.klass, "[]", VALUEFUNC(_wrap_VarsVector___getitem__), -1); + rb_define_method(SwigClassVarsVector.klass, "[]=", VALUEFUNC(_wrap_VarsVector___setitem__), -1); + rb_define_method(SwigClassVarsVector.klass, "reject!", VALUEFUNC(_wrap_VarsVector_rejectN___), -1); + rb_define_alias(SwigClassVarsVector.klass, "delete_if", "reject!"); + rb_define_method(SwigClassVarsVector.klass, "pop", VALUEFUNC(_wrap_VarsVector_pop), -1); + rb_define_method(SwigClassVarsVector.klass, "push", VALUEFUNC(_wrap_VarsVector_push), -1); + rb_define_alias(SwigClassVarsVector.klass, "<<", "push"); + rb_define_method(SwigClassVarsVector.klass, "reject", VALUEFUNC(_wrap_VarsVector_reject), -1); + rb_define_method(SwigClassVarsVector.klass, "shift", VALUEFUNC(_wrap_VarsVector_shift), -1); + rb_define_method(SwigClassVarsVector.klass, "unshift", VALUEFUNC(_wrap_VarsVector_unshift), -1); + rb_define_method(SwigClassVarsVector.klass, "empty?", VALUEFUNC(_wrap_VarsVector_emptyq___), -1); + rb_define_method(SwigClassVarsVector.klass, "size", VALUEFUNC(_wrap_VarsVector_size), -1); + rb_define_method(SwigClassVarsVector.klass, "swap", VALUEFUNC(_wrap_VarsVector_swap), -1); + rb_define_method(SwigClassVarsVector.klass, "begin", VALUEFUNC(_wrap_VarsVector_begin), -1); + rb_define_method(SwigClassVarsVector.klass, "end", VALUEFUNC(_wrap_VarsVector_end), -1); + rb_define_method(SwigClassVarsVector.klass, "rbegin", VALUEFUNC(_wrap_VarsVector_rbegin), -1); + rb_define_method(SwigClassVarsVector.klass, "rend", VALUEFUNC(_wrap_VarsVector_rend), -1); + rb_define_method(SwigClassVarsVector.klass, "clear", VALUEFUNC(_wrap_VarsVector_clear), -1); + rb_define_method(SwigClassVarsVector.klass, "get_allocator", VALUEFUNC(_wrap_VarsVector_get_allocator), -1); + rb_define_method(SwigClassVarsVector.klass, "erase", VALUEFUNC(_wrap_VarsVector_erase), -1); + rb_define_method(SwigClassVarsVector.klass, "front", VALUEFUNC(_wrap_VarsVector_front), -1); + rb_define_method(SwigClassVarsVector.klass, "back", VALUEFUNC(_wrap_VarsVector_back), -1); + rb_define_method(SwigClassVarsVector.klass, "assign", VALUEFUNC(_wrap_VarsVector_assign), -1); + rb_define_method(SwigClassVarsVector.klass, "resize", VALUEFUNC(_wrap_VarsVector_resize), -1); + rb_define_method(SwigClassVarsVector.klass, "insert", VALUEFUNC(_wrap_VarsVector_insert), -1); + rb_define_method(SwigClassVarsVector.klass, "reserve", VALUEFUNC(_wrap_VarsVector_reserve), -1); + rb_define_method(SwigClassVarsVector.klass, "capacity", VALUEFUNC(_wrap_VarsVector_capacity), -1); + SwigClassVarsVector.mark = 0; + SwigClassVarsVector.destroy = (void (*)(void *)) free_std_vector_Sl_CdiVariable_Sg_; + SwigClassVarsVector.trackObjects = 0; + + SwigClassVarsMap.klass = rb_define_class("VarsMap", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__mapT_std__string_CdiVariable_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_CdiVariable_t_t_t, (void *) &SwigClassVarsMap); + rb_include_module(SwigClassVarsMap.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassVarsMap.klass, _wrap_VarsMap_allocate); + rb_define_method(SwigClassVarsMap.klass, "initialize", VALUEFUNC(_wrap_new_VarsMap), -1); + rb_define_method(SwigClassVarsMap.klass, "dup", VALUEFUNC(_wrap_VarsMap_dup), -1); + rb_define_method(SwigClassVarsMap.klass, "delete", VALUEFUNC(_wrap_VarsMap_delete), -1); + rb_define_method(SwigClassVarsMap.klass, "has_key?", VALUEFUNC(_wrap_VarsMap_has_keyq___), -1); + rb_define_method(SwigClassVarsMap.klass, "keys", VALUEFUNC(_wrap_VarsMap_keys), -1); + rb_define_method(SwigClassVarsMap.klass, "each", VALUEFUNC(_wrap_VarsMap_each), -1); + rb_define_method(SwigClassVarsMap.klass, "select", VALUEFUNC(_wrap_VarsMap_select), -1); + rb_define_method(SwigClassVarsMap.klass, "values_at", VALUEFUNC(_wrap_VarsMap_values_at), -1); + rb_define_method(SwigClassVarsMap.klass, "each_key", VALUEFUNC(_wrap_VarsMap_each_key), -1); + rb_define_method(SwigClassVarsMap.klass, "values", VALUEFUNC(_wrap_VarsMap_values), -1); + rb_define_method(SwigClassVarsMap.klass, "each_value", VALUEFUNC(_wrap_VarsMap_each_value), -1); + rb_define_method(SwigClassVarsMap.klass, "entries", VALUEFUNC(_wrap_VarsMap_entries), -1); + rb_define_method(SwigClassVarsMap.klass, "include?", VALUEFUNC(_wrap_VarsMap_includeq___), -1); + rb_define_method(SwigClassVarsMap.klass, "key_iterator", VALUEFUNC(_wrap_VarsMap_key_iterator), -1); + rb_define_method(SwigClassVarsMap.klass, "value_iterator", VALUEFUNC(_wrap_VarsMap_value_iterator), -1); + rb_define_method(SwigClassVarsMap.klass, "[]", VALUEFUNC(_wrap_VarsMap___getitem__), -1); + rb_define_method(SwigClassVarsMap.klass, "[]=", VALUEFUNC(_wrap_VarsMap___setitem__), -1); + rb_define_method(SwigClassVarsMap.klass, "inspect", VALUEFUNC(_wrap_VarsMap_inspect), -1); + rb_define_method(SwigClassVarsMap.klass, "to_a", VALUEFUNC(_wrap_VarsMap_to_a), -1); + rb_define_method(SwigClassVarsMap.klass, "to_s", VALUEFUNC(_wrap_VarsMap_to_s), -1); + rb_define_method(SwigClassVarsMap.klass, "empty?", VALUEFUNC(_wrap_VarsMap_emptyq___), -1); + rb_define_method(SwigClassVarsMap.klass, "size", VALUEFUNC(_wrap_VarsMap_size), -1); + rb_define_method(SwigClassVarsMap.klass, "swap", VALUEFUNC(_wrap_VarsMap_swap), -1); + rb_define_method(SwigClassVarsMap.klass, "begin", VALUEFUNC(_wrap_VarsMap_begin), -1); + rb_define_method(SwigClassVarsMap.klass, "end", VALUEFUNC(_wrap_VarsMap_end), -1); + rb_define_method(SwigClassVarsMap.klass, "rbegin", VALUEFUNC(_wrap_VarsMap_rbegin), -1); + rb_define_method(SwigClassVarsMap.klass, "rend", VALUEFUNC(_wrap_VarsMap_rend), -1); + rb_define_method(SwigClassVarsMap.klass, "clear", VALUEFUNC(_wrap_VarsMap_clear), -1); + rb_define_method(SwigClassVarsMap.klass, "get_allocator", VALUEFUNC(_wrap_VarsMap_get_allocator), -1); + rb_define_method(SwigClassVarsMap.klass, "count", VALUEFUNC(_wrap_VarsMap_count), -1); + rb_define_method(SwigClassVarsMap.klass, "erase", VALUEFUNC(_wrap_VarsMap_erase), -1); + rb_define_method(SwigClassVarsMap.klass, "find", VALUEFUNC(_wrap_VarsMap_find), -1); + rb_define_method(SwigClassVarsMap.klass, "lower_bound", VALUEFUNC(_wrap_VarsMap_lower_bound), -1); + rb_define_method(SwigClassVarsMap.klass, "upper_bound", VALUEFUNC(_wrap_VarsMap_upper_bound), -1); + SwigClassVarsMap.mark = 0; + SwigClassVarsMap.destroy = (void (*)(void *)) free_std_map_Sl_std_string_Sc_CdiVariable_Sg_; + SwigClassVarsMap.trackObjects = 0; + + SwigClassVarsByCode.klass = rb_define_class("VarsByCode", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__mapT_int_CdiVariable_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiVariable_t_t_t, (void *) &SwigClassVarsByCode); + rb_include_module(SwigClassVarsByCode.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassVarsByCode.klass, _wrap_VarsByCode_allocate); + rb_define_method(SwigClassVarsByCode.klass, "initialize", VALUEFUNC(_wrap_new_VarsByCode), -1); + rb_define_method(SwigClassVarsByCode.klass, "dup", VALUEFUNC(_wrap_VarsByCode_dup), -1); + rb_define_method(SwigClassVarsByCode.klass, "delete", VALUEFUNC(_wrap_VarsByCode_delete), -1); + rb_define_method(SwigClassVarsByCode.klass, "has_key?", VALUEFUNC(_wrap_VarsByCode_has_keyq___), -1); + rb_define_method(SwigClassVarsByCode.klass, "keys", VALUEFUNC(_wrap_VarsByCode_keys), -1); + rb_define_method(SwigClassVarsByCode.klass, "each", VALUEFUNC(_wrap_VarsByCode_each), -1); + rb_define_method(SwigClassVarsByCode.klass, "select", VALUEFUNC(_wrap_VarsByCode_select), -1); + rb_define_method(SwigClassVarsByCode.klass, "values_at", VALUEFUNC(_wrap_VarsByCode_values_at), -1); + rb_define_method(SwigClassVarsByCode.klass, "each_key", VALUEFUNC(_wrap_VarsByCode_each_key), -1); + rb_define_method(SwigClassVarsByCode.klass, "values", VALUEFUNC(_wrap_VarsByCode_values), -1); + rb_define_method(SwigClassVarsByCode.klass, "each_value", VALUEFUNC(_wrap_VarsByCode_each_value), -1); + rb_define_method(SwigClassVarsByCode.klass, "entries", VALUEFUNC(_wrap_VarsByCode_entries), -1); + rb_define_method(SwigClassVarsByCode.klass, "include?", VALUEFUNC(_wrap_VarsByCode_includeq___), -1); + rb_define_method(SwigClassVarsByCode.klass, "key_iterator", VALUEFUNC(_wrap_VarsByCode_key_iterator), -1); + rb_define_method(SwigClassVarsByCode.klass, "value_iterator", VALUEFUNC(_wrap_VarsByCode_value_iterator), -1); + rb_define_method(SwigClassVarsByCode.klass, "[]", VALUEFUNC(_wrap_VarsByCode___getitem__), -1); + rb_define_method(SwigClassVarsByCode.klass, "[]=", VALUEFUNC(_wrap_VarsByCode___setitem__), -1); + rb_define_method(SwigClassVarsByCode.klass, "inspect", VALUEFUNC(_wrap_VarsByCode_inspect), -1); + rb_define_method(SwigClassVarsByCode.klass, "to_a", VALUEFUNC(_wrap_VarsByCode_to_a), -1); + rb_define_method(SwigClassVarsByCode.klass, "to_s", VALUEFUNC(_wrap_VarsByCode_to_s), -1); + rb_define_method(SwigClassVarsByCode.klass, "empty?", VALUEFUNC(_wrap_VarsByCode_emptyq___), -1); + rb_define_method(SwigClassVarsByCode.klass, "size", VALUEFUNC(_wrap_VarsByCode_size), -1); + rb_define_method(SwigClassVarsByCode.klass, "swap", VALUEFUNC(_wrap_VarsByCode_swap), -1); + rb_define_method(SwigClassVarsByCode.klass, "begin", VALUEFUNC(_wrap_VarsByCode_begin), -1); + rb_define_method(SwigClassVarsByCode.klass, "end", VALUEFUNC(_wrap_VarsByCode_end), -1); + rb_define_method(SwigClassVarsByCode.klass, "rbegin", VALUEFUNC(_wrap_VarsByCode_rbegin), -1); + rb_define_method(SwigClassVarsByCode.klass, "rend", VALUEFUNC(_wrap_VarsByCode_rend), -1); + rb_define_method(SwigClassVarsByCode.klass, "clear", VALUEFUNC(_wrap_VarsByCode_clear), -1); + rb_define_method(SwigClassVarsByCode.klass, "get_allocator", VALUEFUNC(_wrap_VarsByCode_get_allocator), -1); + rb_define_method(SwigClassVarsByCode.klass, "count", VALUEFUNC(_wrap_VarsByCode_count), -1); + rb_define_method(SwigClassVarsByCode.klass, "erase", VALUEFUNC(_wrap_VarsByCode_erase), -1); + rb_define_method(SwigClassVarsByCode.klass, "find", VALUEFUNC(_wrap_VarsByCode_find), -1); + rb_define_method(SwigClassVarsByCode.klass, "lower_bound", VALUEFUNC(_wrap_VarsByCode_lower_bound), -1); + rb_define_method(SwigClassVarsByCode.klass, "upper_bound", VALUEFUNC(_wrap_VarsByCode_upper_bound), -1); + SwigClassVarsByCode.mark = 0; + SwigClassVarsByCode.destroy = (void (*)(void *)) free_std_map_Sl_int_Sc_CdiVariable_Sg_; + SwigClassVarsByCode.trackObjects = 0; + + SwigClassTaxesMap.klass = rb_define_class("TaxesMap", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__mapT_int_CdiTaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiTaxis_t_t_t, (void *) &SwigClassTaxesMap); + rb_include_module(SwigClassTaxesMap.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassTaxesMap.klass, _wrap_TaxesMap_allocate); + rb_define_method(SwigClassTaxesMap.klass, "initialize", VALUEFUNC(_wrap_new_TaxesMap), -1); + rb_define_method(SwigClassTaxesMap.klass, "dup", VALUEFUNC(_wrap_TaxesMap_dup), -1); + rb_define_method(SwigClassTaxesMap.klass, "delete", VALUEFUNC(_wrap_TaxesMap_delete), -1); + rb_define_method(SwigClassTaxesMap.klass, "has_key?", VALUEFUNC(_wrap_TaxesMap_has_keyq___), -1); + rb_define_method(SwigClassTaxesMap.klass, "keys", VALUEFUNC(_wrap_TaxesMap_keys), -1); + rb_define_method(SwigClassTaxesMap.klass, "each", VALUEFUNC(_wrap_TaxesMap_each), -1); + rb_define_method(SwigClassTaxesMap.klass, "select", VALUEFUNC(_wrap_TaxesMap_select), -1); + rb_define_method(SwigClassTaxesMap.klass, "values_at", VALUEFUNC(_wrap_TaxesMap_values_at), -1); + rb_define_method(SwigClassTaxesMap.klass, "each_key", VALUEFUNC(_wrap_TaxesMap_each_key), -1); + rb_define_method(SwigClassTaxesMap.klass, "values", VALUEFUNC(_wrap_TaxesMap_values), -1); + rb_define_method(SwigClassTaxesMap.klass, "each_value", VALUEFUNC(_wrap_TaxesMap_each_value), -1); + rb_define_method(SwigClassTaxesMap.klass, "entries", VALUEFUNC(_wrap_TaxesMap_entries), -1); + rb_define_method(SwigClassTaxesMap.klass, "include?", VALUEFUNC(_wrap_TaxesMap_includeq___), -1); + rb_define_method(SwigClassTaxesMap.klass, "key_iterator", VALUEFUNC(_wrap_TaxesMap_key_iterator), -1); + rb_define_method(SwigClassTaxesMap.klass, "value_iterator", VALUEFUNC(_wrap_TaxesMap_value_iterator), -1); + rb_define_method(SwigClassTaxesMap.klass, "[]", VALUEFUNC(_wrap_TaxesMap___getitem__), -1); + rb_define_method(SwigClassTaxesMap.klass, "[]=", VALUEFUNC(_wrap_TaxesMap___setitem__), -1); + rb_define_method(SwigClassTaxesMap.klass, "inspect", VALUEFUNC(_wrap_TaxesMap_inspect), -1); + rb_define_method(SwigClassTaxesMap.klass, "to_a", VALUEFUNC(_wrap_TaxesMap_to_a), -1); + rb_define_method(SwigClassTaxesMap.klass, "to_s", VALUEFUNC(_wrap_TaxesMap_to_s), -1); + rb_define_method(SwigClassTaxesMap.klass, "empty?", VALUEFUNC(_wrap_TaxesMap_emptyq___), -1); + rb_define_method(SwigClassTaxesMap.klass, "size", VALUEFUNC(_wrap_TaxesMap_size), -1); + rb_define_method(SwigClassTaxesMap.klass, "swap", VALUEFUNC(_wrap_TaxesMap_swap), -1); + rb_define_method(SwigClassTaxesMap.klass, "begin", VALUEFUNC(_wrap_TaxesMap_begin), -1); + rb_define_method(SwigClassTaxesMap.klass, "end", VALUEFUNC(_wrap_TaxesMap_end), -1); + rb_define_method(SwigClassTaxesMap.klass, "rbegin", VALUEFUNC(_wrap_TaxesMap_rbegin), -1); + rb_define_method(SwigClassTaxesMap.klass, "rend", VALUEFUNC(_wrap_TaxesMap_rend), -1); + rb_define_method(SwigClassTaxesMap.klass, "clear", VALUEFUNC(_wrap_TaxesMap_clear), -1); + rb_define_method(SwigClassTaxesMap.klass, "get_allocator", VALUEFUNC(_wrap_TaxesMap_get_allocator), -1); + rb_define_method(SwigClassTaxesMap.klass, "count", VALUEFUNC(_wrap_TaxesMap_count), -1); + rb_define_method(SwigClassTaxesMap.klass, "erase", VALUEFUNC(_wrap_TaxesMap_erase), -1); + rb_define_method(SwigClassTaxesMap.klass, "find", VALUEFUNC(_wrap_TaxesMap_find), -1); + rb_define_method(SwigClassTaxesMap.klass, "lower_bound", VALUEFUNC(_wrap_TaxesMap_lower_bound), -1); + rb_define_method(SwigClassTaxesMap.klass, "upper_bound", VALUEFUNC(_wrap_TaxesMap_upper_bound), -1); + SwigClassTaxesMap.mark = 0; + SwigClassTaxesMap.destroy = (void (*)(void *)) free_std_map_Sl_int_Sc_CdiTaxis_Sg_; + SwigClassTaxesMap.trackObjects = 0; + + SwigClassZaxesMap.klass = rb_define_class("ZaxesMap", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__mapT_int_CdiZaxis_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiZaxis_t_t_t, (void *) &SwigClassZaxesMap); + rb_include_module(SwigClassZaxesMap.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassZaxesMap.klass, _wrap_ZaxesMap_allocate); + rb_define_method(SwigClassZaxesMap.klass, "initialize", VALUEFUNC(_wrap_new_ZaxesMap), -1); + rb_define_method(SwigClassZaxesMap.klass, "dup", VALUEFUNC(_wrap_ZaxesMap_dup), -1); + rb_define_method(SwigClassZaxesMap.klass, "delete", VALUEFUNC(_wrap_ZaxesMap_delete), -1); + rb_define_method(SwigClassZaxesMap.klass, "has_key?", VALUEFUNC(_wrap_ZaxesMap_has_keyq___), -1); + rb_define_method(SwigClassZaxesMap.klass, "keys", VALUEFUNC(_wrap_ZaxesMap_keys), -1); + rb_define_method(SwigClassZaxesMap.klass, "each", VALUEFUNC(_wrap_ZaxesMap_each), -1); + rb_define_method(SwigClassZaxesMap.klass, "select", VALUEFUNC(_wrap_ZaxesMap_select), -1); + rb_define_method(SwigClassZaxesMap.klass, "values_at", VALUEFUNC(_wrap_ZaxesMap_values_at), -1); + rb_define_method(SwigClassZaxesMap.klass, "each_key", VALUEFUNC(_wrap_ZaxesMap_each_key), -1); + rb_define_method(SwigClassZaxesMap.klass, "values", VALUEFUNC(_wrap_ZaxesMap_values), -1); + rb_define_method(SwigClassZaxesMap.klass, "each_value", VALUEFUNC(_wrap_ZaxesMap_each_value), -1); + rb_define_method(SwigClassZaxesMap.klass, "entries", VALUEFUNC(_wrap_ZaxesMap_entries), -1); + rb_define_method(SwigClassZaxesMap.klass, "include?", VALUEFUNC(_wrap_ZaxesMap_includeq___), -1); + rb_define_method(SwigClassZaxesMap.klass, "key_iterator", VALUEFUNC(_wrap_ZaxesMap_key_iterator), -1); + rb_define_method(SwigClassZaxesMap.klass, "value_iterator", VALUEFUNC(_wrap_ZaxesMap_value_iterator), -1); + rb_define_method(SwigClassZaxesMap.klass, "[]", VALUEFUNC(_wrap_ZaxesMap___getitem__), -1); + rb_define_method(SwigClassZaxesMap.klass, "[]=", VALUEFUNC(_wrap_ZaxesMap___setitem__), -1); + rb_define_method(SwigClassZaxesMap.klass, "inspect", VALUEFUNC(_wrap_ZaxesMap_inspect), -1); + rb_define_method(SwigClassZaxesMap.klass, "to_a", VALUEFUNC(_wrap_ZaxesMap_to_a), -1); + rb_define_method(SwigClassZaxesMap.klass, "to_s", VALUEFUNC(_wrap_ZaxesMap_to_s), -1); + rb_define_method(SwigClassZaxesMap.klass, "empty?", VALUEFUNC(_wrap_ZaxesMap_emptyq___), -1); + rb_define_method(SwigClassZaxesMap.klass, "size", VALUEFUNC(_wrap_ZaxesMap_size), -1); + rb_define_method(SwigClassZaxesMap.klass, "swap", VALUEFUNC(_wrap_ZaxesMap_swap), -1); + rb_define_method(SwigClassZaxesMap.klass, "begin", VALUEFUNC(_wrap_ZaxesMap_begin), -1); + rb_define_method(SwigClassZaxesMap.klass, "end", VALUEFUNC(_wrap_ZaxesMap_end), -1); + rb_define_method(SwigClassZaxesMap.klass, "rbegin", VALUEFUNC(_wrap_ZaxesMap_rbegin), -1); + rb_define_method(SwigClassZaxesMap.klass, "rend", VALUEFUNC(_wrap_ZaxesMap_rend), -1); + rb_define_method(SwigClassZaxesMap.klass, "clear", VALUEFUNC(_wrap_ZaxesMap_clear), -1); + rb_define_method(SwigClassZaxesMap.klass, "get_allocator", VALUEFUNC(_wrap_ZaxesMap_get_allocator), -1); + rb_define_method(SwigClassZaxesMap.klass, "count", VALUEFUNC(_wrap_ZaxesMap_count), -1); + rb_define_method(SwigClassZaxesMap.klass, "erase", VALUEFUNC(_wrap_ZaxesMap_erase), -1); + rb_define_method(SwigClassZaxesMap.klass, "find", VALUEFUNC(_wrap_ZaxesMap_find), -1); + rb_define_method(SwigClassZaxesMap.klass, "lower_bound", VALUEFUNC(_wrap_ZaxesMap_lower_bound), -1); + rb_define_method(SwigClassZaxesMap.klass, "upper_bound", VALUEFUNC(_wrap_ZaxesMap_upper_bound), -1); + SwigClassZaxesMap.mark = 0; + SwigClassZaxesMap.destroy = (void (*)(void *)) free_std_map_Sl_int_Sc_CdiZaxis_Sg_; + SwigClassZaxesMap.trackObjects = 0; + + SwigClassGridsMap.klass = rb_define_class("GridsMap", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_std__mapT_int_CdiGrid_std__lessT_int_t_std__allocatorT_std__pairT_int_const_CdiGrid_t_t_t, (void *) &SwigClassGridsMap); + rb_include_module(SwigClassGridsMap.klass, rb_eval_string("Enumerable")); + rb_define_alloc_func(SwigClassGridsMap.klass, _wrap_GridsMap_allocate); + rb_define_method(SwigClassGridsMap.klass, "initialize", VALUEFUNC(_wrap_new_GridsMap), -1); + rb_define_method(SwigClassGridsMap.klass, "dup", VALUEFUNC(_wrap_GridsMap_dup), -1); + rb_define_method(SwigClassGridsMap.klass, "delete", VALUEFUNC(_wrap_GridsMap_delete), -1); + rb_define_method(SwigClassGridsMap.klass, "has_key?", VALUEFUNC(_wrap_GridsMap_has_keyq___), -1); + rb_define_method(SwigClassGridsMap.klass, "keys", VALUEFUNC(_wrap_GridsMap_keys), -1); + rb_define_method(SwigClassGridsMap.klass, "each", VALUEFUNC(_wrap_GridsMap_each), -1); + rb_define_method(SwigClassGridsMap.klass, "select", VALUEFUNC(_wrap_GridsMap_select), -1); + rb_define_method(SwigClassGridsMap.klass, "values_at", VALUEFUNC(_wrap_GridsMap_values_at), -1); + rb_define_method(SwigClassGridsMap.klass, "each_key", VALUEFUNC(_wrap_GridsMap_each_key), -1); + rb_define_method(SwigClassGridsMap.klass, "values", VALUEFUNC(_wrap_GridsMap_values), -1); + rb_define_method(SwigClassGridsMap.klass, "each_value", VALUEFUNC(_wrap_GridsMap_each_value), -1); + rb_define_method(SwigClassGridsMap.klass, "entries", VALUEFUNC(_wrap_GridsMap_entries), -1); + rb_define_method(SwigClassGridsMap.klass, "include?", VALUEFUNC(_wrap_GridsMap_includeq___), -1); + rb_define_method(SwigClassGridsMap.klass, "key_iterator", VALUEFUNC(_wrap_GridsMap_key_iterator), -1); + rb_define_method(SwigClassGridsMap.klass, "value_iterator", VALUEFUNC(_wrap_GridsMap_value_iterator), -1); + rb_define_method(SwigClassGridsMap.klass, "[]", VALUEFUNC(_wrap_GridsMap___getitem__), -1); + rb_define_method(SwigClassGridsMap.klass, "[]=", VALUEFUNC(_wrap_GridsMap___setitem__), -1); + rb_define_method(SwigClassGridsMap.klass, "inspect", VALUEFUNC(_wrap_GridsMap_inspect), -1); + rb_define_method(SwigClassGridsMap.klass, "to_a", VALUEFUNC(_wrap_GridsMap_to_a), -1); + rb_define_method(SwigClassGridsMap.klass, "to_s", VALUEFUNC(_wrap_GridsMap_to_s), -1); + rb_define_method(SwigClassGridsMap.klass, "empty?", VALUEFUNC(_wrap_GridsMap_emptyq___), -1); + rb_define_method(SwigClassGridsMap.klass, "size", VALUEFUNC(_wrap_GridsMap_size), -1); + rb_define_method(SwigClassGridsMap.klass, "swap", VALUEFUNC(_wrap_GridsMap_swap), -1); + rb_define_method(SwigClassGridsMap.klass, "begin", VALUEFUNC(_wrap_GridsMap_begin), -1); + rb_define_method(SwigClassGridsMap.klass, "end", VALUEFUNC(_wrap_GridsMap_end), -1); + rb_define_method(SwigClassGridsMap.klass, "rbegin", VALUEFUNC(_wrap_GridsMap_rbegin), -1); + rb_define_method(SwigClassGridsMap.klass, "rend", VALUEFUNC(_wrap_GridsMap_rend), -1); + rb_define_method(SwigClassGridsMap.klass, "clear", VALUEFUNC(_wrap_GridsMap_clear), -1); + rb_define_method(SwigClassGridsMap.klass, "get_allocator", VALUEFUNC(_wrap_GridsMap_get_allocator), -1); + rb_define_method(SwigClassGridsMap.klass, "count", VALUEFUNC(_wrap_GridsMap_count), -1); + rb_define_method(SwigClassGridsMap.klass, "erase", VALUEFUNC(_wrap_GridsMap_erase), -1); + rb_define_method(SwigClassGridsMap.klass, "find", VALUEFUNC(_wrap_GridsMap_find), -1); + rb_define_method(SwigClassGridsMap.klass, "lower_bound", VALUEFUNC(_wrap_GridsMap_lower_bound), -1); + rb_define_method(SwigClassGridsMap.klass, "upper_bound", VALUEFUNC(_wrap_GridsMap_upper_bound), -1); + SwigClassGridsMap.mark = 0; + SwigClassGridsMap.destroy = (void (*)(void *)) free_std_map_Sl_int_Sc_CdiGrid_Sg_; + SwigClassGridsMap.trackObjects = 0; + + SwigClassCdiGrid.klass = rb_define_class("CdiGrid", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_CdiGrid, (void *) &SwigClassCdiGrid); + rb_define_alloc_func(SwigClassCdiGrid.klass, _wrap_CdiGrid_allocate); + rb_define_method(SwigClassCdiGrid.klass, "initialize", VALUEFUNC(_wrap_new_CdiGrid), -1); + rb_define_method(SwigClassCdiGrid.klass, "gridID=", VALUEFUNC(_wrap_CdiGrid_gridID_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "gridID", VALUEFUNC(_wrap_CdiGrid_gridID_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "type=", VALUEFUNC(_wrap_CdiGrid_type_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "type", VALUEFUNC(_wrap_CdiGrid_type_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "size=", VALUEFUNC(_wrap_CdiGrid_size_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "size", VALUEFUNC(_wrap_CdiGrid_size_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "xsize=", VALUEFUNC(_wrap_CdiGrid_xsize_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "xsize", VALUEFUNC(_wrap_CdiGrid_xsize_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "ysize=", VALUEFUNC(_wrap_CdiGrid_ysize_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "ysize", VALUEFUNC(_wrap_CdiGrid_ysize_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "prec=", VALUEFUNC(_wrap_CdiGrid_prec_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "prec", VALUEFUNC(_wrap_CdiGrid_prec_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "ncorner=", VALUEFUNC(_wrap_CdiGrid_ncorner_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "ncorner", VALUEFUNC(_wrap_CdiGrid_ncorner_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "hasXValues=", VALUEFUNC(_wrap_CdiGrid_hasXValues_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "hasXValues", VALUEFUNC(_wrap_CdiGrid_hasXValues_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "hasYValues=", VALUEFUNC(_wrap_CdiGrid_hasYValues_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "hasYValues", VALUEFUNC(_wrap_CdiGrid_hasYValues_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "hasBounds=", VALUEFUNC(_wrap_CdiGrid_hasBounds_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "hasBounds", VALUEFUNC(_wrap_CdiGrid_hasBounds_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "xvalues=", VALUEFUNC(_wrap_CdiGrid_xvalues_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "xvalues", VALUEFUNC(_wrap_CdiGrid_xvalues_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "yvalues=", VALUEFUNC(_wrap_CdiGrid_yvalues_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "yvalues", VALUEFUNC(_wrap_CdiGrid_yvalues_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "xbounds=", VALUEFUNC(_wrap_CdiGrid_xbounds_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "xbounds", VALUEFUNC(_wrap_CdiGrid_xbounds_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "ybounds=", VALUEFUNC(_wrap_CdiGrid_ybounds_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "ybounds", VALUEFUNC(_wrap_CdiGrid_ybounds_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "xname=", VALUEFUNC(_wrap_CdiGrid_xname_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "xname", VALUEFUNC(_wrap_CdiGrid_xname_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "xlongname=", VALUEFUNC(_wrap_CdiGrid_xlongname_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "xlongname", VALUEFUNC(_wrap_CdiGrid_xlongname_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "xstdname=", VALUEFUNC(_wrap_CdiGrid_xstdname_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "xstdname", VALUEFUNC(_wrap_CdiGrid_xstdname_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "xunits=", VALUEFUNC(_wrap_CdiGrid_xunits_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "xunits", VALUEFUNC(_wrap_CdiGrid_xunits_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "yname=", VALUEFUNC(_wrap_CdiGrid_yname_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "yname", VALUEFUNC(_wrap_CdiGrid_yname_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "ylongname=", VALUEFUNC(_wrap_CdiGrid_ylongname_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "ylongname", VALUEFUNC(_wrap_CdiGrid_ylongname_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "ystdname=", VALUEFUNC(_wrap_CdiGrid_ystdname_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "ystdname", VALUEFUNC(_wrap_CdiGrid_ystdname_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "yunits=", VALUEFUNC(_wrap_CdiGrid_yunits_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "yunits", VALUEFUNC(_wrap_CdiGrid_yunits_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "name=", VALUEFUNC(_wrap_CdiGrid_name_set), -1); + rb_define_method(SwigClassCdiGrid.klass, "name", VALUEFUNC(_wrap_CdiGrid_name_get), -1); + rb_define_method(SwigClassCdiGrid.klass, "getValues", VALUEFUNC(_wrap_CdiGrid_getValues), -1); + rb_define_method(SwigClassCdiGrid.klass, "getBounds", VALUEFUNC(_wrap_CdiGrid_getBounds), -1); + rb_define_method(SwigClassCdiGrid.klass, "getValuesAsPointer", VALUEFUNC(_wrap_CdiGrid_getValuesAsPointer), -1); + rb_define_method(SwigClassCdiGrid.klass, "getBoundsAsPointer", VALUEFUNC(_wrap_CdiGrid_getBoundsAsPointer), -1); + rb_define_method(SwigClassCdiGrid.klass, "getFloatVals", VALUEFUNC(_wrap_CdiGrid_getFloatVals), -1); + rb_define_method(SwigClassCdiGrid.klass, "getFloatBounds", VALUEFUNC(_wrap_CdiGrid_getFloatBounds), -1); + SwigClassCdiGrid.mark = 0; + SwigClassCdiGrid.destroy = (void (*)(void *)) free_CdiGrid; + SwigClassCdiGrid.trackObjects = 0; + + SwigClassCdiTaxis.klass = rb_define_class("CdiTaxis", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_CdiTaxis, (void *) &SwigClassCdiTaxis); + rb_define_alloc_func(SwigClassCdiTaxis.klass, _wrap_CdiTaxis_allocate); + rb_define_method(SwigClassCdiTaxis.klass, "initialize", VALUEFUNC(_wrap_new_CdiTaxis), -1); + rb_define_method(SwigClassCdiTaxis.klass, "taxisID=", VALUEFUNC(_wrap_CdiTaxis_taxisID_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "taxisID", VALUEFUNC(_wrap_CdiTaxis_taxisID_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "ntsteps=", VALUEFUNC(_wrap_CdiTaxis_ntsteps_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "ntsteps", VALUEFUNC(_wrap_CdiTaxis_ntsteps_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "unit=", VALUEFUNC(_wrap_CdiTaxis_unit_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "unit", VALUEFUNC(_wrap_CdiTaxis_unit_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "rdate=", VALUEFUNC(_wrap_CdiTaxis_rdate_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "rdate", VALUEFUNC(_wrap_CdiTaxis_rdate_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "rtime=", VALUEFUNC(_wrap_CdiTaxis_rtime_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "rtime", VALUEFUNC(_wrap_CdiTaxis_rtime_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "vdate=", VALUEFUNC(_wrap_CdiTaxis_vdate_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "vdate", VALUEFUNC(_wrap_CdiTaxis_vdate_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "vtime=", VALUEFUNC(_wrap_CdiTaxis_vtime_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "vtime", VALUEFUNC(_wrap_CdiTaxis_vtime_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "type=", VALUEFUNC(_wrap_CdiTaxis_type_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "type", VALUEFUNC(_wrap_CdiTaxis_type_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "calendar=", VALUEFUNC(_wrap_CdiTaxis_calendar_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "calendar", VALUEFUNC(_wrap_CdiTaxis_calendar_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "hasBounds=", VALUEFUNC(_wrap_CdiTaxis_hasBounds_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "hasBounds", VALUEFUNC(_wrap_CdiTaxis_hasBounds_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "name=", VALUEFUNC(_wrap_CdiTaxis_name_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "name", VALUEFUNC(_wrap_CdiTaxis_name_get), -1); + rb_define_method(SwigClassCdiTaxis.klass, "unitname=", VALUEFUNC(_wrap_CdiTaxis_unitname_set), -1); + rb_define_method(SwigClassCdiTaxis.klass, "unitname", VALUEFUNC(_wrap_CdiTaxis_unitname_get), -1); + SwigClassCdiTaxis.mark = 0; + SwigClassCdiTaxis.destroy = (void (*)(void *)) free_CdiTaxis; + SwigClassCdiTaxis.trackObjects = 0; + + SwigClassCdiZaxis.klass = rb_define_class("CdiZaxis", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_CdiZaxis, (void *) &SwigClassCdiZaxis); + rb_define_alloc_func(SwigClassCdiZaxis.klass, _wrap_CdiZaxis_allocate); + rb_define_method(SwigClassCdiZaxis.klass, "initialize", VALUEFUNC(_wrap_new_CdiZaxis), -1); + rb_define_method(SwigClassCdiZaxis.klass, "zaxisID=", VALUEFUNC(_wrap_CdiZaxis_zaxisID_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "zaxisID", VALUEFUNC(_wrap_CdiZaxis_zaxisID_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "type=", VALUEFUNC(_wrap_CdiZaxis_type_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "type", VALUEFUNC(_wrap_CdiZaxis_type_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "ltype=", VALUEFUNC(_wrap_CdiZaxis_ltype_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "ltype", VALUEFUNC(_wrap_CdiZaxis_ltype_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "size=", VALUEFUNC(_wrap_CdiZaxis_size_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "size", VALUEFUNC(_wrap_CdiZaxis_size_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "prec=", VALUEFUNC(_wrap_CdiZaxis_prec_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "prec", VALUEFUNC(_wrap_CdiZaxis_prec_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "plevels=", VALUEFUNC(_wrap_CdiZaxis_plevels_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "plevels", VALUEFUNC(_wrap_CdiZaxis_plevels_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "plbounds=", VALUEFUNC(_wrap_CdiZaxis_plbounds_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "plbounds", VALUEFUNC(_wrap_CdiZaxis_plbounds_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "pubounds=", VALUEFUNC(_wrap_CdiZaxis_pubounds_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "pubounds", VALUEFUNC(_wrap_CdiZaxis_pubounds_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "pweights=", VALUEFUNC(_wrap_CdiZaxis_pweights_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "pweights", VALUEFUNC(_wrap_CdiZaxis_pweights_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "levels=", VALUEFUNC(_wrap_CdiZaxis_levels_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "levels", VALUEFUNC(_wrap_CdiZaxis_levels_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "lbounds=", VALUEFUNC(_wrap_CdiZaxis_lbounds_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "lbounds", VALUEFUNC(_wrap_CdiZaxis_lbounds_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "ubounds=", VALUEFUNC(_wrap_CdiZaxis_ubounds_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "ubounds", VALUEFUNC(_wrap_CdiZaxis_ubounds_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "weights=", VALUEFUNC(_wrap_CdiZaxis_weights_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "weights", VALUEFUNC(_wrap_CdiZaxis_weights_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "name=", VALUEFUNC(_wrap_CdiZaxis_name_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "name", VALUEFUNC(_wrap_CdiZaxis_name_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "longname=", VALUEFUNC(_wrap_CdiZaxis_longname_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "longname", VALUEFUNC(_wrap_CdiZaxis_longname_get), -1); + rb_define_method(SwigClassCdiZaxis.klass, "units=", VALUEFUNC(_wrap_CdiZaxis_units_set), -1); + rb_define_method(SwigClassCdiZaxis.klass, "units", VALUEFUNC(_wrap_CdiZaxis_units_get), -1); + SwigClassCdiZaxis.mark = 0; + SwigClassCdiZaxis.destroy = (void (*)(void *)) free_CdiZaxis; + SwigClassCdiZaxis.trackObjects = 0; + + SwigClassCdiVariable.klass = rb_define_class("CdiVariable", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_CdiVariable, (void *) &SwigClassCdiVariable); + rb_define_alloc_func(SwigClassCdiVariable.klass, _wrap_CdiVariable_allocate); + rb_define_method(SwigClassCdiVariable.klass, "initialize", VALUEFUNC(_wrap_new_CdiVariable), -1); + rb_define_method(SwigClassCdiVariable.klass, "varID=", VALUEFUNC(_wrap_CdiVariable_varID_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "varID", VALUEFUNC(_wrap_CdiVariable_varID_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "zaxisID=", VALUEFUNC(_wrap_CdiVariable_zaxisID_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "zaxisID", VALUEFUNC(_wrap_CdiVariable_zaxisID_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "gridID=", VALUEFUNC(_wrap_CdiVariable_gridID_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "gridID", VALUEFUNC(_wrap_CdiVariable_gridID_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "taxisID=", VALUEFUNC(_wrap_CdiVariable_taxisID_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "taxisID", VALUEFUNC(_wrap_CdiVariable_taxisID_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "timeID=", VALUEFUNC(_wrap_CdiVariable_timeID_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "timeID", VALUEFUNC(_wrap_CdiVariable_timeID_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "vlistID=", VALUEFUNC(_wrap_CdiVariable_vlistID_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "vlistID", VALUEFUNC(_wrap_CdiVariable_vlistID_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "size=", VALUEFUNC(_wrap_CdiVariable_size_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "size", VALUEFUNC(_wrap_CdiVariable_size_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "code=", VALUEFUNC(_wrap_CdiVariable_code_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "code", VALUEFUNC(_wrap_CdiVariable_code_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "datatype=", VALUEFUNC(_wrap_CdiVariable_datatype_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "datatype", VALUEFUNC(_wrap_CdiVariable_datatype_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "streamID=", VALUEFUNC(_wrap_CdiVariable_streamID_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "streamID", VALUEFUNC(_wrap_CdiVariable_streamID_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "name=", VALUEFUNC(_wrap_CdiVariable_name_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "name", VALUEFUNC(_wrap_CdiVariable_name_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "longname=", VALUEFUNC(_wrap_CdiVariable_longname_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "longname", VALUEFUNC(_wrap_CdiVariable_longname_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "units=", VALUEFUNC(_wrap_CdiVariable_units_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "units", VALUEFUNC(_wrap_CdiVariable_units_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "stdname=", VALUEFUNC(_wrap_CdiVariable_stdname_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "stdname", VALUEFUNC(_wrap_CdiVariable_stdname_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "missval=", VALUEFUNC(_wrap_CdiVariable_missval_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "missval", VALUEFUNC(_wrap_CdiVariable_missval_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "values=", VALUEFUNC(_wrap_CdiVariable_values_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "values", VALUEFUNC(_wrap_CdiVariable_values_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "valuesWithLevel=", VALUEFUNC(_wrap_CdiVariable_valuesWithLevel_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "valuesWithLevel", VALUEFUNC(_wrap_CdiVariable_valuesWithLevel_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "grid=", VALUEFUNC(_wrap_CdiVariable_grid_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "grid", VALUEFUNC(_wrap_CdiVariable_grid_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "zaxis=", VALUEFUNC(_wrap_CdiVariable_zaxis_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "zaxis", VALUEFUNC(_wrap_CdiVariable_zaxis_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "taxis=", VALUEFUNC(_wrap_CdiVariable_taxis_set), -1); + rb_define_method(SwigClassCdiVariable.klass, "taxis", VALUEFUNC(_wrap_CdiVariable_taxis_get), -1); + rb_define_method(SwigClassCdiVariable.klass, "sinfo", VALUEFUNC(_wrap_CdiVariable_sinfo), -1); + rb_define_method(SwigClassCdiVariable.klass, "getValues", VALUEFUNC(_wrap_CdiVariable_getValues), -1); + rb_define_method(SwigClassCdiVariable.klass, "getValuesWithLevel", VALUEFUNC(_wrap_CdiVariable_getValuesWithLevel), -1); + rb_define_method(SwigClassCdiVariable.klass, "getFValues", VALUEFUNC(_wrap_CdiVariable_getFValues), -1); + rb_define_method(SwigClassCdiVariable.klass, "getFValuesWithLevel", VALUEFUNC(_wrap_CdiVariable_getFValuesWithLevel), -1); + rb_define_method(SwigClassCdiVariable.klass, "getValuesAsPointer", VALUEFUNC(_wrap_CdiVariable_getValuesAsPointer), -1); + rb_define_method(SwigClassCdiVariable.klass, "getValuesWithLevelAsPointer", VALUEFUNC(_wrap_CdiVariable_getValuesWithLevelAsPointer), -1); + SwigClassCdiVariable.mark = 0; + SwigClassCdiVariable.destroy = (void (*)(void *)) free_CdiVariable; + SwigClassCdiVariable.trackObjects = 0; + + SwigClassCdi.klass = rb_define_class("Cdi", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_Cdi, (void *) &SwigClassCdi); + rb_define_alloc_func(SwigClassCdi.klass, _wrap_Cdi_allocate); + rb_define_method(SwigClassCdi.klass, "initialize", VALUEFUNC(_wrap_new_Cdi), -1); + rb_define_method(SwigClassCdi.klass, "streamID=", VALUEFUNC(_wrap_Cdi_streamID_set), -1); + rb_define_method(SwigClassCdi.klass, "streamID", VALUEFUNC(_wrap_Cdi_streamID_get), -1); + rb_define_method(SwigClassCdi.klass, "vlistID=", VALUEFUNC(_wrap_Cdi_vlistID_set), -1); + rb_define_method(SwigClassCdi.klass, "vlistID", VALUEFUNC(_wrap_Cdi_vlistID_get), -1); + rb_define_method(SwigClassCdi.klass, "nvars=", VALUEFUNC(_wrap_Cdi_nvars_set), -1); + rb_define_method(SwigClassCdi.klass, "nvars", VALUEFUNC(_wrap_Cdi_nvars_get), -1); + rb_define_method(SwigClassCdi.klass, "nzaxes=", VALUEFUNC(_wrap_Cdi_nzaxes_set), -1); + rb_define_method(SwigClassCdi.klass, "nzaxes", VALUEFUNC(_wrap_Cdi_nzaxes_get), -1); + rb_define_method(SwigClassCdi.klass, "ngrids=", VALUEFUNC(_wrap_Cdi_ngrids_set), -1); + rb_define_method(SwigClassCdi.klass, "ngrids", VALUEFUNC(_wrap_Cdi_ngrids_get), -1); + rb_define_method(SwigClassCdi.klass, "ntaxes=", VALUEFUNC(_wrap_Cdi_ntaxes_set), -1); + rb_define_method(SwigClassCdi.klass, "ntaxes", VALUEFUNC(_wrap_Cdi_ntaxes_get), -1); + rb_define_method(SwigClassCdi.klass, "taxisID=", VALUEFUNC(_wrap_Cdi_taxisID_set), -1); + rb_define_method(SwigClassCdi.klass, "taxisID", VALUEFUNC(_wrap_Cdi_taxisID_get), -1); + rb_define_method(SwigClassCdi.klass, "varnames=", VALUEFUNC(_wrap_Cdi_varnames_set), -1); + rb_define_method(SwigClassCdi.klass, "varnames", VALUEFUNC(_wrap_Cdi_varnames_get), -1); + rb_define_method(SwigClassCdi.klass, "codes=", VALUEFUNC(_wrap_Cdi_codes_set), -1); + rb_define_method(SwigClassCdi.klass, "codes", VALUEFUNC(_wrap_Cdi_codes_get), -1); + rb_define_method(SwigClassCdi.klass, "variables=", VALUEFUNC(_wrap_Cdi_variables_set), -1); + rb_define_method(SwigClassCdi.klass, "variables", VALUEFUNC(_wrap_Cdi_variables_get), -1); + rb_define_method(SwigClassCdi.klass, "var=", VALUEFUNC(_wrap_Cdi_var_set), -1); + rb_define_method(SwigClassCdi.klass, "var", VALUEFUNC(_wrap_Cdi_var_get), -1); + rb_define_method(SwigClassCdi.klass, "varByCode=", VALUEFUNC(_wrap_Cdi_varByCode_set), -1); + rb_define_method(SwigClassCdi.klass, "varByCode", VALUEFUNC(_wrap_Cdi_varByCode_get), -1); + rb_define_method(SwigClassCdi.klass, "taxes=", VALUEFUNC(_wrap_Cdi_taxes_set), -1); + rb_define_method(SwigClassCdi.klass, "taxes", VALUEFUNC(_wrap_Cdi_taxes_get), -1); + rb_define_method(SwigClassCdi.klass, "zaxes=", VALUEFUNC(_wrap_Cdi_zaxes_set), -1); + rb_define_method(SwigClassCdi.klass, "zaxes", VALUEFUNC(_wrap_Cdi_zaxes_get), -1); + rb_define_method(SwigClassCdi.klass, "grids=", VALUEFUNC(_wrap_Cdi_grids_set), -1); + rb_define_method(SwigClassCdi.klass, "grids", VALUEFUNC(_wrap_Cdi_grids_get), -1); + rb_define_method(SwigClassCdi.klass, "griddes", VALUEFUNC(_wrap_Cdi_griddes), -1); + SwigClassCdi.mark = 0; + SwigClassCdi.destroy = (void (*)(void *)) free_Cdi; + SwigClassCdi.trackObjects = 0; +} + diff --git a/m4/libtool.m4 b/m4/libtool.m4 new file mode 100644 index 000000000..a3bc337b7 --- /dev/null +++ b/m4/libtool.m4 @@ -0,0 +1,8369 @@ +# 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="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_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|@@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 + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$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], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) +])# _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 new file mode 100644 index 000000000..94b082976 --- /dev/null +++ b/m4/ltoptions.m4 @@ -0,0 +1,437 @@ +# 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 new file mode 100644 index 000000000..48bc9344a --- /dev/null +++ b/m4/ltsugar.m4 @@ -0,0 +1,124 @@ +# 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 new file mode 100644 index 000000000..fa04b52a3 --- /dev/null +++ b/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# 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 4179 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.6' +macro_revision='2.4.6' +_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 new file mode 100644 index 000000000..c6b26f88f --- /dev/null +++ b/m4/lt~obsolete.m4 @@ -0,0 +1,99 @@ +# 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/src/Makefile.in b/src/Makefile.in new file mode 100644 index 000000000..b1322a41e --- /dev/null +++ b/src/Makefile.in @@ -0,0 +1,1620 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + 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@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +EXTRA_PROGRAMS = make_fint$(EXEEXT) +@ENABLE_CDI_LIB_TRUE@am__append_1 = \ +@ENABLE_CDI_LIB_TRUE@ calendar.h \ +@ENABLE_CDI_LIB_TRUE@ cdi.h \ +@ENABLE_CDI_LIB_TRUE@ cdi_datetime.h \ +@ENABLE_CDI_LIB_TRUE@ julian_date.h + +@ENABLE_CDI_LIB_TRUE@am__append_2 = libcdi.la +@ENABLE_CDI_LIB_TRUE@am__append_3 = pkgconfig/cdi.pc +@ENABLE_CDI_LIB_TRUE@am__append_4 = \ +@ENABLE_CDI_LIB_TRUE@ cmake/cdi/cdi-config-version.cmake \ +@ENABLE_CDI_LIB_TRUE@ cmake/cdi/cdi-config.cmake + +@ENABLE_CDI_LIB_TRUE@@ENABLE_CF_INTERFACE_TRUE@am__append_5 = cdi.inc +@ENABLE_CDI_LIB_TRUE@@ENABLE_ISOC_INTERFACE_TRUE@am__append_6 = $(mo_cdi_mod) +@ENABLE_CDI_LIB_TRUE@@ENABLE_ISOC_INTERFACE_TRUE@am__append_7 = libcdi_f2003.la +@ENABLE_CDI_LIB_TRUE@@ENABLE_ISOC_INTERFACE_TRUE@am__append_8 = pkgconfig/cdi_f2003.pc +@ENABLE_CDI_LIB_TRUE@@ENABLE_MPI_TRUE@am__append_9 = cdipio.h +@ENABLE_CDI_LIB_TRUE@@ENABLE_MPI_TRUE@am__append_10 = libcdipio.la +@ENABLE_CDI_LIB_TRUE@@ENABLE_MPI_TRUE@am__append_11 = pkgconfig/cdipio.pc +@ENABLE_CDI_LIB_TRUE@@ENABLE_CF_INTERFACE_TRUE@@ENABLE_MPI_TRUE@am__append_12 = cdipio.inc +@ENABLE_CDI_LIB_FALSE@am__append_13 = libcdi.la +@ENABLE_CDI_LIB_FALSE@@ENABLE_ISOC_INTERFACE_TRUE@am__append_14 = libcdi_f2003.la +@ENABLE_CDI_LIB_FALSE@@ENABLE_MPI_TRUE@am__append_15 = libcdipio.la +@with_on_demand_check_programs_TRUE@am__append_16 = libcdiresunpack.la +@with_on_demand_check_programs_FALSE@am__append_17 = libcdiresunpack.la +# TODO: this needs a refactoring but for now we set this macro here and not in +# config.h because the macro is used in several files that do not include the +# header file directly. +@ENABLE_MPI_TRUE@am__append_18 = -DUSE_MPI +@ENABLE_CF_INTERFACE_TRUE@am__append_19 = \ +@ENABLE_CF_INTERFACE_TRUE@ cdiFortran.c \ +@ENABLE_CF_INTERFACE_TRUE@ cfortran.h + +@HAVE_LIBGRIB_API_TRUE@am__append_20 = \ +@HAVE_LIBGRIB_API_TRUE@ gribapi_utilities.c \ +@HAVE_LIBGRIB_API_TRUE@ stream_gribapi.c + +@ENABLE_CF_INTERFACE_TRUE@am__append_21 = \ +@ENABLE_CF_INTERFACE_TRUE@ cdipioFortran.c \ +@ENABLE_CF_INTERFACE_TRUE@ cfortran.h + +@HAVE_PARALLEL_NC4_TRUE@am__append_22 = pio_cdf_int.c +@ENABLE_ISOC_INTERFACE_TRUE@am__append_23 = $(mo_cdi_mod) +subdir = src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \ + $(top_srcdir)/m4/acx_c_package.m4 \ + $(top_srcdir)/m4/acx_cfortran_flags.m4 \ + $(top_srcdir)/m4/acx_check_cfortran.m4 \ + $(top_srcdir)/m4/acx_check_strptr_convert.m4 \ + $(top_srcdir)/m4/acx_execinfo.m4 \ + $(top_srcdir)/m4/acx_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_fortran_include_flag.m4 \ + $(top_srcdir)/m4/acx_fortran_package.m4 \ + $(top_srcdir)/m4/acx_lang_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_package.m4 \ + $(top_srcdir)/m4/acx_lt_problems.m4 \ + $(top_srcdir)/m4/acx_m4_list_to_quoted_strings.m4 \ + $(top_srcdir)/m4/acx_mpirun.m4 $(top_srcdir)/m4/acx_mv_obj.m4 \ + $(top_srcdir)/m4/acx_option_search_libs.m4 \ + $(top_srcdir)/m4/acx_options.m4 \ + $(top_srcdir)/m4/acx_prog_cc_posix.m4 \ + $(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \ + $(top_srcdir)/m4/acx_sl_mod_suffix.m4 \ + $(top_srcdir)/m4/acx_tls_xlc_retry.m4 \ + $(top_srcdir)/m4/acx_use_libtool_configuration.m4 \ + $(top_srcdir)/m4/acx_uuid.m4 $(top_srcdir)/m4/asx_tr_arg.m4 \ + $(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/kpse_libtool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/ac_lang_program_fortran.m4 \ + $(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_c_check_include.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__include_HEADERS_DIST) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cmakedir)" \ + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \ + "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +libcdi_la_LIBADD = +am__libcdi_la_SOURCES_DIST = async_worker.c async_worker.h basetime.c \ + basetime.h binary.c binary.h calendar.c calendar.h cdf.c cdf.h \ + cdf_config.h cdf_int.c cdf_int.h cdf_lazy_grid.c \ + cdf_lazy_grid.h cdf_read.c cdf_records.c cdf_util.c cdf_util.h \ + cdf_write.c cdi.h cdi_across.c cdi_across.h cdi_att.c \ + cdi_att.h cdi_cksum.c cdi_cksum.h cdi_datetime.c \ + cdi_datetime.h cdi_error.c cdi_fdb.c cdi_fdb.h cdi_int.c \ + cdi_int.h cdi_key.c cdi_key.h cdi_limits.h cdi_query.c \ + cdi_util.c cdi_uuid.h cgribex.h cgribexlib.c cksum.c cksum.h \ + dmemory.c dmemory.h dtypes.h error.c error.h exse.h extra.h \ + extralib.c file.c file.h gaussian_latitudes.c \ + get_num_missvals.c get_num_missvals.h grb_read.c grb_write.c \ + gribapi.c gribapi.h gribapi_utilities.h grid.c grid.h ieg.h \ + ieglib.c input_file.c input_file.h institution.c institution.h \ + iterator.c iterator.h iterator_fallback.c iterator_fallback.h \ + iterator_grib.c iterator_grib.h julian_date.c julian_date.h \ + model.c model.h namespace.c namespace.h normalize_month.h \ + referenceCounting.c referenceCounting.h resource_handle.c \ + resource_handle.h serialize.c serialize.h service.h \ + servicelib.c stream.c stream_cdf.h stream_cdf_i.c \ + stream_cdf_o.c stream_cdf_postdef.h stream_cdf_time.c \ + stream_cgribex.c stream_cgribex.h stream_ext.c stream_ext.h \ + stream_grb.c stream_grb.h stream_gribapi.h stream_ieg.c \ + stream_ieg.h stream_read.c stream_record.c stream_scan.c \ + stream_scan.h stream_srv.c stream_srv.h stream_var.c \ + stream_write.c subtype.c subtype.h swap.c swap.h table.c \ + table.h tablepar.h taxis.c taxis.h tsteps.c util.c varscan.c \ + varscan.h version.c vlist.c vlist.h vlist_var.c vlist_var.h \ + vlist_var_key.c vlist_var_pack.c zaxis.c zaxis.h cdiFortran.c \ + cfortran.h gribapi_utilities.c stream_gribapi.c +@ENABLE_CF_INTERFACE_TRUE@am__objects_1 = cdiFortran.lo +@HAVE_LIBGRIB_API_TRUE@am__objects_2 = gribapi_utilities.lo \ +@HAVE_LIBGRIB_API_TRUE@ stream_gribapi.lo +am_libcdi_la_OBJECTS = async_worker.lo basetime.lo binary.lo \ + calendar.lo cdf.lo cdf_int.lo cdf_lazy_grid.lo cdf_read.lo \ + cdf_records.lo cdf_util.lo cdf_write.lo cdi_across.lo \ + cdi_att.lo cdi_cksum.lo cdi_datetime.lo cdi_error.lo \ + cdi_fdb.lo cdi_int.lo cdi_key.lo cdi_query.lo cdi_util.lo \ + cgribexlib.lo cksum.lo dmemory.lo error.lo extralib.lo file.lo \ + gaussian_latitudes.lo get_num_missvals.lo grb_read.lo \ + grb_write.lo gribapi.lo grid.lo ieglib.lo input_file.lo \ + institution.lo iterator.lo iterator_fallback.lo \ + iterator_grib.lo julian_date.lo model.lo namespace.lo \ + referenceCounting.lo resource_handle.lo serialize.lo \ + servicelib.lo stream.lo stream_cdf_i.lo stream_cdf_o.lo \ + stream_cdf_time.lo stream_cgribex.lo stream_ext.lo \ + stream_grb.lo stream_ieg.lo stream_read.lo stream_record.lo \ + stream_scan.lo stream_srv.lo stream_var.lo stream_write.lo \ + subtype.lo swap.lo table.lo taxis.lo tsteps.lo util.lo \ + varscan.lo version.lo vlist.lo vlist_var.lo vlist_var_key.lo \ + vlist_var_pack.lo zaxis.lo $(am__objects_1) $(am__objects_2) +libcdi_la_OBJECTS = $(am_libcdi_la_OBJECTS) +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 = +@ENABLE_CDI_LIB_FALSE@am_libcdi_la_rpath = +@ENABLE_CDI_LIB_TRUE@am_libcdi_la_rpath = -rpath $(libdir) +libcdi_f2003_la_DEPENDENCIES = libcdi.la +am_libcdi_f2003_la_OBJECTS = mo_cdi.lo +libcdi_f2003_la_OBJECTS = $(am_libcdi_f2003_la_OBJECTS) +@ENABLE_CDI_LIB_FALSE@@ENABLE_ISOC_INTERFACE_TRUE@am_libcdi_f2003_la_rpath = +@ENABLE_CDI_LIB_TRUE@@ENABLE_ISOC_INTERFACE_TRUE@am_libcdi_f2003_la_rpath = \ +@ENABLE_CDI_LIB_TRUE@@ENABLE_ISOC_INTERFACE_TRUE@ -rpath \ +@ENABLE_CDI_LIB_TRUE@@ENABLE_ISOC_INTERFACE_TRUE@ $(libdir) +am__DEPENDENCIES_1 = +libcdipio_la_DEPENDENCIES = libcdi.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am__libcdipio_la_SOURCES_DIST = cdipio.h pio.c pio.h pio_cdf_int.h \ + pio_client.c pio_client.h pio_comm.c pio_comm.h pio_conf.c \ + pio_conf.h pio_dbuffer.c pio_dbuffer.h pio_dist_grid.c \ + pio_dist_grid.h pio_id_set.h pio_idxlist_cache.c \ + pio_idxlist_cache.h pio_impl.h pio_interface.c pio_interface.h \ + pio_mpi_fw_at_all.c pio_mpi_fw_at_reblock.c \ + pio_mpi_fw_ordered.c pio_mpinonb.c pio_posixasynch.c \ + pio_posixfpguardsendrecv.c pio_posixnonb.c pio_record_send.c \ + pio_roles.c pio_rpc.c pio_rpc.h pio_serialize.c \ + pio_serialize.h pio_server.c pio_server.h pio_util.c \ + pio_util.h pio_xmap_cache.c pio_xmap_cache.h resource_unpack.c \ + resource_unpack.h cdipioFortran.c cfortran.h pio_cdf_int.c +@ENABLE_CF_INTERFACE_TRUE@am__objects_3 = cdipioFortran.lo +@HAVE_PARALLEL_NC4_TRUE@am__objects_4 = pio_cdf_int.lo +am_libcdipio_la_OBJECTS = pio.lo pio_client.lo pio_comm.lo pio_conf.lo \ + pio_dbuffer.lo pio_dist_grid.lo pio_idxlist_cache.lo \ + pio_interface.lo pio_mpi_fw_at_all.lo pio_mpi_fw_at_reblock.lo \ + pio_mpi_fw_ordered.lo pio_mpinonb.lo pio_posixasynch.lo \ + pio_posixfpguardsendrecv.lo pio_posixnonb.lo \ + pio_record_send.lo pio_roles.lo pio_rpc.lo pio_serialize.lo \ + pio_server.lo pio_util.lo pio_xmap_cache.lo resource_unpack.lo \ + $(am__objects_3) $(am__objects_4) +libcdipio_la_OBJECTS = $(am_libcdipio_la_OBJECTS) +@ENABLE_CDI_LIB_FALSE@@ENABLE_MPI_TRUE@am_libcdipio_la_rpath = +@ENABLE_CDI_LIB_TRUE@@ENABLE_MPI_TRUE@am_libcdipio_la_rpath = -rpath \ +@ENABLE_CDI_LIB_TRUE@@ENABLE_MPI_TRUE@ $(libdir) +libcdiresunpack_la_DEPENDENCIES = libcdi.la +am_libcdiresunpack_la_OBJECTS = resource_unpack.lo +libcdiresunpack_la_OBJECTS = $(am_libcdiresunpack_la_OBJECTS) +@with_on_demand_check_programs_FALSE@am_libcdiresunpack_la_rpath = +@with_on_demand_check_programs_TRUE@am_libcdiresunpack_la_rpath = +am_make_fint_OBJECTS = make_fint-make_fint.$(OBJEXT) +make_fint_OBJECTS = $(am_make_fint_OBJECTS) +make_fint_DEPENDENCIES = $(LIBOBJS) +make_fint_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(make_fint_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 +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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@ +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = $(DEPDIR)/getline.Po \ + ./$(DEPDIR)/async_worker.Plo ./$(DEPDIR)/basetime.Plo \ + ./$(DEPDIR)/binary.Plo ./$(DEPDIR)/calendar.Plo \ + ./$(DEPDIR)/cdf.Plo ./$(DEPDIR)/cdf_int.Plo \ + ./$(DEPDIR)/cdf_lazy_grid.Plo ./$(DEPDIR)/cdf_read.Plo \ + ./$(DEPDIR)/cdf_records.Plo ./$(DEPDIR)/cdf_util.Plo \ + ./$(DEPDIR)/cdf_write.Plo ./$(DEPDIR)/cdiFortran.Plo \ + ./$(DEPDIR)/cdi_across.Plo ./$(DEPDIR)/cdi_att.Plo \ + ./$(DEPDIR)/cdi_cksum.Plo ./$(DEPDIR)/cdi_datetime.Plo \ + ./$(DEPDIR)/cdi_error.Plo ./$(DEPDIR)/cdi_fdb.Plo \ + ./$(DEPDIR)/cdi_int.Plo ./$(DEPDIR)/cdi_key.Plo \ + ./$(DEPDIR)/cdi_query.Plo ./$(DEPDIR)/cdi_util.Plo \ + ./$(DEPDIR)/cdipioFortran.Plo ./$(DEPDIR)/cgribexlib.Plo \ + ./$(DEPDIR)/cksum.Plo ./$(DEPDIR)/dmemory.Plo \ + ./$(DEPDIR)/error.Plo ./$(DEPDIR)/extralib.Plo \ + ./$(DEPDIR)/file.Plo ./$(DEPDIR)/gaussian_latitudes.Plo \ + ./$(DEPDIR)/get_num_missvals.Plo ./$(DEPDIR)/grb_read.Plo \ + ./$(DEPDIR)/grb_write.Plo ./$(DEPDIR)/gribapi.Plo \ + ./$(DEPDIR)/gribapi_utilities.Plo ./$(DEPDIR)/grid.Plo \ + ./$(DEPDIR)/ieglib.Plo ./$(DEPDIR)/input_file.Plo \ + ./$(DEPDIR)/institution.Plo ./$(DEPDIR)/iterator.Plo \ + ./$(DEPDIR)/iterator_fallback.Plo \ + ./$(DEPDIR)/iterator_grib.Plo ./$(DEPDIR)/julian_date.Plo \ + ./$(DEPDIR)/make_fint-make_fint.Po ./$(DEPDIR)/model.Plo \ + ./$(DEPDIR)/namespace.Plo ./$(DEPDIR)/pio.Plo \ + ./$(DEPDIR)/pio_cdf_int.Plo ./$(DEPDIR)/pio_client.Plo \ + ./$(DEPDIR)/pio_comm.Plo ./$(DEPDIR)/pio_conf.Plo \ + ./$(DEPDIR)/pio_dbuffer.Plo ./$(DEPDIR)/pio_dist_grid.Plo \ + ./$(DEPDIR)/pio_idxlist_cache.Plo \ + ./$(DEPDIR)/pio_interface.Plo \ + ./$(DEPDIR)/pio_mpi_fw_at_all.Plo \ + ./$(DEPDIR)/pio_mpi_fw_at_reblock.Plo \ + ./$(DEPDIR)/pio_mpi_fw_ordered.Plo ./$(DEPDIR)/pio_mpinonb.Plo \ + ./$(DEPDIR)/pio_posixasynch.Plo \ + ./$(DEPDIR)/pio_posixfpguardsendrecv.Plo \ + ./$(DEPDIR)/pio_posixnonb.Plo ./$(DEPDIR)/pio_record_send.Plo \ + ./$(DEPDIR)/pio_roles.Plo ./$(DEPDIR)/pio_rpc.Plo \ + ./$(DEPDIR)/pio_serialize.Plo ./$(DEPDIR)/pio_server.Plo \ + ./$(DEPDIR)/pio_util.Plo ./$(DEPDIR)/pio_xmap_cache.Plo \ + ./$(DEPDIR)/referenceCounting.Plo \ + ./$(DEPDIR)/resource_handle.Plo \ + ./$(DEPDIR)/resource_unpack.Plo ./$(DEPDIR)/serialize.Plo \ + ./$(DEPDIR)/servicelib.Plo ./$(DEPDIR)/stream.Plo \ + ./$(DEPDIR)/stream_cdf_i.Plo ./$(DEPDIR)/stream_cdf_o.Plo \ + ./$(DEPDIR)/stream_cdf_time.Plo ./$(DEPDIR)/stream_cgribex.Plo \ + ./$(DEPDIR)/stream_ext.Plo ./$(DEPDIR)/stream_grb.Plo \ + ./$(DEPDIR)/stream_gribapi.Plo ./$(DEPDIR)/stream_ieg.Plo \ + ./$(DEPDIR)/stream_read.Plo ./$(DEPDIR)/stream_record.Plo \ + ./$(DEPDIR)/stream_scan.Plo ./$(DEPDIR)/stream_srv.Plo \ + ./$(DEPDIR)/stream_var.Plo ./$(DEPDIR)/stream_write.Plo \ + ./$(DEPDIR)/subtype.Plo ./$(DEPDIR)/swap.Plo \ + ./$(DEPDIR)/table.Plo ./$(DEPDIR)/taxis.Plo \ + ./$(DEPDIR)/tsteps.Plo ./$(DEPDIR)/util.Plo \ + ./$(DEPDIR)/varscan.Plo ./$(DEPDIR)/version.Plo \ + ./$(DEPDIR)/vlist.Plo ./$(DEPDIR)/vlist_var.Plo \ + ./$(DEPDIR)/vlist_var_key.Plo ./$(DEPDIR)/vlist_var_pack.Plo \ + ./$(DEPDIR)/zaxis.Plo +am__mv = mv -f +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_FC = $(am__v_FC_@AM_V@) +am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) +am__v_FC_0 = @echo " FC " $@; +am__v_FC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(libcdi_la_SOURCES) $(libcdi_f2003_la_SOURCES) \ + $(libcdipio_la_SOURCES) $(libcdiresunpack_la_SOURCES) \ + $(make_fint_SOURCES) +DIST_SOURCES = $(am__libcdi_la_SOURCES_DIST) \ + $(libcdi_f2003_la_SOURCES) $(am__libcdipio_la_SOURCES_DIST) \ + $(libcdiresunpack_la_SOURCES) $(make_fint_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(nodist_cmake_DATA) $(nodist_pkgconfig_DATA) +am__include_HEADERS_DIST = calendar.h cdi.h cdi_datetime.h \ + julian_date.h cdi.inc cdipio.h cdipio.inc +HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) +am__extra_recursive_targets = examples-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in +# 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)` +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/config/depcomp getline.c +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCE_UUIDROOT = @DCE_UUIDROOT@ +DCE_UUID_C_INCLUDE = @DCE_UUID_C_INCLUDE@ +DCE_UUID_C_LIB = @DCE_UUID_C_LIB@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECCODES_INCLUDE = @ECCODES_INCLUDE@ +ECCODES_LIBS = @ECCODES_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_ACROSS = @ENABLE_ACROSS@ +ENABLE_CDI_LIB = @ENABLE_CDI_LIB@ +ENABLE_CGRIBEX = @ENABLE_CGRIBEX@ +ENABLE_EXTRA = @ENABLE_EXTRA@ +ENABLE_GRIB = @ENABLE_GRIB@ +ENABLE_IEG = @ENABLE_IEG@ +ENABLE_MPI = @ENABLE_MPI@ +ENABLE_NC2 = @ENABLE_NC2@ +ENABLE_NC4 = @ENABLE_NC4@ +ENABLE_NC4HDF5 = @ENABLE_NC4HDF5@ +ENABLE_NC4SZLIB = @ENABLE_NC4SZLIB@ +ENABLE_NETCDF = @ENABLE_NETCDF@ +ENABLE_SERVICE = @ENABLE_SERVICE@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCMODCASE = @FCMODCASE@ +FCMODEXT = @FCMODEXT@ +FC_DEFINE = @FC_DEFINE@ +FC_MOD_FLAG = @FC_MOD_FLAG@ +FC_OPTINC = @FC_OPTINC@ +FDB5_INCLUDE = @FDB5_INCLUDE@ +FDB5_LIBS = @FDB5_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GRIB_API_INCLUDE = @GRIB_API_INCLUDE@ +GRIB_API_LIBS = @GRIB_API_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPIROOT = @MPIROOT@ +MPI_C_INCLUDE = @MPI_C_INCLUDE@ +MPI_C_LIB = @MPI_C_LIB@ +MPI_FC_LIB = @MPI_FC_LIB@ +MPI_FC_MOD = @MPI_FC_MOD@ +MPI_LAUNCH = @MPI_LAUNCH@ +NC_CONFIG = @NC_CONFIG@ +NETCDF_INCLUDE = @NETCDF_INCLUDE@ +NETCDF_LIBS = @NETCDF_LIBS@ +NETCDF_ROOT = @NETCDF_ROOT@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OSSP_UUIDROOT = @OSSP_UUIDROOT@ +OSSP_UUID_C_INCLUDE = @OSSP_UUID_C_INCLUDE@ +OSSP_UUID_C_LIB = @OSSP_UUID_C_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PPM_CORE_C_INCLUDE = @PPM_CORE_C_INCLUDE@ +PPM_CORE_C_LIB = @PPM_CORE_C_LIB@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PLATFORM_SITE_PKG = @PYTHON_PLATFORM_SITE_PKG@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SYSTEM_TYPE = @SYSTEM_TYPE@ +SZLIB_INCLUDE = @SZLIB_INCLUDE@ +SZLIB_LIBS = @SZLIB_LIBS@ +THREADS_INCLUDE = @THREADS_INCLUDE@ +THREADS_LIBS = @THREADS_LIBS@ +UTIL_LINUX_UUIDROOT = @UTIL_LINUX_UUIDROOT@ +UTIL_LINUX_UUID_C_INCLUDE = @UTIL_LINUX_UUID_C_INCLUDE@ +UTIL_LINUX_UUID_C_LIB = @UTIL_LINUX_UUID_C_LIB@ +UUID_C_INCLUDE = @UUID_C_INCLUDE@ +UUID_C_LIB = @UUID_C_LIB@ +VERSION = @VERSION@ +YAXT_C_INCLUDE = @YAXT_C_INCLUDE@ +YAXT_C_LIB = @YAXT_C_LIB@ +YAXT_FC_LIB = @YAXT_FC_LIB@ +YAXT_FC_MOD = @YAXT_FC_MOD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pkgconfigdir = $(libdir)/pkgconfig +cmakedir = $(libdir)/cmake +include_HEADERS = $(am__append_1) $(am__append_5) $(am__append_9) \ + $(am__append_12) +nodist_include_HEADERS = $(am__append_6) +lib_LTLIBRARIES = $(am__append_2) $(am__append_7) $(am__append_10) +check_LTLIBRARIES = $(am__append_16) +noinst_LTLIBRARIES = $(am__append_13) $(am__append_14) \ + $(am__append_15) $(am__append_17) +EXTRA_DIST = \ + cdilib.c \ + make_cdilib + +nodist_pkgconfig_DATA = $(am__append_3) $(am__append_8) \ + $(am__append_11) +nodist_cmake_DATA = $(am__append_4) +@FC_MOD_UPPERCASE_FALSE@mo_cdi_mod = mo_cdi.$(FCMODEXT) +@FC_MOD_UPPERCASE_TRUE@mo_cdi_mod = MO_CDI.$(FCMODEXT) +AM_CPPFLAGS = $(PPM_CORE_C_INCLUDE) $(YAXT_C_INCLUDE) $(MPI_C_INCLUDE) \ + $(am__append_18) +libcdiresunpack_la_SOURCES = \ + resource_unpack.c \ + resource_unpack.h + +libcdiresunpack_la_LIBADD = libcdi.la +make_fint_SOURCES = make_fint.c +make_fint_CFLAGS = -static +make_fint_LDADD = $(LIBOBJS) +libcdi_la_SOURCES = async_worker.c async_worker.h basetime.c \ + basetime.h binary.c binary.h calendar.c calendar.h cdf.c cdf.h \ + cdf_config.h cdf_int.c cdf_int.h cdf_lazy_grid.c \ + cdf_lazy_grid.h cdf_read.c cdf_records.c cdf_util.c cdf_util.h \ + cdf_write.c cdi.h cdi_across.c cdi_across.h cdi_att.c \ + cdi_att.h cdi_cksum.c cdi_cksum.h cdi_datetime.c \ + cdi_datetime.h cdi_error.c cdi_fdb.c cdi_fdb.h cdi_int.c \ + cdi_int.h cdi_key.c cdi_key.h cdi_limits.h cdi_query.c \ + cdi_util.c cdi_uuid.h cgribex.h cgribexlib.c cksum.c cksum.h \ + dmemory.c dmemory.h dtypes.h error.c error.h exse.h extra.h \ + extralib.c file.c file.h gaussian_latitudes.c \ + get_num_missvals.c get_num_missvals.h grb_read.c grb_write.c \ + gribapi.c gribapi.h gribapi_utilities.h grid.c grid.h ieg.h \ + ieglib.c input_file.c input_file.h institution.c institution.h \ + iterator.c iterator.h iterator_fallback.c iterator_fallback.h \ + iterator_grib.c iterator_grib.h julian_date.c julian_date.h \ + model.c model.h namespace.c namespace.h normalize_month.h \ + referenceCounting.c referenceCounting.h resource_handle.c \ + resource_handle.h serialize.c serialize.h service.h \ + servicelib.c stream.c stream_cdf.h stream_cdf_i.c \ + stream_cdf_o.c stream_cdf_postdef.h stream_cdf_time.c \ + stream_cgribex.c stream_cgribex.h stream_ext.c stream_ext.h \ + stream_grb.c stream_grb.h stream_gribapi.h stream_ieg.c \ + stream_ieg.h stream_read.c stream_record.c stream_scan.c \ + stream_scan.h stream_srv.c stream_srv.h stream_var.c \ + stream_write.c subtype.c subtype.h swap.c swap.h table.c \ + table.h tablepar.h taxis.c taxis.h tsteps.c util.c varscan.c \ + varscan.h version.c vlist.c vlist.h vlist_var.c vlist_var.h \ + vlist_var_key.c vlist_var_pack.c zaxis.c zaxis.h \ + $(am__append_19) $(am__append_20) +libcdi_f2003_la_SOURCES = mo_cdi.f90 +libcdi_f2003_la_LIBADD = libcdi.la +libcdipio_la_SOURCES = cdipio.h pio.c pio.h pio_cdf_int.h pio_client.c \ + pio_client.h pio_comm.c pio_comm.h pio_conf.c pio_conf.h \ + pio_dbuffer.c pio_dbuffer.h pio_dist_grid.c pio_dist_grid.h \ + pio_id_set.h pio_idxlist_cache.c pio_idxlist_cache.h \ + pio_impl.h pio_interface.c pio_interface.h pio_mpi_fw_at_all.c \ + pio_mpi_fw_at_reblock.c pio_mpi_fw_ordered.c pio_mpinonb.c \ + pio_posixasynch.c pio_posixfpguardsendrecv.c pio_posixnonb.c \ + pio_record_send.c pio_roles.c pio_rpc.c pio_rpc.h \ + pio_serialize.c pio_serialize.h pio_server.c pio_server.h \ + pio_util.c pio_util.h pio_xmap_cache.c pio_xmap_cache.h \ + resource_unpack.c resource_unpack.h $(am__append_21) \ + $(am__append_22) +libcdipio_la_LIBADD = libcdi.la $(LIBRT) $(PPM_CORE_C_LIB) $(YAXT_C_LIB) $(MPI_C_LIB) +MOSTLYCLEANFILES = make_fint $(am__append_23) +MAINTAINERCLEANFILES = \ + cdi.inc \ + cdiFortran.c \ + cdilib.c \ + cdipio.inc \ + cdipioFortran.c \ + mo_cdi.f90 + + +# Compile programs using Libtool: +COMPILE = $(LTCOMPILE) +FCCOMPILE = $(LTFCCOMPILE) +PPFCCOMPILE = $(LTPPFCCOMPILE) +CXXCOMPILE = $(LTCXXCOMPILE) + +# Compile *.F90 without CPPFLAGS, which are normally meant for the C compiler +# and might not be compatible with the Fortran compiler: +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .f90 .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status src/config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +clean-checkLTLIBRARIES: + -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) + @list='$(check_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libcdi.la: $(libcdi_la_OBJECTS) $(libcdi_la_DEPENDENCIES) $(EXTRA_libcdi_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libcdi_la_rpath) $(libcdi_la_OBJECTS) $(libcdi_la_LIBADD) $(LIBS) + +libcdi_f2003.la: $(libcdi_f2003_la_OBJECTS) $(libcdi_f2003_la_DEPENDENCIES) $(EXTRA_libcdi_f2003_la_DEPENDENCIES) + $(AM_V_FCLD)$(FCLINK) $(am_libcdi_f2003_la_rpath) $(libcdi_f2003_la_OBJECTS) $(libcdi_f2003_la_LIBADD) $(LIBS) + +libcdipio.la: $(libcdipio_la_OBJECTS) $(libcdipio_la_DEPENDENCIES) $(EXTRA_libcdipio_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libcdipio_la_rpath) $(libcdipio_la_OBJECTS) $(libcdipio_la_LIBADD) $(LIBS) + +libcdiresunpack.la: $(libcdiresunpack_la_OBJECTS) $(libcdiresunpack_la_DEPENDENCIES) $(EXTRA_libcdiresunpack_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libcdiresunpack_la_rpath) $(libcdiresunpack_la_OBJECTS) $(libcdiresunpack_la_LIBADD) $(LIBS) + +make_fint$(EXEEXT): $(make_fint_OBJECTS) $(make_fint_DEPENDENCIES) $(EXTRA_make_fint_DEPENDENCIES) + @rm -f make_fint$(EXEEXT) + $(AM_V_CCLD)$(make_fint_LINK) $(make_fint_OBJECTS) $(make_fint_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getline.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/async_worker.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basetime.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_int.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_lazy_grid.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_read.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_records.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_write.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdiFortran.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_across.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_att.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_cksum.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_datetime.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_error.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_fdb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_int.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_key.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_query.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdipioFortran.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgribexlib.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cksum.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmemory.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extralib.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaussian_latitudes.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_num_missvals.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grb_read.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grb_write.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gribapi.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gribapi_utilities.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grid.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieglib.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input_file.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/institution.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterator_fallback.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterator_grib.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/julian_date.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_fint-make_fint.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/namespace.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_cdf_int.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_client.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_comm.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_conf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_dbuffer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_dist_grid.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_idxlist_cache.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_interface.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_mpi_fw_at_all.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_mpi_fw_at_reblock.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_mpi_fw_ordered.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_mpinonb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_posixasynch.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_posixfpguardsendrecv.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_posixnonb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_record_send.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_roles.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_rpc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_serialize.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_server.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_xmap_cache.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/referenceCounting.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_handle.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_unpack.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serialize.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/servicelib.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_cdf_i.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_cdf_o.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_cdf_time.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_cgribex.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_ext.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_grb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_gribapi.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_ieg.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_read.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_record.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_scan.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_srv.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_var.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_write.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subtype.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/table.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taxis.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsteps.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/varscan.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vlist.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vlist_var.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vlist_var_key.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vlist_var_pack.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zaxis.Plo@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +make_fint-make_fint.o: make_fint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(make_fint_CFLAGS) $(CFLAGS) -MT make_fint-make_fint.o -MD -MP -MF $(DEPDIR)/make_fint-make_fint.Tpo -c -o make_fint-make_fint.o `test -f 'make_fint.c' || echo '$(srcdir)/'`make_fint.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/make_fint-make_fint.Tpo $(DEPDIR)/make_fint-make_fint.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='make_fint.c' object='make_fint-make_fint.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) $(make_fint_CFLAGS) $(CFLAGS) -c -o make_fint-make_fint.o `test -f 'make_fint.c' || echo '$(srcdir)/'`make_fint.c + +make_fint-make_fint.obj: make_fint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(make_fint_CFLAGS) $(CFLAGS) -MT make_fint-make_fint.obj -MD -MP -MF $(DEPDIR)/make_fint-make_fint.Tpo -c -o make_fint-make_fint.obj `if test -f 'make_fint.c'; then $(CYGPATH_W) 'make_fint.c'; else $(CYGPATH_W) '$(srcdir)/make_fint.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/make_fint-make_fint.Tpo $(DEPDIR)/make_fint-make_fint.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='make_fint.c' object='make_fint-make_fint.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) $(make_fint_CFLAGS) $(CFLAGS) -c -o make_fint-make_fint.obj `if test -f 'make_fint.c'; then $(CYGPATH_W) 'make_fint.c'; else $(CYGPATH_W) '$(srcdir)/make_fint.c'; fi` + +.f90.o: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< + +.f90.obj: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` + +.f90.lo: + $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-nodist_cmakeDATA: $(nodist_cmake_DATA) + @$(NORMAL_INSTALL) + @list='$(nodist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(cmakedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(cmakedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakedir)" || exit $$?; \ + done + +uninstall-nodist_cmakeDATA: + @$(NORMAL_UNINSTALL) + @list='$(nodist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(cmakedir)'; $(am__uninstall_files_from_dir) +install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-nodist_pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +install-nodist_includeHEADERS: $(nodist_include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-nodist_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +examples-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(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-am + +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-am + +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: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h +install-EXTRAPROGRAMS: install-libLTLIBRARIES + +install-checkLTLIBRARIES: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; 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-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-checkLTLIBRARIES clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f $(DEPDIR)/getline.Po + -rm -f ./$(DEPDIR)/async_worker.Plo + -rm -f ./$(DEPDIR)/basetime.Plo + -rm -f ./$(DEPDIR)/binary.Plo + -rm -f ./$(DEPDIR)/calendar.Plo + -rm -f ./$(DEPDIR)/cdf.Plo + -rm -f ./$(DEPDIR)/cdf_int.Plo + -rm -f ./$(DEPDIR)/cdf_lazy_grid.Plo + -rm -f ./$(DEPDIR)/cdf_read.Plo + -rm -f ./$(DEPDIR)/cdf_records.Plo + -rm -f ./$(DEPDIR)/cdf_util.Plo + -rm -f ./$(DEPDIR)/cdf_write.Plo + -rm -f ./$(DEPDIR)/cdiFortran.Plo + -rm -f ./$(DEPDIR)/cdi_across.Plo + -rm -f ./$(DEPDIR)/cdi_att.Plo + -rm -f ./$(DEPDIR)/cdi_cksum.Plo + -rm -f ./$(DEPDIR)/cdi_datetime.Plo + -rm -f ./$(DEPDIR)/cdi_error.Plo + -rm -f ./$(DEPDIR)/cdi_fdb.Plo + -rm -f ./$(DEPDIR)/cdi_int.Plo + -rm -f ./$(DEPDIR)/cdi_key.Plo + -rm -f ./$(DEPDIR)/cdi_query.Plo + -rm -f ./$(DEPDIR)/cdi_util.Plo + -rm -f ./$(DEPDIR)/cdipioFortran.Plo + -rm -f ./$(DEPDIR)/cgribexlib.Plo + -rm -f ./$(DEPDIR)/cksum.Plo + -rm -f ./$(DEPDIR)/dmemory.Plo + -rm -f ./$(DEPDIR)/error.Plo + -rm -f ./$(DEPDIR)/extralib.Plo + -rm -f ./$(DEPDIR)/file.Plo + -rm -f ./$(DEPDIR)/gaussian_latitudes.Plo + -rm -f ./$(DEPDIR)/get_num_missvals.Plo + -rm -f ./$(DEPDIR)/grb_read.Plo + -rm -f ./$(DEPDIR)/grb_write.Plo + -rm -f ./$(DEPDIR)/gribapi.Plo + -rm -f ./$(DEPDIR)/gribapi_utilities.Plo + -rm -f ./$(DEPDIR)/grid.Plo + -rm -f ./$(DEPDIR)/ieglib.Plo + -rm -f ./$(DEPDIR)/input_file.Plo + -rm -f ./$(DEPDIR)/institution.Plo + -rm -f ./$(DEPDIR)/iterator.Plo + -rm -f ./$(DEPDIR)/iterator_fallback.Plo + -rm -f ./$(DEPDIR)/iterator_grib.Plo + -rm -f ./$(DEPDIR)/julian_date.Plo + -rm -f ./$(DEPDIR)/make_fint-make_fint.Po + -rm -f ./$(DEPDIR)/model.Plo + -rm -f ./$(DEPDIR)/namespace.Plo + -rm -f ./$(DEPDIR)/pio.Plo + -rm -f ./$(DEPDIR)/pio_cdf_int.Plo + -rm -f ./$(DEPDIR)/pio_client.Plo + -rm -f ./$(DEPDIR)/pio_comm.Plo + -rm -f ./$(DEPDIR)/pio_conf.Plo + -rm -f ./$(DEPDIR)/pio_dbuffer.Plo + -rm -f ./$(DEPDIR)/pio_dist_grid.Plo + -rm -f ./$(DEPDIR)/pio_idxlist_cache.Plo + -rm -f ./$(DEPDIR)/pio_interface.Plo + -rm -f ./$(DEPDIR)/pio_mpi_fw_at_all.Plo + -rm -f ./$(DEPDIR)/pio_mpi_fw_at_reblock.Plo + -rm -f ./$(DEPDIR)/pio_mpi_fw_ordered.Plo + -rm -f ./$(DEPDIR)/pio_mpinonb.Plo + -rm -f ./$(DEPDIR)/pio_posixasynch.Plo + -rm -f ./$(DEPDIR)/pio_posixfpguardsendrecv.Plo + -rm -f ./$(DEPDIR)/pio_posixnonb.Plo + -rm -f ./$(DEPDIR)/pio_record_send.Plo + -rm -f ./$(DEPDIR)/pio_roles.Plo + -rm -f ./$(DEPDIR)/pio_rpc.Plo + -rm -f ./$(DEPDIR)/pio_serialize.Plo + -rm -f ./$(DEPDIR)/pio_server.Plo + -rm -f ./$(DEPDIR)/pio_util.Plo + -rm -f ./$(DEPDIR)/pio_xmap_cache.Plo + -rm -f ./$(DEPDIR)/referenceCounting.Plo + -rm -f ./$(DEPDIR)/resource_handle.Plo + -rm -f ./$(DEPDIR)/resource_unpack.Plo + -rm -f ./$(DEPDIR)/serialize.Plo + -rm -f ./$(DEPDIR)/servicelib.Plo + -rm -f ./$(DEPDIR)/stream.Plo + -rm -f ./$(DEPDIR)/stream_cdf_i.Plo + -rm -f ./$(DEPDIR)/stream_cdf_o.Plo + -rm -f ./$(DEPDIR)/stream_cdf_time.Plo + -rm -f ./$(DEPDIR)/stream_cgribex.Plo + -rm -f ./$(DEPDIR)/stream_ext.Plo + -rm -f ./$(DEPDIR)/stream_grb.Plo + -rm -f ./$(DEPDIR)/stream_gribapi.Plo + -rm -f ./$(DEPDIR)/stream_ieg.Plo + -rm -f ./$(DEPDIR)/stream_read.Plo + -rm -f ./$(DEPDIR)/stream_record.Plo + -rm -f ./$(DEPDIR)/stream_scan.Plo + -rm -f ./$(DEPDIR)/stream_srv.Plo + -rm -f ./$(DEPDIR)/stream_var.Plo + -rm -f ./$(DEPDIR)/stream_write.Plo + -rm -f ./$(DEPDIR)/subtype.Plo + -rm -f ./$(DEPDIR)/swap.Plo + -rm -f ./$(DEPDIR)/table.Plo + -rm -f ./$(DEPDIR)/taxis.Plo + -rm -f ./$(DEPDIR)/tsteps.Plo + -rm -f ./$(DEPDIR)/util.Plo + -rm -f ./$(DEPDIR)/varscan.Plo + -rm -f ./$(DEPDIR)/version.Plo + -rm -f ./$(DEPDIR)/vlist.Plo + -rm -f ./$(DEPDIR)/vlist_var.Plo + -rm -f ./$(DEPDIR)/vlist_var_key.Plo + -rm -f ./$(DEPDIR)/vlist_var_pack.Plo + -rm -f ./$(DEPDIR)/zaxis.Plo + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-am + +dvi-am: + +examples: examples-am + +examples-am: examples-local + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includeHEADERS install-nodist_cmakeDATA \ + install-nodist_includeHEADERS install-nodist_pkgconfigDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(DEPDIR)/getline.Po + -rm -f ./$(DEPDIR)/async_worker.Plo + -rm -f ./$(DEPDIR)/basetime.Plo + -rm -f ./$(DEPDIR)/binary.Plo + -rm -f ./$(DEPDIR)/calendar.Plo + -rm -f ./$(DEPDIR)/cdf.Plo + -rm -f ./$(DEPDIR)/cdf_int.Plo + -rm -f ./$(DEPDIR)/cdf_lazy_grid.Plo + -rm -f ./$(DEPDIR)/cdf_read.Plo + -rm -f ./$(DEPDIR)/cdf_records.Plo + -rm -f ./$(DEPDIR)/cdf_util.Plo + -rm -f ./$(DEPDIR)/cdf_write.Plo + -rm -f ./$(DEPDIR)/cdiFortran.Plo + -rm -f ./$(DEPDIR)/cdi_across.Plo + -rm -f ./$(DEPDIR)/cdi_att.Plo + -rm -f ./$(DEPDIR)/cdi_cksum.Plo + -rm -f ./$(DEPDIR)/cdi_datetime.Plo + -rm -f ./$(DEPDIR)/cdi_error.Plo + -rm -f ./$(DEPDIR)/cdi_fdb.Plo + -rm -f ./$(DEPDIR)/cdi_int.Plo + -rm -f ./$(DEPDIR)/cdi_key.Plo + -rm -f ./$(DEPDIR)/cdi_query.Plo + -rm -f ./$(DEPDIR)/cdi_util.Plo + -rm -f ./$(DEPDIR)/cdipioFortran.Plo + -rm -f ./$(DEPDIR)/cgribexlib.Plo + -rm -f ./$(DEPDIR)/cksum.Plo + -rm -f ./$(DEPDIR)/dmemory.Plo + -rm -f ./$(DEPDIR)/error.Plo + -rm -f ./$(DEPDIR)/extralib.Plo + -rm -f ./$(DEPDIR)/file.Plo + -rm -f ./$(DEPDIR)/gaussian_latitudes.Plo + -rm -f ./$(DEPDIR)/get_num_missvals.Plo + -rm -f ./$(DEPDIR)/grb_read.Plo + -rm -f ./$(DEPDIR)/grb_write.Plo + -rm -f ./$(DEPDIR)/gribapi.Plo + -rm -f ./$(DEPDIR)/gribapi_utilities.Plo + -rm -f ./$(DEPDIR)/grid.Plo + -rm -f ./$(DEPDIR)/ieglib.Plo + -rm -f ./$(DEPDIR)/input_file.Plo + -rm -f ./$(DEPDIR)/institution.Plo + -rm -f ./$(DEPDIR)/iterator.Plo + -rm -f ./$(DEPDIR)/iterator_fallback.Plo + -rm -f ./$(DEPDIR)/iterator_grib.Plo + -rm -f ./$(DEPDIR)/julian_date.Plo + -rm -f ./$(DEPDIR)/make_fint-make_fint.Po + -rm -f ./$(DEPDIR)/model.Plo + -rm -f ./$(DEPDIR)/namespace.Plo + -rm -f ./$(DEPDIR)/pio.Plo + -rm -f ./$(DEPDIR)/pio_cdf_int.Plo + -rm -f ./$(DEPDIR)/pio_client.Plo + -rm -f ./$(DEPDIR)/pio_comm.Plo + -rm -f ./$(DEPDIR)/pio_conf.Plo + -rm -f ./$(DEPDIR)/pio_dbuffer.Plo + -rm -f ./$(DEPDIR)/pio_dist_grid.Plo + -rm -f ./$(DEPDIR)/pio_idxlist_cache.Plo + -rm -f ./$(DEPDIR)/pio_interface.Plo + -rm -f ./$(DEPDIR)/pio_mpi_fw_at_all.Plo + -rm -f ./$(DEPDIR)/pio_mpi_fw_at_reblock.Plo + -rm -f ./$(DEPDIR)/pio_mpi_fw_ordered.Plo + -rm -f ./$(DEPDIR)/pio_mpinonb.Plo + -rm -f ./$(DEPDIR)/pio_posixasynch.Plo + -rm -f ./$(DEPDIR)/pio_posixfpguardsendrecv.Plo + -rm -f ./$(DEPDIR)/pio_posixnonb.Plo + -rm -f ./$(DEPDIR)/pio_record_send.Plo + -rm -f ./$(DEPDIR)/pio_roles.Plo + -rm -f ./$(DEPDIR)/pio_rpc.Plo + -rm -f ./$(DEPDIR)/pio_serialize.Plo + -rm -f ./$(DEPDIR)/pio_server.Plo + -rm -f ./$(DEPDIR)/pio_util.Plo + -rm -f ./$(DEPDIR)/pio_xmap_cache.Plo + -rm -f ./$(DEPDIR)/referenceCounting.Plo + -rm -f ./$(DEPDIR)/resource_handle.Plo + -rm -f ./$(DEPDIR)/resource_unpack.Plo + -rm -f ./$(DEPDIR)/serialize.Plo + -rm -f ./$(DEPDIR)/servicelib.Plo + -rm -f ./$(DEPDIR)/stream.Plo + -rm -f ./$(DEPDIR)/stream_cdf_i.Plo + -rm -f ./$(DEPDIR)/stream_cdf_o.Plo + -rm -f ./$(DEPDIR)/stream_cdf_time.Plo + -rm -f ./$(DEPDIR)/stream_cgribex.Plo + -rm -f ./$(DEPDIR)/stream_ext.Plo + -rm -f ./$(DEPDIR)/stream_grb.Plo + -rm -f ./$(DEPDIR)/stream_gribapi.Plo + -rm -f ./$(DEPDIR)/stream_ieg.Plo + -rm -f ./$(DEPDIR)/stream_read.Plo + -rm -f ./$(DEPDIR)/stream_record.Plo + -rm -f ./$(DEPDIR)/stream_scan.Plo + -rm -f ./$(DEPDIR)/stream_srv.Plo + -rm -f ./$(DEPDIR)/stream_var.Plo + -rm -f ./$(DEPDIR)/stream_write.Plo + -rm -f ./$(DEPDIR)/subtype.Plo + -rm -f ./$(DEPDIR)/swap.Plo + -rm -f ./$(DEPDIR)/table.Plo + -rm -f ./$(DEPDIR)/taxis.Plo + -rm -f ./$(DEPDIR)/tsteps.Plo + -rm -f ./$(DEPDIR)/util.Plo + -rm -f ./$(DEPDIR)/varscan.Plo + -rm -f ./$(DEPDIR)/version.Plo + -rm -f ./$(DEPDIR)/vlist.Plo + -rm -f ./$(DEPDIR)/vlist_var.Plo + -rm -f ./$(DEPDIR)/vlist_var_key.Plo + -rm -f ./$(DEPDIR)/vlist_var_pack.Plo + -rm -f ./$(DEPDIR)/zaxis.Plo + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-nodist_cmakeDATA uninstall-nodist_includeHEADERS \ + uninstall-nodist_pkgconfigDATA + +.MAKE: all check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-checkLTLIBRARIES clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distdir dvi \ + dvi-am examples-am examples-local 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-includeHEADERS install-info \ + install-info-am install-libLTLIBRARIES install-man \ + install-nodist_cmakeDATA install-nodist_includeHEADERS \ + install-nodist_pkgconfigDATA install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-nodist_cmakeDATA \ + uninstall-nodist_includeHEADERS uninstall-nodist_pkgconfigDATA + +.PRECIOUS: Makefile + + +@MAINTAINER_MODE_TRUE@cdi.inc: cdi.h make_fint.c +@MAINTAINER_MODE_TRUE@ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) make_fint +@MAINTAINER_MODE_TRUE@ $(AM_V_GEN)$(top_builddir)/libtool --mode=execute ./make_fint -o $(@D) $< +@MAINTAINER_MODE_TRUE@cdiFortran.c: cdi.inc +@MAINTAINER_MODE_TRUE@ $(AM_V_at)test -f $@ || rm -f $< +@MAINTAINER_MODE_TRUE@ $(AM_V_at)test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $< + +@MAINTAINER_MODE_TRUE@cdipio.inc: cdipio.h make_fint.c cdi.inc +@MAINTAINER_MODE_TRUE@ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) make_fint +@MAINTAINER_MODE_TRUE@ $(AM_V_GEN)$(top_builddir)/libtool --mode=execute ./make_fint -o $(@D) $< +@MAINTAINER_MODE_TRUE@cdipioFortran.c: cdipio.inc +@MAINTAINER_MODE_TRUE@ $(AM_V_at)test -f $@ || rm -f $< +@MAINTAINER_MODE_TRUE@ $(AM_V_at)test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $< + +@MAINTAINER_MODE_TRUE@mo_cdi.f90: cdi.h $(top_srcdir)/interfaces/f2003/bindGen.rb +@MAINTAINER_MODE_TRUE@ $(AM_V_GEN)$(RUBY) $(top_srcdir)/interfaces/f2003/bindGen.rb $< $@ + +@MAINTAINER_MODE_TRUE@cdilib.c: $(libcdi_la_SOURCES) $(srcdir)/make_cdilib +@MAINTAINER_MODE_TRUE@ $(AM_V_GEN)CPP='$(CPP)' $(srcdir)/make_cdilib $(srcdir) +@MAINTAINER_MODE_FALSE@cdiFortran.c cdi.inc cdipioFortran.c cdipio.inc mo_cdi.f90 cdilib.c: +@MAINTAINER_MODE_FALSE@ @:;{ \ +@MAINTAINER_MODE_FALSE@ echo "ERROR: cannot generate '$@' when the maintainer mode is disabled:"; \ +@MAINTAINER_MODE_FALSE@ echo " re-configure with the '--enable-maintainer-mode' option"; \ +@MAINTAINER_MODE_FALSE@ } >&2; exit 1 + +$(mo_cdi_mod): mo_cdi.lo + $(AM_V_at)test -f $@ || rm -f $< + $(AM_V_at)test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $< + +cmake/cdi/cdi-config.cmake: $(top_builddir)/config.status cmake/cdi/cdi-config.cmake.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +cmake/cdi/cdi-config-version.cmake: $(top_builddir)/config.status cmake/cdi/cdi-config-version.cmake.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +pkgconfig/cdi.pc: $(top_builddir)/config.status $(srcdir)/pkgconfig/cdi.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +pkgconfig/cdipio.pc: $(top_builddir)/config.status $(srcdir)/pkgconfig/cdipio.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +pkgconfig/cdi_f2003.pc: $(top_builddir)/config.status $(srcdir)/pkgconfig/cdi_f2003.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +# 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/src/cdi.inc b/src/cdi.inc new file mode 100644 index 000000000..1913ab219 --- /dev/null +++ b/src/cdi.inc @@ -0,0 +1,2620 @@ +! This file was automatically generated, don't edit! +! +! Fortran interface for CDI library version 2.2.0 +! +! Author: +! ------- +! Uwe Schulzweida, MPI-MET, Hamburg, February 2023 +! + +! +! Start of fortran interface for the following routines (make_fint.c) +! + INTEGER CDI_MAX_NAME + PARAMETER (CDI_MAX_NAME = 256) + INTEGER CDI_UNDEFID + PARAMETER (CDI_UNDEFID = -1) + INTEGER CDI_GLOBAL + PARAMETER (CDI_GLOBAL = -1) + INTEGER CDI_XAXIS + PARAMETER (CDI_XAXIS = 1) + INTEGER CDI_YAXIS + PARAMETER (CDI_YAXIS = 2) +! +! Byte order +! + INTEGER CDI_BIGENDIAN + PARAMETER (CDI_BIGENDIAN = 0) + INTEGER CDI_LITTLEENDIAN + PARAMETER (CDI_LITTLEENDIAN = 1) + INTEGER CDI_PDPENDIAN + PARAMETER (CDI_PDPENDIAN = 2) + INTEGER CDI_REAL + PARAMETER (CDI_REAL = 1) + INTEGER CDI_COMP + PARAMETER (CDI_COMP = 2) + INTEGER CDI_BOTH + PARAMETER (CDI_BOTH = 3) +! +! Error identifier +! + INTEGER CDI_NOERR + PARAMETER (CDI_NOERR = 0) + INTEGER CDI_EEOF + PARAMETER (CDI_EEOF = -1) + INTEGER CDI_ETMOF + PARAMETER (CDI_ETMOF = -9) + INTEGER CDI_ESYSTEM + PARAMETER (CDI_ESYSTEM = -10) + INTEGER CDI_EINVAL + PARAMETER (CDI_EINVAL = -20) + INTEGER CDI_EISDIR + PARAMETER (CDI_EISDIR = -21) + INTEGER CDI_EISEMPTY + PARAMETER (CDI_EISEMPTY = -22) + INTEGER CDI_EUFTYPE + PARAMETER (CDI_EUFTYPE = -23) + INTEGER CDI_ELIBNAVAIL + PARAMETER (CDI_ELIBNAVAIL = -24) + INTEGER CDI_EUFSTRUCT + PARAMETER (CDI_EUFSTRUCT = -25) + INTEGER CDI_EUNC4 + PARAMETER (CDI_EUNC4 = -26) + INTEGER CDI_EDIMSIZE + PARAMETER (CDI_EDIMSIZE = -27) + INTEGER CDI_EQENF + PARAMETER (CDI_EQENF = -50) + INTEGER CDI_EQNAVAIL + PARAMETER (CDI_EQNAVAIL = -51) + INTEGER CDI_ELIMIT + PARAMETER (CDI_ELIMIT = -99) +! +! File types +! + INTEGER CDI_FILETYPE_GRB + PARAMETER (CDI_FILETYPE_GRB = 1) + INTEGER CDI_FILETYPE_GRB2 + PARAMETER (CDI_FILETYPE_GRB2 = 2) + INTEGER CDI_FILETYPE_NC + PARAMETER (CDI_FILETYPE_NC = 3) + INTEGER CDI_FILETYPE_NC2 + PARAMETER (CDI_FILETYPE_NC2 = 4) + INTEGER CDI_FILETYPE_NC4 + PARAMETER (CDI_FILETYPE_NC4 = 5) + INTEGER CDI_FILETYPE_NC4C + PARAMETER (CDI_FILETYPE_NC4C = 6) + INTEGER CDI_FILETYPE_NC5 + PARAMETER (CDI_FILETYPE_NC5 = 7) + INTEGER CDI_FILETYPE_SRV + PARAMETER (CDI_FILETYPE_SRV = 8) + INTEGER CDI_FILETYPE_EXT + PARAMETER (CDI_FILETYPE_EXT = 9) + INTEGER CDI_FILETYPE_IEG + PARAMETER (CDI_FILETYPE_IEG = 10) + INTEGER CDI_FILETYPE_NCZARR + PARAMETER (CDI_FILETYPE_NCZARR = 11) +! +! Compatibility defines for release 1.8.3 (obsolete defines) +! + INTEGER FILETYPE_GRB + PARAMETER (FILETYPE_GRB = 1) + INTEGER FILETYPE_GRB2 + PARAMETER (FILETYPE_GRB2 = 2) + INTEGER FILETYPE_NC + PARAMETER (FILETYPE_NC = 3) + INTEGER FILETYPE_NC2 + PARAMETER (FILETYPE_NC2 = 4) + INTEGER FILETYPE_NC4 + PARAMETER (FILETYPE_NC4 = 5) +! +! Protocols (in filename/URI) +! + INTEGER CDI_PROTOCOL_OTHER + PARAMETER (CDI_PROTOCOL_OTHER = 0) + INTEGER CDI_PROTOCOL_FILE + PARAMETER (CDI_PROTOCOL_FILE = 1) + INTEGER CDI_PROTOCOL_FDB + PARAMETER (CDI_PROTOCOL_FDB = 2) + INTEGER CDI_PROTOCOL_ACROSS + PARAMETER (CDI_PROTOCOL_ACROSS = 3) +! +! Compress types +! + INTEGER CDI_COMPRESS_NONE + PARAMETER (CDI_COMPRESS_NONE = 0) + INTEGER CDI_COMPRESS_SZIP + PARAMETER (CDI_COMPRESS_SZIP = 1) + INTEGER CDI_COMPRESS_AEC + PARAMETER (CDI_COMPRESS_AEC = 2) + INTEGER CDI_COMPRESS_ZIP + PARAMETER (CDI_COMPRESS_ZIP = 3) + INTEGER CDI_COMPRESS_JPEG + PARAMETER (CDI_COMPRESS_JPEG = 4) + INTEGER CDI_COMPRESS_FILTER + PARAMETER (CDI_COMPRESS_FILTER = 5) +! +! external data types +! +! +! Compatibility defines for release 1.8.3 (obsolete defines) +! + INTEGER DATATYPE_PACK16 + PARAMETER (DATATYPE_PACK16 = 16) + INTEGER DATATYPE_PACK24 + PARAMETER (DATATYPE_PACK24 = 24) + INTEGER DATATYPE_FLT32 + PARAMETER (DATATYPE_FLT32 = 132) + INTEGER DATATYPE_FLT64 + PARAMETER (DATATYPE_FLT64 = 164) + INTEGER DATATYPE_INT32 + PARAMETER (DATATYPE_INT32 = 232) + INTEGER DATATYPE_INT + PARAMETER (DATATYPE_INT = 251) + INTEGER CDI_DATATYPE_PACK + PARAMETER (CDI_DATATYPE_PACK = 0) + INTEGER CDI_DATATYPE_PACK1 + PARAMETER (CDI_DATATYPE_PACK1 = 1) + INTEGER CDI_DATATYPE_PACK2 + PARAMETER (CDI_DATATYPE_PACK2 = 2) + INTEGER CDI_DATATYPE_PACK3 + PARAMETER (CDI_DATATYPE_PACK3 = 3) + INTEGER CDI_DATATYPE_PACK4 + PARAMETER (CDI_DATATYPE_PACK4 = 4) + INTEGER CDI_DATATYPE_PACK5 + PARAMETER (CDI_DATATYPE_PACK5 = 5) + INTEGER CDI_DATATYPE_PACK6 + PARAMETER (CDI_DATATYPE_PACK6 = 6) + INTEGER CDI_DATATYPE_PACK7 + PARAMETER (CDI_DATATYPE_PACK7 = 7) + INTEGER CDI_DATATYPE_PACK8 + PARAMETER (CDI_DATATYPE_PACK8 = 8) + INTEGER CDI_DATATYPE_PACK9 + PARAMETER (CDI_DATATYPE_PACK9 = 9) + INTEGER CDI_DATATYPE_PACK10 + PARAMETER (CDI_DATATYPE_PACK10 = 10) + INTEGER CDI_DATATYPE_PACK11 + PARAMETER (CDI_DATATYPE_PACK11 = 11) + INTEGER CDI_DATATYPE_PACK12 + PARAMETER (CDI_DATATYPE_PACK12 = 12) + INTEGER CDI_DATATYPE_PACK13 + PARAMETER (CDI_DATATYPE_PACK13 = 13) + INTEGER CDI_DATATYPE_PACK14 + PARAMETER (CDI_DATATYPE_PACK14 = 14) + INTEGER CDI_DATATYPE_PACK15 + PARAMETER (CDI_DATATYPE_PACK15 = 15) + INTEGER CDI_DATATYPE_PACK16 + PARAMETER (CDI_DATATYPE_PACK16 = 16) + INTEGER CDI_DATATYPE_PACK17 + PARAMETER (CDI_DATATYPE_PACK17 = 17) + INTEGER CDI_DATATYPE_PACK18 + PARAMETER (CDI_DATATYPE_PACK18 = 18) + INTEGER CDI_DATATYPE_PACK19 + PARAMETER (CDI_DATATYPE_PACK19 = 19) + INTEGER CDI_DATATYPE_PACK20 + PARAMETER (CDI_DATATYPE_PACK20 = 20) + INTEGER CDI_DATATYPE_PACK21 + PARAMETER (CDI_DATATYPE_PACK21 = 21) + INTEGER CDI_DATATYPE_PACK22 + PARAMETER (CDI_DATATYPE_PACK22 = 22) + INTEGER CDI_DATATYPE_PACK23 + PARAMETER (CDI_DATATYPE_PACK23 = 23) + INTEGER CDI_DATATYPE_PACK24 + PARAMETER (CDI_DATATYPE_PACK24 = 24) + INTEGER CDI_DATATYPE_PACK25 + PARAMETER (CDI_DATATYPE_PACK25 = 25) + INTEGER CDI_DATATYPE_PACK26 + PARAMETER (CDI_DATATYPE_PACK26 = 26) + INTEGER CDI_DATATYPE_PACK27 + PARAMETER (CDI_DATATYPE_PACK27 = 27) + INTEGER CDI_DATATYPE_PACK28 + PARAMETER (CDI_DATATYPE_PACK28 = 28) + INTEGER CDI_DATATYPE_PACK29 + PARAMETER (CDI_DATATYPE_PACK29 = 29) + INTEGER CDI_DATATYPE_PACK30 + PARAMETER (CDI_DATATYPE_PACK30 = 30) + INTEGER CDI_DATATYPE_PACK31 + PARAMETER (CDI_DATATYPE_PACK31 = 31) + INTEGER CDI_DATATYPE_PACK32 + PARAMETER (CDI_DATATYPE_PACK32 = 32) + INTEGER CDI_DATATYPE_CPX32 + PARAMETER (CDI_DATATYPE_CPX32 = 64) + INTEGER CDI_DATATYPE_CPX64 + PARAMETER (CDI_DATATYPE_CPX64 = 128) + INTEGER CDI_DATATYPE_FLT32 + PARAMETER (CDI_DATATYPE_FLT32 = 132) + INTEGER CDI_DATATYPE_FLT64 + PARAMETER (CDI_DATATYPE_FLT64 = 164) + INTEGER CDI_DATATYPE_INT8 + PARAMETER (CDI_DATATYPE_INT8 = 208) + INTEGER CDI_DATATYPE_INT16 + PARAMETER (CDI_DATATYPE_INT16 = 216) + INTEGER CDI_DATATYPE_INT32 + PARAMETER (CDI_DATATYPE_INT32 = 232) + INTEGER CDI_DATATYPE_UINT8 + PARAMETER (CDI_DATATYPE_UINT8 = 308) + INTEGER CDI_DATATYPE_UINT16 + PARAMETER (CDI_DATATYPE_UINT16 = 316) + INTEGER CDI_DATATYPE_UINT32 + PARAMETER (CDI_DATATYPE_UINT32 = 332) +! +! internal data types +! + INTEGER CDI_DATATYPE_INT + PARAMETER (CDI_DATATYPE_INT = 251) + INTEGER CDI_DATATYPE_FLT + PARAMETER (CDI_DATATYPE_FLT = 252) + INTEGER CDI_DATATYPE_TXT + PARAMETER (CDI_DATATYPE_TXT = 253) + INTEGER CDI_DATATYPE_CPX + PARAMETER (CDI_DATATYPE_CPX = 254) + INTEGER CDI_DATATYPE_UCHAR + PARAMETER (CDI_DATATYPE_UCHAR = 255) + INTEGER CDI_DATATYPE_LONG + PARAMETER (CDI_DATATYPE_LONG = 256) + INTEGER CDI_DATATYPE_UINT + PARAMETER (CDI_DATATYPE_UINT = 257) +! +! Chunk types +! + INTEGER CDI_CHUNK_AUTO + PARAMETER (CDI_CHUNK_AUTO = 1) + INTEGER CDI_CHUNK_GRID + PARAMETER (CDI_CHUNK_GRID = 2) + INTEGER CDI_CHUNK_LINES + PARAMETER (CDI_CHUNK_LINES = 3) +! +! GRID types +! + INTEGER GRID_GENERIC + PARAMETER (GRID_GENERIC = 1) + INTEGER GRID_GAUSSIAN + PARAMETER (GRID_GAUSSIAN = 2) + INTEGER GRID_GAUSSIAN_REDUCED + PARAMETER (GRID_GAUSSIAN_REDUCED = 3) + INTEGER GRID_LONLAT + PARAMETER (GRID_LONLAT = 4) + INTEGER GRID_SPECTRAL + PARAMETER (GRID_SPECTRAL = 5) + INTEGER GRID_FOURIER + PARAMETER (GRID_FOURIER = 6) + INTEGER GRID_GME + PARAMETER (GRID_GME = 7) + INTEGER GRID_TRAJECTORY + PARAMETER (GRID_TRAJECTORY = 8) + INTEGER GRID_UNSTRUCTURED + PARAMETER (GRID_UNSTRUCTURED = 9) + INTEGER GRID_CURVILINEAR + PARAMETER (GRID_CURVILINEAR = 10) + INTEGER GRID_PROJECTION + PARAMETER (GRID_PROJECTION = 12) + INTEGER GRID_CHARXY + PARAMETER (GRID_CHARXY = 13) + INTEGER CDI_PROJ_RLL + PARAMETER (CDI_PROJ_RLL = 21) + INTEGER CDI_PROJ_LCC + PARAMETER (CDI_PROJ_LCC = 22) + INTEGER CDI_PROJ_LAEA + PARAMETER (CDI_PROJ_LAEA = 23) + INTEGER CDI_PROJ_SINU + PARAMETER (CDI_PROJ_SINU = 24) + INTEGER CDI_PROJ_STERE + PARAMETER (CDI_PROJ_STERE = 25) + INTEGER CDI_PROJ_HEALPIX + PARAMETER (CDI_PROJ_HEALPIX = 26) +! +! ZAXIS types +! + INTEGER ZAXIS_SURFACE + PARAMETER (ZAXIS_SURFACE = 0) + INTEGER ZAXIS_GENERIC + PARAMETER (ZAXIS_GENERIC = 1) + INTEGER ZAXIS_HYBRID + PARAMETER (ZAXIS_HYBRID = 2) + INTEGER ZAXIS_HYBRID_HALF + PARAMETER (ZAXIS_HYBRID_HALF = 3) + INTEGER ZAXIS_PRESSURE + PARAMETER (ZAXIS_PRESSURE = 4) + INTEGER ZAXIS_HEIGHT + PARAMETER (ZAXIS_HEIGHT = 5) + INTEGER ZAXIS_DEPTH_BELOW_SEA + PARAMETER (ZAXIS_DEPTH_BELOW_SEA = 6) + INTEGER ZAXIS_DEPTH_BELOW_LAND + PARAMETER (ZAXIS_DEPTH_BELOW_LAND = 7) + INTEGER ZAXIS_ISENTROPIC + PARAMETER (ZAXIS_ISENTROPIC = 8) + INTEGER ZAXIS_TRAJECTORY + PARAMETER (ZAXIS_TRAJECTORY = 9) + INTEGER ZAXIS_ALTITUDE + PARAMETER (ZAXIS_ALTITUDE = 10) + INTEGER ZAXIS_SIGMA + PARAMETER (ZAXIS_SIGMA = 11) + INTEGER ZAXIS_MEANSEA + PARAMETER (ZAXIS_MEANSEA = 12) + INTEGER ZAXIS_TOA + PARAMETER (ZAXIS_TOA = 13) + INTEGER ZAXIS_SEA_BOTTOM + PARAMETER (ZAXIS_SEA_BOTTOM = 14) + INTEGER ZAXIS_ATMOSPHERE + PARAMETER (ZAXIS_ATMOSPHERE = 15) + INTEGER ZAXIS_CLOUD_BASE + PARAMETER (ZAXIS_CLOUD_BASE = 16) + INTEGER ZAXIS_CLOUD_TOP + PARAMETER (ZAXIS_CLOUD_TOP = 17) + INTEGER ZAXIS_ISOTHERM_ZERO + PARAMETER (ZAXIS_ISOTHERM_ZERO = 18) + INTEGER ZAXIS_SNOW + PARAMETER (ZAXIS_SNOW = 19) + INTEGER ZAXIS_LAKE_BOTTOM + PARAMETER (ZAXIS_LAKE_BOTTOM = 20) + INTEGER ZAXIS_SEDIMENT_BOTTOM + PARAMETER (ZAXIS_SEDIMENT_BOTTOM = 21) + INTEGER ZAXIS_SEDIMENT_BOTTOM_TA + PARAMETER (ZAXIS_SEDIMENT_BOTTOM_TA = 22) + INTEGER ZAXIS_SEDIMENT_BOTTOM_TW + PARAMETER (ZAXIS_SEDIMENT_BOTTOM_TW = 23) + INTEGER ZAXIS_MIX_LAYER + PARAMETER (ZAXIS_MIX_LAYER = 24) + INTEGER ZAXIS_REFERENCE + PARAMETER (ZAXIS_REFERENCE = 25) + INTEGER ZAXIS_CHAR + PARAMETER (ZAXIS_CHAR = 26) + INTEGER ZAXIS_TROPOPAUSE + PARAMETER (ZAXIS_TROPOPAUSE = 27) +! +! SUBTYPE types +! + INTEGER MAX_KV_PAIRS_MATCH + PARAMETER (MAX_KV_PAIRS_MATCH = 10) +! +! Data structure defining a key-value search, possibly with multiple +! key-value pairs in combination. +! +! Currently, only multiple pairs combined by AND are supported. +! +! +! TIME types +! + INTEGER TIME_CONSTANT + PARAMETER (TIME_CONSTANT = 0) + INTEGER TIME_VARYING + PARAMETER (TIME_VARYING = 1) + INTEGER TIME_VARIABLE + PARAMETER (TIME_VARIABLE = 1) +! +! TSTEP types +! + INTEGER TSTEP_CONSTANT + PARAMETER (TSTEP_CONSTANT = 0) + INTEGER TSTEP_INSTANT + PARAMETER (TSTEP_INSTANT = 1) + INTEGER TSTEP_AVG + PARAMETER (TSTEP_AVG = 2) + INTEGER TSTEP_ACCUM + PARAMETER (TSTEP_ACCUM = 3) + INTEGER TSTEP_MAX + PARAMETER (TSTEP_MAX = 4) + INTEGER TSTEP_MIN + PARAMETER (TSTEP_MIN = 5) + INTEGER TSTEP_DIFF + PARAMETER (TSTEP_DIFF = 6) + INTEGER TSTEP_RMS + PARAMETER (TSTEP_RMS = 7) + INTEGER TSTEP_SD + PARAMETER (TSTEP_SD = 8) + INTEGER TSTEP_COV + PARAMETER (TSTEP_COV = 9) + INTEGER TSTEP_RATIO + PARAMETER (TSTEP_RATIO = 10) + INTEGER TSTEP_SUM + PARAMETER (TSTEP_SUM = 11) + INTEGER TSTEP_RANGE + PARAMETER (TSTEP_RANGE = 12) + INTEGER TSTEP_INSTANT2 + PARAMETER (TSTEP_INSTANT2 = 13) + INTEGER TSTEP_INSTANT3 + PARAMETER (TSTEP_INSTANT3 = 14) +! +! TAXIS types +! + INTEGER TAXIS_ABSOLUTE + PARAMETER (TAXIS_ABSOLUTE = 1) + INTEGER TAXIS_RELATIVE + PARAMETER (TAXIS_RELATIVE = 2) + INTEGER TAXIS_FORECAST + PARAMETER (TAXIS_FORECAST = 3) +! +! TUNIT types +! + INTEGER TUNIT_SECOND + PARAMETER (TUNIT_SECOND = 1) + INTEGER TUNIT_MINUTE + PARAMETER (TUNIT_MINUTE = 2) + INTEGER TUNIT_QUARTER + PARAMETER (TUNIT_QUARTER = 3) + INTEGER TUNIT_30MINUTES + PARAMETER (TUNIT_30MINUTES = 4) + INTEGER TUNIT_HOUR + PARAMETER (TUNIT_HOUR = 5) + INTEGER TUNIT_3HOURS + PARAMETER (TUNIT_3HOURS = 6) + INTEGER TUNIT_6HOURS + PARAMETER (TUNIT_6HOURS = 7) + INTEGER TUNIT_12HOURS + PARAMETER (TUNIT_12HOURS = 8) + INTEGER TUNIT_DAY + PARAMETER (TUNIT_DAY = 9) + INTEGER TUNIT_MONTH + PARAMETER (TUNIT_MONTH = 10) + INTEGER TUNIT_YEAR + PARAMETER (TUNIT_YEAR = 11) +! +! CALENDAR types +! + INTEGER CALENDAR_STANDARD + PARAMETER (CALENDAR_STANDARD = 0) + INTEGER CALENDAR_GREGORIAN + PARAMETER (CALENDAR_GREGORIAN = 1) + INTEGER CALENDAR_PROLEPTIC + PARAMETER (CALENDAR_PROLEPTIC = 2) + INTEGER CALENDAR_360DAYS + PARAMETER (CALENDAR_360DAYS = 3) + INTEGER CALENDAR_365DAYS + PARAMETER (CALENDAR_365DAYS = 4) + INTEGER CALENDAR_366DAYS + PARAMETER (CALENDAR_366DAYS = 5) + INTEGER CALENDAR_NONE + PARAMETER (CALENDAR_NONE = 6) +! +! number of unsigned char needed to store UUID +! + INTEGER CDI_UUID_SIZE + PARAMETER (CDI_UUID_SIZE = 16) +! +! Structs that are used to return data to the user +! +! +! Opaque types +! +! +! CDI control routines +! +! cdiReset + EXTERNAL cdiReset + + CHARACTER(80) cdiStringError +! (INTEGER cdiErrno) + EXTERNAL cdiStringError + +! cdiDebug +! (INTEGER debug) + EXTERNAL cdiDebug + + CHARACTER(80) cdiLibraryVersion + EXTERNAL cdiLibraryVersion + +! cdiPrintVersion + EXTERNAL cdiPrintVersion + + INTEGER cdiHaveFiletype +! (INTEGER filetype) + EXTERNAL cdiHaveFiletype + +! cdiDefMissval +! (DOUBLEPRECISION missval) + EXTERNAL cdiDefMissval + + DOUBLEPRECISION cdiInqMissval + EXTERNAL cdiInqMissval + +! cdiDefGlobal +! (CHARACTER*(*) string, +! INTEGER val) + EXTERNAL cdiDefGlobal + + INTEGER namespaceNew + EXTERNAL namespaceNew + +! namespaceSetActive +! (INTEGER namespaceID) + EXTERNAL namespaceSetActive + + INTEGER namespaceGetActive + EXTERNAL namespaceGetActive + +! namespaceDelete +! (INTEGER namespaceID) + EXTERNAL namespaceDelete + +! +! CDI converter routines +! +! +! parameter +! +! cdiParamToString +! (INTEGER param, +! CHARACTER*(*) paramstr, +! INTEGER maxlen) + EXTERNAL cdiParamToString + +! cdiDecodeParam +! (INTEGER param, +! INTEGER pnum, +! INTEGER pcat, +! INTEGER pdis) + EXTERNAL cdiDecodeParam + + INTEGER cdiEncodeParam +! (INTEGER pnum, +! INTEGER pcat, +! INTEGER pdis) + EXTERNAL cdiEncodeParam + +! +! date format: YYYYMMDD +! +! +! time format: hhmmss +! +! cdiDecodeDate +! (INTEGER date, +! INTEGER year, +! INTEGER month, +! INTEGER day) + EXTERNAL cdiDecodeDate + + INTEGER cdiEncodeDate +! (INTEGER year, +! INTEGER month, +! INTEGER day) + EXTERNAL cdiEncodeDate + +! cdiDecodeTime +! (INTEGER time, +! INTEGER hour, +! INTEGER minute, +! INTEGER second) + EXTERNAL cdiDecodeTime + + INTEGER cdiEncodeTime +! (INTEGER hour, +! INTEGER minute, +! INTEGER second) + EXTERNAL cdiEncodeTime + +! +! STREAM control routines +! + INTEGER cdiGetFiletype +! (CHARACTER*(*) uri, +! INTEGER byteorder) + EXTERNAL cdiGetFiletype + + INTEGER streamOpenRead +! (CHARACTER*(*) path) + EXTERNAL streamOpenRead + + INTEGER streamOpenWrite +! (CHARACTER*(*) path, +! INTEGER filetype) + EXTERNAL streamOpenWrite + + INTEGER streamOpenAppend +! (CHARACTER*(*) path) + EXTERNAL streamOpenAppend + +! streamClose +! (INTEGER streamID) + EXTERNAL streamClose + +! streamSync +! (INTEGER streamID) + EXTERNAL streamSync + +! streamDefMaxSteps +! (INTEGER streamID, +! INTEGER maxSteps) + EXTERNAL streamDefMaxSteps + +! streamDefNumWorker +! (INTEGER streamID, +! INTEGER numWorker) + EXTERNAL streamDefNumWorker + +! streamDefVlist +! (INTEGER streamID, +! INTEGER vlistID) + EXTERNAL streamDefVlist + + INTEGER streamInqVlist +! (INTEGER streamID) + EXTERNAL streamInqVlist + + INTEGER streamInqFiletype +! (INTEGER streamID) + EXTERNAL streamInqFiletype + +! streamDefByteorder +! (INTEGER streamID, +! INTEGER byteorder) + EXTERNAL streamDefByteorder + + INTEGER streamInqByteorder +! (INTEGER streamID) + EXTERNAL streamInqByteorder + +! streamDefFilter +! (INTEGER streamID, +! INTEGER filterId, +! INTEGER nparams, +! INTEGER params) + EXTERNAL streamDefFilter + +! streamDefCompType +! (INTEGER streamID, +! INTEGER comptype) + EXTERNAL streamDefCompType + + INTEGER streamInqCompType +! (INTEGER streamID) + EXTERNAL streamInqCompType + +! streamDefCompLevel +! (INTEGER streamID, +! INTEGER complevel) + EXTERNAL streamDefCompLevel + + INTEGER streamInqCompLevel +! (INTEGER streamID) + EXTERNAL streamInqCompLevel + + INTEGER streamDefTimestep +! (INTEGER streamID, +! INTEGER tsID) + EXTERNAL streamDefTimestep + + INTEGER streamInqTimestep +! (INTEGER streamID, +! INTEGER tsID) + EXTERNAL streamInqTimestep + + INTEGER streamInqCurTimestepID +! (INTEGER streamID) + EXTERNAL streamInqCurTimestepID + + CHARACTER(80) streamFilename +! (INTEGER streamID) + EXTERNAL streamFilename + + CHARACTER(80) streamFilesuffix +! (INTEGER filetype) + EXTERNAL streamFilesuffix + + INTEGER streamNvals +! (INTEGER streamID) + EXTERNAL streamNvals + + INTEGER streamInqNvars +! (INTEGER streamID) + EXTERNAL streamInqNvars + +! +! STREAM var I/O routines (random access) +! +! streamWriteVar +! (INTEGER streamID, +! INTEGER varID, +! DOUBLEPRECISION data(*), +! INTEGER nmiss) + EXTERNAL streamWriteVar + +! streamWriteVarF +! (INTEGER streamID, +! INTEGER varID, +! REAL data(*), +! INTEGER nmiss) + EXTERNAL streamWriteVarF + +! streamReadVar +! (INTEGER streamID, +! INTEGER varID, +! DOUBLEPRECISION data(*), +! INTEGER nmiss) + EXTERNAL streamReadVar + +! streamReadVarF +! (INTEGER streamID, +! INTEGER varID, +! REAL data(*), +! INTEGER nmiss) + EXTERNAL streamReadVarF + +! streamWriteVarSlice +! (INTEGER streamID, +! INTEGER varID, +! INTEGER levelID, +! DOUBLEPRECISION data(*), +! INTEGER nmiss) + EXTERNAL streamWriteVarSlice + +! streamWriteVarSliceF +! (INTEGER streamID, +! INTEGER varID, +! INTEGER levelID, +! REAL data(*), +! INTEGER nmiss) + EXTERNAL streamWriteVarSliceF + +! streamReadVarSlice +! (INTEGER streamID, +! INTEGER varID, +! INTEGER levelID, +! DOUBLEPRECISION data(*), +! INTEGER nmiss) + EXTERNAL streamReadVarSlice + +! streamReadVarSliceF +! (INTEGER streamID, +! INTEGER varID, +! INTEGER levelID, +! REAL data(*), +! INTEGER nmiss) + EXTERNAL streamReadVarSliceF + +! streamWriteVarChunk +! (INTEGER streamID, +! INTEGER varID, +! INTEGER rect(2,*), +! DOUBLEPRECISION data(*), +! INTEGER nmiss) + EXTERNAL streamWriteVarChunk + +! streamWriteVarChunkF +! (INTEGER streamID, +! INTEGER varID, +! INTEGER rect(2,*), +! REAL data(*), +! INTEGER nmiss) + EXTERNAL streamWriteVarChunkF + +! +! STREAM record I/O routines (sequential access) +! +! streamDefRecord +! (INTEGER streamID, +! INTEGER varID, +! INTEGER levelID) + EXTERNAL streamDefRecord + +! streamInqRecord +! (INTEGER streamID, +! INTEGER varID, +! INTEGER levelID) + EXTERNAL streamInqRecord + +! streamWriteRecord +! (INTEGER streamID, +! DOUBLEPRECISION data(*), +! INTEGER nmiss) + EXTERNAL streamWriteRecord + +! streamWriteRecordF +! (INTEGER streamID, +! REAL data(*), +! INTEGER nmiss) + EXTERNAL streamWriteRecordF + +! streamReadRecord +! (INTEGER streamID, +! DOUBLEPRECISION data(*), +! INTEGER nmiss) + EXTERNAL streamReadRecord + +! streamReadRecordF +! (INTEGER streamID, +! REAL data(*), +! INTEGER nmiss) + EXTERNAL streamReadRecordF + +! streamCopyRecord +! (INTEGER streamIDdest, +! INTEGER streamIDsrc) + EXTERNAL streamCopyRecord + +! +! File driven I/O (may yield better performance than using the streamXXX functions) +! +! +! Creation & Destruction +! +! +! Advancing an iterator +! +! +! Introspecting metadata +! +! +! All outXXX arguments to these functions may be NULL. +! +! +! Reading data +! +! +! TODO[NH]: Add functions to read partial fields. +! +! +! Direct access to grib fields +! +! +! Callthroughs to GRIB-API +! +! +! Convenience functions for accessing GRIB-API keys +! +! +! VLIST routines +! + INTEGER vlistCreate + EXTERNAL vlistCreate + +! vlistDestroy +! (INTEGER vlistID) + EXTERNAL vlistDestroy + + INTEGER vlistDuplicate +! (INTEGER vlistID) + EXTERNAL vlistDuplicate + +! vlistCopy +! (INTEGER vlistID2, +! INTEGER vlistID1) + EXTERNAL vlistCopy + +! vlistCopyFlag +! (INTEGER vlistID2, +! INTEGER vlistID1) + EXTERNAL vlistCopyFlag + +! vlistClearFlag +! (INTEGER vlistID) + EXTERNAL vlistClearFlag + +! vlistCat +! (INTEGER vlistID2, +! INTEGER vlistID1) + EXTERNAL vlistCat + +! vlistMerge +! (INTEGER vlistID2, +! INTEGER vlistID1) + EXTERNAL vlistMerge + +! vlistPrint +! (INTEGER vlistID) + EXTERNAL vlistPrint + + INTEGER vlistNumber +! (INTEGER vlistID) + EXTERNAL vlistNumber + + INTEGER vlistNvars +! (INTEGER vlistID) + EXTERNAL vlistNvars + + INTEGER vlistNgrids +! (INTEGER vlistID) + EXTERNAL vlistNgrids + + INTEGER vlistNzaxis +! (INTEGER vlistID) + EXTERNAL vlistNzaxis + + INTEGER vlistNsubtypes +! (INTEGER vlistID) + EXTERNAL vlistNsubtypes + +! vlistDefNtsteps +! (INTEGER vlistID, +! INTEGER nts) + EXTERNAL vlistDefNtsteps + + INTEGER vlistNtsteps +! (INTEGER vlistID) + EXTERNAL vlistNtsteps + + INTEGER vlistGridsizeMax +! (INTEGER vlistID) + EXTERNAL vlistGridsizeMax + + INTEGER vlistGrid +! (INTEGER vlistID, +! INTEGER index) + EXTERNAL vlistGrid + + INTEGER vlistGridIndex +! (INTEGER vlistID, +! INTEGER gridID) + EXTERNAL vlistGridIndex + +! vlistChangeGridIndex +! (INTEGER vlistID, +! INTEGER index, +! INTEGER gridID) + EXTERNAL vlistChangeGridIndex + +! vlistChangeGrid +! (INTEGER vlistID, +! INTEGER gridID1, +! INTEGER gridID2) + EXTERNAL vlistChangeGrid + + INTEGER vlistZaxis +! (INTEGER vlistID, +! INTEGER index) + EXTERNAL vlistZaxis + + INTEGER vlistZaxisIndex +! (INTEGER vlistID, +! INTEGER zaxisID) + EXTERNAL vlistZaxisIndex + +! vlistChangeZaxisIndex +! (INTEGER vlistID, +! INTEGER index, +! INTEGER zaxisID) + EXTERNAL vlistChangeZaxisIndex + +! vlistChangeZaxis +! (INTEGER vlistID, +! INTEGER zaxisID1, +! INTEGER zaxisID2) + EXTERNAL vlistChangeZaxis + + INTEGER vlistNrecs +! (INTEGER vlistID) + EXTERNAL vlistNrecs + + INTEGER vlistSubtype +! (INTEGER vlistID, +! INTEGER index) + EXTERNAL vlistSubtype + + INTEGER vlistSubtypeIndex +! (INTEGER vlistID, +! INTEGER subtypeID) + EXTERNAL vlistSubtypeIndex + +! vlistDefTaxis +! (INTEGER vlistID, +! INTEGER taxisID) + EXTERNAL vlistDefTaxis + + INTEGER vlistInqTaxis +! (INTEGER vlistID) + EXTERNAL vlistInqTaxis + +! vlistDefTable +! (INTEGER vlistID, +! INTEGER tableID) + EXTERNAL vlistDefTable + + INTEGER vlistInqTable +! (INTEGER vlistID) + EXTERNAL vlistInqTable + +! vlistDefInstitut +! (INTEGER vlistID, +! INTEGER instID) + EXTERNAL vlistDefInstitut + + INTEGER vlistInqInstitut +! (INTEGER vlistID) + EXTERNAL vlistInqInstitut + +! vlistDefModel +! (INTEGER vlistID, +! INTEGER modelID) + EXTERNAL vlistDefModel + + INTEGER vlistInqModel +! (INTEGER vlistID) + EXTERNAL vlistInqModel + +! +! VLIST VAR routines +! + INTEGER vlistDefVarTiles +! (INTEGER vlistID, +! INTEGER gridID, +! INTEGER zaxisID, +! INTEGER timetype, +! INTEGER tilesetID) + EXTERNAL vlistDefVarTiles + + INTEGER vlistDefVar +! (INTEGER vlistID, +! INTEGER gridID, +! INTEGER zaxisID, +! INTEGER timetype) + EXTERNAL vlistDefVar + +! vlistChangeVarGrid +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER gridID) + EXTERNAL vlistChangeVarGrid + +! vlistChangeVarZaxis +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER zaxisID) + EXTERNAL vlistChangeVarZaxis + +! vlistInqVar +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER gridID, +! INTEGER zaxisID, +! INTEGER timetype) + EXTERNAL vlistInqVar + + INTEGER vlistInqVarGrid +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarGrid + + INTEGER vlistInqVarZaxis +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarZaxis + +! +! used in MPIOM +! + INTEGER vlistInqVarID +! (INTEGER vlistID, +! INTEGER code) + EXTERNAL vlistInqVarID + +! vlistDefVarTimetype +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER timetype) + EXTERNAL vlistDefVarTimetype + + INTEGER vlistInqVarTimetype +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarTimetype + +! vlistDefVarTsteptype +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER tsteptype) + EXTERNAL vlistDefVarTsteptype + + INTEGER vlistInqVarTsteptype +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarTsteptype + +! vlistDefVarCompType +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER comptype) + EXTERNAL vlistDefVarCompType + + INTEGER vlistInqVarCompType +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarCompType + +! vlistDefVarCompLevel +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER complevel) + EXTERNAL vlistDefVarCompLevel + + INTEGER vlistInqVarCompLevel +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarCompLevel + +! vlistDefVarParam +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER param) + EXTERNAL vlistDefVarParam + + INTEGER vlistInqVarParam +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarParam + +! vlistDefVarCode +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER code) + EXTERNAL vlistDefVarCode + + INTEGER vlistInqVarCode +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarCode + +! vlistDefVarDatatype +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER datatype) + EXTERNAL vlistDefVarDatatype + + INTEGER vlistInqVarDatatype +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarDatatype + +! vlistDefVarXYZ +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER xyz) + EXTERNAL vlistDefVarXYZ + + INTEGER vlistInqVarXYZ +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarXYZ + +! vlistDefVarNSB +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER nsb) + EXTERNAL vlistDefVarNSB + + INTEGER vlistInqVarNSB +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarNSB + + INTEGER vlistInqVarNumber +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarNumber + +! vlistDefVarInstitut +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER instID) + EXTERNAL vlistDefVarInstitut + + INTEGER vlistInqVarInstitut +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarInstitut + +! vlistDefVarModel +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER modelID) + EXTERNAL vlistDefVarModel + + INTEGER vlistInqVarModel +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarModel + +! vlistDefVarTable +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER tableID) + EXTERNAL vlistDefVarTable + + INTEGER vlistInqVarTable +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarTable + +! vlistDefVarName +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) name) + EXTERNAL vlistDefVarName + +! vlistInqVarName +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) name) + EXTERNAL vlistInqVarName + + CHARACTER(80) vlistCopyVarName +! (INTEGER vlistId, +! INTEGER varId) + EXTERNAL vlistCopyVarName + +! vlistDefVarStdname +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) stdname) + EXTERNAL vlistDefVarStdname + +! vlistInqVarStdname +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) stdname) + EXTERNAL vlistInqVarStdname + +! vlistDefVarLongname +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) longname) + EXTERNAL vlistDefVarLongname + +! vlistInqVarLongname +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) longname) + EXTERNAL vlistInqVarLongname + +! vlistDefVarUnits +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) units) + EXTERNAL vlistDefVarUnits + +! vlistInqVarUnits +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) units) + EXTERNAL vlistInqVarUnits + +! vlistDefVarMissval +! (INTEGER vlistID, +! INTEGER varID, +! DOUBLEPRECISION missval) + EXTERNAL vlistDefVarMissval + + DOUBLEPRECISION vlistInqVarMissval +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarMissval + + INTEGER vlistInqVarSize +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarSize + +! vlistDefIndex +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER levID, +! INTEGER index) + EXTERNAL vlistDefIndex + + INTEGER vlistInqIndex +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER levID) + EXTERNAL vlistInqIndex + +! vlistDefFlag +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER levID, +! INTEGER flag) + EXTERNAL vlistDefFlag + + INTEGER vlistInqFlag +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER levID) + EXTERNAL vlistInqFlag + + INTEGER vlistFindVar +! (INTEGER vlistID, +! INTEGER fvarID) + EXTERNAL vlistFindVar + + INTEGER vlistFindLevel +! (INTEGER vlistID, +! INTEGER fvarID, +! INTEGER flevelID) + EXTERNAL vlistFindLevel + + INTEGER vlistMergedVar +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistMergedVar + + INTEGER vlistMergedLevel +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER levelID) + EXTERNAL vlistMergedLevel + +! cdiClearAdditionalKeys + EXTERNAL cdiClearAdditionalKeys + +! cdiDefAdditionalKey +! (CHARACTER*(*) string) + EXTERNAL cdiDefAdditionalKey + +! vlistDefVarIntKey +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) name, +! INTEGER value) + EXTERNAL vlistDefVarIntKey + +! vlistDefVarDblKey +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) name, +! DOUBLEPRECISION value) + EXTERNAL vlistDefVarDblKey + + INTEGER vlistHasVarKey +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) name) + EXTERNAL vlistHasVarKey + + DOUBLEPRECISION vlistInqVarDblKey +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) name) + EXTERNAL vlistInqVarDblKey + + INTEGER vlistInqVarIntKey +! (INTEGER vlistID, +! INTEGER varID, +! CHARACTER*(*) name) + EXTERNAL vlistInqVarIntKey + +! +! CDI attributes +! + INTEGER cdiInqNatts +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER nattsp) + EXTERNAL cdiInqNatts + + INTEGER cdiInqAtt +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER attrnum, +! CHARACTER*(*) name, +! INTEGER typep, +! INTEGER lenp) + EXTERNAL cdiInqAtt + + INTEGER cdiInqAttLen +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name) + EXTERNAL cdiInqAttLen + + INTEGER cdiInqAttType +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name) + EXTERNAL cdiInqAttType + + INTEGER cdiDelAtt +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name) + EXTERNAL cdiDelAtt + + INTEGER cdiCopyAtts +! (INTEGER cdiID1, +! INTEGER varID1, +! INTEGER cdiID2, +! INTEGER varID2) + EXTERNAL cdiCopyAtts + + INTEGER cdiDefAttInt +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name, +! INTEGER type, +! INTEGER len, +! INTEGER ip(*)) + EXTERNAL cdiDefAttInt + + INTEGER cdiDefAttFlt +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name, +! INTEGER type, +! INTEGER len, +! DOUBLEPRECISION dp(*)) + EXTERNAL cdiDefAttFlt + + INTEGER cdiDefAttTxt +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name, +! INTEGER len, +! CHARACTER*(*) tp_cbuf) + EXTERNAL cdiDefAttTxt + + INTEGER cdiInqAttInt +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name, +! INTEGER mlen, +! INTEGER ip(*)) + EXTERNAL cdiInqAttInt + + INTEGER cdiInqAttFlt +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name, +! INTEGER mlen, +! DOUBLEPRECISION dp(*)) + EXTERNAL cdiInqAttFlt + + INTEGER cdiInqAttTxt +! (INTEGER cdiID, +! INTEGER varID, +! CHARACTER*(*) name, +! INTEGER mlen, +! CHARACTER*(*) tp_cbuf) + EXTERNAL cdiInqAttTxt + +! +! GRID routines +! +! gridName +! (INTEGER gridtype, +! CHARACTER*(*) gridname) + EXTERNAL gridName + + CHARACTER(80) gridNamePtr +! (INTEGER gridtype) + EXTERNAL gridNamePtr + +! gridCompress +! (INTEGER gridID) + EXTERNAL gridCompress + +! gridDefMaskGME +! (INTEGER gridID, +! INTEGER mask(*)) + EXTERNAL gridDefMaskGME + + INTEGER gridInqMaskGME +! (INTEGER gridID, +! INTEGER mask(*)) + EXTERNAL gridInqMaskGME + +! gridDefMask +! (INTEGER gridID, +! INTEGER mask(*)) + EXTERNAL gridDefMask + + INTEGER gridInqMask +! (INTEGER gridID, +! INTEGER mask(*)) + EXTERNAL gridInqMask + + INTEGER gridCreate +! (INTEGER gridtype, +! INTEGER size) + EXTERNAL gridCreate + +! gridDestroy +! (INTEGER gridID) + EXTERNAL gridDestroy + + INTEGER gridDuplicate +! (INTEGER gridID) + EXTERNAL gridDuplicate + +! gridDefProj +! (INTEGER gridID, +! INTEGER projID) + EXTERNAL gridDefProj + + INTEGER gridInqProj +! (INTEGER gridID) + EXTERNAL gridInqProj + + INTEGER gridInqProjType +! (INTEGER gridID) + EXTERNAL gridInqProjType + + INTEGER gridInqType +! (INTEGER gridID) + EXTERNAL gridInqType + + INTEGER gridInqSize +! (INTEGER gridID) + EXTERNAL gridInqSize + +! gridDefXsize +! (INTEGER gridID, +! INTEGER xsize) + EXTERNAL gridDefXsize + + INTEGER gridInqXsize +! (INTEGER gridID) + EXTERNAL gridInqXsize + +! gridDefYsize +! (INTEGER gridID, +! INTEGER ysize) + EXTERNAL gridDefYsize + + INTEGER gridInqYsize +! (INTEGER gridID) + EXTERNAL gridInqYsize + +! gridDefNP +! (INTEGER gridID, +! INTEGER np) + EXTERNAL gridDefNP + + INTEGER gridInqNP +! (INTEGER gridID) + EXTERNAL gridInqNP + +! gridDefXvals +! (INTEGER gridID, +! DOUBLEPRECISION xvals(*)) + EXTERNAL gridDefXvals + + INTEGER gridInqXvals +! (INTEGER gridID, +! DOUBLEPRECISION xvals(*)) + EXTERNAL gridInqXvals + + INTEGER gridInqXvalsPart +! (INTEGER gridID, +! INTEGER start, +! INTEGER size, +! DOUBLEPRECISION xvals(*)) + EXTERNAL gridInqXvalsPart + + INTEGER gridInqXIsc +! (INTEGER gridID) + EXTERNAL gridInqXIsc + +! gridDefYvals +! (INTEGER gridID, +! DOUBLEPRECISION yvals(*)) + EXTERNAL gridDefYvals + + INTEGER gridInqYvals +! (INTEGER gridID, +! DOUBLEPRECISION yvals(*)) + EXTERNAL gridInqYvals + + INTEGER gridInqYvalsPart +! (INTEGER gridID, +! INTEGER start, +! INTEGER size, +! DOUBLEPRECISION yvals(*)) + EXTERNAL gridInqYvalsPart + + INTEGER gridInqYIsc +! (INTEGER gridID) + EXTERNAL gridInqYIsc + +! +! CDI var keys +! +! +! String keys +! + INTEGER CDI_KEY_NAME + PARAMETER (CDI_KEY_NAME = 942) + INTEGER CDI_KEY_LONGNAME + PARAMETER (CDI_KEY_LONGNAME = 943) + INTEGER CDI_KEY_STDNAME + PARAMETER (CDI_KEY_STDNAME = 944) + INTEGER CDI_KEY_UNITS + PARAMETER (CDI_KEY_UNITS = 945) + INTEGER CDI_KEY_DATATYPE + PARAMETER (CDI_KEY_DATATYPE = 946) + INTEGER CDI_KEY_REFERENCEURI + PARAMETER (CDI_KEY_REFERENCEURI = 947) + INTEGER CDI_KEY_CHUNKS + PARAMETER (CDI_KEY_CHUNKS = 948) +! +! Integer keys +! + INTEGER CDI_KEY_NUMBEROFGRIDUSED + PARAMETER (CDI_KEY_NUMBEROFGRIDUSED = 961) + INTEGER CDI_KEY_NUMBEROFGRIDINREFERENCE + PARAMETER (CDI_KEY_NUMBEROFGRIDINREFERENCE = 962) + INTEGER CDI_KEY_NUMBEROFVGRIDUSED + PARAMETER (CDI_KEY_NUMBEROFVGRIDUSED = 963) + INTEGER CDI_KEY_NLEV + PARAMETER (CDI_KEY_NLEV = 964) + INTEGER CDI_KEY_CHUNKTYPE + PARAMETER (CDI_KEY_CHUNKTYPE = 965) + INTEGER CDI_KEY_CHUNKSIZE + PARAMETER (CDI_KEY_CHUNKSIZE = 966) +! +! Floating point keys +! + INTEGER CDI_KEY_MISSVAL + PARAMETER (CDI_KEY_MISSVAL = 701) + INTEGER CDI_KEY_ADDOFFSET + PARAMETER (CDI_KEY_ADDOFFSET = 702) + INTEGER CDI_KEY_SCALEFACTOR + PARAMETER (CDI_KEY_SCALEFACTOR = 703) +! +! Byte array keys +! + INTEGER CDI_KEY_UUID + PARAMETER (CDI_KEY_UUID = 960) + INTEGER CDI_KEY_DIMNAME + PARAMETER (CDI_KEY_DIMNAME = 941) + INTEGER CDI_KEY_PSNAME + PARAMETER (CDI_KEY_PSNAME = 950) + INTEGER CDI_KEY_P0NAME + PARAMETER (CDI_KEY_P0NAME = 951) + INTEGER CDI_KEY_P0VALUE + PARAMETER (CDI_KEY_P0VALUE = 952) + INTEGER CDI_KEY_TABLESVERSION + PARAMETER (CDI_KEY_TABLESVERSION = 801) + INTEGER CDI_KEY_LOCALTABLESVERSION + PARAMETER (CDI_KEY_LOCALTABLESVERSION = 802) + INTEGER CDI_KEY_TYPEOFGENERATINGPROCESS + PARAMETER (CDI_KEY_TYPEOFGENERATINGPROCESS = 803) + INTEGER CDI_KEY_PRODUCTDEFINITIONTEMPLATE + PARAMETER (CDI_KEY_PRODUCTDEFINITIONTEMPLATE = 804) + INTEGER CDI_KEY_TYPEOFPROCESSEDDATA + PARAMETER (CDI_KEY_TYPEOFPROCESSEDDATA = 805) + INTEGER CDI_KEY_SHAPEOFTHEEARTH + PARAMETER (CDI_KEY_SHAPEOFTHEEARTH = 806) + INTEGER CDI_KEY_BACKGROUNDPROCESS + PARAMETER (CDI_KEY_BACKGROUNDPROCESS = 807) + INTEGER CDI_KEY_TYPEOFENSEMBLEFORECAST + PARAMETER (CDI_KEY_TYPEOFENSEMBLEFORECAST = 808) + INTEGER CDI_KEY_NUMBEROFFORECASTSINENSEMBLE + PARAMETER (CDI_KEY_NUMBEROFFORECASTSINENSEMBLE = 809) + INTEGER CDI_KEY_PERTURBATIONNUMBER + PARAMETER (CDI_KEY_PERTURBATIONNUMBER = 810) + INTEGER CDI_KEY_CENTRE + PARAMETER (CDI_KEY_CENTRE = 811) + INTEGER CDI_KEY_SUBCENTRE + PARAMETER (CDI_KEY_SUBCENTRE = 812) + INTEGER CDI_KEY_MPIMTYPE + PARAMETER (CDI_KEY_MPIMTYPE = 813) + INTEGER CDI_KEY_MPIMCLASS + PARAMETER (CDI_KEY_MPIMCLASS = 814) + INTEGER CDI_KEY_MPIMUSER + PARAMETER (CDI_KEY_MPIMUSER = 815) + INTEGER CDI_KEY_REVSTATUS + PARAMETER (CDI_KEY_REVSTATUS = 816) + INTEGER CDI_KEY_REVNUMBER + PARAMETER (CDI_KEY_REVNUMBER = 817) + INTEGER CDI_KEY_GRIB2LOCALSECTIONNUMBER + PARAMETER (CDI_KEY_GRIB2LOCALSECTIONNUMBER = 818) + INTEGER CDI_KEY_SECTION2PADDINGLENGTH + PARAMETER (CDI_KEY_SECTION2PADDINGLENGTH = 819) + INTEGER CDI_KEY_SECTION2PADDING + PARAMETER (CDI_KEY_SECTION2PADDING = 820) + INTEGER CDI_KEY_CONSTITUENTTYPE + PARAMETER (CDI_KEY_CONSTITUENTTYPE = 821) + INTEGER CDI_KEY_TYPEOFTIMEINCREMENT + PARAMETER (CDI_KEY_TYPEOFTIMEINCREMENT = 822) + INTEGER CDI_KEY_TYPEOFFIRSTFIXEDSURFACE + PARAMETER (CDI_KEY_TYPEOFFIRSTFIXEDSURFACE = 823) + INTEGER CDI_KEY_TYPEOFSECONDFIXEDSURFACE + PARAMETER (CDI_KEY_TYPEOFSECONDFIXEDSURFACE = 824) + INTEGER CDI_KEY_UVRELATIVETOGRID + PARAMETER (CDI_KEY_UVRELATIVETOGRID = 825) + INTEGER CDI_KEY_SCANNINGMODE + PARAMETER (CDI_KEY_SCANNINGMODE = 826) + INTEGER CDI_KEY_VDIMNAME + PARAMETER (CDI_KEY_VDIMNAME = 920) + INTEGER CDI_KEY_GRIDMAP_VARTYPE + PARAMETER (CDI_KEY_GRIDMAP_VARTYPE = 921) + INTEGER CDI_KEY_GRIDMAP_VARNAME + PARAMETER (CDI_KEY_GRIDMAP_VARNAME = 922) + INTEGER CDI_KEY_GRIDMAP_NAME + PARAMETER (CDI_KEY_GRIDMAP_NAME = 923) + INTEGER cdiDefKeyInt +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER key, +! INTEGER value) + EXTERNAL cdiDefKeyInt + + INTEGER cdiInqKeyInt +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER key, +! INTEGER value) + EXTERNAL cdiInqKeyInt + + INTEGER cdiDefKeyFloat +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER key, +! DOUBLEPRECISION value) + EXTERNAL cdiDefKeyFloat + +! +! cdiInqKeyFloat Get a float value from a key +! + INTEGER cdiInqKeyFloat +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER key, +! DOUBLEPRECISION value) + EXTERNAL cdiInqKeyFloat + + INTEGER cdiDefKeyString +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER key, +! CHARACTER*(*) string) + EXTERNAL cdiDefKeyString + + INTEGER cdiInqKeyString +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER key, +! CHARACTER*(*) string, +! INTEGER length) + EXTERNAL cdiInqKeyString + + INTEGER cdiInqKeyLen +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER key, +! INTEGER length) + EXTERNAL cdiInqKeyLen + + INTEGER cdiCopyKeys +! (INTEGER cdiID1, +! INTEGER varID1, +! INTEGER cdiID2, +! INTEGER varID2) + EXTERNAL cdiCopyKeys + + INTEGER cdiCopyKey +! (INTEGER cdiID1, +! INTEGER varID1, +! INTEGER key, +! INTEGER cdiID2) + EXTERNAL cdiCopyKey + + INTEGER cdiDeleteKey +! (INTEGER cdiID, +! INTEGER varID, +! INTEGER key) + EXTERNAL cdiDeleteKey + +! +! GRID routines +! +! gridDefXname +! (INTEGER gridID, +! CHARACTER*(*) xname) + EXTERNAL gridDefXname + +! gridInqXname +! (INTEGER gridID, +! CHARACTER*(*) xname) + EXTERNAL gridInqXname + +! gridDefXlongname +! (INTEGER gridID, +! CHARACTER*(*) xlongname) + EXTERNAL gridDefXlongname + +! gridInqXlongname +! (INTEGER gridID, +! CHARACTER*(*) xlongname) + EXTERNAL gridInqXlongname + +! gridDefXunits +! (INTEGER gridID, +! CHARACTER*(*) xunits) + EXTERNAL gridDefXunits + +! gridInqXunits +! (INTEGER gridID, +! CHARACTER*(*) xunits) + EXTERNAL gridInqXunits + +! gridDefYname +! (INTEGER gridID, +! CHARACTER*(*) yname) + EXTERNAL gridDefYname + +! gridInqYname +! (INTEGER gridID, +! CHARACTER*(*) yname) + EXTERNAL gridInqYname + +! gridDefYlongname +! (INTEGER gridID, +! CHARACTER*(*) ylongname) + EXTERNAL gridDefYlongname + +! gridInqYlongname +! (INTEGER gridID, +! CHARACTER*(*) ylongname) + EXTERNAL gridInqYlongname + +! gridDefYunits +! (INTEGER gridID, +! CHARACTER*(*) yunits) + EXTERNAL gridDefYunits + +! gridInqYunits +! (INTEGER gridID, +! CHARACTER*(*) yunits) + EXTERNAL gridInqYunits + +! gridDefDatatype +! (INTEGER gridID, +! INTEGER datatype) + EXTERNAL gridDefDatatype + + INTEGER gridInqDatatype +! (INTEGER gridID) + EXTERNAL gridInqDatatype + + DOUBLEPRECISION gridInqXval +! (INTEGER gridID, +! INTEGER index) + EXTERNAL gridInqXval + + DOUBLEPRECISION gridInqYval +! (INTEGER gridID, +! INTEGER index) + EXTERNAL gridInqYval + + DOUBLEPRECISION gridInqXinc +! (INTEGER gridID) + EXTERNAL gridInqXinc + + DOUBLEPRECISION gridInqYinc +! (INTEGER gridID) + EXTERNAL gridInqYinc + + INTEGER gridIsCircular +! (INTEGER gridID) + EXTERNAL gridIsCircular + + INTEGER gridInqTrunc +! (INTEGER gridID) + EXTERNAL gridInqTrunc + +! gridDefTrunc +! (INTEGER gridID, +! INTEGER trunc) + EXTERNAL gridDefTrunc + +! +! Reference of an unstructured grid +! +! gridDefNumber +! (INTEGER gridID, +! INTEGER number) + EXTERNAL gridDefNumber + + INTEGER gridInqNumber +! (INTEGER gridID) + EXTERNAL gridInqNumber + +! gridDefPosition +! (INTEGER gridID, +! INTEGER position) + EXTERNAL gridDefPosition + + INTEGER gridInqPosition +! (INTEGER gridID) + EXTERNAL gridInqPosition + +! gridDefReference +! (INTEGER gridID, +! CHARACTER*(*) reference) + EXTERNAL gridDefReference + + INTEGER gridInqReference +! (INTEGER gridID, +! CHARACTER*(*) reference) + EXTERNAL gridInqReference + +! gridDefUUID +! (INTEGER gridID, +! INTEGER*1(16) uuid) + EXTERNAL gridDefUUID + +! gridInqUUID +! (INTEGER gridID, +! INTEGER*1(16) uuid) + EXTERNAL gridInqUUID + +! +! Rotated Lon/Lat grid +! +! gridDefParamRLL +! (INTEGER gridID, +! DOUBLEPRECISION xpole, +! DOUBLEPRECISION ypole, +! DOUBLEPRECISION angle) + EXTERNAL gridDefParamRLL + +! gridInqParamRLL +! (INTEGER gridID, +! DOUBLEPRECISION xpole, +! DOUBLEPRECISION ypole, +! DOUBLEPRECISION angle) + EXTERNAL gridInqParamRLL + +! +! Hexagonal GME grid +! +! gridDefParamGME +! (INTEGER gridID, +! INTEGER nd, +! INTEGER ni, +! INTEGER ni2, +! INTEGER ni3) + EXTERNAL gridDefParamGME + +! gridInqParamGME +! (INTEGER gridID, +! INTEGER nd, +! INTEGER ni, +! INTEGER ni2, +! INTEGER ni3) + EXTERNAL gridInqParamGME + +! gridDefArea +! (INTEGER gridID, +! DOUBLEPRECISION area(*)) + EXTERNAL gridDefArea + +! gridInqArea +! (INTEGER gridID, +! DOUBLEPRECISION area(*)) + EXTERNAL gridInqArea + + INTEGER gridHasArea +! (INTEGER gridID) + EXTERNAL gridHasArea + +! gridDefNvertex +! (INTEGER gridID, +! INTEGER nvertex) + EXTERNAL gridDefNvertex + + INTEGER gridInqNvertex +! (INTEGER gridID) + EXTERNAL gridInqNvertex + +! gridDefXbounds +! (INTEGER gridID, +! DOUBLEPRECISION xbounds(*)) + EXTERNAL gridDefXbounds + + INTEGER gridInqXbounds +! (INTEGER gridID, +! DOUBLEPRECISION xbounds(*)) + EXTERNAL gridInqXbounds + + INTEGER gridInqXboundsPart +! (INTEGER gridID, +! INTEGER start, +! INTEGER size, +! DOUBLEPRECISION xbounds(*)) + EXTERNAL gridInqXboundsPart + +! gridDefYbounds +! (INTEGER gridID, +! DOUBLEPRECISION ybounds(*)) + EXTERNAL gridDefYbounds + + INTEGER gridInqYbounds +! (INTEGER gridID, +! DOUBLEPRECISION ybounds(*)) + EXTERNAL gridInqYbounds + + INTEGER gridInqYboundsPart +! (INTEGER gridID, +! INTEGER start, +! INTEGER size, +! DOUBLEPRECISION ybounds(*)) + EXTERNAL gridInqYboundsPart + +! gridDefReducedPoints +! (INTEGER gridID, +! INTEGER reducedPointsSize, +! INTEGER reducedPoints(*)) + EXTERNAL gridDefReducedPoints + +! gridInqReducedPoints +! (INTEGER gridID, +! INTEGER reducedPoints(*)) + EXTERNAL gridInqReducedPoints + +! gridChangeType +! (INTEGER gridID, +! INTEGER gridtype) + EXTERNAL gridChangeType + +! gridDefComplexPacking +! (INTEGER gridID, +! INTEGER lpack) + EXTERNAL gridDefComplexPacking + + INTEGER gridInqComplexPacking +! (INTEGER gridID) + EXTERNAL gridInqComplexPacking + +! +! ZAXIS routines +! +! zaxisName +! (INTEGER zaxistype, +! CHARACTER*(*) zaxisname) + EXTERNAL zaxisName + + CHARACTER(80) zaxisNamePtr +! (INTEGER leveltype) + EXTERNAL zaxisNamePtr + + INTEGER zaxisCreate +! (INTEGER zaxistype, +! INTEGER size) + EXTERNAL zaxisCreate + +! zaxisDestroy +! (INTEGER zaxisID) + EXTERNAL zaxisDestroy + + INTEGER zaxisInqType +! (INTEGER zaxisID) + EXTERNAL zaxisInqType + + INTEGER zaxisInqSize +! (INTEGER zaxisID) + EXTERNAL zaxisInqSize + + INTEGER zaxisDuplicate +! (INTEGER zaxisID) + EXTERNAL zaxisDuplicate + +! zaxisDefLevels +! (INTEGER zaxisID, +! DOUBLEPRECISION levels(*)) + EXTERNAL zaxisDefLevels + + INTEGER zaxisInqLevels +! (INTEGER zaxisID, +! DOUBLEPRECISION levels(*)) + EXTERNAL zaxisInqLevels + + INTEGER zaxisInqCLen +! (INTEGER zaxisID) + EXTERNAL zaxisInqCLen + +! zaxisDefLevel +! (INTEGER zaxisID, +! INTEGER levelID, +! DOUBLEPRECISION levels) + EXTERNAL zaxisDefLevel + + DOUBLEPRECISION zaxisInqLevel +! (INTEGER zaxisID, +! INTEGER levelID) + EXTERNAL zaxisInqLevel + +! zaxisDefNlevRef +! (INTEGER gridID, +! INTEGER nhlev) + EXTERNAL zaxisDefNlevRef + + INTEGER zaxisInqNlevRef +! (INTEGER gridID) + EXTERNAL zaxisInqNlevRef + +! zaxisDefNumber +! (INTEGER gridID, +! INTEGER number) + EXTERNAL zaxisDefNumber + + INTEGER zaxisInqNumber +! (INTEGER gridID) + EXTERNAL zaxisInqNumber + +! zaxisDefUUID +! (INTEGER zaxisID, +! INTEGER*1(16) uuid) + EXTERNAL zaxisDefUUID + +! zaxisInqUUID +! (INTEGER zaxisID, +! INTEGER*1(16) uuid) + EXTERNAL zaxisInqUUID + +! zaxisDefName +! (INTEGER zaxisID, +! CHARACTER*(*) name_optional) + EXTERNAL zaxisDefName + +! zaxisInqName +! (INTEGER zaxisID, +! CHARACTER*(*) name) + EXTERNAL zaxisInqName + +! zaxisDefLongname +! (INTEGER zaxisID, +! CHARACTER*(*) longname_optional) + EXTERNAL zaxisDefLongname + +! zaxisInqLongname +! (INTEGER zaxisID, +! CHARACTER*(*) longname) + EXTERNAL zaxisInqLongname + +! zaxisDefUnits +! (INTEGER zaxisID, +! CHARACTER*(*) units_optional) + EXTERNAL zaxisDefUnits + +! zaxisInqUnits +! (INTEGER zaxisID, +! CHARACTER*(*) units) + EXTERNAL zaxisInqUnits + +! zaxisInqStdname +! (INTEGER zaxisID, +! CHARACTER*(*) stdname) + EXTERNAL zaxisInqStdname + +! zaxisDefDatatype +! (INTEGER zaxisID, +! INTEGER datatype) + EXTERNAL zaxisDefDatatype + + INTEGER zaxisInqDatatype +! (INTEGER zaxisID) + EXTERNAL zaxisInqDatatype + +! zaxisDefPositive +! (INTEGER zaxisID, +! INTEGER positive) + EXTERNAL zaxisDefPositive + + INTEGER zaxisInqPositive +! (INTEGER zaxisID) + EXTERNAL zaxisInqPositive + +! zaxisDefScalar +! (INTEGER zaxisID) + EXTERNAL zaxisDefScalar + + INTEGER zaxisInqScalar +! (INTEGER zaxisID) + EXTERNAL zaxisInqScalar + +! zaxisDefVct +! (INTEGER zaxisID, +! INTEGER size, +! DOUBLEPRECISION vct(*)) + EXTERNAL zaxisDefVct + +! zaxisInqVct +! (INTEGER zaxisID, +! DOUBLEPRECISION vct(*)) + EXTERNAL zaxisInqVct + + INTEGER zaxisInqVctSize +! (INTEGER zaxisID) + EXTERNAL zaxisInqVctSize + +! zaxisDefLbounds +! (INTEGER zaxisID, +! DOUBLEPRECISION lbounds(*)) + EXTERNAL zaxisDefLbounds + + INTEGER zaxisInqLbounds +! (INTEGER zaxisID, +! DOUBLEPRECISION lbounds_optional(*)) + EXTERNAL zaxisInqLbounds + + DOUBLEPRECISION zaxisInqLbound +! (INTEGER zaxisID, +! INTEGER index) + EXTERNAL zaxisInqLbound + +! zaxisDefUbounds +! (INTEGER zaxisID, +! DOUBLEPRECISION ubounds(*)) + EXTERNAL zaxisDefUbounds + + INTEGER zaxisInqUbounds +! (INTEGER zaxisID, +! DOUBLEPRECISION ubounds_optional(*)) + EXTERNAL zaxisInqUbounds + + DOUBLEPRECISION zaxisInqUbound +! (INTEGER zaxisID, +! INTEGER index) + EXTERNAL zaxisInqUbound + +! zaxisDefWeights +! (INTEGER zaxisID, +! DOUBLEPRECISION weights(*)) + EXTERNAL zaxisDefWeights + + INTEGER zaxisInqWeights +! (INTEGER zaxisID, +! DOUBLEPRECISION weights_optional(*)) + EXTERNAL zaxisInqWeights + +! zaxisChangeType +! (INTEGER zaxisID, +! INTEGER zaxistype) + EXTERNAL zaxisChangeType + +! +! TAXIS routines +! + INTEGER taxisCreate +! (INTEGER taxistype) + EXTERNAL taxisCreate + +! taxisDestroy +! (INTEGER taxisID) + EXTERNAL taxisDestroy + + INTEGER taxisDuplicate +! (INTEGER taxisID) + EXTERNAL taxisDuplicate + +! taxisCopyTimestep +! (INTEGER taxisIDdes, +! INTEGER taxisIDsrc) + EXTERNAL taxisCopyTimestep + +! taxisDefType +! (INTEGER taxisID, +! INTEGER taxistype) + EXTERNAL taxisDefType + + INTEGER taxisInqType +! (INTEGER taxisID) + EXTERNAL taxisInqType + +! taxisDefVdate +! (INTEGER taxisID, +! INTEGER date) + EXTERNAL taxisDefVdate + +! taxisDefVtime +! (INTEGER taxisID, +! INTEGER time) + EXTERNAL taxisDefVtime + + INTEGER taxisInqVdate +! (INTEGER taxisID) + EXTERNAL taxisInqVdate + + INTEGER taxisInqVtime +! (INTEGER taxisID) + EXTERNAL taxisInqVtime + +! taxisDefRdate +! (INTEGER taxisID, +! INTEGER date) + EXTERNAL taxisDefRdate + +! taxisDefRtime +! (INTEGER taxisID, +! INTEGER time) + EXTERNAL taxisDefRtime + + INTEGER taxisInqRdate +! (INTEGER taxisID) + EXTERNAL taxisInqRdate + + INTEGER taxisInqRtime +! (INTEGER taxisID) + EXTERNAL taxisInqRtime + + INTEGER taxisHasBounds +! (INTEGER taxisID) + EXTERNAL taxisHasBounds + +! taxisWithBounds +! (INTEGER taxisID) + EXTERNAL taxisWithBounds + +! taxisDeleteBounds +! (INTEGER taxisID) + EXTERNAL taxisDeleteBounds + +! taxisDefVdateBounds +! (INTEGER taxisID, +! INTEGER vdate_lb, +! INTEGER vdate_ub) + EXTERNAL taxisDefVdateBounds + +! taxisDefVtimeBounds +! (INTEGER taxisID, +! INTEGER vtime_lb, +! INTEGER vtime_ub) + EXTERNAL taxisDefVtimeBounds + +! taxisInqVdateBounds +! (INTEGER taxisID, +! INTEGER vdate_lb, +! INTEGER vdate_ub) + EXTERNAL taxisInqVdateBounds + +! taxisInqVtimeBounds +! (INTEGER taxisID, +! INTEGER vtime_lb, +! INTEGER vtime_ub) + EXTERNAL taxisInqVtimeBounds + +! taxisDefCalendar +! (INTEGER taxisID, +! INTEGER calendar) + EXTERNAL taxisDefCalendar + + INTEGER taxisInqCalendar +! (INTEGER taxisID) + EXTERNAL taxisInqCalendar + +! taxisDefTunit +! (INTEGER taxisID, +! INTEGER tunit) + EXTERNAL taxisDefTunit + + INTEGER taxisInqTunit +! (INTEGER taxisID) + EXTERNAL taxisInqTunit + +! taxisDefForecastTunit +! (INTEGER taxisID, +! INTEGER tunit) + EXTERNAL taxisDefForecastTunit + + INTEGER taxisInqForecastTunit +! (INTEGER taxisID) + EXTERNAL taxisInqForecastTunit + +! taxisDefForecastPeriod +! (INTEGER taxisID, +! DOUBLEPRECISION fc_period) + EXTERNAL taxisDefForecastPeriod + + DOUBLEPRECISION taxisInqForecastPeriod +! (INTEGER taxisID) + EXTERNAL taxisInqForecastPeriod + +! taxisDefNumavg +! (INTEGER taxisID, +! INTEGER numavg) + EXTERNAL taxisDefNumavg + + INTEGER taxisInqNumavg +! (INTEGER taxisID) + EXTERNAL taxisInqNumavg + + CHARACTER(80) taxisNamePtr +! (INTEGER taxisID) + EXTERNAL taxisNamePtr + + CHARACTER(80) tunitNamePtr +! (INTEGER tunitID) + EXTERNAL tunitNamePtr + +! +! Institut routines +! + INTEGER institutDef +! (INTEGER center, +! INTEGER subcenter, +! CHARACTER*(*) name, +! CHARACTER*(*) longname) + EXTERNAL institutDef + + INTEGER institutInq +! (INTEGER center, +! INTEGER subcenter, +! CHARACTER*(*) name, +! CHARACTER*(*) longname) + EXTERNAL institutInq + + INTEGER institutInqNumber + EXTERNAL institutInqNumber + + INTEGER institutInqCenter +! (INTEGER instID) + EXTERNAL institutInqCenter + + INTEGER institutInqSubcenter +! (INTEGER instID) + EXTERNAL institutInqSubcenter + + CHARACTER(80) institutInqNamePtr +! (INTEGER instID) + EXTERNAL institutInqNamePtr + + CHARACTER(80) institutInqLongnamePtr +! (INTEGER instID) + EXTERNAL institutInqLongnamePtr + +! +! Model routines +! + INTEGER modelDef +! (INTEGER instID, +! INTEGER modelgribID, +! CHARACTER*(*) name) + EXTERNAL modelDef + + INTEGER modelInq +! (INTEGER instID, +! INTEGER modelgribID, +! CHARACTER*(*) name) + EXTERNAL modelInq + + INTEGER modelInqInstitut +! (INTEGER modelID) + EXTERNAL modelInqInstitut + + INTEGER modelInqGribID +! (INTEGER modelID) + EXTERNAL modelInqGribID + + CHARACTER(80) modelInqNamePtr +! (INTEGER modelID) + EXTERNAL modelInqNamePtr + +! +! Table routines +! +! tableWrite +! (CHARACTER*(*) filename, +! INTEGER tableID) + EXTERNAL tableWrite + + INTEGER tableRead +! (CHARACTER*(*) tablefile) + EXTERNAL tableRead + + INTEGER tableDef +! (INTEGER modelID, +! INTEGER tablenum, +! CHARACTER*(*) tablename) + EXTERNAL tableDef + + CHARACTER(80) tableInqNamePtr +! (INTEGER tableID) + EXTERNAL tableInqNamePtr + + INTEGER tableInq +! (INTEGER modelID, +! INTEGER tablenum, +! CHARACTER*(*) tablename) + EXTERNAL tableInq + + INTEGER tableInqNumber + EXTERNAL tableInqNumber + + INTEGER tableInqNum +! (INTEGER tableID) + EXTERNAL tableInqNum + + INTEGER tableInqModel +! (INTEGER tableID) + EXTERNAL tableInqModel + +! tableInqEntry +! (INTEGER tableID, +! INTEGER id, +! INTEGER ltype, +! CHARACTER*(*) name, +! CHARACTER*(*) longname, +! CHARACTER*(*) units) + EXTERNAL tableInqEntry + +! +! Subtype routines +! + INTEGER subtypeCreate +! (INTEGER subtype) + EXTERNAL subtypeCreate + +! +! Gives a textual summary of the variable subtype +! +! subtypePrint +! (INTEGER subtypeID) + EXTERNAL subtypePrint + +! +! Compares two subtype data structures +! + INTEGER subtypeCompare +! (INTEGER subtypeID1, +! INTEGER subtypeID2) + EXTERNAL subtypeCompare + + INTEGER subtypeInqSize +! (INTEGER subtypeID) + EXTERNAL subtypeInqSize + + INTEGER subtypeInqActiveIndex +! (INTEGER subtypeID) + EXTERNAL subtypeInqActiveIndex + +! subtypeDefActiveIndex +! (INTEGER subtypeID, +! INTEGER index) + EXTERNAL subtypeDefActiveIndex + +! +! Generate a "query object" out of a key-value pair +! +! +! Generate an AND-combined "query object" out of two previous query objects +! + INTEGER subtypeInqTile +! (INTEGER subtypeID, +! INTEGER tileindex, +! INTEGER attribute) + EXTERNAL subtypeInqTile + + INTEGER subtypeInqAttribute +! (INTEGER subtypeID, +! INTEGER index, +! CHARACTER*(*) key, +! INTEGER outValue) + EXTERNAL subtypeInqAttribute + + INTEGER vlistInqVarSubtype +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarSubtype + +! gribapiLibraryVersion +! (INTEGER major_version, +! INTEGER minor_version, +! INTEGER revision_version) + EXTERNAL gribapiLibraryVersion + +! +! Compatibility functions for release 1.8.3 (obsolete functions) +! +! zaxisDefLtype +! (INTEGER zaxisID, +! INTEGER ltype) + EXTERNAL zaxisDefLtype + + INTEGER vlistInqVarTypeOfGeneratingProcess +! (INTEGER vlistID, +! INTEGER varID) + EXTERNAL vlistInqVarTypeOfGeneratingProcess + +! vlistDefVarTypeOfGeneratingProcess +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER typeOfGeneratingProcess) + EXTERNAL vlistDefVarTypeOfGeneratingProcess + +! vlistDefVarProductDefinitionTemplate +! (INTEGER vlistID, +! INTEGER varID, +! INTEGER productDefinitionTemplate) + EXTERNAL vlistDefVarProductDefinitionTemplate + +! +! End of fortran interface +! diff --git a/src/cdiFortran.c b/src/cdiFortran.c new file mode 100644 index 000000000..1c78dfb17 --- /dev/null +++ b/src/cdiFortran.c @@ -0,0 +1,812 @@ +// Automatically generated by make_fint.c, don't edit! + +// clang-format off + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef CDI_H_ +#include "cdi.h" +#endif + +#ifdef HAVE_CF_INTERFACE + +#include <limits.h> +#include <assert.h> + +#ifndef __CFORTRAN_LOADED +# if defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wreserved-id-macro" +# endif +# include "cfortran.h" +# if defined __clang__ +# pragma GCC diagnostic pop +# endif +#endif +/* These functions are meant to be called from Fortran and don't + * need an interface declaration in a C header. */ +#ifdef __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmissing-prototypes" +#endif + +#ifdef CDI_H_ + +static inline +int SizeType_c2f(SizeType value_SizeType) +{ + assert(value_SizeType < INT_MAX); + return (int) value_SizeType; +} + +#endif + +/* Start of fortran interface for the following routines (make_fint.c) */ + + +/* Byte order */ + + +/* Error identifier */ + + +/* File types */ + + +/* Compatibility defines for release 1.8.3 (obsolete defines) */ + + +/* Protocols (in filename/URI) */ + + +/* Compress types */ + + +/* external data types */ + + +/* Compatibility defines for release 1.8.3 (obsolete defines) */ + + +/* internal data types */ + + +/* Chunk types */ + + +/* GRID types */ + + +/* ZAXIS types */ + + +/* SUBTYPE types */ + + +/* Data structure defining a key-value search, possibly with multiple + key-value pairs in combination. + + Currently, only multiple pairs combined by AND are supported. */ + + +/* TIME types */ + + +/* TSTEP types */ + + +/* TAXIS types */ + + +/* TUNIT types */ + + +/* CALENDAR types */ + + +/* number of unsigned char needed to store UUID */ + + +/* Structs that are used to return data to the user */ + + +/* Opaque types */ + + +/* CDI control routines */ + +FCALLSCSUB0 (cdiReset, CDIRESET, cdireset) +FCALLSCFUN1 (STRING, cdiStringError, CDISTRINGERROR, cdistringerror, INT) +FCALLSCSUB1 (cdiDebug, CDIDEBUG, cdidebug, INT) +FCALLSCFUN0 (STRING, cdiLibraryVersion, CDILIBRARYVERSION, cdilibraryversion) +FCALLSCSUB0 (cdiPrintVersion, CDIPRINTVERSION, cdiprintversion) +FCALLSCFUN1 (INT, cdiHaveFiletype, CDIHAVEFILETYPE, cdihavefiletype, INT) +FCALLSCSUB1 (cdiDefMissval, CDIDEFMISSVAL, cdidefmissval, DOUBLE) +FCALLSCFUN0 (DOUBLE, cdiInqMissval, CDIINQMISSVAL, cdiinqmissval) +FCALLSCSUB2 (cdiDefGlobal, CDIDEFGLOBAL, cdidefglobal, STRING, INT) +FCALLSCFUN0 (INT, namespaceNew, NAMESPACENEW, namespacenew) +FCALLSCSUB1 (namespaceSetActive, NAMESPACESETACTIVE, namespacesetactive, INT) +FCALLSCFUN0 (INT, namespaceGetActive, NAMESPACEGETACTIVE, namespacegetactive) +FCALLSCSUB1 (namespaceDelete, NAMESPACEDELETE, namespacedelete, INT) + +/* CDI converter routines */ + + +/* parameter */ + +FCALLSCSUB3 (cdiParamToString, CDIPARAMTOSTRING, cdiparamtostring, INT, PSTRING, INT) +FCALLSCSUB4 (cdiDecodeParam, CDIDECODEPARAM, cdidecodeparam, INT, PINT, PINT, PINT) +FCALLSCFUN3 (INT, cdiEncodeParam, CDIENCODEPARAM, cdiencodeparam, INT, INT, INT) + +/* date format: YYYYMMDD */ + + +/* time format: hhmmss */ + +FCALLSCSUB4 (cdiDecodeDate, CDIDECODEDATE, cdidecodedate, INT, PINT, PINT, PINT) +FCALLSCFUN3 (INT, cdiEncodeDate, CDIENCODEDATE, cdiencodedate, INT, INT, INT) +FCALLSCSUB4 (cdiDecodeTime, CDIDECODETIME, cdidecodetime, INT, PINT, PINT, PINT) +FCALLSCFUN3 (INT, cdiEncodeTime, CDIENCODETIME, cdiencodetime, INT, INT, INT) + +/* STREAM control routines */ + +FCALLSCFUN2 (INT, cdiGetFiletype, CDIGETFILETYPE, cdigetfiletype, STRING, PINT) +FCALLSCFUN1 (INT, streamOpenRead, STREAMOPENREAD, streamopenread, STRING) +FCALLSCFUN2 (INT, streamOpenWrite, STREAMOPENWRITE, streamopenwrite, STRING, INT) +FCALLSCFUN1 (INT, streamOpenAppend, STREAMOPENAPPEND, streamopenappend, STRING) +FCALLSCSUB1 (streamClose, STREAMCLOSE, streamclose, INT) +FCALLSCSUB1 (streamSync, STREAMSYNC, streamsync, INT) +FCALLSCSUB2 (streamDefMaxSteps, STREAMDEFMAXSTEPS, streamdefmaxsteps, INT, INT) +FCALLSCSUB2 (streamDefNumWorker, STREAMDEFNUMWORKER, streamdefnumworker, INT, INT) +FCALLSCSUB2 (streamDefVlist, STREAMDEFVLIST, streamdefvlist, INT, INT) +FCALLSCFUN1 (INT, streamInqVlist, STREAMINQVLIST, streaminqvlist, INT) +FCALLSCFUN1 (INT, streamInqFiletype, STREAMINQFILETYPE, streaminqfiletype, INT) +FCALLSCSUB2 (streamDefByteorder, STREAMDEFBYTEORDER, streamdefbyteorder, INT, INT) +FCALLSCFUN1 (INT, streamInqByteorder, STREAMINQBYTEORDER, streaminqbyteorder, INT) +FCALLSCSUB4 (streamDefFilter, STREAMDEFFILTER, streamdeffilter, INT, INT, INT, PINT) +FCALLSCSUB2 (streamDefCompType, STREAMDEFCOMPTYPE, streamdefcomptype, INT, INT) +FCALLSCFUN1 (INT, streamInqCompType, STREAMINQCOMPTYPE, streaminqcomptype, INT) +FCALLSCSUB2 (streamDefCompLevel, STREAMDEFCOMPLEVEL, streamdefcomplevel, INT, INT) +FCALLSCFUN1 (INT, streamInqCompLevel, STREAMINQCOMPLEVEL, streaminqcomplevel, INT) +FCALLSCFUN2 (INT, streamDefTimestep, STREAMDEFTIMESTEP, streamdeftimestep, INT, INT) +FCALLSCFUN2 (INT, streamInqTimestep, STREAMINQTIMESTEP, streaminqtimestep, INT, INT) +FCALLSCFUN1 (INT, streamInqCurTimestepID, STREAMINQCURTIMESTEPID, streaminqcurtimestepid, INT) +FCALLSCFUN1 (STRING, streamFilename, STREAMFILENAME, streamfilename, INT) +FCALLSCFUN1 (STRING, streamFilesuffix, STREAMFILESUFFIX, streamfilesuffix, INT) +static int streamNvals_fwrap(int streamID) +{ + SizeType v; + v = streamNvals(streamID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, streamNvals_fwrap, STREAMNVALS, streamnvals, INT) +FCALLSCFUN1 (INT, streamInqNvars, STREAMINQNVARS, streaminqnvars, INT) + +/* STREAM var I/O routines (random access) */ + +static void streamWriteVar_fwrap(int streamID, int varID, const double data[], int nmiss) +{ + streamWriteVar(streamID, varID, data, (SizeType)nmiss); +} +FCALLSCSUB4 (streamWriteVar_fwrap, STREAMWRITEVAR, streamwritevar, INT, INT, DOUBLEV, INT) +static void streamWriteVarF_fwrap(int streamID, int varID, const float data[], int nmiss) +{ + streamWriteVarF(streamID, varID, data, (SizeType)nmiss); +} +FCALLSCSUB4 (streamWriteVarF_fwrap, STREAMWRITEVARF, streamwritevarf, INT, INT, FLOATV, INT) +static void streamReadVar_fwrap(int streamID, int varID, double data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadVar(streamID, varID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB4 (streamReadVar_fwrap, STREAMREADVAR, streamreadvar, INT, INT, DOUBLEV, PINT) +static void streamReadVarF_fwrap(int streamID, int varID, float data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadVarF(streamID, varID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB4 (streamReadVarF_fwrap, STREAMREADVARF, streamreadvarf, INT, INT, FLOATV, PINT) +static void streamWriteVarSlice_fwrap(int streamID, int varID, int levelID, const double data[], int nmiss) +{ + streamWriteVarSlice(streamID, varID, levelID, data, (SizeType)nmiss); +} +FCALLSCSUB5 (streamWriteVarSlice_fwrap, STREAMWRITEVARSLICE, streamwritevarslice, INT, INT, INT, DOUBLEV, INT) +static void streamWriteVarSliceF_fwrap(int streamID, int varID, int levelID, const float data[], int nmiss) +{ + streamWriteVarSliceF(streamID, varID, levelID, data, (SizeType)nmiss); +} +FCALLSCSUB5 (streamWriteVarSliceF_fwrap, STREAMWRITEVARSLICEF, streamwritevarslicef, INT, INT, INT, FLOATV, INT) +static void streamReadVarSlice_fwrap(int streamID, int varID, int levelID, double data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadVarSlice(streamID, varID, levelID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB5 (streamReadVarSlice_fwrap, STREAMREADVARSLICE, streamreadvarslice, INT, INT, INT, DOUBLEV, PINT) +static void streamReadVarSliceF_fwrap(int streamID, int varID, int levelID, float data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadVarSliceF(streamID, varID, levelID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB5 (streamReadVarSliceF_fwrap, STREAMREADVARSLICEF, streamreadvarslicef, INT, INT, INT, FLOATV, PINT) +static void streamWriteVarChunk_fwrap(int streamID, int varID, const int rect[][2], const double data[], int nmiss) +{ + streamWriteVarChunk(streamID, varID, rect, data, (SizeType)nmiss); +} +FCALLSCSUB5 (streamWriteVarChunk_fwrap, STREAMWRITEVARCHUNK, streamwritevarchunk, INT, INT, INTVV, DOUBLEV, INT) +static void streamWriteVarChunkF_fwrap(int streamID, int varID, const int rect[][2], const float data[], int nmiss) +{ + streamWriteVarChunkF(streamID, varID, rect, data, (SizeType)nmiss); +} +FCALLSCSUB5 (streamWriteVarChunkF_fwrap, STREAMWRITEVARCHUNKF, streamwritevarchunkf, INT, INT, INTVV, FLOATV, INT) + +/* STREAM record I/O routines (sequential access) */ + +FCALLSCSUB3 (streamDefRecord, STREAMDEFRECORD, streamdefrecord, INT, INT, INT) +FCALLSCSUB3 (streamInqRecord, STREAMINQRECORD, streaminqrecord, INT, PINT, PINT) +static void streamWriteRecord_fwrap(int streamID, const double data[], int nmiss) +{ + streamWriteRecord(streamID, data, (SizeType)nmiss); +} +FCALLSCSUB3 (streamWriteRecord_fwrap, STREAMWRITERECORD, streamwriterecord, INT, DOUBLEV, INT) +static void streamWriteRecordF_fwrap(int streamID, const float data[], int nmiss) +{ + streamWriteRecordF(streamID, data, (SizeType)nmiss); +} +FCALLSCSUB3 (streamWriteRecordF_fwrap, STREAMWRITERECORDF, streamwriterecordf, INT, FLOATV, INT) +static void streamReadRecord_fwrap(int streamID, double data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadRecord(streamID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB3 (streamReadRecord_fwrap, STREAMREADRECORD, streamreadrecord, INT, DOUBLEV, PINT) +static void streamReadRecordF_fwrap(int streamID, float data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadRecordF(streamID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB3 (streamReadRecordF_fwrap, STREAMREADRECORDF, streamreadrecordf, INT, FLOATV, PINT) +FCALLSCSUB2 (streamCopyRecord, STREAMCOPYRECORD, streamcopyrecord, INT, INT) + +/* File driven I/O (may yield better performance than using the streamXXX functions) */ + + +/* Creation & Destruction */ + + +/* Advancing an iterator */ + + +/* Introspecting metadata */ + + +/* All outXXX arguments to these functions may be NULL. */ + + +/* Reading data */ + + +/* TODO[NH]: Add functions to read partial fields. */ + + +/* Direct access to grib fields */ + + +/* Callthroughs to GRIB-API */ + + +/* Convenience functions for accessing GRIB-API keys */ + + +/* VLIST routines */ + +FCALLSCFUN0 (INT, vlistCreate, VLISTCREATE, vlistcreate) +FCALLSCSUB1 (vlistDestroy, VLISTDESTROY, vlistdestroy, INT) +FCALLSCFUN1 (INT, vlistDuplicate, VLISTDUPLICATE, vlistduplicate, INT) +FCALLSCSUB2 (vlistCopy, VLISTCOPY, vlistcopy, INT, INT) +FCALLSCSUB2 (vlistCopyFlag, VLISTCOPYFLAG, vlistcopyflag, INT, INT) +FCALLSCSUB1 (vlistClearFlag, VLISTCLEARFLAG, vlistclearflag, INT) +FCALLSCSUB2 (vlistCat, VLISTCAT, vlistcat, INT, INT) +FCALLSCSUB2 (vlistMerge, VLISTMERGE, vlistmerge, INT, INT) +FCALLSCSUB1 (vlistPrint, VLISTPRINT, vlistprint, INT) +FCALLSCFUN1 (INT, vlistNumber, VLISTNUMBER, vlistnumber, INT) +FCALLSCFUN1 (INT, vlistNvars, VLISTNVARS, vlistnvars, INT) +FCALLSCFUN1 (INT, vlistNgrids, VLISTNGRIDS, vlistngrids, INT) +FCALLSCFUN1 (INT, vlistNzaxis, VLISTNZAXIS, vlistnzaxis, INT) +FCALLSCFUN1 (INT, vlistNsubtypes, VLISTNSUBTYPES, vlistnsubtypes, INT) +FCALLSCSUB2 (vlistDefNtsteps, VLISTDEFNTSTEPS, vlistdefntsteps, INT, INT) +FCALLSCFUN1 (INT, vlistNtsteps, VLISTNTSTEPS, vlistntsteps, INT) +static int vlistGridsizeMax_fwrap(int vlistID) +{ + SizeType v; + v = vlistGridsizeMax(vlistID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, vlistGridsizeMax_fwrap, VLISTGRIDSIZEMAX, vlistgridsizemax, INT) +FCALLSCFUN2 (INT, vlistGrid, VLISTGRID, vlistgrid, INT, INT) +FCALLSCFUN2 (INT, vlistGridIndex, VLISTGRIDINDEX, vlistgridindex, INT, INT) +FCALLSCSUB3 (vlistChangeGridIndex, VLISTCHANGEGRIDINDEX, vlistchangegridindex, INT, INT, INT) +FCALLSCSUB3 (vlistChangeGrid, VLISTCHANGEGRID, vlistchangegrid, INT, INT, INT) +FCALLSCFUN2 (INT, vlistZaxis, VLISTZAXIS, vlistzaxis, INT, INT) +FCALLSCFUN2 (INT, vlistZaxisIndex, VLISTZAXISINDEX, vlistzaxisindex, INT, INT) +FCALLSCSUB3 (vlistChangeZaxisIndex, VLISTCHANGEZAXISINDEX, vlistchangezaxisindex, INT, INT, INT) +FCALLSCSUB3 (vlistChangeZaxis, VLISTCHANGEZAXIS, vlistchangezaxis, INT, INT, INT) +FCALLSCFUN1 (INT, vlistNrecs, VLISTNRECS, vlistnrecs, INT) +FCALLSCFUN2 (INT, vlistSubtype, VLISTSUBTYPE, vlistsubtype, INT, INT) +FCALLSCFUN2 (INT, vlistSubtypeIndex, VLISTSUBTYPEINDEX, vlistsubtypeindex, INT, INT) +FCALLSCSUB2 (vlistDefTaxis, VLISTDEFTAXIS, vlistdeftaxis, INT, INT) +FCALLSCFUN1 (INT, vlistInqTaxis, VLISTINQTAXIS, vlistinqtaxis, INT) +FCALLSCSUB2 (vlistDefTable, VLISTDEFTABLE, vlistdeftable, INT, INT) +FCALLSCFUN1 (INT, vlistInqTable, VLISTINQTABLE, vlistinqtable, INT) +FCALLSCSUB2 (vlistDefInstitut, VLISTDEFINSTITUT, vlistdefinstitut, INT, INT) +FCALLSCFUN1 (INT, vlistInqInstitut, VLISTINQINSTITUT, vlistinqinstitut, INT) +FCALLSCSUB2 (vlistDefModel, VLISTDEFMODEL, vlistdefmodel, INT, INT) +FCALLSCFUN1 (INT, vlistInqModel, VLISTINQMODEL, vlistinqmodel, INT) + +/* VLIST VAR routines */ + +FCALLSCFUN5 (INT, vlistDefVarTiles, VLISTDEFVARTILES, vlistdefvartiles, INT, INT, INT, INT, INT) +FCALLSCFUN4 (INT, vlistDefVar, VLISTDEFVAR, vlistdefvar, INT, INT, INT, INT) +FCALLSCSUB3 (vlistChangeVarGrid, VLISTCHANGEVARGRID, vlistchangevargrid, INT, INT, INT) +FCALLSCSUB3 (vlistChangeVarZaxis, VLISTCHANGEVARZAXIS, vlistchangevarzaxis, INT, INT, INT) +FCALLSCSUB5 (vlistInqVar, VLISTINQVAR, vlistinqvar, INT, INT, PINT, PINT, PINT) +FCALLSCFUN2 (INT, vlistInqVarGrid, VLISTINQVARGRID, vlistinqvargrid, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarZaxis, VLISTINQVARZAXIS, vlistinqvarzaxis, INT, INT) + +/* used in MPIOM */ + +FCALLSCFUN2 (INT, vlistInqVarID, VLISTINQVARID, vlistinqvarid, INT, INT) +FCALLSCSUB3 (vlistDefVarTimetype, VLISTDEFVARTIMETYPE, vlistdefvartimetype, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarTimetype, VLISTINQVARTIMETYPE, vlistinqvartimetype, INT, INT) +FCALLSCSUB3 (vlistDefVarTsteptype, VLISTDEFVARTSTEPTYPE, vlistdefvartsteptype, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarTsteptype, VLISTINQVARTSTEPTYPE, vlistinqvartsteptype, INT, INT) +FCALLSCSUB3 (vlistDefVarCompType, VLISTDEFVARCOMPTYPE, vlistdefvarcomptype, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarCompType, VLISTINQVARCOMPTYPE, vlistinqvarcomptype, INT, INT) +FCALLSCSUB3 (vlistDefVarCompLevel, VLISTDEFVARCOMPLEVEL, vlistdefvarcomplevel, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarCompLevel, VLISTINQVARCOMPLEVEL, vlistinqvarcomplevel, INT, INT) +FCALLSCSUB3 (vlistDefVarParam, VLISTDEFVARPARAM, vlistdefvarparam, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarParam, VLISTINQVARPARAM, vlistinqvarparam, INT, INT) +FCALLSCSUB3 (vlistDefVarCode, VLISTDEFVARCODE, vlistdefvarcode, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarCode, VLISTINQVARCODE, vlistinqvarcode, INT, INT) +FCALLSCSUB3 (vlistDefVarDatatype, VLISTDEFVARDATATYPE, vlistdefvardatatype, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarDatatype, VLISTINQVARDATATYPE, vlistinqvardatatype, INT, INT) +FCALLSCSUB3 (vlistDefVarXYZ, VLISTDEFVARXYZ, vlistdefvarxyz, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarXYZ, VLISTINQVARXYZ, vlistinqvarxyz, INT, INT) +FCALLSCSUB3 (vlistDefVarNSB, VLISTDEFVARNSB, vlistdefvarnsb, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarNSB, VLISTINQVARNSB, vlistinqvarnsb, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarNumber, VLISTINQVARNUMBER, vlistinqvarnumber, INT, INT) +FCALLSCSUB3 (vlistDefVarInstitut, VLISTDEFVARINSTITUT, vlistdefvarinstitut, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarInstitut, VLISTINQVARINSTITUT, vlistinqvarinstitut, INT, INT) +FCALLSCSUB3 (vlistDefVarModel, VLISTDEFVARMODEL, vlistdefvarmodel, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarModel, VLISTINQVARMODEL, vlistinqvarmodel, INT, INT) +FCALLSCSUB3 (vlistDefVarTable, VLISTDEFVARTABLE, vlistdefvartable, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarTable, VLISTINQVARTABLE, vlistinqvartable, INT, INT) +FCALLSCSUB3 (vlistDefVarName, VLISTDEFVARNAME, vlistdefvarname, INT, INT, STRING) +FCALLSCSUB3 (vlistInqVarName, VLISTINQVARNAME, vlistinqvarname, INT, INT, PSTRING) +FCALLSCFUN2 (STRING, vlistCopyVarName, VLISTCOPYVARNAME, vlistcopyvarname, INT, INT) +FCALLSCSUB3 (vlistDefVarStdname, VLISTDEFVARSTDNAME, vlistdefvarstdname, INT, INT, STRING) +FCALLSCSUB3 (vlistInqVarStdname, VLISTINQVARSTDNAME, vlistinqvarstdname, INT, INT, PSTRING) +FCALLSCSUB3 (vlistDefVarLongname, VLISTDEFVARLONGNAME, vlistdefvarlongname, INT, INT, STRING) +FCALLSCSUB3 (vlistInqVarLongname, VLISTINQVARLONGNAME, vlistinqvarlongname, INT, INT, PSTRING) +FCALLSCSUB3 (vlistDefVarUnits, VLISTDEFVARUNITS, vlistdefvarunits, INT, INT, STRING) +FCALLSCSUB3 (vlistInqVarUnits, VLISTINQVARUNITS, vlistinqvarunits, INT, INT, PSTRING) +FCALLSCSUB3 (vlistDefVarMissval, VLISTDEFVARMISSVAL, vlistdefvarmissval, INT, INT, DOUBLE) +FCALLSCFUN2 (DOUBLE, vlistInqVarMissval, VLISTINQVARMISSVAL, vlistinqvarmissval, INT, INT) +static int vlistInqVarSize_fwrap(int vlistID, int varID) +{ + SizeType v; + v = vlistInqVarSize(vlistID, varID); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, vlistInqVarSize_fwrap, VLISTINQVARSIZE, vlistinqvarsize, INT, INT) +FCALLSCSUB4 (vlistDefIndex, VLISTDEFINDEX, vlistdefindex, INT, INT, INT, INT) +FCALLSCFUN3 (INT, vlistInqIndex, VLISTINQINDEX, vlistinqindex, INT, INT, INT) +FCALLSCSUB4 (vlistDefFlag, VLISTDEFFLAG, vlistdefflag, INT, INT, INT, INT) +FCALLSCFUN3 (INT, vlistInqFlag, VLISTINQFLAG, vlistinqflag, INT, INT, INT) +FCALLSCFUN2 (INT, vlistFindVar, VLISTFINDVAR, vlistfindvar, INT, INT) +FCALLSCFUN3 (INT, vlistFindLevel, VLISTFINDLEVEL, vlistfindlevel, INT, INT, INT) +FCALLSCFUN2 (INT, vlistMergedVar, VLISTMERGEDVAR, vlistmergedvar, INT, INT) +FCALLSCFUN3 (INT, vlistMergedLevel, VLISTMERGEDLEVEL, vlistmergedlevel, INT, INT, INT) +FCALLSCSUB0 (cdiClearAdditionalKeys, CDICLEARADDITIONALKEYS, cdiclearadditionalkeys) +FCALLSCSUB1 (cdiDefAdditionalKey, CDIDEFADDITIONALKEY, cdidefadditionalkey, STRING) +FCALLSCSUB4 (vlistDefVarIntKey, VLISTDEFVARINTKEY, vlistdefvarintkey, INT, INT, STRING, INT) +FCALLSCSUB4 (vlistDefVarDblKey, VLISTDEFVARDBLKEY, vlistdefvardblkey, INT, INT, STRING, DOUBLE) +FCALLSCFUN3 (INT, vlistHasVarKey, VLISTHASVARKEY, vlisthasvarkey, INT, INT, STRING) +FCALLSCFUN3 (DOUBLE, vlistInqVarDblKey, VLISTINQVARDBLKEY, vlistinqvardblkey, INT, INT, STRING) +FCALLSCFUN3 (INT, vlistInqVarIntKey, VLISTINQVARINTKEY, vlistinqvarintkey, INT, INT, STRING) + +/* CDI attributes */ + +FCALLSCFUN3 (INT, cdiInqNatts, CDIINQNATTS, cdiinqnatts, INT, INT, PINT) +FCALLSCFUN6 (INT, cdiInqAtt, CDIINQATT, cdiinqatt, INT, INT, INT, PSTRING, PINT, PINT) +FCALLSCFUN3 (INT, cdiInqAttLen, CDIINQATTLEN, cdiinqattlen, INT, INT, STRING) +FCALLSCFUN3 (INT, cdiInqAttType, CDIINQATTTYPE, cdiinqatttype, INT, INT, STRING) +FCALLSCFUN3 (INT, cdiDelAtt, CDIDELATT, cdidelatt, INT, INT, STRING) +FCALLSCFUN4 (INT, cdiCopyAtts, CDICOPYATTS, cdicopyatts, INT, INT, INT, INT) +FCALLSCFUN6 (INT, cdiDefAttInt, CDIDEFATTINT, cdidefattint, INT, INT, STRING, INT, INT, INTV) +FCALLSCFUN6 (INT, cdiDefAttFlt, CDIDEFATTFLT, cdidefattflt, INT, INT, STRING, INT, INT, DOUBLEV) +FCALLSCFUN5 (INT, cdiDefAttTxt, CDIDEFATTTXT, cdidefatttxt, INT, INT, STRING, INT, PPSTRING) +FCALLSCFUN5 (INT, cdiInqAttInt, CDIINQATTINT, cdiinqattint, INT, INT, STRING, INT, INTV) +FCALLSCFUN5 (INT, cdiInqAttFlt, CDIINQATTFLT, cdiinqattflt, INT, INT, STRING, INT, DOUBLEV) +FCALLSCFUN5 (INT, cdiInqAttTxt, CDIINQATTTXT, cdiinqatttxt, INT, INT, STRING, INT, PPSTRING) + +/* GRID routines */ + +FCALLSCSUB2 (gridName, GRIDNAME, gridname, INT, PSTRING) +FCALLSCFUN1 (STRING, gridNamePtr, GRIDNAMEPTR, gridnameptr, INT) +FCALLSCSUB1 (gridCompress, GRIDCOMPRESS, gridcompress, INT) +FCALLSCSUB2 (gridDefMaskGME, GRIDDEFMASKGME, griddefmaskgme, INT, INTV) +FCALLSCFUN2 (INT, gridInqMaskGME, GRIDINQMASKGME, gridinqmaskgme, INT, INTV) +FCALLSCSUB2 (gridDefMask, GRIDDEFMASK, griddefmask, INT, INTV) +FCALLSCFUN2 (INT, gridInqMask, GRIDINQMASK, gridinqmask, INT, INTV) +static int gridCreate_fwrap(int gridtype, int size) +{ + int v; + v = gridCreate(gridtype, (SizeType)size); + return v; +} +FCALLSCFUN2 (INT, gridCreate_fwrap, GRIDCREATE, gridcreate, INT, INT) +FCALLSCSUB1 (gridDestroy, GRIDDESTROY, griddestroy, INT) +FCALLSCFUN1 (INT, gridDuplicate, GRIDDUPLICATE, gridduplicate, INT) +FCALLSCSUB2 (gridDefProj, GRIDDEFPROJ, griddefproj, INT, INT) +FCALLSCFUN1 (INT, gridInqProj, GRIDINQPROJ, gridinqproj, INT) +FCALLSCFUN1 (INT, gridInqProjType, GRIDINQPROJTYPE, gridinqprojtype, INT) +FCALLSCFUN1 (INT, gridInqType, GRIDINQTYPE, gridinqtype, INT) +static int gridInqSize_fwrap(int gridID) +{ + SizeType v; + v = gridInqSize(gridID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, gridInqSize_fwrap, GRIDINQSIZE, gridinqsize, INT) +static void gridDefXsize_fwrap(int gridID, int xsize) +{ + gridDefXsize(gridID, (SizeType)xsize); +} +FCALLSCSUB2 (gridDefXsize_fwrap, GRIDDEFXSIZE, griddefxsize, INT, INT) +static int gridInqXsize_fwrap(int gridID) +{ + SizeType v; + v = gridInqXsize(gridID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, gridInqXsize_fwrap, GRIDINQXSIZE, gridinqxsize, INT) +static void gridDefYsize_fwrap(int gridID, int ysize) +{ + gridDefYsize(gridID, (SizeType)ysize); +} +FCALLSCSUB2 (gridDefYsize_fwrap, GRIDDEFYSIZE, griddefysize, INT, INT) +static int gridInqYsize_fwrap(int gridID) +{ + SizeType v; + v = gridInqYsize(gridID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, gridInqYsize_fwrap, GRIDINQYSIZE, gridinqysize, INT) +FCALLSCSUB2 (gridDefNP, GRIDDEFNP, griddefnp, INT, INT) +FCALLSCFUN1 (INT, gridInqNP, GRIDINQNP, gridinqnp, INT) +FCALLSCSUB2 (gridDefXvals, GRIDDEFXVALS, griddefxvals, INT, DOUBLEV) +static int gridInqXvals_fwrap(int gridID, double xvals[]) +{ + SizeType v; + v = gridInqXvals(gridID, xvals); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, gridInqXvals_fwrap, GRIDINQXVALS, gridinqxvals, INT, DOUBLEV) +static int gridInqXvalsPart_fwrap(int gridID, int start, int size, double xvals[]) +{ + SizeType v; + v = gridInqXvalsPart(gridID, start, (SizeType)size, xvals); + return SizeType_c2f(v); +} +FCALLSCFUN4 (INT, gridInqXvalsPart_fwrap, GRIDINQXVALSPART, gridinqxvalspart, INT, INT, INT, DOUBLEV) +FCALLSCFUN1 (INT, gridInqXIsc, GRIDINQXISC, gridinqxisc, INT) +FCALLSCSUB2 (gridDefYvals, GRIDDEFYVALS, griddefyvals, INT, DOUBLEV) +static int gridInqYvals_fwrap(int gridID, double yvals[]) +{ + SizeType v; + v = gridInqYvals(gridID, yvals); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, gridInqYvals_fwrap, GRIDINQYVALS, gridinqyvals, INT, DOUBLEV) +static int gridInqYvalsPart_fwrap(int gridID, int start, int size, double yvals[]) +{ + SizeType v; + v = gridInqYvalsPart(gridID, start, (SizeType)size, yvals); + return SizeType_c2f(v); +} +FCALLSCFUN4 (INT, gridInqYvalsPart_fwrap, GRIDINQYVALSPART, gridinqyvalspart, INT, INT, INT, DOUBLEV) +FCALLSCFUN1 (INT, gridInqYIsc, GRIDINQYISC, gridinqyisc, INT) + +/* CDI var keys */ + + +/* String keys */ + + +/* Integer keys */ + + +/* Floating point keys */ + + +/* Byte array keys */ + +FCALLSCFUN4 (INT, cdiDefKeyInt, CDIDEFKEYINT, cdidefkeyint, INT, INT, INT, INT) +FCALLSCFUN4 (INT, cdiInqKeyInt, CDIINQKEYINT, cdiinqkeyint, INT, INT, INT, PINT) +FCALLSCFUN4 (INT, cdiDefKeyFloat, CDIDEFKEYFLOAT, cdidefkeyfloat, INT, INT, INT, DOUBLE) + +/* cdiInqKeyFloat Get a float value from a key */ + +FCALLSCFUN4 (INT, cdiInqKeyFloat, CDIINQKEYFLOAT, cdiinqkeyfloat, INT, INT, INT, PDOUBLE) +FCALLSCFUN4 (INT, cdiDefKeyString, CDIDEFKEYSTRING, cdidefkeystring, INT, INT, INT, STRING) +FCALLSCFUN5 (INT, cdiInqKeyString, CDIINQKEYSTRING, cdiinqkeystring, INT, INT, INT, PSTRING, PINT) +FCALLSCFUN4 (INT, cdiInqKeyLen, CDIINQKEYLEN, cdiinqkeylen, INT, INT, INT, PINT) +FCALLSCFUN4 (INT, cdiCopyKeys, CDICOPYKEYS, cdicopykeys, INT, INT, INT, INT) +FCALLSCFUN4 (INT, cdiCopyKey, CDICOPYKEY, cdicopykey, INT, INT, INT, INT) +FCALLSCFUN3 (INT, cdiDeleteKey, CDIDELETEKEY, cdideletekey, INT, INT, INT) + +/* GRID routines */ + +FCALLSCSUB2 (gridDefXname, GRIDDEFXNAME, griddefxname, INT, STRING) +FCALLSCSUB2 (gridInqXname, GRIDINQXNAME, gridinqxname, INT, PSTRING) +FCALLSCSUB2 (gridDefXlongname, GRIDDEFXLONGNAME, griddefxlongname, INT, STRING) +FCALLSCSUB2 (gridInqXlongname, GRIDINQXLONGNAME, gridinqxlongname, INT, PSTRING) +FCALLSCSUB2 (gridDefXunits, GRIDDEFXUNITS, griddefxunits, INT, STRING) +FCALLSCSUB2 (gridInqXunits, GRIDINQXUNITS, gridinqxunits, INT, PSTRING) +FCALLSCSUB2 (gridDefYname, GRIDDEFYNAME, griddefyname, INT, STRING) +FCALLSCSUB2 (gridInqYname, GRIDINQYNAME, gridinqyname, INT, PSTRING) +FCALLSCSUB2 (gridDefYlongname, GRIDDEFYLONGNAME, griddefylongname, INT, STRING) +FCALLSCSUB2 (gridInqYlongname, GRIDINQYLONGNAME, gridinqylongname, INT, PSTRING) +FCALLSCSUB2 (gridDefYunits, GRIDDEFYUNITS, griddefyunits, INT, STRING) +FCALLSCSUB2 (gridInqYunits, GRIDINQYUNITS, gridinqyunits, INT, PSTRING) +FCALLSCSUB2 (gridDefDatatype, GRIDDEFDATATYPE, griddefdatatype, INT, INT) +FCALLSCFUN1 (INT, gridInqDatatype, GRIDINQDATATYPE, gridinqdatatype, INT) +static double gridInqXval_fwrap(int gridID, int index) +{ + double v; + v = gridInqXval(gridID, (SizeType)index); + return v; +} +FCALLSCFUN2 (DOUBLE, gridInqXval_fwrap, GRIDINQXVAL, gridinqxval, INT, INT) +static double gridInqYval_fwrap(int gridID, int index) +{ + double v; + v = gridInqYval(gridID, (SizeType)index); + return v; +} +FCALLSCFUN2 (DOUBLE, gridInqYval_fwrap, GRIDINQYVAL, gridinqyval, INT, INT) +FCALLSCFUN1 (DOUBLE, gridInqXinc, GRIDINQXINC, gridinqxinc, INT) +FCALLSCFUN1 (DOUBLE, gridInqYinc, GRIDINQYINC, gridinqyinc, INT) +FCALLSCFUN1 (INT, gridIsCircular, GRIDISCIRCULAR, gridiscircular, INT) +FCALLSCFUN1 (INT, gridInqTrunc, GRIDINQTRUNC, gridinqtrunc, INT) +FCALLSCSUB2 (gridDefTrunc, GRIDDEFTRUNC, griddeftrunc, INT, INT) + +/* Reference of an unstructured grid */ + +FCALLSCSUB2 (gridDefNumber, GRIDDEFNUMBER, griddefnumber, INT, INT) +FCALLSCFUN1 (INT, gridInqNumber, GRIDINQNUMBER, gridinqnumber, INT) +FCALLSCSUB2 (gridDefPosition, GRIDDEFPOSITION, griddefposition, INT, INT) +FCALLSCFUN1 (INT, gridInqPosition, GRIDINQPOSITION, gridinqposition, INT) +FCALLSCSUB2 (gridDefReference, GRIDDEFREFERENCE, griddefreference, INT, STRING) +FCALLSCFUN2 (INT, gridInqReference, GRIDINQREFERENCE, gridinqreference, INT, PSTRING) +FCALLSCSUB2 (gridDefUUID, GRIDDEFUUID, griddefuuid, INT, PVOID) +FCALLSCSUB2 (gridInqUUID, GRIDINQUUID, gridinquuid, INT, PVOID) + +/* Rotated Lon/Lat grid */ + +FCALLSCSUB4 (gridDefParamRLL, GRIDDEFPARAMRLL, griddefparamrll, INT, DOUBLE, DOUBLE, DOUBLE) +FCALLSCSUB4 (gridInqParamRLL, GRIDINQPARAMRLL, gridinqparamrll, INT, PDOUBLE, PDOUBLE, PDOUBLE) + +/* Hexagonal GME grid */ + +FCALLSCSUB5 (gridDefParamGME, GRIDDEFPARAMGME, griddefparamgme, INT, INT, INT, INT, INT) +FCALLSCSUB5 (gridInqParamGME, GRIDINQPARAMGME, gridinqparamgme, INT, PINT, PINT, PINT, PINT) +FCALLSCSUB2 (gridDefArea, GRIDDEFAREA, griddefarea, INT, DOUBLEV) +FCALLSCSUB2 (gridInqArea, GRIDINQAREA, gridinqarea, INT, DOUBLEV) +FCALLSCFUN1 (INT, gridHasArea, GRIDHASAREA, gridhasarea, INT) +FCALLSCSUB2 (gridDefNvertex, GRIDDEFNVERTEX, griddefnvertex, INT, INT) +FCALLSCFUN1 (INT, gridInqNvertex, GRIDINQNVERTEX, gridinqnvertex, INT) +FCALLSCSUB2 (gridDefXbounds, GRIDDEFXBOUNDS, griddefxbounds, INT, DOUBLEV) +static int gridInqXbounds_fwrap(int gridID, double xbounds[]) +{ + SizeType v; + v = gridInqXbounds(gridID, xbounds); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, gridInqXbounds_fwrap, GRIDINQXBOUNDS, gridinqxbounds, INT, DOUBLEV) +static int gridInqXboundsPart_fwrap(int gridID, int start, int size, double xbounds[]) +{ + SizeType v; + v = gridInqXboundsPart(gridID, start, (SizeType)size, xbounds); + return SizeType_c2f(v); +} +FCALLSCFUN4 (INT, gridInqXboundsPart_fwrap, GRIDINQXBOUNDSPART, gridinqxboundspart, INT, INT, INT, DOUBLEV) +FCALLSCSUB2 (gridDefYbounds, GRIDDEFYBOUNDS, griddefybounds, INT, DOUBLEV) +static int gridInqYbounds_fwrap(int gridID, double ybounds[]) +{ + SizeType v; + v = gridInqYbounds(gridID, ybounds); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, gridInqYbounds_fwrap, GRIDINQYBOUNDS, gridinqybounds, INT, DOUBLEV) +static int gridInqYboundsPart_fwrap(int gridID, int start, int size, double ybounds[]) +{ + SizeType v; + v = gridInqYboundsPart(gridID, start, (SizeType)size, ybounds); + return SizeType_c2f(v); +} +FCALLSCFUN4 (INT, gridInqYboundsPart_fwrap, GRIDINQYBOUNDSPART, gridinqyboundspart, INT, INT, INT, DOUBLEV) +FCALLSCSUB3 (gridDefReducedPoints, GRIDDEFREDUCEDPOINTS, griddefreducedpoints, INT, INT, INTV) +FCALLSCSUB2 (gridInqReducedPoints, GRIDINQREDUCEDPOINTS, gridinqreducedpoints, INT, INTV) +FCALLSCSUB2 (gridChangeType, GRIDCHANGETYPE, gridchangetype, INT, INT) +FCALLSCSUB2 (gridDefComplexPacking, GRIDDEFCOMPLEXPACKING, griddefcomplexpacking, INT, INT) +FCALLSCFUN1 (INT, gridInqComplexPacking, GRIDINQCOMPLEXPACKING, gridinqcomplexpacking, INT) + +/* ZAXIS routines */ + +FCALLSCSUB2 (zaxisName, ZAXISNAME, zaxisname, INT, PSTRING) +FCALLSCFUN1 (STRING, zaxisNamePtr, ZAXISNAMEPTR, zaxisnameptr, INT) +FCALLSCFUN2 (INT, zaxisCreate, ZAXISCREATE, zaxiscreate, INT, INT) +FCALLSCSUB1 (zaxisDestroy, ZAXISDESTROY, zaxisdestroy, INT) +FCALLSCFUN1 (INT, zaxisInqType, ZAXISINQTYPE, zaxisinqtype, INT) +FCALLSCFUN1 (INT, zaxisInqSize, ZAXISINQSIZE, zaxisinqsize, INT) +FCALLSCFUN1 (INT, zaxisDuplicate, ZAXISDUPLICATE, zaxisduplicate, INT) +FCALLSCSUB2 (zaxisDefLevels, ZAXISDEFLEVELS, zaxisdeflevels, INT, DOUBLEV) +FCALLSCFUN2 (INT, zaxisInqLevels, ZAXISINQLEVELS, zaxisinqlevels, INT, DOUBLEV) +FCALLSCFUN1 (INT, zaxisInqCLen, ZAXISINQCLEN, zaxisinqclen, INT) +FCALLSCSUB3 (zaxisDefLevel, ZAXISDEFLEVEL, zaxisdeflevel, INT, INT, DOUBLE) +FCALLSCFUN2 (DOUBLE, zaxisInqLevel, ZAXISINQLEVEL, zaxisinqlevel, INT, INT) +FCALLSCSUB2 (zaxisDefNlevRef, ZAXISDEFNLEVREF, zaxisdefnlevref, INT, INT) +FCALLSCFUN1 (INT, zaxisInqNlevRef, ZAXISINQNLEVREF, zaxisinqnlevref, INT) +FCALLSCSUB2 (zaxisDefNumber, ZAXISDEFNUMBER, zaxisdefnumber, INT, INT) +FCALLSCFUN1 (INT, zaxisInqNumber, ZAXISINQNUMBER, zaxisinqnumber, INT) +FCALLSCSUB2 (zaxisDefUUID, ZAXISDEFUUID, zaxisdefuuid, INT, PVOID) +FCALLSCSUB2 (zaxisInqUUID, ZAXISINQUUID, zaxisinquuid, INT, PVOID) +FCALLSCSUB2 (zaxisDefName, ZAXISDEFNAME, zaxisdefname, INT, STRING) +FCALLSCSUB2 (zaxisInqName, ZAXISINQNAME, zaxisinqname, INT, PSTRING) +FCALLSCSUB2 (zaxisDefLongname, ZAXISDEFLONGNAME, zaxisdeflongname, INT, STRING) +FCALLSCSUB2 (zaxisInqLongname, ZAXISINQLONGNAME, zaxisinqlongname, INT, PSTRING) +FCALLSCSUB2 (zaxisDefUnits, ZAXISDEFUNITS, zaxisdefunits, INT, STRING) +FCALLSCSUB2 (zaxisInqUnits, ZAXISINQUNITS, zaxisinqunits, INT, PSTRING) +FCALLSCSUB2 (zaxisInqStdname, ZAXISINQSTDNAME, zaxisinqstdname, INT, PSTRING) +FCALLSCSUB2 (zaxisDefDatatype, ZAXISDEFDATATYPE, zaxisdefdatatype, INT, INT) +FCALLSCFUN1 (INT, zaxisInqDatatype, ZAXISINQDATATYPE, zaxisinqdatatype, INT) +FCALLSCSUB2 (zaxisDefPositive, ZAXISDEFPOSITIVE, zaxisdefpositive, INT, INT) +FCALLSCFUN1 (INT, zaxisInqPositive, ZAXISINQPOSITIVE, zaxisinqpositive, INT) +FCALLSCSUB1 (zaxisDefScalar, ZAXISDEFSCALAR, zaxisdefscalar, INT) +FCALLSCFUN1 (INT, zaxisInqScalar, ZAXISINQSCALAR, zaxisinqscalar, INT) +FCALLSCSUB3 (zaxisDefVct, ZAXISDEFVCT, zaxisdefvct, INT, INT, DOUBLEV) +FCALLSCSUB2 (zaxisInqVct, ZAXISINQVCT, zaxisinqvct, INT, DOUBLEV) +FCALLSCFUN1 (INT, zaxisInqVctSize, ZAXISINQVCTSIZE, zaxisinqvctsize, INT) +FCALLSCSUB2 (zaxisDefLbounds, ZAXISDEFLBOUNDS, zaxisdeflbounds, INT, DOUBLEV) +FCALLSCFUN2 (INT, zaxisInqLbounds, ZAXISINQLBOUNDS, zaxisinqlbounds, INT, DOUBLEV) +FCALLSCFUN2 (DOUBLE, zaxisInqLbound, ZAXISINQLBOUND, zaxisinqlbound, INT, INT) +FCALLSCSUB2 (zaxisDefUbounds, ZAXISDEFUBOUNDS, zaxisdefubounds, INT, DOUBLEV) +FCALLSCFUN2 (INT, zaxisInqUbounds, ZAXISINQUBOUNDS, zaxisinqubounds, INT, DOUBLEV) +FCALLSCFUN2 (DOUBLE, zaxisInqUbound, ZAXISINQUBOUND, zaxisinqubound, INT, INT) +FCALLSCSUB2 (zaxisDefWeights, ZAXISDEFWEIGHTS, zaxisdefweights, INT, DOUBLEV) +FCALLSCFUN2 (INT, zaxisInqWeights, ZAXISINQWEIGHTS, zaxisinqweights, INT, DOUBLEV) +FCALLSCSUB2 (zaxisChangeType, ZAXISCHANGETYPE, zaxischangetype, INT, INT) + +/* TAXIS routines */ + +FCALLSCFUN1 (INT, taxisCreate, TAXISCREATE, taxiscreate, INT) +FCALLSCSUB1 (taxisDestroy, TAXISDESTROY, taxisdestroy, INT) +FCALLSCFUN1 (INT, taxisDuplicate, TAXISDUPLICATE, taxisduplicate, INT) +FCALLSCSUB2 (taxisCopyTimestep, TAXISCOPYTIMESTEP, taxiscopytimestep, INT, INT) +FCALLSCSUB2 (taxisDefType, TAXISDEFTYPE, taxisdeftype, INT, INT) +FCALLSCFUN1 (INT, taxisInqType, TAXISINQTYPE, taxisinqtype, INT) +FCALLSCSUB2 (taxisDefVdate, TAXISDEFVDATE, taxisdefvdate, INT, INT) +FCALLSCSUB2 (taxisDefVtime, TAXISDEFVTIME, taxisdefvtime, INT, INT) +FCALLSCFUN1 (INT, taxisInqVdate, TAXISINQVDATE, taxisinqvdate, INT) +FCALLSCFUN1 (INT, taxisInqVtime, TAXISINQVTIME, taxisinqvtime, INT) +FCALLSCSUB2 (taxisDefRdate, TAXISDEFRDATE, taxisdefrdate, INT, INT) +FCALLSCSUB2 (taxisDefRtime, TAXISDEFRTIME, taxisdefrtime, INT, INT) +FCALLSCFUN1 (INT, taxisInqRdate, TAXISINQRDATE, taxisinqrdate, INT) +FCALLSCFUN1 (INT, taxisInqRtime, TAXISINQRTIME, taxisinqrtime, INT) +FCALLSCFUN1 (INT, taxisHasBounds, TAXISHASBOUNDS, taxishasbounds, INT) +FCALLSCSUB1 (taxisWithBounds, TAXISWITHBOUNDS, taxiswithbounds, INT) +FCALLSCSUB1 (taxisDeleteBounds, TAXISDELETEBOUNDS, taxisdeletebounds, INT) +FCALLSCSUB3 (taxisDefVdateBounds, TAXISDEFVDATEBOUNDS, taxisdefvdatebounds, INT, INT, INT) +FCALLSCSUB3 (taxisDefVtimeBounds, TAXISDEFVTIMEBOUNDS, taxisdefvtimebounds, INT, INT, INT) +FCALLSCSUB3 (taxisInqVdateBounds, TAXISINQVDATEBOUNDS, taxisinqvdatebounds, INT, PINT, PINT) +FCALLSCSUB3 (taxisInqVtimeBounds, TAXISINQVTIMEBOUNDS, taxisinqvtimebounds, INT, PINT, PINT) +FCALLSCSUB2 (taxisDefCalendar, TAXISDEFCALENDAR, taxisdefcalendar, INT, INT) +FCALLSCFUN1 (INT, taxisInqCalendar, TAXISINQCALENDAR, taxisinqcalendar, INT) +FCALLSCSUB2 (taxisDefTunit, TAXISDEFTUNIT, taxisdeftunit, INT, INT) +FCALLSCFUN1 (INT, taxisInqTunit, TAXISINQTUNIT, taxisinqtunit, INT) +FCALLSCSUB2 (taxisDefForecastTunit, TAXISDEFFORECASTTUNIT, taxisdefforecasttunit, INT, INT) +FCALLSCFUN1 (INT, taxisInqForecastTunit, TAXISINQFORECASTTUNIT, taxisinqforecasttunit, INT) +FCALLSCSUB2 (taxisDefForecastPeriod, TAXISDEFFORECASTPERIOD, taxisdefforecastperiod, INT, DOUBLE) +FCALLSCFUN1 (DOUBLE, taxisInqForecastPeriod, TAXISINQFORECASTPERIOD, taxisinqforecastperiod, INT) +FCALLSCSUB2 (taxisDefNumavg, TAXISDEFNUMAVG, taxisdefnumavg, INT, INT) +FCALLSCFUN1 (INT, taxisInqNumavg, TAXISINQNUMAVG, taxisinqnumavg, INT) +FCALLSCFUN1 (STRING, taxisNamePtr, TAXISNAMEPTR, taxisnameptr, INT) +FCALLSCFUN1 (STRING, tunitNamePtr, TUNITNAMEPTR, tunitnameptr, INT) + +/* Institut routines */ + +FCALLSCFUN4 (INT, institutDef, INSTITUTDEF, institutdef, INT, INT, STRING, STRING) +FCALLSCFUN4 (INT, institutInq, INSTITUTINQ, institutinq, INT, INT, STRING, STRING) +FCALLSCFUN0 (INT, institutInqNumber, INSTITUTINQNUMBER, institutinqnumber) +FCALLSCFUN1 (INT, institutInqCenter, INSTITUTINQCENTER, institutinqcenter, INT) +FCALLSCFUN1 (INT, institutInqSubcenter, INSTITUTINQSUBCENTER, institutinqsubcenter, INT) +FCALLSCFUN1 (STRING, institutInqNamePtr, INSTITUTINQNAMEPTR, institutinqnameptr, INT) +FCALLSCFUN1 (STRING, institutInqLongnamePtr, INSTITUTINQLONGNAMEPTR, institutinqlongnameptr, INT) + +/* Model routines */ + +FCALLSCFUN3 (INT, modelDef, MODELDEF, modeldef, INT, INT, STRING) +FCALLSCFUN3 (INT, modelInq, MODELINQ, modelinq, INT, INT, STRING) +FCALLSCFUN1 (INT, modelInqInstitut, MODELINQINSTITUT, modelinqinstitut, INT) +FCALLSCFUN1 (INT, modelInqGribID, MODELINQGRIBID, modelinqgribid, INT) +FCALLSCFUN1 (STRING, modelInqNamePtr, MODELINQNAMEPTR, modelinqnameptr, INT) + +/* Table routines */ + +FCALLSCSUB2 (tableWrite, TABLEWRITE, tablewrite, STRING, INT) +FCALLSCFUN1 (INT, tableRead, TABLEREAD, tableread, STRING) +FCALLSCFUN3 (INT, tableDef, TABLEDEF, tabledef, INT, INT, STRING) +FCALLSCFUN1 (STRING, tableInqNamePtr, TABLEINQNAMEPTR, tableinqnameptr, INT) +FCALLSCFUN3 (INT, tableInq, TABLEINQ, tableinq, INT, INT, STRING) +FCALLSCFUN0 (INT, tableInqNumber, TABLEINQNUMBER, tableinqnumber) +FCALLSCFUN1 (INT, tableInqNum, TABLEINQNUM, tableinqnum, INT) +FCALLSCFUN1 (INT, tableInqModel, TABLEINQMODEL, tableinqmodel, INT) +FCALLSCSUB6 (tableInqEntry, TABLEINQENTRY, tableinqentry, INT, INT, INT, PSTRING, PSTRING, PSTRING) + +/* Subtype routines */ + +FCALLSCFUN1 (INT, subtypeCreate, SUBTYPECREATE, subtypecreate, INT) + +/* Gives a textual summary of the variable subtype */ + +FCALLSCSUB1 (subtypePrint, SUBTYPEPRINT, subtypeprint, INT) + +/* Compares two subtype data structures */ + +FCALLSCFUN2 (INT, subtypeCompare, SUBTYPECOMPARE, subtypecompare, INT, INT) +FCALLSCFUN1 (INT, subtypeInqSize, SUBTYPEINQSIZE, subtypeinqsize, INT) +FCALLSCFUN1 (INT, subtypeInqActiveIndex, SUBTYPEINQACTIVEINDEX, subtypeinqactiveindex, INT) +FCALLSCSUB2 (subtypeDefActiveIndex, SUBTYPEDEFACTIVEINDEX, subtypedefactiveindex, INT, INT) + +/* Generate a "query object" out of a key-value pair */ + + +/* Generate an AND-combined "query object" out of two previous query objects */ + +FCALLSCFUN3 (INT, subtypeInqTile, SUBTYPEINQTILE, subtypeinqtile, INT, INT, INT) +FCALLSCFUN4 (INT, subtypeInqAttribute, SUBTYPEINQATTRIBUTE, subtypeinqattribute, INT, INT, STRING, PINT) +FCALLSCFUN2 (INT, vlistInqVarSubtype, VLISTINQVARSUBTYPE, vlistinqvarsubtype, INT, INT) +FCALLSCSUB3 (gribapiLibraryVersion, GRIBAPILIBRARYVERSION, gribapilibraryversion, PINT, PINT, PINT) + +/* Compatibility functions for release 1.8.3 (obsolete functions) */ + +FCALLSCSUB2 (zaxisDefLtype, ZAXISDEFLTYPE, zaxisdefltype, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarTypeOfGeneratingProcess, VLISTINQVARTYPEOFGENERATINGPROCESS, vlistinqvartypeofgeneratingprocess, INT, INT) +FCALLSCSUB3 (vlistDefVarTypeOfGeneratingProcess, VLISTDEFVARTYPEOFGENERATINGPROCESS, vlistdefvartypeofgeneratingprocess, INT, INT, INT) +FCALLSCSUB3 (vlistDefVarProductDefinitionTemplate, VLISTDEFVARPRODUCTDEFINITIONTEMPLATE, vlistdefvarproductdefinitiontemplate, INT, INT, INT) + +/* End of fortran interface */ + + +#if defined __clang__ +# pragma GCC diagnostic pop +#endif + +// clang-format on + +#endif diff --git a/src/cdilib.c b/src/cdilib.c new file mode 100644 index 000000000..64cf1b43b --- /dev/null +++ b/src/cdilib.c @@ -0,0 +1,75025 @@ + +/* Automatically generated by m300488 at 2023-02-24, do not edit */ + +/* CDILIB_VERSION="2.2.0" */ + +#if defined(_WIN32) || defined(_WIN64) +#define restrict +#define ssize_t long +#else +#define HAVE_UNISTD_H +#endif + +#ifdef _ARCH_PWR6 +#pragma options nostrict +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 +#endif + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <ctype.h> +#include <limits.h> +#include <float.h> +#include <math.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <stdbool.h> +#include <assert.h> + +#ifdef HAVE_LIBGRIB_API +#include <grib_api.h> +#endif + +#ifdef HAVE_MMAP +#include <sys/mman.h> /* mmap() is defined in this header */ +#endif + +#ifdef HAVE_LIBPTHREAD +#include <pthread.h> +#endif + +#ifdef HAVE_LIBSZ +#include <szlib.h> +#endif + +#ifndef HAVE_CONFIG_H +#define HAVE_LIBGRIB 1 +#define HAVE_LIBCGRIBEX 1 +#define HAVE_LIBSERVICE 1 +#define HAVE_LIBEXTRA 1 +#define HAVE_LIBIEG 1 +#define CDI -1 +#endif + +#ifndef ASYNC_WORKER_H +#define ASYNC_WORKER_H + +typedef struct AsyncJob AsyncJob; +typedef struct AsyncManager AsyncManager; + +// a negative threadCount gives the number of cores that should remain unused by the worker threads, returns an error code +int AsyncWorker_init(AsyncManager **jobManager, int threadCount); + +// executes work(data) in a worker thread, must be followed by a call to AsyncWorker_wait() +AsyncJob *AsyncWorker_requestWork(AsyncManager *jobManager, int (*work)(void *data), void *data); + +// waits for the async job to finish and returns its result (or some other error code) +int AsyncWorker_wait(AsyncManager *jobManager, AsyncJob *job); + +// return the number of workers that are currently idle +int AsyncWorker_availableWorkers(AsyncManager *jobManager); + +// waits for all pending jobs to finish, stops all workers, returns a non-zero error code from a pending job if there were any +int AsyncWorker_finalize(AsyncManager *jobManager); + +#endif +#ifndef CDI_DATETIME_H +#define CDI_DATETIME_H + +#include <stdbool.h> +#include <stdint.h> + +// clang-format off + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + int year; // year of date + short month; // month of date + short day; // day of date +} CdiDate; + +typedef struct +{ + short hour; // hour part of time + short minute; // minute part of time + short second; // second part of time + short ms; // milli-second part of time. 0<=ms<=999 +} CdiTime; + +typedef struct +{ + CdiDate date; // date elements + CdiTime time; // time elements +} CdiDateTime; + +CdiDateTime cdiDateTime_set(int64_t date, int time); +CdiDate cdiDate_set(int64_t date); +CdiTime cdiTime_set(int time); +int64_t cdiDate_get(CdiDate cdiDate); +int cdiTime_get(CdiTime cdiTime); + +CdiDate cdiDate_encode(int year, int month, int day); +void cdiDate_decode(CdiDate cdiDate, int *year, int *month, int *day); +CdiTime cdiTime_encode(int hour, int minute, int second, int ms); +void cdiTime_decode(CdiTime cdiTime, int *hour, int *minute, int *second, int *ms); + +void cdiDate_init(CdiDate *cdiDate); +void cdiTime_init(CdiTime *cdiTime); +void cdiDateTime_init(CdiDateTime *cdiDateTime); + +bool cdiDate_isEQ(CdiDate cdiDate1, CdiDate cdiDate2); +bool cdiTime_isEQ(CdiTime cdiTime1, CdiTime cdiTime2); +bool cdiDateTime_isEQ(CdiDateTime cdiDateTime1, CdiDateTime cdiDateTime2); +bool cdiDateTime_isNE(CdiDateTime cdiDateTime1, CdiDateTime cdiDateTime2); +bool cdiDateTime_isLT(CdiDateTime cdiDateTime1, CdiDateTime cdiDateTime2); +bool cdiDateTime_isNull(CdiDateTime cdiDateTime); + +const char *CdiDateTime_string(CdiDateTime cdiDateTime); + +#ifdef __cplusplus +} +#endif + +// clang-format on + +#endif /* CDI_DATETIME_H */ +/* + CDI C header file + + This is the only file that must be included to use the CDI library from C. +*/ + +#ifndef CDI_H_ +#define CDI_H_ + +// clang-format off + +#include <stdio.h> +#include <stdint.h> // int64_t +#include <stdbool.h> +#include <sys/types.h> + +#ifndef CDI_SIZE_TYPE +#define CDI_SIZE_TYPE int +#endif + +typedef CDI_SIZE_TYPE SizeType; + +//FINT_ON <--- don't change or remove this line!!! +// Start of fortran interface for the following routines (make_fint.c) + +#ifdef __cplusplus +extern "C" { +#endif + +#define CDI_MAX_NAME 256 // Max length of a name + +#define CDI_UNDEFID -1 +#define CDI_GLOBAL -1 // Global var ID for vlist and Z-axis +#define CDI_XAXIS 1 // X-axis ID for grid +#define CDI_YAXIS 2 // Y-axis ID for grid + +// Byte order + +#define CDI_BIGENDIAN 0 // Byte order BIGENDIAN +#define CDI_LITTLEENDIAN 1 // Byte order LITTLEENDIAN +#define CDI_PDPENDIAN 2 + +#define CDI_REAL 1 // Real numbers +#define CDI_COMP 2 // Complex numbers +#define CDI_BOTH 3 // Both numbers + +// Error identifier + +#define CDI_NOERR 0 // No Error +#define CDI_EEOF -1 // The end of file was encountered +#define CDI_ETMOF -9 // Too many open files +#define CDI_ESYSTEM -10 // Operating system error +#define CDI_EINVAL -20 // Invalid argument +#define CDI_EISDIR -21 // Is a directory +#define CDI_EISEMPTY -22 // Is empty +#define CDI_EUFTYPE -23 // Unsupported file type +#define CDI_ELIBNAVAIL -24 // xxx library not available +#define CDI_EUFSTRUCT -25 // Unsupported file structure +#define CDI_EUNC4 -26 // Unsupported NetCDF4 structure +#define CDI_EDIMSIZE -27 // Invalid dimension size +#define CDI_EQENF -50 // Query entries not found +#define CDI_EQNAVAIL -51 // Query not available for file type +#define CDI_ELIMIT -99 // Internal limits exceeded + +// File types + +#define CDI_FILETYPE_GRB 1 // File type GRIB +#define CDI_FILETYPE_GRB2 2 // File type GRIB version 2 +#define CDI_FILETYPE_NC 3 // File type NetCDF +#define CDI_FILETYPE_NC2 4 // File type NetCDF version 2 (64-bit offset) +#define CDI_FILETYPE_NC4 5 // File type NetCDF version 4 +#define CDI_FILETYPE_NC4C 6 // File type NetCDF version 4 (classic) +#define CDI_FILETYPE_NC5 7 // File type NetCDF version 5 (64-bit data) +#define CDI_FILETYPE_SRV 8 // File type SERVICE +#define CDI_FILETYPE_EXT 9 // File type EXTRA +#define CDI_FILETYPE_IEG 10 // File type IEG +#define CDI_FILETYPE_NCZARR 11 // File type NetCDF NCZarr Data Model + +// Compatibility defines for release 1.8.3 (obsolete defines) +#define FILETYPE_GRB 1 // File type GRIB +#define FILETYPE_GRB2 2 // File type GRIB version 2 +#define FILETYPE_NC 3 // File type NetCDF +#define FILETYPE_NC2 4 // File type NetCDF version 2 (64-bit offset) +#define FILETYPE_NC4 5 // File type NetCDF version 4 + +// Protocols (in filename/URI) + +#define CDI_PROTOCOL_OTHER 0 // Any other protocol (might be supported by NetCDF library) +#define CDI_PROTOCOL_FILE 1 +#define CDI_PROTOCOL_FDB 2 +#define CDI_PROTOCOL_ACROSS 3 + +// Compress types + +#define CDI_COMPRESS_NONE 0 +#define CDI_COMPRESS_SZIP 1 +#define CDI_COMPRESS_AEC 2 +#define CDI_COMPRESS_ZIP 3 +#define CDI_COMPRESS_JPEG 4 +#define CDI_COMPRESS_FILTER 5 + +// external data types + +// Compatibility defines for release 1.8.3 (obsolete defines) +#define DATATYPE_PACK16 16 +#define DATATYPE_PACK24 24 +#define DATATYPE_FLT32 132 +#define DATATYPE_FLT64 164 +#define DATATYPE_INT32 232 +#define DATATYPE_INT 251 + +#define CDI_DATATYPE_PACK 0 +#define CDI_DATATYPE_PACK1 1 +#define CDI_DATATYPE_PACK2 2 +#define CDI_DATATYPE_PACK3 3 +#define CDI_DATATYPE_PACK4 4 +#define CDI_DATATYPE_PACK5 5 +#define CDI_DATATYPE_PACK6 6 +#define CDI_DATATYPE_PACK7 7 +#define CDI_DATATYPE_PACK8 8 +#define CDI_DATATYPE_PACK9 9 +#define CDI_DATATYPE_PACK10 10 +#define CDI_DATATYPE_PACK11 11 +#define CDI_DATATYPE_PACK12 12 +#define CDI_DATATYPE_PACK13 13 +#define CDI_DATATYPE_PACK14 14 +#define CDI_DATATYPE_PACK15 15 +#define CDI_DATATYPE_PACK16 16 +#define CDI_DATATYPE_PACK17 17 +#define CDI_DATATYPE_PACK18 18 +#define CDI_DATATYPE_PACK19 19 +#define CDI_DATATYPE_PACK20 20 +#define CDI_DATATYPE_PACK21 21 +#define CDI_DATATYPE_PACK22 22 +#define CDI_DATATYPE_PACK23 23 +#define CDI_DATATYPE_PACK24 24 +#define CDI_DATATYPE_PACK25 25 +#define CDI_DATATYPE_PACK26 26 +#define CDI_DATATYPE_PACK27 27 +#define CDI_DATATYPE_PACK28 28 +#define CDI_DATATYPE_PACK29 29 +#define CDI_DATATYPE_PACK30 30 +#define CDI_DATATYPE_PACK31 31 +#define CDI_DATATYPE_PACK32 32 +#define CDI_DATATYPE_CPX32 64 +#define CDI_DATATYPE_CPX64 128 +#define CDI_DATATYPE_FLT32 132 +#define CDI_DATATYPE_FLT64 164 +#define CDI_DATATYPE_INT8 208 +#define CDI_DATATYPE_INT16 216 +#define CDI_DATATYPE_INT32 232 +#define CDI_DATATYPE_UINT8 308 +#define CDI_DATATYPE_UINT16 316 +#define CDI_DATATYPE_UINT32 332 + +// internal data types +#define CDI_DATATYPE_INT 251 +#define CDI_DATATYPE_FLT 252 +#define CDI_DATATYPE_TXT 253 +#define CDI_DATATYPE_CPX 254 +#define CDI_DATATYPE_UCHAR 255 +#define CDI_DATATYPE_LONG 256 +#define CDI_DATATYPE_UINT 257 + +// Chunk types + +#define CDI_CHUNK_AUTO 1 // use default chunk size +#define CDI_CHUNK_GRID 2 +#define CDI_CHUNK_LINES 3 + +// GRID types + +#define GRID_GENERIC 1 // Generic grid +#define GRID_GAUSSIAN 2 // Regular Gaussian lon/lat grid +#define GRID_GAUSSIAN_REDUCED 3 // Reduced Gaussian lon/lat grid +#define GRID_LONLAT 4 // Regular longitude/latitude grid +#define GRID_SPECTRAL 5 // Spherical harmonic coefficients (spectral gaussian) +#define GRID_FOURIER 6 // Fourier coefficients (spectral gaussian) +#define GRID_GME 7 // Icosahedral-hexagonal GME grid +#define GRID_TRAJECTORY 8 // Trajectory +#define GRID_UNSTRUCTURED 9 // General unstructured grid +#define GRID_CURVILINEAR 10 // Curvilinear grid +#define GRID_PROJECTION 12 // Projected coordinates +#define GRID_CHARXY 13 // One horizontal character dimension + +#define CDI_PROJ_RLL 21 // Rotated Latitude Longitude +#define CDI_PROJ_LCC 22 // Lambert Conformal Conic +#define CDI_PROJ_LAEA 23 // Lambert Azimuthal Equal Area +#define CDI_PROJ_SINU 24 // Sinusoidal +#define CDI_PROJ_STERE 25 // Polar stereographic +#define CDI_PROJ_HEALPIX 26 // Healpix + +// ZAXIS types + +#define ZAXIS_SURFACE 0 // Surface level +#define ZAXIS_GENERIC 1 // Generic level +#define ZAXIS_HYBRID 2 // Hybrid level +#define ZAXIS_HYBRID_HALF 3 // Hybrid half level +#define ZAXIS_PRESSURE 4 // Isobaric pressure level in Pascal +#define ZAXIS_HEIGHT 5 // Height above ground +#define ZAXIS_DEPTH_BELOW_SEA 6 // Depth below sea level in meters +#define ZAXIS_DEPTH_BELOW_LAND 7 // Depth below land surface in centimeters +#define ZAXIS_ISENTROPIC 8 // Isentropic +#define ZAXIS_TRAJECTORY 9 // Trajectory +#define ZAXIS_ALTITUDE 10 // Altitude above mean sea level in meters +#define ZAXIS_SIGMA 11 // Sigma level +#define ZAXIS_MEANSEA 12 // Mean sea level +#define ZAXIS_TOA 13 // Norminal top of atmosphere +#define ZAXIS_SEA_BOTTOM 14 // Sea bottom +#define ZAXIS_ATMOSPHERE 15 // Entire atmosphere +#define ZAXIS_CLOUD_BASE 16 // Cloud base level +#define ZAXIS_CLOUD_TOP 17 // Level of cloud tops +#define ZAXIS_ISOTHERM_ZERO 18 // Level of 0o C isotherm +#define ZAXIS_SNOW 19 // Snow level +#define ZAXIS_LAKE_BOTTOM 20 // Lake or River Bottom +#define ZAXIS_SEDIMENT_BOTTOM 21 // Bottom Of Sediment Layer +#define ZAXIS_SEDIMENT_BOTTOM_TA 22 // Bottom Of Thermally Active Sediment Layer +#define ZAXIS_SEDIMENT_BOTTOM_TW 23 // Bottom Of Sediment Layer Penetrated By Thermal Wave +#define ZAXIS_MIX_LAYER 24 // Mixing Layer +#define ZAXIS_REFERENCE 25 // zaxis reference number +#define ZAXIS_CHAR 26 // Area types +#define ZAXIS_TROPOPAUSE 27 // Tropopause + +// SUBTYPE types + +enum { + SUBTYPE_TILES = 0 // Tiles variable +}; + +#define MAX_KV_PAIRS_MATCH 10 + +/* Data structure defining a key-value search, possibly with multiple + key-value pairs in combination. + + Currently, only multiple pairs combined by AND are supported. +*/ +typedef struct { + int nAND; // no. of key-value pairs that have to match + int key_value_pairs[2][MAX_KV_PAIRS_MATCH]; // key-value pairs +} subtype_query_t; + + + +// TIME types + +#define TIME_CONSTANT 0 // Time constant +#define TIME_VARYING 1 // Time varying +#define TIME_VARIABLE 1 // obsolete, use TIME_VARYING + +// TSTEP types + +#define TSTEP_CONSTANT 0 // obsolete, use TIME_CONSTANT +#define TSTEP_INSTANT 1 // Instant +#define TSTEP_AVG 2 // Average +#define TSTEP_ACCUM 3 // Accumulation +#define TSTEP_MAX 4 // Maximum +#define TSTEP_MIN 5 // Minimum +#define TSTEP_DIFF 6 // Difference +#define TSTEP_RMS 7 // Root mean square +#define TSTEP_SD 8 // Standard deviation +#define TSTEP_COV 9 // Covariance +#define TSTEP_RATIO 10 // Ratio +#define TSTEP_SUM 11 // Summation +#define TSTEP_RANGE 12 +#define TSTEP_INSTANT2 13 +#define TSTEP_INSTANT3 14 + +// TAXIS types + +#define TAXIS_ABSOLUTE 1 +#define TAXIS_RELATIVE 2 +#define TAXIS_FORECAST 3 + +// TUNIT types + +#define TUNIT_SECOND 1 +#define TUNIT_MINUTE 2 +#define TUNIT_QUARTER 3 +#define TUNIT_30MINUTES 4 +#define TUNIT_HOUR 5 +#define TUNIT_3HOURS 6 +#define TUNIT_6HOURS 7 +#define TUNIT_12HOURS 8 +#define TUNIT_DAY 9 +#define TUNIT_MONTH 10 +#define TUNIT_YEAR 11 + +// CALENDAR types + +#define CALENDAR_STANDARD 0 // don't change this value (used also in cgribexlib)! +#define CALENDAR_GREGORIAN 1 +#define CALENDAR_PROLEPTIC 2 +#define CALENDAR_360DAYS 3 +#define CALENDAR_365DAYS 4 +#define CALENDAR_366DAYS 5 +#define CALENDAR_NONE 6 + +// number of unsigned char needed to store UUID +#define CDI_UUID_SIZE 16 + +// Structs that are used to return data to the user + +typedef struct CdiParam { int discipline; int category; int number; } CdiParam; + + +// Opaque types +typedef struct CdiIterator CdiIterator; +typedef struct CdiGribIterator CdiGribIterator; + +// CDI control routines + +void cdiReset(void); + +const char *cdiStringError(int cdiErrno); +void cdiDebug(int debug); + +const char *cdiLibraryVersion(void); +void cdiPrintVersion(void); + +int cdiHaveFiletype(int filetype); + +void cdiDefMissval(double missval); +double cdiInqMissval(void); +void cdiDefGlobal(const char *string, int val); + +int namespaceNew(void); +void namespaceSetActive(int namespaceID); +int namespaceGetActive(void); +void namespaceDelete(int namespaceID); + + +// CDI converter routines + +// parameter + +void cdiParamToString(int param, char *paramstr, int maxlen); + +void cdiDecodeParam(int param, int *pnum, int *pcat, int *pdis); +int cdiEncodeParam(int pnum, int pcat, int pdis); + +// date format: YYYYMMDD +// time format: hhmmss + +void cdiDecodeDate(int date, int *year, int *month, int *day); +int cdiEncodeDate(int year, int month, int day); + +void cdiDecodeTime(int time, int *hour, int *minute, int *second); +int cdiEncodeTime(int hour, int minute, int second); + + +// STREAM control routines + +int cdiGetFiletype(const char *uri, int *byteorder); +int cdiGetProtocol(const char *uri, const char **filename); + +// streamOpenRead: Open a dataset for reading +int streamOpenRead(const char *path); + +// streamOpenWrite: Create a new dataset +int streamOpenWrite(const char *path, int filetype); + +int streamOpenAppend(const char *path); + +// streamClose: Close an open dataset +void streamClose(int streamID); + +// streamSync: Synchronize an Open Dataset to Disk +void streamSync(int streamID); + +void streamDefMaxSteps(int streamID, int maxSteps); +void streamDefNumWorker(int streamID, int numWorker); + +// streamDefVlist: Define the Vlist for a stream +void streamDefVlist(int streamID, int vlistID); + +// streamInqVlist: Get the Vlist of a stream +int streamInqVlist(int streamID); + +// streamInqFiletype: Get the filetype +int streamInqFiletype(int streamID); + +// streamDefByteorder: Define the byteorder +void streamDefByteorder(int streamID, int byteorder); + +// streamInqByteorder: Get the byteorder +int streamInqByteorder(int streamID); + +void streamDefFilter(int streamID, int filterId, int nparams, const int *params); + +// streamDefCompType: Define compression type +void streamDefCompType(int streamID, int comptype); + +// streamInqCompType: Get compression type +int streamInqCompType(int streamID); + +// streamDefCompLevel: Define compression level +void streamDefCompLevel(int streamID, int complevel); + +// streamInqCompLevel: Get compression level +int streamInqCompLevel(int streamID); + +// streamDefTimestep: Define time step +int streamDefTimestep(int streamID, int tsID); + +// streamInqTimestep: Get time step +int streamInqTimestep(int streamID, int tsID); + +// PIO: query currently set timestep id +int streamInqCurTimestepID(int streamID); + +const char *streamFilename(int streamID); +const char *streamFilesuffix(int filetype); + +SizeType streamNvals(int streamID); + +int streamInqNvars(int streamID); + +// STREAM var I/O routines (random access) + +// streamWriteVar: Write a variable +void streamWriteVar(int streamID, int varID, const double data[], SizeType nmiss); +void streamWriteVarF(int streamID, int varID, const float data[], SizeType nmiss); + +// streamReadVar: Read a variable +void streamReadVar(int streamID, int varID, double data[], SizeType *nmiss); +void streamReadVarF(int streamID, int varID, float data[], SizeType *nmiss); +void streamReadVarPart(int streamID, int varID, int varType, int start, SizeType size, void *data, SizeType *nmiss, int memtype); + +// streamWriteVarSlice: Write a horizontal slice of a variable +void streamWriteVarSlice(int streamID, int varID, int levelID, const double data[], SizeType nmiss); +void streamWriteVarSliceF(int streamID, int varID, int levelID, const float data[], SizeType nmiss); +void streamReadVarSlicePart(int streamID, int varID, int levelID, int varType, int start, SizeType size, void *data, SizeType *nmiss, int memtype); + +// streamReadVarSlice: Read a horizontal slice of a variable +void streamReadVarSlice(int streamID, int varID, int levelID, double data[], SizeType *nmiss); +void streamReadVarSliceF(int streamID, int varID, int levelID, float data[], SizeType *nmiss); + +void streamWriteVarChunk(int streamID, int varID, const int rect[][2], const double data[], SizeType nmiss); +void streamWriteVarChunkF(int streamID, int varID, const int rect[][2], const float data[], SizeType nmiss); + + +// STREAM record I/O routines (sequential access) + +void streamDefRecord(int streamID, int varID, int levelID); +void streamInqRecord(int streamID, int *varID, int *levelID); +void streamWriteRecord(int streamID, const double data[], SizeType nmiss); +void streamWriteRecordF(int streamID, const float data[], SizeType nmiss); +void streamReadRecord(int streamID, double data[], SizeType *nmiss); +void streamReadRecordF(int streamID, float data[], SizeType *nmiss); +void streamCopyRecord(int streamIDdest, int streamIDsrc); + +void streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignum); + + +// File driven I/O (may yield better performance than using the streamXXX functions) + +// Creation & Destruction +CdiIterator *cdiIterator_new(const char *path); // Requires a subsequent call to cdiIteratorNextField() to point the iterator at the first field. +CdiIterator *cdiIterator_clone(CdiIterator *me); +char *cdiIterator_serialize(CdiIterator *me); // Returns a malloc'ed string. +CdiIterator *cdiIterator_deserialize(const char *description); // description is a string that was returned by cdiIteratorSerialize(). Returns a copy of the original iterator. +void cdiIterator_print(CdiIterator *me, FILE *stream); +void cdiIterator_delete(CdiIterator *me); + +// Advancing an iterator +int cdiIterator_nextField(CdiIterator *me); // Points the iterator at the next field, returns CDI_EEOF if there are no more fields in the file. + +// Introspecting metadata +// All outXXX arguments to these functions may be NULL. +char *cdiIterator_inqStartTime(CdiIterator *me); // Returns the (start) time as an ISO-8601 coded string. The caller is responsible to Free() the returned string. +char *cdiIterator_inqEndTime(CdiIterator *me); // Returns the end time of an integration period as an ISO-8601 coded string, or NULL if there is no end time. The caller is responsible to Free() the returned string. +char *cdiIterator_inqRTime(CdiIterator *me); // Returns the reference date as an ISO-8601 coded string. The caller is responsible to Free() the returned string. +char *cdiIterator_inqVTime(CdiIterator *me); // Returns the validity date as an ISO-8601 coded string. The caller is responsible to Free() the returned string. +int cdiIterator_inqLevelType(CdiIterator *me, int levelSelector, char **outName_optional, char **outLongName_optional, char **outStdName_optional, char **outUnit_optional); // callers are responsible to Free() strings that they request +int cdiIterator_inqLevel(CdiIterator *me, int levelSelector, double *outValue1_optional, double *outValue2_optional); // outValue2 is only written to if the level is a hybrid level +int cdiIterator_inqLevelUuid(CdiIterator *me, int *outVgridNumber_optional, int *outLevelCount_optional, unsigned char outUuid_optional[CDI_UUID_SIZE]); // outUuid must point to a buffer of 16 bytes, returns an error code if no generalized zaxis is used. +int cdiIterator_inqTile(CdiIterator *me, int *outTileIndex, int *outTileAttribute); // Returns CDI_EINVAL if there is no tile information connected to the current field, *outTileIndex and *outTileAttribute will be set to -1 in this case. +int cdiIterator_inqTileCount(CdiIterator *me, int *outTileCount, int *outTileAttributeCount); // outTileAttributeCount is the count for the tile associated with the current field, a total attribute count cannot be inquired. Returns CDI_EINVAL if there is no tile information connected to the current field, *outTileCount and *outTileAttributeCount will be set to 0 in this case. +CdiParam cdiIterator_inqParam(CdiIterator *me); +void cdiIterator_inqParamParts(CdiIterator *me, int *outDiscipline, int *outCategory, int *outNumber); // Some FORTRAN compilers produce wrong code for the cdiIterator_inqParam()-wrapper, rendering it unusable from FORTRAN. This function is the workaround. +int cdiIterator_inqDatatype(CdiIterator *me); +int cdiIterator_inqFiletype(CdiIterator *me); +int cdiIterator_inqTsteptype(CdiIterator *me); +char *cdiIterator_inqVariableName(CdiIterator *me); // The caller is responsible to Free() the returned buffer. +int cdiIterator_inqGridId(CdiIterator *me); // The returned id is only valid until the next call to cdiIteratorNextField(). + +// Reading data +void cdiIterator_readField(CdiIterator *me, double data[], SizeType *nmiss_optional); +void cdiIterator_readFieldF(CdiIterator *me, float data[], SizeType *nmiss_optional); +// TODO[NH]: Add functions to read partial fields. + + +// Direct access to grib fields +CdiGribIterator *cdiGribIterator_clone(CdiIterator *me); // Returns NULL if the associated file is not a GRIB file. +void cdiGribIterator_delete(CdiGribIterator *me); + +// Callthroughs to GRIB-API +int cdiGribIterator_getLong(CdiGribIterator *me, const char *key, long *value); // Same semantics as grib_get_long(). +int cdiGribIterator_getDouble(CdiGribIterator *me, const char *key, double *value); // Same semantics as grib_get_double(). +int cdiGribIterator_getLength(CdiGribIterator *me, const char *key, size_t *value); // Same semantics as grib_get_length(). +int cdiGribIterator_getString(CdiGribIterator *me, const char *key, char *value, size_t *length); // Same semantics as grib_get_string(). +int cdiGribIterator_getSize(CdiGribIterator *me, const char *key, size_t *value); // Same semantics as grib_get_size(). +int cdiGribIterator_getLongArray(CdiGribIterator *me, const char *key, long *value, size_t *array_size); // Same semantics as grib_get_long_array(). +int cdiGribIterator_getDoubleArray(CdiGribIterator *me, const char *key, double *value, size_t *array_size); // Same semantics as grib_get_double_array(). + +// Convenience functions for accessing GRIB-API keys +int cdiGribIterator_inqEdition(CdiGribIterator *me); +long cdiGribIterator_inqLongValue(CdiGribIterator *me, const char *key); // Aborts on failure to fetch the given key. +long cdiGribIterator_inqLongDefaultValue(CdiGribIterator *me, const char *key, long defaultValue); // Returns the default value if the given key is not present. +double cdiGribIterator_inqDoubleValue(CdiGribIterator *me, const char *key); // Aborts on failure to fetch the given key. +double cdiGribIterator_inqDoubleDefaultValue(CdiGribIterator *me, const char *key, double defaultValue); // Returns the default value if the given key is not present. +char *cdiGribIterator_inqStringValue(CdiGribIterator *me, const char *key); // Returns a malloc'ed string. + +// VLIST routines + +// vlistCreate: Create a variable list +int vlistCreate(void); + +// vlistDestroy: Destroy a variable list +void vlistDestroy(int vlistID); + +// vlistDuplicate: Duplicate a variable list +int vlistDuplicate(int vlistID); + +// vlistCopy: Copy a variable list +void vlistCopy(int vlistID2, int vlistID1); + +// vlistCopyFlag: Copy some entries of a variable list +void vlistCopyFlag(int vlistID2, int vlistID1); + +void vlistClearFlag(int vlistID); + +// vlistCat: Concatenate two variable lists +void vlistCat(int vlistID2, int vlistID1); + +// vlistMerge: Merge two variable lists +void vlistMerge(int vlistID2, int vlistID1); + +void vlistPrint(int vlistID); + +// vlistNumber: Number type in a variable list +int vlistNumber(int vlistID); + +// vlistNvars: Number of variables in a variable list +int vlistNvars(int vlistID); + +// vlistNgrids: Number of grids in a variable list +int vlistNgrids(int vlistID); + +// vlistNzaxis: Number of zaxis in a variable list +int vlistNzaxis(int vlistID); + +// vlistNsubtypes: Number of subtypes in a variable list +int vlistNsubtypes(int vlistID); + +void vlistDefNtsteps(int vlistID, int nts); +int vlistNtsteps(int vlistID); +SizeType vlistGridsizeMax(int vlistID); +int vlistGrid(int vlistID, int index); +int vlistGridIndex(int vlistID, int gridID); +void vlistChangeGridIndex(int vlistID, int index, int gridID); +void vlistChangeGrid(int vlistID, int gridID1, int gridID2); +int vlistZaxis(int vlistID, int index); +int vlistZaxisIndex(int vlistID, int zaxisID); +void vlistChangeZaxisIndex(int vlistID, int index, int zaxisID); +void vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2); +int vlistNrecs(int vlistID); +int vlistSubtype(int vlistID, int index); +int vlistSubtypeIndex(int vlistID, int subtypeID); + +// vlistDefTaxis: Define the time axis of a variable list +void vlistDefTaxis(int vlistID, int taxisID); + +// vlistInqTaxis: Get the time axis of a variable list +int vlistInqTaxis(int vlistID); + +void vlistDefTable(int vlistID, int tableID); +int vlistInqTable(int vlistID); +void vlistDefInstitut(int vlistID, int instID); +int vlistInqInstitut(int vlistID); +void vlistDefModel(int vlistID, int modelID); +int vlistInqModel(int vlistID); + + +// VLIST VAR routines + +// vlistDefVarTiles: Create a new tile-based variable +int vlistDefVarTiles(int vlistID, int gridID, int zaxisID, int timetype, int tilesetID); + +// vlistDefVar: Create a new variable +int vlistDefVar(int vlistID, int gridID, int zaxisID, int timetype); + +void vlistChangeVarGrid(int vlistID, int varID, int gridID); +void vlistChangeVarZaxis(int vlistID, int varID, int zaxisID); + +void vlistInqVar(int vlistID, int varID, int *gridID, int *zaxisID, int *timetype); +int vlistInqVarGrid(int vlistID, int varID); +int vlistInqVarZaxis(int vlistID, int varID); + +// used in MPIOM +int vlistInqVarID(int vlistID, int code); + +void vlistDefVarTimetype(int vlistID, int varID, int timetype); +int vlistInqVarTimetype(int vlistID, int varID); + +void vlistDefVarTsteptype(int vlistID, int varID, int tsteptype); + +// vlistInqVarTsteptype: Get the timestep type of a Variable +int vlistInqVarTsteptype(int vlistID, int varID); + +void vlistDefVarCompType(int vlistID, int varID, int comptype); +int vlistInqVarCompType(int vlistID, int varID); +void vlistDefVarCompLevel(int vlistID, int varID, int complevel); +int vlistInqVarCompLevel(int vlistID, int varID); + +// vlistDefVarParam: Define the parameter number of a Variable +void vlistDefVarParam(int vlistID, int varID, int param); + +// vlistInqVarParam: Get the parameter number of a Variable +int vlistInqVarParam(int vlistID, int varID); + +// vlistDefVarCode: Define the code number of a Variable +void vlistDefVarCode(int vlistID, int varID, int code); + +// vlistInqVarCode: Get the code number of a Variable +int vlistInqVarCode(int vlistID, int varID); + +// vlistDefVarDatatype: Define the data type of a Variable +void vlistDefVarDatatype(int vlistID, int varID, int datatype); + +// vlistInqVarDatatype: Get the data type of a Variable +int vlistInqVarDatatype(int vlistID, int varID); + +void vlistDefVarXYZ(int vlistID, int varID, int xyz); +int vlistInqVarXYZ(int vlistID, int varID); + +void vlistDefVarNSB(int vlistID, int varID, int nsb); +int vlistInqVarNSB(int vlistID, int varID); + +int vlistInqVarNumber(int vlistID, int varID); + +void vlistDefVarInstitut(int vlistID, int varID, int instID); +int vlistInqVarInstitut(int vlistID, int varID); +void vlistDefVarModel(int vlistID, int varID, int modelID); +int vlistInqVarModel(int vlistID, int varID); +void vlistDefVarTable(int vlistID, int varID, int tableID); +int vlistInqVarTable(int vlistID, int varID); + +// vlistDefVarName: Define the name of a Variable +void vlistDefVarName(int vlistID, int varID, const char *name); + +// vlistInqVarName: Get the name of a Variable +void vlistInqVarName(int vlistID, int varID, char *name); + +// vlistCopyVarName: Safe and convenient version of vlistInqVarName +char *vlistCopyVarName(int vlistId, int varId); + +// vlistDefVarStdname: Define the standard name of a Variable +void vlistDefVarStdname(int vlistID, int varID, const char *stdname); + +// vlistInqVarStdname: Get the standard name of a Variable +void vlistInqVarStdname(int vlistID, int varID, char *stdname); + +// vlistDefVarLongname: Define the long name of a Variable +void vlistDefVarLongname(int vlistID, int varID, const char *longname); + +// vlistInqVarLongname: Get the long name of a Variable +void vlistInqVarLongname(int vlistID, int varID, char *longname); + +// vlistDefVarUnits: Define the units of a Variable +void vlistDefVarUnits(int vlistID, int varID, const char *units); + +// vlistInqVarUnits: Get the units of a Variable +void vlistInqVarUnits(int vlistID, int varID, char *units); + +// vlistDefVarMissval: Define the missing value of a Variable +void vlistDefVarMissval(int vlistID, int varID, double missval); + +// vlistInqVarMissval: Get the missing value of a Variable +double vlistInqVarMissval(int vlistID, int varID); + +SizeType vlistInqVarSize(int vlistID, int varID); + +void vlistDefIndex(int vlistID, int varID, int levID, int index); +int vlistInqIndex(int vlistID, int varID, int levID); +void vlistDefFlag(int vlistID, int varID, int levID, int flag); +int vlistInqFlag(int vlistID, int varID, int levID); +int vlistFindVar(int vlistID, int fvarID); +int vlistFindLevel(int vlistID, int fvarID, int flevelID); +int vlistMergedVar(int vlistID, int varID); +int vlistMergedLevel(int vlistID, int varID, int levelID); + +// cdiClearAdditionalKeys: Clear the list of additional GRIB keys +void cdiClearAdditionalKeys(void); +// cdiDefAdditionalKey: Register an additional GRIB key which is read when file is opened +void cdiDefAdditionalKey(const char *string); + +// vlistDefVarIntKey: Set an arbitrary keyword/integer value pair for GRIB API +void vlistDefVarIntKey(int vlistID, int varID, const char *name, int value); +// vlistDefVarDblKey: Set an arbitrary keyword/double value pair for GRIB API +void vlistDefVarDblKey(int vlistID, int varID, const char *name, double value); + +// vlistHasVarKey: returns 1 if meta-data key was read, 0 otherwise +int vlistHasVarKey(int vlistID, int varID, const char *name); +// vlistInqVarDblKey: raw access to GRIB meta-data +double vlistInqVarDblKey(int vlistID, int varID, const char *name); +// vlistInqVarIntKey: raw access to GRIB meta-data +int vlistInqVarIntKey(int vlistID, int varID, const char *name); + +// CDI attributes + +// cdiInqNatts: Get number of attributes assigned to this variable +int cdiInqNatts(int cdiID, int varID, int *nattsp); +// cdiInqAtt: Get information about an attribute +int cdiInqAtt(int cdiID, int varID, int attrnum, char *name, int *typep, int *lenp); +int cdiInqAttLen(int cdiID, int varID, const char *name); +int cdiInqAttType(int cdiID, int varID, const char *name); +int cdiDelAtt(int cdiID, int varID, const char *name); + +int cdiCopyAtts(int cdiID1, int varID1, int cdiID2, int varID2); + +// cdiDefAttInt: Define an integer attribute +int cdiDefAttInt(int cdiID, int varID, const char *name, int type, int len, const int ip[]); +// cdiDefAttFlt: Define a floating point attribute +int cdiDefAttFlt(int cdiID, int varID, const char *name, int type, int len, const double dp[]); +// cdiDefAttTxt: Define a text attribute +int cdiDefAttTxt(int cdiID, int varID, const char *name, int len, const char *tp_cbuf); + +// cdiInqAttInt: Get the value(s) of an integer attribute +int cdiInqAttInt(int cdiID, int varID, const char *name, int mlen, int ip[]); +// cdiInqAttFlt: Get the value(s) of a floating point attribute +int cdiInqAttFlt(int cdiID, int varID, const char *name, int mlen, double dp[]); +// cdiInqAttTxt: Get the value(s) of a text attribute +int cdiInqAttTxt(int cdiID, int varID, const char *name, int mlen, char *tp_cbuf); + + +// GRID routines + +void gridName(int gridtype, char *gridname); +const char *gridNamePtr(int gridtype); + +void gridCompress(int gridID); + +void gridDefMaskGME(int gridID, const int mask[]); +int gridInqMaskGME(int gridID, int mask[]); + +void gridDefMask(int gridID, const int mask[]); +int gridInqMask(int gridID, int mask[]); + +// gridCreate: Create a horizontal Grid +int gridCreate(int gridtype, SizeType size); + +// gridDestroy: Destroy a horizontal Grid +void gridDestroy(int gridID); + +// gridDuplicate: Duplicate a Grid +int gridDuplicate(int gridID); + +// gridDefProj: Define the projection ID of a Grid +void gridDefProj(int gridID, int projID); + +// gridInqProj: Get the projection ID of a Grid +int gridInqProj(int gridID); + +// gridInqProjType: Get the projection type +int gridInqProjType(int gridID); + +// gridInqType: Get the type of a Grid +int gridInqType(int gridID); + +// gridInqSize: Get the size of a Grid +SizeType gridInqSize(int gridID); + +// gridDefXsize: Define the size of a X-axis +void gridDefXsize(int gridID, SizeType xsize); + +// gridInqXsize: Get the size of a X-axis +SizeType gridInqXsize(int gridID); + +// gridDefYsize: Define the size of a Y-axis +void gridDefYsize(int gridID, SizeType ysize); + +// gridInqYsize: Get the size of a Y-axis +SizeType gridInqYsize(int gridID); + +// gridDefNP: Define the number of parallels between a pole and the equator +void gridDefNP(int gridID, int np); + +// gridInqNP: Get the number of parallels between a pole and the equator +int gridInqNP(int gridID); + +// gridDefXvals: Define the values of a X-axis +void gridDefXvals(int gridID, const double xvals[]); + +// gridInqXvals: Get all values of a X-axis +SizeType gridInqXvals(int gridID, double xvals[]); +SizeType gridInqXvalsPart(int gridID, int start, SizeType size, double xvals[]); +const double *gridInqXvalsPtr(int gridID); + +// gridInqXIsc: Find out whether X-coordinate is of type CHAR +int gridInqXIsc(int gridID); + +// gridInqXCvals: Get strings from X-axis in case grid is of type GRID_CHARXY +SizeType gridInqXCvals(int gridID, char *xcvals[]); + +// gridDefYvals: Define the values of a Y-axis +void gridDefYvals(int gridID, const double yvals[]); + +// gridInqYvals: Get all values of a Y-axis +SizeType gridInqYvals(int gridID, double yvals[]); +SizeType gridInqYvalsPart(int gridID, int start, SizeType size, double yvals[]); +const double *gridInqYvalsPtr(int gridID); + +// gridInqYIsc: Find out whether Y-coordinate is of type CHAR +int gridInqYIsc(int gridID); + +// gridInqYCvals: Get strings from Y-axis in case grid is of type GRID_CHARXY +SizeType gridInqYCvals(int gridID, char *ycvals[]); + +// CDI var keys + +// String keys +#define CDI_KEY_NAME 942 // Variable name +#define CDI_KEY_LONGNAME 943 // Long name of the variable +#define CDI_KEY_STDNAME 944 // CF Standard name of the variable +#define CDI_KEY_UNITS 945 // Units of the variable +#define CDI_KEY_DATATYPE 946 // Data type +#define CDI_KEY_REFERENCEURI 947 // Reference URI to grid file +#define CDI_KEY_CHUNKS 948 // Chunks + +// Integer keys +#define CDI_KEY_NUMBEROFGRIDUSED 961 // GRIB2 numberOfGridUsed +#define CDI_KEY_NUMBEROFGRIDINREFERENCE 962 // GRIB2 numberOfGridInReference +#define CDI_KEY_NUMBEROFVGRIDUSED 963 // GRIB2 numberOfVGridUsed +#define CDI_KEY_NLEV 964 // GRIB2 nlev +#define CDI_KEY_CHUNKTYPE 965 // ChunkType: CDI_CHUNK_AUTO/CDI_CHUNK_GRID/CDI_CHUNK_LINES +#define CDI_KEY_CHUNKSIZE 966 // ChunkSize + +// Floating point keys +#define CDI_KEY_MISSVAL 701 // Missing value +#define CDI_KEY_ADDOFFSET 702 // Add offset +#define CDI_KEY_SCALEFACTOR 703 // Scale factor + +// Byte array keys +#define CDI_KEY_UUID 960 // UUID for grid/Z-axis reference [size: CDI_UUID_SIZE] + + +#define CDI_KEY_DIMNAME 941 // Dimension name + +#define CDI_KEY_PSNAME 950 // Z-axis surface pressure name +#define CDI_KEY_P0NAME 951 // Z-axis reference pressure name +#define CDI_KEY_P0VALUE 952 // Z-axis reference pressure in Pa + +#define CDI_KEY_TABLESVERSION 801 // GRIB2 tablesVersion +#define CDI_KEY_LOCALTABLESVERSION 802 // GRIB2 localTablesVersion +#define CDI_KEY_TYPEOFGENERATINGPROCESS 803 // GRIB2 typeOfGeneratingProcess +#define CDI_KEY_PRODUCTDEFINITIONTEMPLATE 804 // GRIB2 productDefinitionTemplate +#define CDI_KEY_TYPEOFPROCESSEDDATA 805 // GRIB2 typeOfProcessedData +#define CDI_KEY_SHAPEOFTHEEARTH 806 // GRIB2 shapeOfTheEarth +#define CDI_KEY_BACKGROUNDPROCESS 807 // GRIB2 backgroundProcess +#define CDI_KEY_TYPEOFENSEMBLEFORECAST 808 // GRIB2 typeOfEnsembleForecast +#define CDI_KEY_NUMBEROFFORECASTSINENSEMBLE 809 // GRIB2 numberOfForecastsInEnsemble +#define CDI_KEY_PERTURBATIONNUMBER 810 // GRIB2 perturbationNumber +#define CDI_KEY_CENTRE 811 // GRIB2 centre +#define CDI_KEY_SUBCENTRE 812 // GRIB2 subCentre +#define CDI_KEY_MPIMTYPE 813 // GRIB2 mpimType +#define CDI_KEY_MPIMCLASS 814 // GRIB2 mpimClass +#define CDI_KEY_MPIMUSER 815 // GRIB2 mpimUser +#define CDI_KEY_REVSTATUS 816 // GRIB2 revStatus +#define CDI_KEY_REVNUMBER 817 // GRIB2 revNumber +#define CDI_KEY_GRIB2LOCALSECTIONNUMBER 818 // GRIB2 grib2LocalSectionNumber +#define CDI_KEY_SECTION2PADDINGLENGTH 819 // GRIB2 length of section2Padding +#define CDI_KEY_SECTION2PADDING 820 // GRIB2 section2Padding +#define CDI_KEY_CONSTITUENTTYPE 821 // GRIB2 constituentType +#define CDI_KEY_TYPEOFTIMEINCREMENT 822 // GRIB2 typeOfTimeIncrement +#define CDI_KEY_TYPEOFFIRSTFIXEDSURFACE 823 // GRIB2 typeOfFirstFixedSurface +#define CDI_KEY_TYPEOFSECONDFIXEDSURFACE 824 // GRIB2 typeOfSecondFixedSurface +#define CDI_KEY_UVRELATIVETOGRID 825 // GRIB uvRelativeToGrid +#define CDI_KEY_SCANNINGMODE 826 // GRIB scanningMode + +#define CDI_KEY_VDIMNAME 920 // Vertex dimension name +#define CDI_KEY_GRIDMAP_VARTYPE 921 // Grid mapping var datatype +#define CDI_KEY_GRIDMAP_VARNAME 922 // Grid mapping var name +#define CDI_KEY_GRIDMAP_NAME 923 // Grid mapping name + +// cdiDefKeyInt: Define an integer value from a key +int cdiDefKeyInt(int cdiID, int varID, int key, int value); + +// cdiInqKeyInt: Get an integer value from a key +int cdiInqKeyInt(int cdiID, int varID, int key, int *value); + +// cdiDefKeyFloat: Define a float value from a key +int cdiDefKeyFloat(int cdiID, int varID, int key, double value); + +// cdiInqKeyFloat Get a float value from a key +int cdiInqKeyFloat(int cdiID, int varID, int key, double *value); + +// cdiDefKeyBytes: Define a byte array from a key +int cdiDefKeyBytes(int cdiID, int varID, int key, const unsigned char bytes[], int length); + +// cdiInqKeyBytes: Get a byte array from a key +int cdiInqKeyBytes(int cdiID, int varID, int key, unsigned char bytes[], int *length); + +// cdiDefKeyString: Define a string from a key +int cdiDefKeyString(int cdiID, int varID, int key, const char *string); + +// cdiInqKeyString: Get a string from a key +int cdiInqKeyString(int cdiID, int varID, int key, char *string, int *length); + +// cdiInqKeyLen: Get the length of the string representation of the key +int cdiInqKeyLen(int cdiID, int varID, int key, int *length); + +int cdiCopyKeys(int cdiID1, int varID1, int cdiID2, int varID2); + +int cdiCopyKey(int cdiID1, int varID1, int key, int cdiID2); + +int cdiDeleteKey(int cdiID, int varID, int key); + +// GRID routines + +// gridDefXname: Define the name of a X-axis +void gridDefXname(int gridID, const char *xname); + +// gridInqXname: Get the name of a X-axis +void gridInqXname(int gridID, char *xname); + +// gridDefXlongname: Define the longname of a X-axis +void gridDefXlongname(int gridID, const char *xlongname); + +// gridInqXlongname: Get the longname of a X-axis +void gridInqXlongname(int gridID, char *xlongname); + +// gridDefXunits: Define the units of a X-axis +void gridDefXunits(int gridID, const char *xunits); + +// gridInqXunits: Get the units of a X-axis +void gridInqXunits(int gridID, char *xunits); + +// gridDefYname: Define the name of a Y-axis +void gridDefYname(int gridID, const char *yname); + +// gridInqYname: Get the name of a Y-axis +void gridInqYname(int gridID, char *yname); + +// gridDefYlongname: Define the longname of a Y-axis +void gridDefYlongname(int gridID, const char *ylongname); + +// gridInqYlongname: Get the longname of a Y-axis +void gridInqYlongname(int gridID, char *ylongname); + +// gridDefYunits: Define the units of a Y-axis +void gridDefYunits(int gridID, const char *yunits); + +// gridInqYunits: Get the units of a Y-axis +void gridInqYunits(int gridID, char *yunits); + +void gridDefDatatype(int gridID, int datatype); +int gridInqDatatype(int gridID); + +// gridInqXval: Get one value of a X-axis +double gridInqXval(int gridID, SizeType index); + +// gridInqYval: Get one value of a Y-axis +double gridInqYval(int gridID, SizeType index); + +double gridInqXinc(int gridID); +double gridInqYinc(int gridID); + +int gridIsCircular(int gridID); + +int gridInqTrunc(int gridID); +void gridDefTrunc(int gridID, int trunc); + +// Reference of an unstructured grid + +// gridDefNumber: Define the reference number for an unstructured grid +void gridDefNumber(int gridID, int number); + +// gridInqNumber: Get the reference number to an unstructured grid +int gridInqNumber(int gridID); + +// gridDefPosition: Define the position of grid in the reference file +void gridDefPosition(int gridID, int position); + +// gridInqPosition: Get the position of grid in the reference file +int gridInqPosition(int gridID); + +// gridDefReference: Define the reference URI for an unstructured grid +void gridDefReference(int gridID, const char *reference); + +// gridInqReference: Get the reference URI to an unstructured grid +int gridInqReference(int gridID, char *reference); + +// gridDefUUID: Define the UUID of an unstructured grid +void gridDefUUID(int gridID, const unsigned char uuid[CDI_UUID_SIZE]); + +// gridInqUUID: Get the UUID of an unstructured grid +void gridInqUUID(int gridID, unsigned char uuid[CDI_UUID_SIZE]); + +// Rotated Lon/Lat grid +void gridDefParamRLL(int gridID, double xpole, double ypole, double angle); +void gridInqParamRLL(int gridID, double *xpole, double *ypole, double *angle); + +// Hexagonal GME grid +void gridDefParamGME(int gridID, int nd, int ni, int ni2, int ni3); +void gridInqParamGME(int gridID, int *nd, int *ni, int *ni2, int *ni3); + +void gridDefArea(int gridID, const double area[]); +void gridInqArea(int gridID, double area[]); +int gridHasArea(int gridID); + +// gridDefNvertex: Define the number of vertex of a Gridbox +void gridDefNvertex(int gridID, int nvertex); + +// gridInqNvertex: Get the number of vertex of a Gridbox +int gridInqNvertex(int gridID); + +// gridDefXbounds: Define the bounds of a X-axis +void gridDefXbounds(int gridID, const double xbounds[]); + +// gridInqXbounds: Get the bounds of a X-axis +SizeType gridInqXbounds(int gridID, double xbounds[]); +SizeType gridInqXboundsPart(int gridID, int start, SizeType size, double xbounds[]); +const double *gridInqXboundsPtr(int gridID); + +// gridDefYbounds: Define the bounds of a Y-axis +void gridDefYbounds(int gridID, const double ybounds[]); + +// gridInqYbounds: Get the bounds of a Y-axis +SizeType gridInqYbounds(int gridID, double ybounds[]); +SizeType gridInqYboundsPart(int gridID, int start, SizeType size, double ybounds[]); +const double *gridInqYboundsPtr(int gridID); + +void gridDefReducedPoints(int gridID, int reducedPointsSize, const int reducedPoints[]); +void gridInqReducedPoints(int gridID, int reducedPoints[]); +void gridChangeType(int gridID, int gridtype); + +void gridDefComplexPacking(int gridID, int lpack); +int gridInqComplexPacking(int gridID); + +// ZAXIS routines + +void zaxisName(int zaxistype, char *zaxisname); +const char *zaxisNamePtr(int leveltype); + +// zaxisCreate: Create a vertical Z-axis +int zaxisCreate(int zaxistype, int size); + +// zaxisDestroy: Destroy a vertical Z-axis +void zaxisDestroy(int zaxisID); + +// zaxisInqType: Get the type of a Z-axis +int zaxisInqType(int zaxisID); + +// zaxisInqSize: Get the size of a Z-axis +int zaxisInqSize(int zaxisID); + +// zaxisDuplicate: Duplicate a Z-axis +int zaxisDuplicate(int zaxisID); + +// zaxisDefLevels: Define the levels of a Z-axis +void zaxisDefLevels(int zaxisID, const double levels[]); + +// zaxisDefCvals: Define area types of a Z-axis +void zaxisDefCvals(int zaxisID, const char *cvals[], int clength); + +// zaxisInqLevels: Get all levels of a Z-axis +int zaxisInqLevels(int zaxisID, double levels[]); + +// zaxisInqCLen: Get maximal string length of character Z-axis +int zaxisInqCLen(int zaxisID); + +// zaxisInqCVals: Get all string values of a character Z-axis +int zaxisInqCVals(int zaxisID, char ***clevels); + +// zaxisDefLevel: Define one level of a Z-axis +void zaxisDefLevel(int zaxisID, int levelID, double levels); + +// zaxisInqLevel: Get one level of a Z-axis +double zaxisInqLevel(int zaxisID, int levelID); + +// zaxisDefNlevRef: Define the number of half levels of a generalized Z-axis +void zaxisDefNlevRef(int gridID, int nhlev); + +// zaxisInqNlevRef: Get the number of half levels of a generalized Z-axis +int zaxisInqNlevRef(int gridID); + +// zaxisDefNumber: Define the reference number for a generalized Z-axis +void zaxisDefNumber(int gridID, int number); + +// zaxisInqNumber: Get the reference number to a generalized Z-axis +int zaxisInqNumber(int gridID); + +// zaxisDefUUID: Define the UUID of a generalized Z-axis +void zaxisDefUUID(int zaxisID, const unsigned char uuid[CDI_UUID_SIZE]); + +// zaxisInqUUID: Get the UUID of a generalized Z-axis +void zaxisInqUUID(int zaxisID, unsigned char uuid[CDI_UUID_SIZE]); + +// zaxisDefName: Define the name of a Z-axis +void zaxisDefName(int zaxisID, const char *name_optional); + +// zaxisInqName: Get the name of a Z-axis +void zaxisInqName(int zaxisID, char *name); + +// zaxisDefLongname: Define the longname of a Z-axis +void zaxisDefLongname(int zaxisID, const char *longname_optional); + +// zaxisInqLongname: Get the longname of a Z-axis +void zaxisInqLongname(int zaxisID, char *longname); + +// zaxisDefUnits: Define the units of a Z-axis +void zaxisDefUnits(int zaxisID, const char *units_optional); + +// zaxisInqUnits: Get the units of a Z-axis +void zaxisInqUnits(int zaxisID, char *units); + +// zaxisInqStdname: Get the standard name of a Z-axis +void zaxisInqStdname(int zaxisID, char *stdname); + +void zaxisDefDatatype(int zaxisID, int datatype); +int zaxisInqDatatype(int zaxisID); + +void zaxisDefPositive(int zaxisID, int positive); +int zaxisInqPositive(int zaxisID); + +void zaxisDefScalar(int zaxisID); +int zaxisInqScalar(int zaxisID); + +void zaxisDefVct(int zaxisID, int size, const double vct[]); +void zaxisInqVct(int zaxisID, double vct[]); +int zaxisInqVctSize(int zaxisID); +const double *zaxisInqVctPtr(int zaxisID); +void zaxisDefLbounds(int zaxisID, const double lbounds[]); +int zaxisInqLbounds(int zaxisID, double lbounds_optional[]); +double zaxisInqLbound(int zaxisID, int index); +void zaxisDefUbounds(int zaxisID, const double ubounds[]); +int zaxisInqUbounds(int zaxisID, double ubounds_optional[]); +double zaxisInqUbound(int zaxisID, int index); +void zaxisDefWeights(int zaxisID, const double weights[]); +int zaxisInqWeights(int zaxisID, double weights_optional[]); +void zaxisChangeType(int zaxisID, int zaxistype); + +// TAXIS routines + +// taxisCreate: Create a Time axis +int taxisCreate(int taxistype); + +// taxisDestroy: Destroy a Time axis +void taxisDestroy(int taxisID); + +int taxisDuplicate(int taxisID); + +void taxisCopyTimestep(int taxisIDdes, int taxisIDsrc); + +void taxisDefType(int taxisID, int taxistype); +int taxisInqType(int taxisID); + +// taxisDefVdate: Define the verification date +void taxisDefVdate(int taxisID, int date); + +// taxisDefVtime: Define the verification time +void taxisDefVtime(int taxisID, int time); + +// taxisInqVdate: Get the verification date +int taxisInqVdate(int taxisID); + +// taxisInqVtime: Get the verification time +int taxisInqVtime(int taxisID); + +// taxisDefRdate: Define the reference date +void taxisDefRdate(int taxisID, int date); + +// taxisDefRtime: Define the reference time +void taxisDefRtime(int taxisID, int time); + +// taxisInqRdate: Get the reference date +int taxisInqRdate(int taxisID); + +// taxisInqRtime: Get the reference time +int taxisInqRtime(int taxisID); + +int taxisHasBounds(int taxisID); +void taxisWithBounds(int taxisID); + +void taxisDeleteBounds(int taxisID); + +void taxisDefVdateBounds(int taxisID, int vdate_lb, int vdate_ub); + +void taxisDefVtimeBounds(int taxisID, int vtime_lb, int vtime_ub); + +void taxisInqVdateBounds(int taxisID, int *vdate_lb, int *vdate_ub); + +void taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub); + +// taxisDefCalendar: Define the calendar +void taxisDefCalendar(int taxisID, int calendar); + +// taxisInqCalendar: Get the calendar +int taxisInqCalendar(int taxisID); + +void taxisDefTunit(int taxisID, int tunit); +int taxisInqTunit(int taxisID); + +void taxisDefForecastTunit(int taxisID, int tunit); +int taxisInqForecastTunit(int taxisID); + +void taxisDefForecastPeriod(int taxisID, double fc_period); +double taxisInqForecastPeriod(int taxisID); + +void taxisDefNumavg(int taxisID, int numavg); +int taxisInqNumavg(int taxisID); + +const char *taxisNamePtr(int taxisID); +const char *tunitNamePtr(int tunitID); + + +// Institut routines + +int institutDef(int center, int subcenter, const char *name, const char *longname); +int institutInq(int center, int subcenter, const char *name, const char *longname); +int institutInqNumber(void); +int institutInqCenter(int instID); +int institutInqSubcenter(int instID); +const char *institutInqNamePtr(int instID); +const char *institutInqLongnamePtr(int instID); + +// Model routines + +int modelDef(int instID, int modelgribID, const char *name); +int modelInq(int instID, int modelgribID, const char *name); +int modelInqInstitut(int modelID) ; +int modelInqGribID(int modelID); +const char *modelInqNamePtr(int modelID); + +// Table routines + +// tableFWriteC: write table of parameters to FILE* in C language format +void tableFWriteC(FILE *ptfp, int tableID); +// tableWrite: write table of parameters to file in tabular format +void tableWrite(const char *filename, int tableID); +// tableRead: read table of parameters from file in tabular format +int tableRead(const char *tablefile); +int tableDef(int modelID, int tablenum, const char *tablename); + +const char *tableInqNamePtr(int tableID); + +int tableInq(int modelID, int tablenum, const char *tablename); +int tableInqNumber(void); + +int tableInqNum(int tableID); +int tableInqModel(int tableID); + +void tableInqEntry(int tableID, int id, int ltype, char *name, char *longname, char *units); + +// Subtype routines + +// subtypeCreate: Create a variable subtype +int subtypeCreate(int subtype); + +// Gives a textual summary of the variable subtype +void subtypePrint(int subtypeID); + +// Compares two subtype data structures +int subtypeCompare(int subtypeID1, int subtypeID2); + +// subtypeInqSize: Get the size of a subtype (e.g. no. of tiles) +int subtypeInqSize(int subtypeID); + +// subtypeInqActiveIndex: Get the currently active index of a subtype (e.g. current tile index) +int subtypeInqActiveIndex(int subtypeID); + +// subtypeDefActiveIndex: Set the currently active index of a subtype (e.g. current tile index) +void subtypeDefActiveIndex(int subtypeID, int index); + +// Generate a "query object" out of a key-value pair +subtype_query_t keyValuePair(const char *key, int value); + +// Generate an AND-combined "query object" out of two previous query objects +subtype_query_t matchAND(subtype_query_t q1, subtype_query_t q2); + +// subtypeInqSubEntry: Returns subtype entry ID for a given criterion +int subtypeInqSubEntry(int subtypeID, subtype_query_t criterion); + +// subtypeInqTile: Specialized version of subtypeInqSubEntry looking for tile/attribute pair +int subtypeInqTile(int subtypeID, int tileindex, int attribute); + +// subtypeInqAttribute: Inquire the value of a subtype attribute. Returns CDI_EINVAL if the attribute does not exist. +int subtypeInqAttribute(int subtypeID, int index, const char *key, int *outValue); + +// vlistInqVarSubtype: Return subtype ID for a given variable +int vlistInqVarSubtype(int vlistID, int varID); + +void gribapiLibraryVersion(int *major_version, int *minor_version, int *revision_version); + +// Compatibility functions for release 1.8.3 (obsolete functions) +void zaxisDefLtype(int zaxisID, int ltype); +int vlistInqVarTypeOfGeneratingProcess(int vlistID, int varID); +void vlistDefVarTypeOfGeneratingProcess(int vlistID, int varID, int typeOfGeneratingProcess); +void vlistDefVarProductDefinitionTemplate(int vlistID, int varID, int productDefinitionTemplate); + +#ifdef __cplusplus +} +#endif + +// End of fortran interface +//FINT_OFF <--- don't change or remove this line!!! + +#ifdef __cplusplus +extern "C" { +#endif + +// CDI query interface + +typedef struct +{ + int numEntries; + // Names + int numNames; + bool *namesFound; + char **names; + // Grid cell indices + int numCellidx; + bool *cellidxFound; + size_t *cellidx; + // Level indices + int numLevidx; + bool *levidxFound; + int *levidx; + // Time step indices + int numStepidx; + bool *stepidxFound; + int *stepidx; +} CdiQuery; + +CdiQuery *cdiQueryCreate(); +CdiQuery *cdiQueryClone(const CdiQuery *query); +void cdiQueryDelete(CdiQuery *query); +void cdiQuerySetNames(CdiQuery *query, int numNames, char **names); +void cdiQuerySetCellidx(CdiQuery *query, int numCellidx, size_t *cellidx); +void cdiQuerySetLevidx(CdiQuery *query, int numLevidx, int *levidx); +void cdiQuerySetStepidx(CdiQuery *query, int numStepidx, int *stepidx); +size_t cdiQueryGetCellidx(const CdiQuery *query, int index); +int cdiQueryName(CdiQuery *query, const char *name); +int cdiQueryCellidx(CdiQuery *query, size_t cellidx); +int cdiQueryLevidx(CdiQuery *query, int levidx); +int cdiQueryStepidx(CdiQuery *query, int stepidx); +int cdiQueryNumNames(const CdiQuery *query); +int cdiQueryNumCellidx(const CdiQuery *query); +int cdiQueryNumStepidx(const CdiQuery *query); +int cdiQueryNumEntries(const CdiQuery *query); +int cdiQueryNumEntriesFound(const CdiQuery *query); +void cdiQueryPrint(const CdiQuery *query); +void cdiQueryPrintEntriesNotFound(const CdiQuery *query); + +// streamOpenReadQuery: Open a dataset for reading and apply query +int streamOpenReadQuery(const char *path, CdiQuery *query); + +// CDI interface for paraview vtkCDIReader.cxx + + +// taxisDefRdatetime: Define the reference date/time +void taxisDefRdatetime(int taxisID, CdiDateTime rDateTime); +// taxisInqRdatetime: Get the reference date/time +CdiDateTime taxisInqRdatetime(int taxisID); +// taxisDefFdatetime: Define the forecast reference date/time +void taxisDefFdatetime(int taxisID, CdiDateTime fDateTime); +// taxisInqFdatetime: Get the forecast reference date/time +CdiDateTime taxisInqFdatetime(int taxisID); +// taxisDefVdatetime: Define the verification date/time +void taxisDefVdatetime(int taxisID, CdiDateTime vDateTime); +// taxisInqVdatetime: Get the verification date/time +CdiDateTime taxisInqVdatetime(int taxisID); +void taxisDefVdatetimeBounds(int taxisID, CdiDateTime vDateTime_lb, CdiDateTime vDateTime_ub); +void taxisInqVdatetimeBounds(int taxisID, CdiDateTime *vDateTime_lb, CdiDateTime *vDateTime_ub); + +// date format: YYYYMMDD +// time format: hhmmss + +int64_t date_to_julday(int calendar, int64_t date); // Used in paraview vtkCDIReader.cxx +int64_t julday_to_date(int calendar, int64_t julday); + +int time_to_sec(int time); // Used in paraview vtkCDIReader.cxx +int sec_to_time(int secofday); + +// CDI projection parameter interface + +struct CDI_GridProjParams +{ + double mv; // Missing value + double lon_0; // The East longitude of the meridian which is parallel to the Y-axis + double lat_0; // Latitude of the projection origin + double lat_1; // First latitude from the pole at which the secant cone cuts the sphere + double lat_2; // Second latitude at which the secant cone cuts the sphere + // lat_ts = lat_1; + double a; // Semi-major axis or earth radius in metres (optional) + double b; // Semi-minor axis in metres (optional) + double rf; // Inverse flattening (1/f) (optional) + double xval_0; // Longitude of the first grid point in degree (optional) + double yval_0; // Latitude of the first grid point in degree (optional) + double x_0; // False easting (optional) + double y_0; // False northing (optional) +}; + +void gridProjParamsInit(struct CDI_GridProjParams *gridProjParams); + +// Lambert Conformal Conic grid +void gridDefParamsLCC(int gridID, struct CDI_GridProjParams gridProjParams); +int gridInqParamsLCC(int gridID, struct CDI_GridProjParams *gridProjParams); + +// Polar stereographic grid +void gridDefParamsSTERE(int gridID, struct CDI_GridProjParams gridProjParams); +int gridInqParamsSTERE(int gridID, struct CDI_GridProjParams *gridProjParams); + +#define HAVE_CDI_PROJ_FUNCS 1 +extern int (*proj_lonlat_to_lcc_func)(struct CDI_GridProjParams gpp, size_t, double*, double*); +extern int (*proj_lcc_to_lonlat_func)(struct CDI_GridProjParams gpp, double, double, size_t, double*, double*); +extern int (*proj_lonlat_to_stere_func)(struct CDI_GridProjParams gpp, size_t, double*, double*); +extern int (*proj_stere_to_lonlat_func)(struct CDI_GridProjParams gpp, double, double, size_t, double*, double*); + +#ifdef __cplusplus +} +#endif + +// clang-format on + +#endif /* CDI_H_ */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _ERROR_H_ +#define _ERROR_H_ + +// clang-format off + +#include <stdarg.h> +#include <stdlib.h> +#include <stdbool.h> + +#ifndef WITH_CALLER_NAME +#define WITH_CALLER_NAME +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +extern int _ExitOnError; // If set to 1, exit on error (default 1) +extern int _Verbose; // If set to 1, errors are reported (default 1) +extern int _Debug; // If set to 1, debuggig (default 0) + +void SysError_(const char *caller, const char *fmt, ...); +void Error_(const char *caller, const char *fmt, ...); +void Warning_(const char *caller, const char *fmt, ...); +/* delegate used by Warning_ unless mode is PIO */ +void cdiWarning(const char *caller, const char *fmt, va_list ap); +void Message_(const char *caller, const char *fmt, ...); + +#ifdef WITH_CALLER_NAME +# define SysError(...) SysError_(__func__, __VA_ARGS__) +# define Errorc(...) Error_( caller, __VA_ARGS__) +# define Error(...) Error_(__func__, __VA_ARGS__) +# define Warning(...) Warning_(__func__, __VA_ARGS__) +# define Messagec(...) Message_( caller, __VA_ARGS__) +# define Message(...) Message_(__func__, __VA_ARGS__) +#else +# define SysError(...) SysError_((void *), __VA_ARGS__) +# define Errorc(...) Error_((void *), __VA_ARGS__) +# define Error(...) Error_((void *), __VA_ARGS__) +# define Warning(...) Warning_((void *), __VA_ARGS__) +# define Messagec(...) Message_((void *), __VA_ARGS__) +# define Message(...) Message_((void *), __VA_ARGS__) +#endif + +/* If we're not using GNU C, elide __attribute__ */ +#ifndef __GNUC__ +# define __attribute__(x) /*NOTHING*/ +#endif + +void cdiAbortC(const char *caller, const char *filename, + const char *functionname, int line, + const char *errorString, ... ) + __attribute__((noreturn)); +#define xabortC(caller, ...) \ + cdiAbortC(caller, __FILE__, __func__, __LINE__, __VA_ARGS__ ) +#define xabort(...) \ + cdiAbortC(NULL, __FILE__, __func__, __LINE__, __VA_ARGS__ ) +#define cdiAbort(file, func, line, ...) \ + cdiAbortC(NULL, (file), (func), (line), __VA_ARGS__) + +#define xassert(arg) do { \ + if ((arg)) { } else { \ + xabort("assertion `" #arg "` failed");} \ + } while(0) + +void +cdiAbortC_serial(const char *caller, const char *filename, + const char *functionname, int line, + const char *errorString, va_list ap) + __attribute__((noreturn)); + + +bool cdiObsoleteInfo(const char *oldFunction, const char *newFunction); + +#if defined (__cplusplus) +} +#endif + +// clang-format on + +#endif /* _ERROR_H_ */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBPTHREAD +#include <pthread.h> +#endif + + + +#include <stdbool.h> + +#ifdef HAVE_LIBPTHREAD +#ifdef __APPLE__ +#include <dispatch/dispatch.h> +#else +#include <errno.h> +#include <semaphore.h> +#endif + +typedef struct sema +{ +#ifdef __APPLE__ + dispatch_semaphore_t sem; +#else + sem_t sem; +#endif +} sema_t; +#endif + +struct AsyncJob +{ + bool inUse; +#ifdef HAVE_LIBPTHREAD + sema_t request, completion; +#endif + int (*work)(void *data); + void *data; + int result; +}; + +struct AsyncManager +{ + int workerCount, idleWorkerCount; + AsyncJob *communicators; +}; + +#ifdef HAVE_LIBPTHREAD +static inline int +sema_init(sema_t *s, int pshared, uint32_t value) +{ + int status = 0; +#ifdef __APPLE__ + dispatch_semaphore_t *sem = &s->sem; + + (void) pshared; + *sem = dispatch_semaphore_create(value); +#else + status = sem_init(&s->sem, pshared, value); +#endif + return status; +} + +static inline int +sema_wait(sema_t *s) +{ +#ifdef __APPLE__ + dispatch_semaphore_wait(s->sem, DISPATCH_TIME_FOREVER); +#else + int r; + + do + { + r = sem_wait(&s->sem); + } + while (r == -1 && errno == EINTR); +#endif + return 0; +} + +static inline int +sema_post(sema_t *s) +{ +#ifdef __APPLE__ + dispatch_semaphore_signal(s->sem); +#else + sem_post(&s->sem); +#endif + return 0; +} + +static void * +workerMain(void *arg) +{ + AsyncJob *communicator = (AsyncJob *) arg; + + while (true) + { + while (sema_wait(&communicator->request)) + ; + if (communicator->work) + { + communicator->result = communicator->work(communicator->data); + if (sema_post(&communicator->completion)) xabort("sema_post() failed"); + } + else + { + if (sema_post(&communicator->completion)) xabort("sema_post() failed"); + break; + } + } + + return NULL; +} + +static void +startWorker(AsyncJob *communicator) +{ + communicator->inUse = false; + communicator->work = NULL; + communicator->data = NULL; + communicator->result = 0; + if (sema_init(&communicator->request, 0, 0)) xabort("sema_init() failed"); + if (sema_init(&communicator->completion, 0, 0)) xabort("sema_init() failed"); + + pthread_t worker; + if (pthread_create(&worker, NULL, workerMain, communicator)) xabort("pthread_create() failed"); + if (pthread_detach(worker)) xabort("pthread_detach() failed"); +} +#endif + +int +AsyncWorker_init(AsyncManager **jobManager, int threadCount) +{ + if (threadCount <= 0) + { + xabort("CPU core count discovery not implemented yet"); + return CDI_EINVAL; // TODO: discover CPU core count, and set threadCount to a sensible positive value + } + + if (*jobManager) return CDI_NOERR; + +#ifdef HAVE_LIBPTHREAD + *jobManager = (AsyncManager *) malloc(sizeof(AsyncManager)); + if (!*jobManager) return CDI_ESYSTEM; + (*jobManager)->workerCount = threadCount; + (*jobManager)->communicators = (AsyncJob *) malloc(threadCount * sizeof(AsyncJob)); + if (!(*jobManager)->communicators) xabort("memory allocation failure"); + + for (int i = 0; i < threadCount; i++) startWorker(&((*jobManager)->communicators[i])); + (*jobManager)->idleWorkerCount = threadCount; +#else + + Error("pthread support not compiled in!"); +#endif + + return CDI_NOERR; +} + +AsyncJob * +AsyncWorker_requestWork(AsyncManager *jobManager, int (*work)(void *data), void *data) +{ + if (!jobManager) xabort("AsyncWorker_requestWork() called without calling AsyncWorker_init() first"); + if (!work) + xabort("AsyncWorker_requestWork() called without a valid function pointer"); // need to catch this condition to stop users from + // terminating our worker threads + + // find an unused worker + if (!jobManager->idleWorkerCount) return NULL; + + AsyncJob *worker = NULL; + for (int i = 0; i < jobManager->workerCount; i++) + { + if (!jobManager->communicators[i].inUse) + { + worker = &jobManager->communicators[i]; + break; + } + } + if (!worker) xabort("internal error: idleWorkerCount is not in sync with the worker states, please report this bug"); + + // pass the request to that worker + jobManager->idleWorkerCount--; + worker->inUse = true; + worker->work = work; + worker->data = data; + worker->result = 0; +#ifdef HAVE_LIBPTHREAD + if (sema_post(&worker->request)) xabort("sema_post() failed"); +#endif + return worker; +} + +int +AsyncWorker_wait(AsyncManager *jobManager, AsyncJob *job) +{ + if (!jobManager) xabort("AsyncWorker_wait() called without calling AsyncWorker_init() first"); + if (job < jobManager->communicators) return CDI_EINVAL; + if (job >= jobManager->communicators + jobManager->workerCount) return CDI_EINVAL; + if (!job->inUse) return CDI_EINVAL; + +#ifdef HAVE_LIBPTHREAD + while (sema_wait(&job->completion)) + ; +#endif + int result = job->result; + + // reset the communicator + job->work = NULL; + job->data = NULL; + job->result = 0; + job->inUse = false; + jobManager->idleWorkerCount++; + + return result; +} + +int +AsyncWorker_availableWorkers(AsyncManager *jobManager) +{ + if (!jobManager) return 0; + return jobManager->idleWorkerCount; +} + +int +AsyncWorker_finalize(AsyncManager *jobManager) +{ + int result = CDI_NOERR; + if (!jobManager) return CDI_NOERR; + + for (int i = 0; i < jobManager->workerCount; i++) + { + AsyncJob *curWorker = &jobManager->communicators[i]; + + // finish any pending job + if (curWorker->inUse) + { + AsyncWorker_wait(jobManager, curWorker); + if (curWorker->result) result = curWorker->result; + } + + // send the teardown signal + curWorker->inUse = true; + curWorker->work = NULL; + curWorker->data = NULL; + curWorker->result = 0; +#ifdef HAVE_LIBPTHREAD + if (sema_post(&curWorker->request)) xabort("sema_post() failed"); +#endif + // wait for the worker to exit + AsyncWorker_wait(jobManager, curWorker); + } + + free(jobManager->communicators); + free(jobManager); + + return result; +} +#ifndef _BASETIME_H +#define _BASETIME_H + +#include <stdbool.h> + +typedef struct +{ + int ncvarid; + int ncdimid; + int ncvarboundsid; + int leadtimeid; + bool hasUnits; + bool isWRF; // true for time axis in WRF format +} basetime_t; + +void basetimeInit(basetime_t *basetime); + +#endif /* _BASETIME_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <stddef.h> // for NULL + +void +basetimeInit(basetime_t *basetime) +{ + if (basetime == NULL) Error("Internal problem! Basetime not allocated."); + + if (basetime) + { + basetime->ncvarid = CDI_UNDEFID; + basetime->ncdimid = CDI_UNDEFID; + basetime->ncvarboundsid = CDI_UNDEFID; + basetime->leadtimeid = CDI_UNDEFID; + basetime->hasUnits = false; + basetime->isWRF = false; + } +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _FILE_H +#define _FILE_H + +#include <stdio.h> +#include <sys/types.h> + +#define FILE_UNDEFID -1 + +#define FILE_TYPE_OPEN 1 +#define FILE_TYPE_FOPEN 2 + +// buffer types for FILE_TYPE_OPEN +#define FILE_BUFTYPE_STD 1 +#define FILE_BUFTYPE_MMAP 2 + +const char *fileLibraryVersion(void); + +void fileDebug(int debug); + +void *filePtr(int fileID); + +int fileSetBufferType(int fileID, int type); +void fileSetBufferSize(int fileID, long buffersize); + +int fileOpen(const char *filename, const char *mode); +int fileOpen_serial(const char *filename, const char *mode); +int fileClose(int fileID); +int fileClose_serial(int fileID); + +char *fileInqName(int fileID); +int fileInqMode(int fileID); + +int fileFlush(int fileID); +void fileClearerr(int fileID); +int fileEOF(int fileID); +int filePtrEOF(void *fileptr); +void fileRewind(int fileID); + +off_t fileGetPos(int fileID); +int fileSetPos(int fileID, off_t offset, int whence); + +int fileGetc(int fileID); +int filePtrGetc(void *fileptr); + +size_t filePtrRead(void *fileptr, void *restrict ptr, size_t size); +size_t fileRead(int fileID, void *restrict ptr, size_t size); +size_t fileWrite(int fileID, const void *restrict ptr, size_t size); + +#endif /* _FILE_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef SWAP_H_ +#define SWAP_H_ + +void swap4byte(void *ptr, size_t size); +void swap8byte(void *ptr, size_t size); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef DTYPES_H +#define DTYPES_H + +#include <stdio.h> +#include <limits.h> + +/* INT32 */ + +#ifndef INT_MAX +#error INT_MAX undefined +#endif + +#undef INT32 +#if INT_MAX == 2147483647L +#define INT32 int +#elif LONG_MAX == 2147483647L +#define INT32 long +#endif + +/* INT64 */ + +#ifndef LONG_MAX +#error LONG_MAX undefined +#endif + +#undef INT64 +#if LONG_MAX > 2147483647L +#define INT64 long +#else +#define INT64 long long +#endif + +/* FLT32 */ + +#undef FLT32 +#define FLT32 float + +/* FLT64 */ + +#undef FLT64 +#define FLT64 double + +/* UINT32 and UINT64 */ + +#define UINT32 unsigned INT32 +#define UINT64 unsigned INT64 + +#endif /* DTYPES_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef BINARY_H +#define BINARY_H + +#ifdef HAVE_CONFIG_H +#endif + +#include <inttypes.h> + + +#ifndef HOST_ENDIANNESS +#ifdef __cplusplus +static const uint32_t HOST_ENDIANNESS_temp[1] = { UINT32_C(0x00030201) }; +#define HOST_ENDIANNESS (((const unsigned char *) HOST_ENDIANNESS_temp)[0]) +#else +#define HOST_ENDIANNESS (((const unsigned char *) &(const uint32_t[1]){ UINT32_C(0x00030201) })[0]) +#endif +#endif + +UINT32 get_UINT32(unsigned char *x); +UINT32 get_SUINT32(unsigned char *x); +UINT64 get_UINT64(unsigned char *x); +UINT64 get_SUINT64(unsigned char *x); + +size_t binReadF77Block(int fileID, int byteswap); +void binWriteF77Block(int fileID, int byteswap, size_t blocksize); + +int binReadInt32(int fileID, int byteswap, size_t size, INT32 *ptr); +int binReadInt64(int fileID, int byteswap, size_t size, INT64 *ptr); + +int binWriteInt32(int fileID, int byteswap, size_t size, INT32 *ptr); +int binWriteInt64(int fileID, int byteswap, size_t size, INT64 *ptr); + +int binWriteFlt32(int fileID, int byteswap, size_t size, FLT32 *ptr); +int binWriteFlt64(int fileID, int byteswap, size_t size, FLT64 *ptr); + +#endif /* BINARY_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + +UINT32 +get_UINT32(unsigned char *x) +{ + // clang-format off + switch (HOST_ENDIANNESS) + { + case CDI_BIGENDIAN: + return (((UINT32)x[0])<<24) + (((UINT32)x[1])<<16) + (((UINT32)x[2])<< 8) + (UINT32)x[3]; + case CDI_LITTLEENDIAN: + return (((UINT32)x[3])<<24) + (((UINT32)x[2])<<16) + (((UINT32)x[1])<< 8) + (UINT32)x[0]; + default: + Error("Unhandled endianness %d", HOST_ENDIANNESS); + return UINT32_C(0xFFFFFFFF); + } + // clang-format on +} + +UINT32 +get_SUINT32(unsigned char *x) +{ + // clang-format off + switch (HOST_ENDIANNESS) + { + case CDI_BIGENDIAN: + return (((UINT32)x[3])<<24) + (((UINT32)x[2])<<16) + (((UINT32)x[1])<< 8) + (UINT32)x[0]; + case CDI_LITTLEENDIAN: + return (((UINT32)x[0])<<24) + (((UINT32)x[1])<<16) + (((UINT32)x[2])<< 8) + (UINT32)x[3]; + default: + Error("Unhandled endianness %d", HOST_ENDIANNESS); + return UINT32_C(0xFFFFFFFF); + } + // clang-format on +} + +UINT64 +get_UINT64(unsigned char *x) +{ + // clang-format off + switch (HOST_ENDIANNESS) + { + case CDI_BIGENDIAN: + return (((UINT64)x[0])<<56) + (((UINT64)x[1])<<48) + (((UINT64)x[2])<<40) + (((UINT64)x[3])<<32) + + (((UINT64)x[4])<<24) + (((UINT64)x[5])<<16) + (((UINT64)x[6])<< 8) + (UINT64)x[7]; + case CDI_LITTLEENDIAN: + return (((UINT64)x[7])<<56) + (((UINT64)x[6])<<48) + (((UINT64)x[5])<<40) + (((UINT64)x[4])<<32) + + (((UINT64)x[3])<<24) + (((UINT64)x[2])<<16) + (((UINT64)x[1])<< 8) + (UINT64)x[0]; + default: + Error("Unhandled endianness %d", HOST_ENDIANNESS); + return UINT64_C(0xFFFFFFFFFFFFFFFF); + } + // clang-format on +} + +UINT64 +get_SUINT64(unsigned char *x) +{ + // clang-format off + switch (HOST_ENDIANNESS) + { + case CDI_BIGENDIAN: + return (((UINT64)x[7])<<56) + (((UINT64)x[6])<<48) + (((UINT64)x[5])<<40) + (((UINT64)x[4])<<32) + + (((UINT64)x[3])<<24) + (((UINT64)x[2])<<16) + (((UINT64)x[1])<< 8) + (UINT64)x[0]; + case CDI_LITTLEENDIAN: + return (((UINT64)x[0])<<56) + (((UINT64)x[1])<<48) + (((UINT64)x[2])<<40) + (((UINT64)x[3])<<32) + + (((UINT64)x[4])<<24) + (((UINT64)x[5])<<16) + (((UINT64)x[6])<< 8) + (UINT64)x[7]; + default: + Error("Unhandled endianness %d", HOST_ENDIANNESS); + return UINT64_C(0xFFFFFFFFFFFFFFFF); + } + // clang-format on +} + +size_t +binReadF77Block(int fileID, int byteswap) +{ + unsigned char f77block[4]; + size_t blocklen = 0; + + if (fileRead(fileID, f77block, 4) == 4) + { + blocklen = byteswap ? get_SUINT32(f77block) : get_UINT32(f77block); + } + + return blocklen; +} + +void +binWriteF77Block(int fileID, int byteswap, size_t blocksize) +{ + static const unsigned int s[4] = { 0, 8, 16, 24 }; + const unsigned long ublocksize = (unsigned long) blocksize; + unsigned char f77block[4]; + + switch (HOST_ENDIANNESS) + { + case CDI_BIGENDIAN: + if (byteswap) + { + for (int i = 0; i <= 3; ++i) f77block[i] = (unsigned char) (ublocksize >> s[i]); + } + else + { + for (int i = 0; i <= 3; ++i) f77block[3 - i] = (unsigned char) (ublocksize >> s[i]); + } + break; + case CDI_LITTLEENDIAN: + if (byteswap) + { + for (int i = 0; i <= 3; ++i) f77block[3 - i] = (unsigned char) (ublocksize >> s[i]); + } + else + { + for (int i = 0; i <= 3; ++i) f77block[i] = (unsigned char) (ublocksize >> s[i]); + } + break; + default: Error("Unhandled endianness %d", HOST_ENDIANNESS); + } + + if (fileWrite(fileID, f77block, 4) != 4) Error("Write failed on %s", fileInqName(fileID)); +} + +int +binReadInt32(int fileID, int byteswap, size_t size, INT32 *ptr) +{ + if (sizeof(INT32) != 4) Error("Not implemented for %d byte integer!", sizeof(INT32)); + + fileRead(fileID, (void *) ptr, 4 * size); + if (byteswap) swap4byte(ptr, size); + + return 0; +} + +int +binReadInt64(int fileID, int byteswap, size_t size, INT64 *ptr) +{ + if (sizeof(INT64) != 8) Error("Not implemented for %d byte integer!", sizeof(INT64)); + + fileRead(fileID, (void *) ptr, 8 * size); + if (byteswap) swap8byte(ptr, size); + + return 0; +} + +int +binWriteInt32(int fileID, int byteswap, size_t size, INT32 *ptr) +{ + if (sizeof(INT32) != 4) Error("Not implemented for %d byte integer!", sizeof(INT32)); + + if (byteswap) swap4byte(ptr, size); + fileWrite(fileID, (void *) ptr, 4 * size); + + return 0; +} + +int +binWriteInt64(int fileID, int byteswap, size_t size, INT64 *ptr) +{ + if (sizeof(INT64) != 8) Error("Not implemented for %d byte integer!", sizeof(INT64)); + + if (byteswap) swap8byte(ptr, size); + fileWrite(fileID, (void *) ptr, 8 * size); + + return 0; +} + +int +binWriteFlt32(int fileID, int byteswap, size_t size, FLT32 *ptr) +{ + if (sizeof(FLT32) != 4) Error("Not implemented for %d byte float!", sizeof(FLT32)); + + if (byteswap) swap4byte(ptr, size); + fileWrite(fileID, (void *) ptr, 4 * size); + + return 0; +} + +int +binWriteFlt64(int fileID, int byteswap, size_t size, FLT64 *ptr) +{ + if (sizeof(FLT64) != 8) Error("Not implemented for %d byte float!", sizeof(FLT64)); + + if (byteswap) swap8byte(ptr, size); + fileWrite(fileID, (void *) ptr, 8 * size); + + return 0; +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CALENDAR_H +#define CALENDAR_H + +#include <stdint.h> // int64_t + +// clang-format off + + +#ifdef __cplusplus +extern "C" { +#endif + +void decode_calday(int daysPerYear, int days, int *year, int *month, int *day); +int64_t encode_calday(int daysPerYear, int year, int month, int day); + +static inline int +calendar_dpy(int calendar) +{ + int daysPerYear = 0; + + if (calendar == CALENDAR_360DAYS) daysPerYear = 360; + else if (calendar == CALENDAR_365DAYS) daysPerYear = 365; + else if (calendar == CALENDAR_366DAYS) daysPerYear = 366; + + return daysPerYear; +} + +int days_per_year(int calendar, int year); +int days_per_month(int calendar, int year, int month); + +#ifdef __cplusplus +} +#endif + +// clang-format on + +#endif +#include <stdio.h> + + +static const int month_360[12] = { 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 }; +static const int month_365[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; +static const int month_366[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + +static const int * +get_dayspermonth_array(int daysPerYear) +{ + // clang-format off + return (daysPerYear == 360) ? month_360 : + (daysPerYear == 365) ? month_365 : + (daysPerYear == 366) ? month_366 : NULL; + // clang-format on +} + +int +days_per_month(int calendar, int year, int month) +{ + const int daysPerYear = calendar_dpy(calendar); + const int *daysPerMonthArray = (daysPerYear == 360) ? month_360 : ((daysPerYear == 365) ? month_365 : month_366); + + int daysPerMonth = (month >= 1 && month <= 12) ? daysPerMonthArray[month - 1] : 0; + + if (daysPerYear == 0 && month == 2) daysPerMonth = ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) ? 29 : 28; + + return daysPerMonth; +} + +int +days_per_year(int calendar, int year) +{ + int daysPerYear = calendar_dpy(calendar); + if (daysPerYear == 0) + { + if (year == 1582 && (calendar == CALENDAR_STANDARD || calendar == CALENDAR_GREGORIAN)) + daysPerYear = 355; + else if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) + daysPerYear = 366; + else + daysPerYear = 365; + } + + return daysPerYear; +} + +void +decode_calday(int daysPerYear, int days, int *year, int *month, int *day) +{ + *year = (days - 1) / daysPerYear; + days -= (*year * daysPerYear); + + const int *daysPerMonthArray = get_dayspermonth_array(daysPerYear); + + int i = 0; + if (daysPerMonthArray) + for (i = 0; i < 12; i++) + { + if (days > daysPerMonthArray[i]) + days -= daysPerMonthArray[i]; + else + break; + } + + *month = i + 1; + *day = days; +} + +int64_t +encode_calday(int daysPerYear, int year, int month, int day) +{ + int64_t rval = (int64_t) daysPerYear * year + day; + + const int *daysPerMonthArray = get_dayspermonth_array(daysPerYear); + + if (daysPerMonthArray) + for (int i = 0; i < month - 1; i++) rval += daysPerMonthArray[i]; + + return rval; +} +#ifndef CDF_H +#define CDF_H + +void cdfDebug(int debug); + +extern int CDF_Debug; + +const char *cdfLibraryVersion(void); +const char *hdfLibraryVersion(void); + +int cdfOpen(const char *filename, const char *mode, int filetype); +int cdf4Open(const char *filename, const char *mode, int *filetype); +void cdfClose(int fileID); + +#endif /* CDF_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDF_CONFIG_H_ +#define CDF_CONFIG_H_ + +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBNETCDF + +#include <netcdf.h> + +#ifdef NC_FORMAT_64BIT_DATA +#define HAVE_NETCDF5 1 +#endif + +#endif + +#endif +#ifndef JULIAN_DATE_H +#define JULIAN_DATE_H + + +// clang-format off + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + int64_t julianDay; + double secondOfDay; +} JulianDate; + +JulianDate julianDate_encode(int calendar, CdiDateTime dt); +CdiDateTime julianDate_decode(int calendar, JulianDate julianDate); +JulianDate julianDate_add_seconds(JulianDate julianDate, int64_t seconds); +JulianDate julianDate_add(JulianDate julianDate1, JulianDate julianDate2); +JulianDate julianDate_sub(JulianDate julianDate1, JulianDate julianDate2); +double julianDate_to_seconds(JulianDate julianDate); + +double secofday_encode(CdiTime time); +CdiTime secofday_decode(double secondOfDay); + +#ifdef __cplusplus +} +#endif + +// clang-format on + +#endif /* JULIAN_DATE_H */ +#ifndef RESOURCE_HANDLE_H +#define RESOURCE_HANDLE_H + +#ifdef HAVE_CONFIG_H +#endif + +#include <stdio.h> + +/* + * CDI internal handling of resource handles given to user code + */ + +/* + * for reasons of compatibility with cfortran.h, the handle type is: int + */ +typedef int cdiResH; + +/* return 0 on equality, not 0 otherwise */ +typedef int (*valCompareFunc)(void *, void *); +typedef void (*valDestroyFunc)(void *); +typedef void (*valPrintFunc)(void *, FILE *); +typedef int (*valGetPackSizeFunc)(void *, void *context); +typedef void (*valPackFunc)(void *, void *buf, int size, int *pos, void *context); +typedef int (*valTxCodeFunc)(void *); + +typedef struct +{ + valCompareFunc valCompare; + valDestroyFunc valDestroy; + valPrintFunc valPrint; + valGetPackSizeFunc valGetPackSize; + valPackFunc valPack; + valTxCodeFunc valTxCode; +} resOps; + +enum +{ + RESH_IN_USE_BIT = 1 << 0, + RESH_SYNC_BIT = 1 << 1, + /* resource holds no value */ + RESH_UNUSED = 0, + /* resource was deleted and needs to be synced */ + RESH_DESYNC_DELETED = RESH_SYNC_BIT, + /* resource is synchronized */ + RESH_IN_USE = RESH_IN_USE_BIT, + /* resource is in use, desynchronized and needs to be synced */ + RESH_DESYNC_IN_USE = RESH_IN_USE_BIT | RESH_SYNC_BIT, +}; + +void reshListCreate(int namespaceID); +void reshListDestruct(int namespaceID); +int reshPut(void *, const resOps *); +void reshReplace(cdiResH resH, void *p, const resOps *ops); +void reshRemove(cdiResH, const resOps *); +/*> doesn't check resource type */ +void reshDestroy(cdiResH); + +unsigned reshCountType(const resOps *resTypeOps); + +void *reshGetValue(const char *caller, const char *expressionString, cdiResH id, const resOps *ops); +#define reshGetVal(resH, ops) reshGetValue(__func__, #resH, resH, ops) + +void reshGetResHListOfType(unsigned numIDs, int IDs[], const resOps *ops); + +enum cdiApplyRet +{ + CDI_APPLY_ERROR = -1, + CDI_APPLY_STOP, + CDI_APPLY_GO_ON, +}; +enum cdiApplyRet cdiResHApply(enum cdiApplyRet (*func)(int id, void *res, const resOps *p, void *data), void *data); +enum cdiApplyRet cdiResHFilterApply(const resOps *p, enum cdiApplyRet (*func)(int id, void *res, void *data), void *data); + +int reshPackBufferCreate(char **packBuf, int *packBufSize, void *context); +void reshPackBufferDestroy(char **); +int reshResourceGetPackSize_intern(int resh, const resOps *ops, void *context, const char *caller, const char *expressionString); +#define reshResourceGetPackSize(resh, ops, context) reshResourceGetPackSize_intern(resh, ops, context, __func__, #resh) +void reshPackResource_intern(int resh, const resOps *ops, void *buf, int buf_size, int *position, void *context, const char *caller, + const char *expressionString); +#define reshPackResource(resh, ops, buf, buf_size, position, context) \ + reshPackResource_intern(resh, ops, buf, buf_size, position, context, __func__, #resh) + +void reshSetStatus(cdiResH, const resOps *, int); +int reshGetStatus(cdiResH, const resOps *); + +void reshLock(void); +void reshUnlock(void); + +enum reshListMismatch +{ + cdiResHListOccupationMismatch, + cdiResHListResourceTypeMismatch, + cdiResHListResourceContentMismatch, +}; + +int reshListCompare(int nsp0, int nsp1); +void reshListPrint(FILE *fp); +int reshGetTxCode(cdiResH resH); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef TAXIS_H +#define TAXIS_H + +#include <stdbool.h> + +#ifndef RESOURCE_HANDLE_H +#endif + +typedef struct +{ + int self; + int datatype; // datatype + int type; // time type + int calendar; + int unit; // time units + int numavg; + CdiDateTime sDateTime; // start date/time + CdiDateTime vDateTime; // verification date/time + CdiDateTime rDateTime; // reference date/time + CdiDateTime fDateTime; // forecast reference date/time + CdiDateTime vDateTime_lb; // lower bounds of verification date/time + CdiDateTime vDateTime_ub; // upper bounds of verification date/time + double fc_period; // forecast time period + int fc_unit; // forecast time unit + char *name; + char *longname; + char *units; + bool climatology; + bool hasBounds; +} taxis_t; + +// taxisInqSdatetime: Get the start date/time +CdiDateTime taxisInqSdatetime(int taxisID); + +void ptaxisInit(taxis_t *taxis); +void ptaxisCopy(taxis_t *dest, taxis_t *source); +taxis_t *taxisPtr(int taxisID); +void cdi_set_forecast_period(double timevalue, taxis_t *taxis); +CdiDateTime cdi_decode_timeval(double timevalue, const taxis_t *taxis); +double cdi_encode_timeval(CdiDateTime datetime, taxis_t *taxis); + +void ptaxisDefDatatype(taxis_t *taxisptr, int datatype); +void ptaxisDefName(taxis_t *taxisptr, const char *name); +void ptaxisDefLongname(taxis_t *taxisptr, const char *longname); +void ptaxisDefUnits(taxis_t *taxisptr, const char *units); +char *ptaxisAllocUnits(taxis_t *taxisptr, size_t len); +void taxisDestroyKernel(taxis_t *taxisptr); +#ifndef SX +extern const resOps taxisOps; +#endif + +int taxisUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, + int checkForSameID); + +enum +{ + TAXIS_MAX_UNIT_STR_LEN = 9 +}; + +#endif /* TAXIS_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDI_LIMITS_H +#define CDI_LIMITS_H + +#define MAX_DIMENSIONS 5 // maximum number of dimensions per variable +#define MAX_DIMS_PS 16 // maximum number of dimensions per stream +#define MAX_GRIDS_PS 128 // maximum number of different grids per stream +#define MAX_ZAXES_PS 128 // maximum number of different zaxes per stream +#define MAX_ATTRIBUTES 256 // maximum number of attributes per variable +#define MAX_KEYS 64 // maximum number of keys per variable +#define MAX_SUBTYPES_PS 128 // maximum number of different subtypes per stream + +#endif /* CDI_LIMITS_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _SERVICE_H +#define _SERVICE_H + +typedef struct +{ + int checked; + int byteswap; + int header[8]; + int hprec; /* header precision */ + int dprec; /* data precision */ + size_t datasize; + size_t buffersize; + void *buffer; +} srvrec_t; + +const char *srvLibraryVersion(void); + +void srvDebug(int debug); + +int srvCheckFiletype(int fileID, int *swap); + +void *srvNew(void); +void srvDelete(void *srv); + +int srvRead(int fileID, void *srv); +void srvWrite(int fileID, void *srv); + +int srvInqHeader(void *srv, int *header); +int srvInqDataSP(void *srv, float *data); +int srvInqDataDP(void *srv, double *data); + +int srvDefHeader(void *srv, const int *header); +int srvDefDataSP(void *srv, const float *data); +int srvDefDataDP(void *srv, const double *data); + +#endif /* _SERVICE_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _EXTRA_H +#define _EXTRA_H + +#define EXT_REAL 1 +#define EXT_COMP 2 + +typedef struct +{ + int checked; + int byteswap; + int header[4]; + int prec; /* single or double precison */ + int number; /* real or complex */ + size_t datasize; + size_t buffersize; + void *buffer; +} extrec_t; + +const char *extLibraryVersion(void); + +void extDebug(int debug); + +int extCheckFiletype(int fileID, int *swap); + +void *extNew(void); +void extDelete(void *ext); + +int extRead(int fileID, void *ext); +int extWrite(int fileID, void *ext); + +int extInqHeader(void *ext, int *header); +int extInqDataSP(void *ext, float *data); +int extInqDataDP(void *ext, double *data); + +int extDefHeader(void *ext, const int *header); +int extDefDataSP(void *ext, const float *data); +int extDefDataDP(void *ext, const double *data); + +#endif /* _EXTRA_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _IEG_H +#define _IEG_H + +// clang-format off + +/* Level Types */ +#define IEG_LTYPE_SURFACE 1 +#define IEG_LTYPE_99 99 +#define IEG_LTYPE_ISOBARIC 100 +#define IEG_LTYPE_MEANSEA 102 +#define IEG_LTYPE_ALTITUDE 103 +#define IEG_LTYPE_HEIGHT 105 +#define IEG_LTYPE_SIGMA 107 +#define IEG_LTYPE_HYBRID 109 +#define IEG_LTYPE_HYBRID_LAYER 110 +#define IEG_LTYPE_LANDDEPTH 111 +#define IEG_LTYPE_LANDDEPTH_LAYER 112 +#define IEG_LTYPE_SEADEPTH 160 + +/* + * Data representation type (Grid Type) [Table 6] + */ +#define IEG_GTYPE_LATLON 0 /* latitude/longitude */ +#define IEG_GTYPE_LATLON_ROT 10 /* rotated latitude/longitude */ + +#define IEG_P_CodeTable(x) (x[ 5]) /* Version number of code table */ +#define IEG_P_Parameter(x) (x[ 6]) /* Parameter indicator */ +#define IEG_P_LevelType(x) (x[ 7]) /* Type of level indicator */ +#define IEG_P_Level1(x) (x[ 8]) /* Level 1 */ +#define IEG_P_Level2(x) (x[ 9]) /* Level 2 */ +#define IEG_P_Year(x) (x[10]) /* Year of century (YY) */ +#define IEG_P_Month(x) (x[11]) /* Month (MM) */ +#define IEG_P_Day(x) (x[12]) /* Day (DD) */ +#define IEG_P_Hour(x) (x[13]) /* Hour (HH) */ +#define IEG_P_Minute(x) (x[14]) /* Minute (MM) */ + +/* + * Macros for the grid definition section ( Section 2 ) + */ +#define IEG_G_Size(x) (x[ 0]) +#define IEG_G_NumVCP(x) (x[3] == 10 ? (x[0]-42)/4 : (x[0]-32)/4) +#define IEG_G_GridType(x) (x[ 3]) /* Data representation type */ +#define IEG_G_NumLon(x) (x[ 4]) /* Number of points along a parallel (Ni) */ +#define IEG_G_NumLat(x) (x[ 5]) /* Number of points along a meridian (Nj) */ +#define IEG_G_FirstLat(x) (x[ 6]) /* Latitude of the first grid point */ +#define IEG_G_FirstLon(x) (x[ 7]) /* Longitude of the first grid point */ +#define IEG_G_ResFlag(x) (x[ 8]) /* Resolution flag: 128 regular grid */ +#define IEG_G_LastLat(x) (x[ 9]) /* Latitude of the last grid point */ +#define IEG_G_LastLon(x) (x[10]) /* Longitude of the last grid point */ +#define IEG_G_LonIncr(x) (x[11]) /* i direction increment */ +#define IEG_G_LatIncr(x) (x[12]) /* j direction increment */ +#define IEG_G_ScanFlag(x) (x[13]) +#define IEG_G_LatSP(x) (x[16]) /* Latitude of the southern pole of rotation */ +#define IEG_G_LonSP(x) (x[17]) /* Longitude of the southern pole of rotation */ +#define IEG_G_ResFac(x) (x[18]) /* Resolution factor */ + +// clang-format on + +typedef struct +{ + int checked; + int byteswap; + int dprec; /* data precision */ + int ipdb[37]; + double refval; + int igdb[22]; + double vct[100]; + size_t datasize; + size_t buffersize; + void *buffer; +} iegrec_t; + +const char *iegLibraryVersion(void); + +void iegDebug(int debug); +int iegCheckFiletype(int fileID, int *swap); + +void *iegNew(void); +void iegDelete(void *ieg); +void iegInitMem(void *ieg); + +int iegRead(int fileID, void *ieg); +int iegWrite(int fileID, void *ieg); + +void iegCopyMeta(void *dieg, void *sieg); +int iegInqHeader(void *ieg, int *header); +int iegInqDataSP(void *ieg, float *data); +int iegInqDataDP(void *ieg, double *data); + +int iegDefHeader(void *ieg, const int *header); +int iegDefDataSP(void *ieg, const float *data); +int iegDefDataDP(void *ieg, const double *data); + +#endif /* _IEG_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDI_INT_H +#define CDI_INT_H + +#ifdef HAVE_CONFIG_H +#endif + +#include <assert.h> +#include <stdio.h> +#include <stdbool.h> +#include <string.h> +#include <errno.h> +#include <limits.h> +#include <math.h> +#include <sys/types.h> + + +// Base file types + +#define CDI_FILETYPE_GRIB 100 // File type GRIB +#define CDI_FILETYPE_NETCDF 101 // File type NetCDF + +// dummy use of unused parameters to silence compiler warnings +#ifndef UNUSED +#define UNUSED(x) (void) x +#endif + +#ifndef strdupx +#ifndef strdup +char *strdup(const char *s); +#endif +#define strdupx strdup +/* +#define strdupx(s) \ +({ \ + const char *__old = (s); \ + size_t __len = strlen(__old) + 1; \ + char *__new = (char *) Malloc(__len); \ + (char *) memcpy(__new, __old, __len); \ +}) +*/ +#endif + +char *str_to_lower(char *str); +bool strStartsWith(const char *vstr, const char *cstr); + +static inline bool +str_is_equal(const char *x, const char *y) +{ + return (*x == *y) && strcmp(x, y) == 0; +} + +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif + +#ifndef ERROR_H +#endif +#ifndef _BASETIME_H +#endif +#ifndef JULIAN_DATE_H +#endif +#ifndef TAXIS_H +#endif +#ifndef CDI_LIMITS_H +#endif +#ifndef _SERVICE_H +#endif +#ifndef _EXTRA_H +#endif +#ifndef _IEG_H +#endif +#ifndef RESOURCE_HANDLE_H +#endif + +#define check_parg(arg) \ + if (arg == 0) Warning("Argument '" #arg "' not allocated!") + +#ifdef __xlC__ /* performance problems on IBM */ +#ifndef DBL_IS_NAN +#define DBL_IS_NAN(x) ((x) != (x)) +#endif +#else +#ifndef DBL_IS_NAN +#if defined(HAVE_DECL_ISNAN) +#define DBL_IS_NAN(x) (isnan(x)) +#elif defined(FP_NAN) +#define DBL_IS_NAN(x) (fpclassify(x) == FP_NAN) +#else +#define DBL_IS_NAN(x) ((x) != (x)) +#endif +#endif +#endif + +#ifndef DBL_IS_EQUAL +//#define DBL_IS_EQUAL(x,y) (!(x < y || y < x)) +#define DBL_IS_EQUAL(x, y) (DBL_IS_NAN(x) || DBL_IS_NAN(y) ? (DBL_IS_NAN(x) && DBL_IS_NAN(y)) : !(x < y || y < x)) +#endif + +#ifndef IS_EQUAL +#define IS_NOT_EQUAL(x, y) (x < y || y < x) +#define IS_EQUAL(x, y) (!IS_NOT_EQUAL(x, y)) +#endif + +enum +{ + TYPE_REC, + TYPE_VAR, +}; + +enum +{ + MEMTYPE_DOUBLE = 1, + MEMTYPE_FLOAT, +}; + +typedef struct +{ + void *buffer; // gribapi, cgribex + size_t buffersize; // gribapi, cgribex + off_t position; // file position + int param; + int ilevel; + int vdate; + int vtime; + int gridID; + int varID; + int levelID; + int prec; // ext, srv + void *objectp; // pointer to ieg, ext, srv or cgribex objects +} Record; + +// data structure specifying tile-related meta-data. structure contains "-1" if this is no tile-variable. +typedef struct +{ + int tileindex, totalno_of_tileattr_pairs, tileClassification, numberOfTiles, numberOfAttributes, attribute; +} var_tile_t; + +typedef struct +{ + short perturbationNumber; + short typeOfGeneratingProcess; +} VarScanKeys; + +static inline void +varScanKeysInit(VarScanKeys *s) +{ + memset(s, 0, sizeof(VarScanKeys)); +} + +static inline bool +varScanKeysIsEqual(const VarScanKeys *s1, const VarScanKeys *s2) +{ + return memcmp(s1, s2, sizeof(VarScanKeys)) == 0; +} + +typedef struct +{ + off_t position; + size_t size; + size_t gridsize; + int zip; + int param; + int ilevel; + int ilevel2; + int ltype; + short tsteptype; + short varID; + int levelID; + short used; + char varname[32]; // needed for grib decoding with GRIB_API + VarScanKeys scanKeys; + var_tile_t tiles; // tile-related meta-data, currently for GRIB-API only. +#ifdef HAVE_LIBFDB5 + void *fdbItem; +#endif +} record_t; + +typedef struct +{ + int *recIDs; // IDs of non constant records + record_t *records; + int recordSize; // number of allocated records + int nrecs; // number of used records + // tsID=0 nallrecs + // tsID>0 number of non constant records + int nallrecs; // number of all records + int curRecID; // current record ID + int ncStepIndex; // NetCDF timestep index + off_t position; // timestep file position + taxis_t taxis; + bool next; +} tsteps_t; + +typedef struct +{ + int nlevs; + int subtypeIndex; // corresponding tile in subtype_t structure (subtype->self) + int *recordID; // record IDs: [nlevs] + int *lindex; // level index +} sleveltable_t; + +typedef struct +{ + sleveltable_t *recordTable; // record IDs for each subtype + int ncvarid; + int subtypeSize; + bool defmiss; // true: if missval is defined in file + bool isUsed; + + int gridID; + int zaxisID; + int tsteptype; // TSTEP_* + int subtypeID; // subtype ID, e.g. for tile-related meta-data (currently for GRIB-API only). +} svarinfo_t; + +typedef struct +{ + int ilev; + int mlev; + int ilevID; + int mlevID; +} VCT; + +#ifdef HAVE_LIBNETCDF +enum cdfIDIdx +{ + CDF_DIMID_E, // 3rd dimID of cube sphere grid (len=6) + CDF_DIMID_X, + CDF_DIMID_Y, + CDF_DIMID_RP, // reducedPoints + CDF_VARID_X, + CDF_VARID_Y, + CDF_VARID_RP, // reducedPoints + CDF_VARID_A, + CDF_SIZE_ncIDs, +}; + +typedef struct +{ + int ncIDs[CDF_SIZE_ncIDs]; + int gridID; + long start; + long count; +} ncgrid_t; +#endif + +typedef struct +{ + int self; + int accesstype; // TYPE_REC or TYPE_VAR + int accessmode; + int filetype; + int byteorder; + int fileID; + int filemode; + int nrecs; // number of records + SizeType numvals; + char *filename; + Record *record; + CdiQuery *query; + svarinfo_t *vars; + int nvars; // number of variables + int varsAllocated; + int curTsID; // current timestep ID + int rtsteps; // number of tsteps accessed + long ntsteps; // number of tsteps : only set if all records accessed + int maxSteps; // max. number of timesteps (needed for CDI_FILETYPE_NCZARR) + tsteps_t *tsteps; + int tstepsTableSize; + int tstepsNextID; + basetime_t basetime; + int ncmode; + int vlistID; +#ifdef HAVE_LIBNETCDF + int nc_complex_float_id; + int nc_complex_double_id; + ncgrid_t ncgrid[MAX_GRIDS_PS]; + int zaxisID[MAX_ZAXES_PS]; // Warning: synchronous array to vlist_to_pointer(vlistID)->zaxisIDs + int nczvarID[MAX_ZAXES_PS]; + int ncNumDims; + int ncDimID[MAX_DIMS_PS]; + size_t ncDimLen[MAX_DIMS_PS]; + VCT vct; +#endif + int globalatts; + int localatts; + int unreduced; + int have_missval; + // netcdf4/HDF5 filter + unsigned int filterId; + size_t numParams; + size_t maxParams; + unsigned int params[8]; + + int comptype; // compression type + int complevel; // compression level + bool sortname; + bool sortparam; + void *gribContainers; + + int numWorker; + int nextGlobalRecId; + int cachedTsID; + void *jobs; + void *jobManager; + + int protocol; + void *protocolData; +} stream_t; + +// Length of optional keyword/value pair list +#define MAX_OPT_GRIB_ENTRIES 500 + +enum cdi_convention +{ + CDI_CONVENTION_ECHAM, + CDI_CONVENTION_CF +}; + +// Data type specification for optional key/value pairs (GRIB) +typedef enum +{ + t_double = 0, + t_int = 1 +} key_val_pair_datatype; + +// Data structure holding optional key/value pairs for GRIB +typedef struct +{ + char *keyword; // keyword string + bool update; + key_val_pair_datatype data_type; // data type of this key/value pair + double dbl_val; // double value (data_type == t_double) + int int_val; // integer value (data_type == t_int) + int subtype_index; // tile index for this key-value pair +} opt_key_val_pair_t; + +// enum for differenciating between the different times that we handle +typedef enum +{ + kCdiTimeType_referenceTime, + kCdiTimeType_startTime, + kCdiTimeType_endTime +} CdiTimeType; + +#define CDI_FILETYPE_UNDEF -1 // Unknown/not yet defined file type + +extern int cdiDebugExt; +extern int CDI_Debug; // If set to 1, debuggig (default 0) +extern int CDI_Recopt; +extern bool CDI_gribapi_debug; +extern bool CDI_gribapi_grib1; +extern double CDI_Default_Missval; +extern double CDI_Grid_Missval; +extern int CDI_Default_InstID; +extern int CDI_Default_ModelID; +extern int CDI_Default_TableID; +extern int cdiDefaultLeveltype; +extern int CDI_Default_Calendar; +// extern int cdiNcMissingValue; +extern int CDI_Netcdf_Chunksizehint; +extern int CDI_ChunkType; +extern int CDI_Split_Ltype105; +extern int cdiDataUnreduced; +extern int cdiSortName; +extern int cdiSortParam; +extern int cdiHaveMissval; +extern bool CDI_Ignore_Att_Coordinates; +extern bool CDI_Coordinates_Lon_Lat; +extern bool CDI_Ignore_Valid_Range; +extern int CDI_Skip_Records; +extern const char *CDI_GRIB1_Template; +extern const char *CDI_GRIB2_Template; +extern int CDI_Convention; +extern int CDI_Inventory_Mode; +extern int CDI_Query_Abort; +extern int CDI_Version_Info; +extern int CDI_Convert_Cubesphere; +extern int CDI_Read_Cell_Corners; +extern int CDI_CMOR_Mode; +extern int CDI_Reduce_Dim; +extern int CDI_Shuffle; +extern size_t CDI_Netcdf_Hdr_Pad; +extern size_t CDI_Chunk_Cache; +extern size_t CDI_Chunk_Cache_Max; +extern bool CDI_Netcdf_Lazy_Grid_Load; +extern int STREAM_Debug; + +extern char *cdiPartabPath; +extern int cdiPartabIntern; +extern const resOps streamOps; + +static inline stream_t * +stream_to_pointer(int idx) +{ + return (stream_t *) reshGetVal(idx, &streamOps); +} + +static inline void +stream_check_ptr(const char *caller, stream_t *streamptr) +{ + if (streamptr == NULL) Errorc("stream undefined!"); +} + +int streamInqFileID(int streamID); + +void gridDefHasDims(int gridID, int hasdims); +int gridInqHasDims(int gridID); +int zaxisInqLevelID(int zaxisID, double level); + +void streamCheckID(const char *caller, int streamID); + +void streamDefineTaxis(int streamID); + +int streamsNewEntry(int filetype); +void streamsInitEntry(int streamID); +void cdiStreamSetupVlist(stream_t *streamptr, int vlistID); +// default implementation of the overridable function +void cdiStreamSetupVlist_(stream_t *streamptr, int vlistID); +int stream_new_var(stream_t *streamptr, int gridID, int zaxisID, int tilesetID); + +int tstepsNewEntry(stream_t *streamptr); + +const char *strfiletype(int filetype); + +void cdi_generate_vars(stream_t *streamptr); + +void vlist_check_contents(int vlistID); + +void cdi_create_records(stream_t *streamptr, int tsID); + +void streamFCopyRecord(stream_t *streamptr2, stream_t *streamptr1, const char *container_name); + +int recordNewEntry(stream_t *streamptr, int tsID); + +void cdi_create_timesteps(int numTimesteps, stream_t *streamptr); + +void recordInitEntry(record_t *record); + +void cdiCheckZaxis(int zaxisID); + +void cdiDefAccesstype(int streamID, int type); +int cdiInqAccesstype(int streamID); + +int getByteswap(int byteorder); + +void cdiStreamGetIndexList(unsigned numIDs, int IDs[]); + +void cdiInitialize(void); + +char *cdiEscapeSpaces(const char *string); +char *cdiUnescapeSpaces(const char *string, const char **outStringEnd); + +enum +{ + CDI_UNIT_PA = 1, + CDI_UNIT_HPA, + CDI_UNIT_MM, + CDI_UNIT_CM, + CDI_UNIT_DM, + CDI_UNIT_M, +}; + +struct streamAssoc +{ + int streamID, vlistID; +}; + +struct streamAssoc streamUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context); + +int cdiStreamOpenDefaultDelegate(const char *filename, char filemode, int filetype, stream_t *streamptr, + int recordBufIsToBeCreated); + +int streamOpenID(const char *filename, char filemode, int filetype, int resH); + +void cdiStreamDefVlist_(int streamID, int vlistID); + +int cdiStreamWriteVar_(int streamID, int varID, int memtype, const void *data, SizeType nmiss); + +void cdiStreamWriteVarChunk_(int streamID, int varID, int memtype, const int rect[][2], const void *data, SizeType nmiss); +void cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted); + +int cdiStreamDefTimestep_(stream_t *streamptr, int tsID); + +void cdiStreamSync_(stream_t *streamptr); + +const char *cdiUnitNamePtr(int cdi_unit); + +enum +{ + // 8192 is known to work on most systems (4096 isn't on Alpha) + commonPageSize = 8192, +}; + +size_t cdiGetPageSize(bool largePageAlign); + +void zaxisGetIndexList(int nzaxis, int *zaxisIndexList); + +// clang-format off + +#ifdef __cplusplus +extern "C" { +#endif + +// functions used in CDO !!! + +void cdiDefTableID(int tableID); + +void gridGenXvals(int xsize, double xfirst, double xlast, double xinc, double *xvals); +void gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double yinc, double *yvals); + +static inline +void cdi_check_gridsize_int_limit(const char *format, SizeType gridsize) +{ + if (gridsize > INT_MAX) Error("%s format grid size (%zu) limit exceeded (%zu)!", format, gridsize, INT_MAX); +} + +bool cdiFiletypeIsExse(int filetype); +int cdiBaseFiletype(int filetype); + +#ifdef __cplusplus +} +#endif + +// clang-format on + +#endif /* CDI_INT_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDF_INT_H +#define CDF_INT_H + +#ifdef HAVE_LIBNETCDF + +#include <netcdf.h> + +void cdf__create(const char *path, int cmode, int *idp); +void cdf_create(const char *path, int cmode, int *idp); +int cdf_open(const char *path, int omode, int *idp); +void cdf_close(int ncid); + +void cdf_redef(int ncid); +void cdf_enddef(int ncid, int streamID); +void cdf__enddef(int ncid, int streamID, const size_t hdr_pad); +void cdf_sync(int ncid); + +void cdf_inq(int ncid, int *ndimsp, int *nvarsp, int *ngattsp, int *unlimdimidp); + +void cdf_def_dim(int ncid, const char *name, size_t len, int *idp); +void cdf_inq_dimid(int ncid, const char *name, int *dimidp); +void cdf_inq_dim(int ncid, int dimid, char *name, size_t *lengthp); +void cdf_inq_dimname(int ncid, int dimid, char *name); +void cdf_inq_dimlen(int ncid, int dimid, size_t *lengthp); +void cdf_def_var(int ncid, const char *name, nc_type xtype, int ndims, const int dimids[], int *varidp); +void cdf_def_var_serial(int ncid, const char *name, nc_type xtype, int ndims, const int dimids[], int *varidp); +void cdf_inq_varid(int ncid, const char *name, int *varidp); +void cdf_inq_nvars(int ncid, int *nvarsp); +void cdf_inq_var(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int dimids[], int *nattsp); +void cdf_inq_varname(int ncid, int varid, char *name); +void cdf_inq_vartype(int ncid, int varid, nc_type *xtypep); +void cdf_inq_varndims(int ncid, int varid, int *ndimsp); +void cdf_inq_vardimid(int ncid, int varid, int dimids[]); +void cdf_inq_varnatts(int ncid, int varid, int *nattsp); + +void cdf_copy_att(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out); +void cdf_put_var_text(int ncid, int varid, const char *tp); +void cdf_put_var_uchar(int ncid, int varid, const unsigned char *up); +void cdf_put_var_schar(int ncid, int varid, const signed char *cp); +void cdf_put_var_short(int ncid, int varid, const short *sp); +void cdf_put_var_int(int ncid, int varid, const int *ip); +void cdf_put_var_long(int ncid, int varid, const long *lp); +void cdf_put_var_float(int ncid, int varid, const float *fp); +void cdf_put_var_double(int ncid, int varid, const double *dp); + +void cdf_get_var_text(int ncid, int varid, char *tp); +void cdf_get_var_uchar(int ncid, int varid, unsigned char *up); +void cdf_get_var_schar(int ncid, int varid, signed char *cp); +void cdf_get_var_short(int ncid, int varid, short *sp); +void cdf_get_var_int(int ncid, int varid, int *ip); +void cdf_get_var_long(int ncid, int varid, long *lp); +void cdf_get_var_float(int ncid, int varid, float *fp); +void cdf_get_var_double(int ncid, int varid, double *dp); + +void cdf_get_var1_text(int ncid, int varid, const size_t index[], char *tp); + +void cdf_get_var1_double(int ncid, int varid, const size_t index[], double *dp); +void cdf_put_var1_double(int ncid, int varid, const size_t index[], const double *dp); + +void cdf_get_vara_uchar(int ncid, int varid, const size_t start[], const size_t count[], unsigned char *tp); +void cdf_get_vara_text(int ncid, int varid, const size_t start[], const size_t count[], char *tp); + +void cdf_get_vara_double(int ncid, int varid, const size_t start[], const size_t count[], double *dp); +void cdf_put_vara_double(int ncid, int varid, const size_t start[], const size_t count[], const double *dp); + +void cdf_get_vara_float(int ncid, int varid, const size_t start[], const size_t count[], float *fp); +void cdf_put_vara_float(int ncid, int varid, const size_t start[], const size_t count[], const float *fp); + +void cdf_get_vara_int(int ncid, int varid, const size_t start[], const size_t count[], int *dp); + +void cdf_get_vara(int ncid, int varid, const size_t start[], const size_t count[], void *cp); +void cdf_put_vara(int ncid, int varid, const size_t start[], const size_t count[], const void *cp); + +void cdf_put_att_text(int ncid, int varid, const char *name, size_t len, const char *tp); +void cdf_put_att_int(int ncid, int varid, const char *name, nc_type xtype, size_t len, const int *ip); +void cdf_put_att_float(int ncid, int varid, const char *name, nc_type xtype, size_t len, const float *dp); +void cdf_put_att_double(int ncid, int varid, const char *name, nc_type xtype, size_t len, const double *dp); + +void cdf_get_att_string(int ncid, int varid, const char *name, char **tp); +void cdf_get_att_text(int ncid, int varid, const char *name, char *tp); +void cdf_get_att_int(int ncid, int varid, const char *name, int *ip); +void cdf_get_att_double(int ncid, int varid, const char *name, double *dp); + +void cdf_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp); +void cdf_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep); +void cdf_inq_attlen(int ncid, int varid, const char *name, size_t *lenp); +void cdf_inq_attname(int ncid, int varid, int attnum, char *name); +void cdf_inq_attid(int ncid, int varid, const char *name, int *attnump); + +void cdf_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp); + +typedef int (*cdi_nc__create_funcp)(const char *path, int cmode, size_t initialsz, size_t *chunksizehintp, int *ncidp); + +typedef void (*cdi_cdf_def_var_funcp)(int ncid, const char *name, nc_type xtype, int ndims, const int dimids[], int *varidp); + +int cdi_nc_enddef_serial(int ncid, int streamID); +int cdi_nc__enddef_serial(int ncid, int streamID, size_t hdr_pad, size_t v_align, size_t v_minfree, size_t r_align); +typedef int (*cdi_nc_enddef_funcp)(int ncid, int streamID); +typedef int (*cdi_nc__enddef_funcp)(int ncid, int streamID, size_t hdr_pad, size_t v_align, size_t v_minfree, size_t r_align); +#endif + +#endif /* CDF_INT_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <ctype.h> + + +#ifdef HAVE_LIBNETCDF +const char * +cdfLibraryVersion(void) +{ + return nc_inq_libvers(); +} + +#ifdef HAVE_H5GET_LIBVERSION +#ifdef __cplusplus +extern "C" +{ +#endif + int H5get_libversion(unsigned *, unsigned *, unsigned *); +#ifdef __cplusplus +} +#endif +#endif + +const char * +hdfLibraryVersion(void) +{ +#ifdef HAVE_H5GET_LIBVERSION + static char hdf_libvers[256]; + static int linit = 0; + if (!linit) + { + linit = 1; + unsigned majnum, minnum, relnum; + H5get_libversion(&majnum, &minnum, &relnum); +#ifdef HAVE_NC4HDF5_THREADSAFE + snprintf(hdf_libvers, sizeof(hdf_libvers), "%u.%u.%u threadsafe", majnum, minnum, relnum); +#else + snprintf(hdf_libvers, sizeof(hdf_libvers), "%u.%u.%u", majnum, minnum, relnum); +#endif + } + + return hdf_libvers; +#else + return "library undefined"; +#endif +} + +int CDF_Debug = 0; /* If set to 1, debugging */ + +void +cdfDebug(int debug) +{ + CDF_Debug = debug; + + if (CDF_Debug) Message("debug level %d", debug); +} + +static void +cdfComment(int ncid) +{ + static char comment[256] = "Climate Data Interface version "; + static bool init = false; + + if (!init) + { + init = true; + const char *libvers = cdiLibraryVersion(); + + if (!isdigit((int) *libvers)) + strcat(comment, "??"); + else + strcat(comment, libvers); + strcat(comment, " (https://mpimet.mpg.de/cdi)"); + } + + cdf_put_att_text(ncid, NC_GLOBAL, "CDI", strlen(comment), comment); +} + +static bool +has_uri_scheme(const char *uri) +{ + const char *pos = strstr(uri, "://"); + if (pos) + { + const int len = pos - uri; + if (strncmp(uri, "file", len) == 0 || strncmp(uri, "https", len) == 0 || strncmp(uri, "s3", len) == 0) return true; + } + + return false; +} + +static int +cdfOpenFile(const char *filename, const char *mode, int *filetype) +{ + int ncid = -1; + const int fmode = tolower(*mode); + int writemode = NC_CLOBBER; + int readmode = NC_NOWRITE; + + if (filename == NULL) + ncid = CDI_EINVAL; + else + { + switch (fmode) + { + case 'r': + { + const int status = cdf_open(filename, readmode, &ncid); + if (status > 0 && ncid < 0) ncid = CDI_ESYSTEM; +#ifdef HAVE_NETCDF4 + else + { + int format = -1; + (void) nc_inq_format(ncid, &format); + if (format == NC_FORMAT_NETCDF4_CLASSIC) *filetype = CDI_FILETYPE_NC4C; + } +#endif + } + break; + case 'w': +#ifdef NC_64BIT_OFFSET + if (*filetype == CDI_FILETYPE_NC2) writemode |= NC_64BIT_OFFSET; +#endif +#ifdef NC_64BIT_DATA + if (*filetype == CDI_FILETYPE_NC5) writemode |= NC_64BIT_DATA; +#endif +#ifdef HAVE_NETCDF4 + if (*filetype == CDI_FILETYPE_NC4C) writemode |= (NC_NETCDF4 | NC_CLASSIC_MODEL); + if (*filetype == CDI_FILETYPE_NC4) writemode |= NC_NETCDF4; + if (*filetype == CDI_FILETYPE_NCZARR) writemode |= NC_NETCDF4; +#endif + if (*filetype == CDI_FILETYPE_NCZARR) + { + if (!has_uri_scheme(filename)) + { + fprintf(stderr, "URI scheme is missing in NCZarr path!\n"); + return CDI_EINVAL; + } + + cdf_create(filename, writemode, &ncid); + } + else + { + if (has_uri_scheme(filename)) fprintf(stderr, "URI scheme defined for non NCZarr Data Model!\n"); + + cdf__create(filename, writemode, &ncid); + } + + if (CDI_Version_Info) cdfComment(ncid); + cdf_put_att_text(ncid, NC_GLOBAL, "Conventions", 6, "CF-1.6"); + break; + case 'a': cdf_open(filename, NC_WRITE, &ncid); break; + default: ncid = CDI_EINVAL; + } + } + + return ncid; +} + +int +cdfOpen(const char *filename, const char *mode, int filetype) +{ + int fileID = -1; + bool open_file = true; + + if (CDF_Debug) Message("Open %s with mode %c", filename, *mode); + +#ifndef NC_64BIT_OFFSET + if (filetype == CDI_FILETYPE_NC2) open_file = false; +#endif +#ifndef NC_64BIT_DATA + if (filetype == CDI_FILETYPE_NC5) open_file = false; +#endif + + if (open_file) + { + fileID = cdfOpenFile(filename, mode, &filetype); + + if (CDF_Debug) Message("File %s opened with id %d", filename, fileID); + } + else + { + fileID = CDI_ELIBNAVAIL; + } + + return fileID; +} + +static int +cdf4CheckLibVersions(void) +{ + int status = 0; +#ifdef HAVE_NETCDF4 +#ifdef HAVE_H5GET_LIBVERSION + static int checked = 0; + if (!checked) + { + checked = 1; + unsigned majnum, minnum, relnum; + + sscanf(nc_inq_libvers(), "%u.%u.%u", &majnum, &minnum, &relnum); + // printf("netCDF %u.%u.%u\n", majnum, minnum, relnum); + const unsigned ncmaxver = 4 * 1000000 + 4 * 1000; + const unsigned nclibver = majnum * 1000000 + minnum * 1000 + relnum; + + if (nclibver <= ncmaxver) + { + H5get_libversion(&majnum, &minnum, &relnum); + const unsigned hdf5maxver = 1 * 1000000 + 10 * 1000; + const unsigned hdf5libver = majnum * 1000000 + minnum * 1000 + relnum; + + if (hdf5libver >= hdf5maxver) + { + fprintf(stderr, "NetCDF library 4.4.0 or earlier, combined with libhdf5 1.10.0 or greater not supported!\n"); + status = 1; + } + } + } +#endif +#endif + return status; +} + +int +cdf4Open(const char *filename, const char *mode, int *filetype) +{ + if (CDF_Debug) Message("Open %s with mode %c", filename, *mode); + +#ifdef HAVE_NETCDF4 + if (cdf4CheckLibVersions() == 0) + { + const int fileID = cdfOpenFile(filename, mode, filetype); + if (CDF_Debug) Message("File %s opened with id %d", filename, fileID); + return fileID; + } + + return CDI_EUFTYPE; +#else + return CDI_ELIBNAVAIL; +#endif +} + +static void +cdfCloseFile(int fileID) +{ + cdf_close(fileID); +} + +void +cdfClose(int fileID) +{ + cdfCloseFile(fileID); +} +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef NAMESPACE_H +#define NAMESPACE_H + +#ifdef HAVE_CONFIG_H +#endif + +typedef struct +{ + int idx; + int nsp; +} namespaceTuple_t; + +enum namespaceSwitch +{ + NSSWITCH_NO_SUCH_SWITCH = -1, + NSSWITCH_ABORT, + NSSWITCH_WARNING, + NSSWITCH_SERIALIZE_GET_SIZE, + NSSWITCH_SERIALIZE_PACK, + NSSWITCH_SERIALIZE_UNPACK, + NSSWITCH_FILE_OPEN, + NSSWITCH_FILE_WRITE, + NSSWITCH_FILE_CLOSE, + NSSWITCH_STREAM_OPEN_BACKEND, + NSSWITCH_STREAM_DEF_VLIST_, + NSSWITCH_STREAM_SETUP_VLIST, + NSSWITCH_STREAM_WRITE_VAR_, + NSSWITCH_STREAM_WRITE_VAR_CHUNK_, + NSSWITCH_STREAM_WRITE_VAR_PART_, + NSSWITCH_STREAM_WRITE_SCATTERED_VAR_PART_, + NSSWITCH_STREAM_CLOSE_BACKEND, + NSSWITCH_STREAM_DEF_TIMESTEP_, + NSSWITCH_STREAM_SYNC, + NSSWITCH_VLIST_DESTROY_, +#ifdef HAVE_LIBNETCDF + NSSWITCH_NC__CREATE, + NSSWITCH_CDF_DEF_VAR, + NSSWITCH_NC_ENDDEF, + NSSWITCH_NC__ENDDEF, + NSSWITCH_CDF_DEF_TIMESTEP, + NSSWITCH_CDF_STREAM_SETUP, + NSSWITCH_CDF_POSTDEFACTION_GRID_PROP, +#endif + NUM_NAMESPACE_SWITCH, +}; + +union namespaceSwitchValue +{ + void *data; + void (*func)(void); +}; + +#define NSSW_FUNC(p) ((union namespaceSwitchValue){ .func = (void (*)(void))(p) }) +#define NSSW_DATA(p) ((union namespaceSwitchValue){ .data = (void *) (p) }) + +// int namespaceNew(); +// void namespaceDelete(int namespaceID); +void namespaceCleanup(void); +int namespaceGetNumber(void); +// void namespaceSetActive(int namespaceID); +// int namespaceGetActive ( void ); +int namespaceIdxEncode(namespaceTuple_t); +int namespaceIdxEncode2(int, int); +namespaceTuple_t namespaceResHDecode(int); +int namespaceAdaptKey(int originResH, int originNamespace); +int namespaceAdaptKey2(int); +void namespaceSwitchSet(int sw, union namespaceSwitchValue value); +union namespaceSwitchValue namespaceSwitchGet(int sw); +/* reserve new dynamic key */ +int cdiNamespaceSwitchNewKey(void); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <sys/stat.h> + + +#ifdef HAVE_LIBNETCDF + +void +cdf_create(const char *path, int cmode, int *ncidp) +{ + int status = nc_create(path, cmode, ncidp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d mode=%d file=%s", *ncidp, cmode, path); + + if (status != NC_NOERR) Error("%s: %s", path, nc_strerror(status)); + + int oldfill; + status = nc_set_fill(*ncidp, NC_NOFILL, &oldfill); + + if (status != NC_NOERR) Error("%s: %s", path, nc_strerror(status)); +} + +void +cdf__create(const char *path, int cmode, int *ncidp) +{ + int status = -1; + size_t chunksizehint = 0; + + size_t initialsz = 0; + +#if defined(__SX__) || defined(ES) + chunksizehint = 16777216; // 16 MB +#endif + + if (CDI_Netcdf_Chunksizehint != CDI_UNDEFID) chunksizehint = (size_t) CDI_Netcdf_Chunksizehint; + + cdi_nc__create_funcp my_nc__create = (cdi_nc__create_funcp) namespaceSwitchGet(NSSWITCH_NC__CREATE).func; + status = my_nc__create(path, cmode, initialsz, &chunksizehint, ncidp); + + if (status != NC_NOERR) + { + if (CDF_Debug) Message("ncid=%d mode=%d chunksizehint=%zu file=%s", *ncidp, cmode, chunksizehint, path); + Error("%s: %s", path, nc_strerror(status)); + } + + int oldfill; + status = nc_set_fill(*ncidp, NC_NOFILL, &oldfill); + + if (status != NC_NOERR) Error("%s: %s", path, nc_strerror(status)); +} + +int +cdf_open(const char *path, int omode, int *ncidp) +{ + int status = 0; + + if (strstr(path, ":/")) // ESDM and DAP + { + status = nc_open(path, omode, ncidp); + } + else + { + struct stat filestat; + if (stat(path, &filestat) != 0) SysError(path); + + size_t chunksizehint = 0; +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + chunksizehint = (size_t) filestat.st_blksize * 4; + if (chunksizehint > (size_t) filestat.st_size) chunksizehint = (size_t) filestat.st_size; +#endif + // if (chunksizehint < ChunkSizeMin) chunksizehint = ChunkSizeMin; + if (CDI_Netcdf_Chunksizehint != CDI_UNDEFID) chunksizehint = (size_t) CDI_Netcdf_Chunksizehint; + + // FIXME: parallel part missing + status = nc__open(path, omode, &chunksizehint, ncidp); + + if (CDF_Debug) Message("chunksizehint %zu", chunksizehint); + } + + if (CDF_Debug) Message("ncid=%d mode=%d file=%s", *ncidp, omode, path); + + if (CDF_Debug && status != NC_NOERR) Message("%s", nc_strerror(status)); + + return status; +} + +void +cdf_close(int ncid) +{ + int status = nc_close(ncid); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_redef(int ncid) +{ + int status = nc_redef(ncid); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +int +cdi_nc_enddef_serial(int ncid, int streamID) +{ + (void) streamID; + return nc_enddef(ncid); +} + +int +cdi_nc__enddef_serial(int ncid, int streamID, size_t hdr_pad, size_t v_align, size_t v_minfree, size_t r_align) +{ + (void) streamID; + return nc__enddef(ncid, hdr_pad, v_align, v_minfree, r_align); +} + +void +cdf_enddef(int ncid, int streamID) +{ + cdi_nc_enddef_funcp my_nc_enddef = (cdi_nc_enddef_funcp) namespaceSwitchGet(NSSWITCH_NC_ENDDEF).func; + int status = my_nc_enddef(ncid, streamID); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf__enddef(int ncid, int streamID, const size_t hdr_pad) +{ + const size_t v_align = 4UL; // [B] Alignment of beginning of data section for fixed variables + const size_t v_minfree = 0UL; // [B] Pad at end of data section for fixed size variables + const size_t r_align = 4UL; // [B] Alignment of beginning of data section for record variables + + // nc_enddef(ncid) is equivalent to nc__enddef(ncid, 0, 4, 0, 4) + cdi_nc__enddef_funcp my_nc__enddef = (cdi_nc__enddef_funcp) namespaceSwitchGet(NSSWITCH_NC_ENDDEF).func; + int status = my_nc__enddef(ncid, streamID, hdr_pad, v_align, v_minfree, r_align); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_sync(int ncid) +{ + int status = nc_sync(ncid); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq(int ncid, int *ndimsp, int *nvarsp, int *ngattsp, int *unlimdimidp) +{ + int status = nc_inq(ncid, ndimsp, nvarsp, ngattsp, unlimdimidp); + + if (CDF_Debug || status != NC_NOERR) + Message("ncid=%d ndims=%d nvars=%d ngatts=%d unlimid=%d", ncid, *ndimsp, *nvarsp, *ngattsp, *unlimdimidp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_def_dim(int ncid, const char *name, size_t len, int *dimidp) +{ + int status = nc_def_dim(ncid, name, len, dimidp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d name=%s len=%d", ncid, name, len); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_dimid(int ncid, const char *name, int *dimidp) +{ + int status = nc_inq_dimid(ncid, name, dimidp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d name=%s dimid=%d", ncid, name, *dimidp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_dim(int ncid, int dimid, char *name, size_t *lengthp) +{ + int status = nc_inq_dim(ncid, dimid, name, lengthp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d dimid=%d length=%d name=%s", ncid, dimid, *lengthp, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_dimname(int ncid, int dimid, char *name) +{ + int status = nc_inq_dimname(ncid, dimid, name); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d dimid=%d name=%s", ncid, dimid, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_dimlen(int ncid, int dimid, size_t *lengthp) +{ + int status = nc_inq_dimlen(ncid, dimid, lengthp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d dimid=%d length=%d", ncid, dimid, *lengthp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_def_var(int ncid, const char *name, nc_type xtype, int ndims, const int dimids[], int *varidp) +{ + cdi_cdf_def_var_funcp my_cdf_def_var = (cdi_cdf_def_var_funcp) namespaceSwitchGet(NSSWITCH_CDF_DEF_VAR).func; + my_cdf_def_var(ncid, name, xtype, ndims, dimids, varidp); +} + +void +cdf_def_var_serial(int ncid, const char *name, nc_type xtype, int ndims, const int dimids[], int *varidp) +{ + int status = nc_def_var(ncid, name, xtype, ndims, dimids, varidp); + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d name=%s xtype=%d ndims=%d varid=%d", ncid, name, xtype, ndims, *varidp); + if (status == NC_NOERR) + { + int fileFormat; + status = nc_inq_format(ncid, &fileFormat); + if (status == NC_NOERR && (fileFormat == NC_FORMAT_NETCDF4 || fileFormat == NC_FORMAT_NETCDF4_CLASSIC)) + status = nc_def_var_fill(ncid, *varidp, 1, NULL); + } + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_varid(int ncid, const char *name, int *varidp) +{ + int status = nc_inq_varid(ncid, name, varidp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d name=%s varid=%d", ncid, name, *varidp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_nvars(int ncid, int *nvarsp) +{ + int status = nc_inq_nvars(ncid, nvarsp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d nvars=%d", ncid, *nvarsp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_var(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int dimids[], int *nattsp) +{ + int status = nc_inq_var(ncid, varid, name, xtypep, ndimsp, dimids, nattsp); + + if (CDF_Debug || status != NC_NOERR) + Message("ncid=%d varid=%d ndims=%d xtype=%d natts=%d name=%s", ncid, varid, *ndimsp, *xtypep, *nattsp, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_varname(int ncid, int varid, char *name) +{ + int status = nc_inq_varname(ncid, varid, name); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d name=%s", ncid, varid, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_vartype(int ncid, int varid, nc_type *xtypep) +{ + int status = nc_inq_vartype(ncid, varid, xtypep); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d xtype=%s", ncid, varid, *xtypep); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_varndims(int ncid, int varid, int *ndimsp) +{ + int status = nc_inq_varndims(ncid, varid, ndimsp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_vardimid(int ncid, int varid, int dimids[]) +{ + int status = nc_inq_vardimid(ncid, varid, dimids); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_varnatts(int ncid, int varid, int *nattsp) +{ + int status = nc_inq_varnatts(ncid, varid, nattsp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d nattsp=%d", ncid, varid, *nattsp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_var_text(int ncid, int varid, const char *tp) +{ + int status = nc_put_var_text(ncid, varid, tp); + + if (CDF_Debug || status != NC_NOERR) Message("%d %d %s", ncid, varid, tp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_var_short(int ncid, int varid, const short *sp) +{ + int status = nc_put_var_short(ncid, varid, sp); + + if (CDF_Debug || status != NC_NOERR) Message("%d %d %hd", ncid, varid, *sp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_var_int(int ncid, int varid, const int *ip) +{ + int status = nc_put_var_int(ncid, varid, ip); + + if (CDF_Debug || status != NC_NOERR) Message("%d %d %d", ncid, varid, *ip); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_var_long(int ncid, int varid, const long *lp) +{ + int status = nc_put_var_long(ncid, varid, lp); + + if (CDF_Debug || status != NC_NOERR) Message("%d %d %ld", ncid, varid, *lp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_var_float(int ncid, int varid, const float *fp) +{ + int status = nc_put_var_float(ncid, varid, fp); + + if (CDF_Debug || status != NC_NOERR) Message("%d %d %f", ncid, varid, *fp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +static const char * +cdf_var_type(nc_type xtype) +{ + const char *ctype = "unknown"; + + // clang-format off + if (xtype == NC_BYTE ) ctype = "NC_BYTE"; + else if (xtype == NC_CHAR ) ctype = "NC_CHAR"; + else if (xtype == NC_SHORT ) ctype = "NC_SHORT"; + else if (xtype == NC_INT ) ctype = "NC_INT"; + else if (xtype == NC_FLOAT ) ctype = "NC_FLOAT"; + else if (xtype == NC_DOUBLE) ctype = "NC_DOUBLE"; +#ifdef HAVE_NETCDF4 + else if (xtype == NC_UBYTE ) ctype = "NC_UBYTE"; + else if (xtype == NC_LONG ) ctype = "NC_LONG"; + else if (xtype == NC_USHORT) ctype = "NC_USHORT"; + else if (xtype == NC_UINT ) ctype = "NC_UINT"; + else if (xtype == NC_INT64 ) ctype = "NC_INT64"; + else if (xtype == NC_UINT64) ctype = "NC_UINT64"; +#endif + // clang-format on + + return ctype; +} + +static void +minmaxval(size_t nvals, const double *array, double *minval, double *maxval) +{ + double minv = array[0]; + double maxv = array[0]; + for (size_t i = 0; i < nvals; ++i) + { + minv = (array[i] < minv) ? array[i] : minv; + maxv = (array[i] > maxv) ? array[i] : maxv; + } + + *minval = minv; + *maxval = maxv; +} + +static void +minmaxvalf(size_t nvals, const float *array, double *minval, double *maxval) +{ + float minv = array[0]; + float maxv = array[0]; + for (size_t i = 0; i < nvals; ++i) + { + minv = (array[i] < minv) ? array[i] : minv; + maxv = (array[i] > maxv) ? array[i] : maxv; + } + + *minval = minv; + *maxval = maxv; +} + +void +cdf_put_vara_double(int ncid, int varid, const size_t start[], const size_t count[], const double *dp) +{ + int status = nc_put_vara_double(ncid, varid, start, count, dp); + + if (CDF_Debug || status != NC_NOERR) + { + char name[256]; + nc_inq_varname(ncid, varid, name); + nc_type xtype; + nc_inq_vartype(ncid, varid, &xtype); + int ndims; + nc_inq_varndims(ncid, varid, &ndims); + double minval = 0.0, maxval = 0.0; + size_t nvals = 1; + for (int i = 0; i < ndims; ++i) nvals *= count[i]; + minmaxval(nvals, dp, &minval, &maxval); + Message("name=%s type=%s minval=%f maxval=%f", name, cdf_var_type(xtype), minval, maxval); + } + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_vara_float(int ncid, int varid, const size_t start[], const size_t count[], const float *fp) +{ + int status = nc_put_vara_float(ncid, varid, start, count, fp); + + if (CDF_Debug || status != NC_NOERR) + { + char name[256]; + nc_inq_varname(ncid, varid, name); + nc_type xtype; + nc_inq_vartype(ncid, varid, &xtype); + int ndims; + nc_inq_varndims(ncid, varid, &ndims); + double minval = 0.0, maxval = 0.0; + size_t nvals = 1; + for (int i = 0; i < ndims; ++i) nvals *= count[i]; + minmaxvalf(nvals, fp, &minval, &maxval); + Message("name=%s type=%s minval=%f maxval=%f", name, cdf_var_type(xtype), minval, maxval); + } + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_vara(int ncid, int varid, const size_t start[], const size_t count[], const void *cp) +{ + int status = nc_put_vara(ncid, varid, start, count, cp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_vara(int ncid, int varid, const size_t start[], const size_t count[], void *cp) +{ + int status = nc_get_vara(ncid, varid, start, count, cp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_vara_int(int ncid, int varid, const size_t start[], const size_t count[], int *dp) +{ + int status = nc_get_vara_int(ncid, varid, start, count, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_vara_double(int ncid, int varid, const size_t start[], const size_t count[], double *dp) +{ + int status = nc_get_vara_double(ncid, varid, start, count, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d start[0]=%zu count[0]=%zu", ncid, varid, start[0], count[0]); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_vara_float(int ncid, int varid, const size_t start[], const size_t count[], float *fp) +{ + int status = nc_get_vara_float(ncid, varid, start, count, fp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d start[0]=%zu count[0]=%zu", ncid, varid, start[0], count[0]); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_vara_text(int ncid, int varid, const size_t start[], const size_t count[], char *tp) +{ + int status = nc_get_vara_text(ncid, varid, start, count, tp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_vara_uchar(int ncid, int varid, const size_t start[], const size_t count[], unsigned char *tp) +{ + int status = nc_get_vara_uchar(ncid, varid, start, count, tp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_var_double(int ncid, int varid, const double *dp) +{ + int status = nc_put_var_double(ncid, varid, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d val0=%f", ncid, varid, *dp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_var1_text(int ncid, int varid, const size_t index[], char *tp) +{ + int status = nc_get_var1_text(ncid, varid, index, tp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_var1_double(int ncid, int varid, const size_t index[], double *dp) +{ + int status = nc_get_var1_double(ncid, varid, index, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_var1_double(int ncid, int varid, const size_t index[], const double *dp) +{ + int status = nc_put_var1_double(ncid, varid, index, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d val=%f", ncid, varid, *dp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_var_text(int ncid, int varid, char *tp) +{ + int status = nc_get_var_text(ncid, varid, tp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_var_short(int ncid, int varid, short *sp) +{ + int status = nc_get_var_short(ncid, varid, sp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_var_int(int ncid, int varid, int *ip) +{ + int status = nc_get_var_int(ncid, varid, ip); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_var_long(int ncid, int varid, long *lp) +{ + int status = nc_get_var_long(ncid, varid, lp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_var_float(int ncid, int varid, float *fp) +{ + int status = nc_get_var_float(ncid, varid, fp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d", ncid, varid); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_var_double(int ncid, int varid, double *dp) +{ + int status = nc_get_var_double(ncid, varid, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d val[0]=%f", ncid, varid, *dp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_copy_att(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out) +{ + int status = nc_copy_att(ncid_in, varid_in, name, ncid_out, varid_out); + + if (CDF_Debug || status != NC_NOERR) Message("%d %d %s %d %d", ncid_in, varid_out, name, ncid_out, varid_out); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_att_text(int ncid, int varid, const char *name, size_t len, const char *tp) +{ + int status = nc_put_att_text(ncid, varid, name, len, tp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s text=%.*s", ncid, varid, name, (int) len, tp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_att_int(int ncid, int varid, const char *name, nc_type xtype, size_t len, const int *ip) +{ + int status = nc_put_att_int(ncid, varid, name, xtype, len, ip); + + if (status == NC_ERANGE) status = NC_NOERR; + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s val=%d", ncid, varid, name, *ip); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_att_float(int ncid, int varid, const char *name, nc_type xtype, size_t len, const float *dp) +{ + int status = nc_put_att_float(ncid, varid, name, xtype, len, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s val=%g", ncid, varid, name, *dp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_put_att_double(int ncid, int varid, const char *name, nc_type xtype, size_t len, const double *dp) +{ + int status = nc_put_att_double(ncid, varid, name, xtype, len, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s val=%g", ncid, varid, name, *dp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_att_text(int ncid, int varid, const char *name, char *tp) +{ + int status = nc_get_att_text(ncid, varid, name, tp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d name=%s", ncid, varid, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_att_string(int ncid, int varid, const char *name, char **tp) +{ +#ifdef HAVE_NETCDF4 + int status = nc_get_att_string(ncid, varid, name, tp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d name=%s", ncid, varid, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +#endif +} + +void +cdf_get_att_int(int ncid, int varid, const char *name, int *ip) +{ + int status = nc_get_att_int(ncid, varid, name, ip); + + if (status == NC_ERANGE) status = NC_NOERR; + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s val=%d", ncid, varid, name, *ip); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_get_att_double(int ncid, int varid, const char *name, double *dp) +{ + int status = nc_get_att_double(ncid, varid, name, dp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s val=%.9g", ncid, varid, name, *dp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp) +{ + int status = nc_inq_att(ncid, varid, name, xtypep, lenp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s", ncid, varid, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep) +{ + int status = nc_inq_atttype(ncid, varid, name, xtypep); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s", ncid, varid, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_attlen(int ncid, int varid, const char *name, size_t *lenp) +{ + int status = nc_inq_attlen(ncid, varid, name, lenp); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s len=%d", ncid, varid, name, *lenp); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_attname(int ncid, int varid, int attnum, char *name) +{ + int status = nc_inq_attname(ncid, varid, attnum, name); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d attnum=%d att=%s", ncid, varid, attnum, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +void +cdf_inq_attid(int ncid, int varid, const char *name, int *attnump) +{ + int status = nc_inq_attid(ncid, varid, name, attnump); + + if (CDF_Debug || status != NC_NOERR) Message("ncid=%d varid=%d att=%s", ncid, varid, name); + + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} + +#ifdef HAVE_NETCDF4 +void +cdf_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp) +{ + int status = nc_def_var_chunking(ncid, varid, storage, chunksizesp); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); +} +#endif + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _DMEMORY_H +#define _DMEMORY_H + +// clang-format off + +#include <stdio.h> + +// if DEBUG_MEMORY is defined setenv MEMORY_DEBUG to debug memory +#define DEBUG_MEMORY + +#ifndef WITH_FUNCTION_NAME +#define WITH_FUNCTION_NAME +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +extern size_t memTotal(void); +extern void memDebug(int debug); +extern void memExitOnError(void); + +#if defined DEBUG_MEMORY + +extern void *memRealloc(void *ptr, size_t size, const char *file, const char *functionname, int line); +extern void *memCalloc (size_t nobjs, size_t size, const char *file, const char *functionname, int line); +extern void *memMalloc (size_t size, const char *file, const char *functionname, int line); +extern void memFree (void *ptr, const char *file, const char *functionname, int line); + +#ifdef __cplusplus +} +#endif + +#ifdef WITH_FUNCTION_NAME +# define Realloc(p, s) memRealloc((p), (s), __FILE__, __func__, __LINE__) +# define Calloc(n, s) memCalloc((n), (s), __FILE__, __func__, __LINE__) +# define Malloc(s) memMalloc((s), __FILE__, __func__, __LINE__) +# define Free(p) memFree((p), __FILE__, __func__, __LINE__) +#else +# define Realloc(p, s) memRealloc((p), (s), __FILE__, (void *) NULL, __LINE__) +# define Calloc(n, s) memCalloc((n), (s), __FILE__, (void *) NULL, __LINE__) +# define Malloc(s) memMalloc((s), __FILE__, (void *) NULL, __LINE__) +# define Free(p) memFree((p), __FILE__, (void *) NULL, __LINE__) +#endif + +#endif /* DEBUG_MEMORY */ + +// clang-format on + +#endif /* _DMEMORY_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDF_UTIL_H_ +#define CDF_UTIL_H_ + +#include <stdbool.h> + +bool xtypeIsText(int xtype); + +int get_time_units(size_t len, const char *ptu); + +bool is_time_units(const char *timeunits); +bool is_timeaxis_units(const char *timeunits); + +bool is_height_units(const char *units); +bool is_pressure_units(const char *units); +bool is_DBL_axis(/*const char *units,*/ const char *longname); +bool is_depth_axis(const char *stdname, const char *longname); +bool is_height_axis(const char *stdname, const char *longname); +bool is_altitude_axis(const char *stdname, const char *longname); +bool is_reference_axis(const char *stdname, const char *longname); + +bool is_lon_axis(const char *units, const char *stdname); +bool is_lat_axis(const char *units, const char *stdname); + +bool is_x_axis(const char *units, const char *stdname); +bool is_y_axis(const char *units, const char *stdname); + +void cdf_set_gridtype(const char *attstring, int *gridtype); +void cdf_set_zaxistype(const char *attstring, int *zaxistype); +int attribute_to_calendar(const char *attstring); + +#endif +#include <string.h> +#include <ctype.h> + + +char * +str_to_lower(char *str) +{ + if (str) + for (size_t i = 0; str[i]; ++i) str[i] = (char) tolower((int) str[i]); + + return str; +} + +bool +strStartsWith(const char *vstr, const char *cstr) +{ + bool is_equal = false; + if (vstr && cstr) + { + const size_t clen = strlen(cstr); + const size_t vlen = strlen(vstr); + if (clen <= vlen) is_equal = (memcmp(vstr, cstr, clen) == 0); + } + return is_equal; +} + +int +get_time_units(size_t len, const char *ptu) +{ + int timeunit = -1; + + while (isspace(*ptu) && len) + { + ptu++; + len--; + } + + // clang-format off + if (len > 2) + { + if (strStartsWith(ptu, "sec")) timeunit = TUNIT_SECOND; + else if (strStartsWith(ptu, "minute")) timeunit = TUNIT_MINUTE; + else if (strStartsWith(ptu, "hour")) timeunit = TUNIT_HOUR; + else if (strStartsWith(ptu, "day")) timeunit = TUNIT_DAY; + else if (strStartsWith(ptu, "month")) timeunit = TUNIT_MONTH; + else if (strStartsWith(ptu, "calendar_month")) timeunit = TUNIT_MONTH; + else if (strStartsWith(ptu, "year")) timeunit = TUNIT_YEAR; + } + else if (len == 1 && ptu[0] == 's') timeunit = TUNIT_SECOND; + // clang-format on + + return timeunit; +} + +bool +is_time_units(const char *timeunits) +{ + while (isspace(*timeunits)) timeunits++; + + // clang-format off + return (strStartsWith(timeunits, "sec") + || strStartsWith(timeunits, "minute") + || strStartsWith(timeunits, "hour") + || strStartsWith(timeunits, "day") + || strStartsWith(timeunits, "month") + || strStartsWith(timeunits, "calendar_month") + || strStartsWith(timeunits, "year")); + // clang-format on +} + +bool +is_timeaxis_units(const char *timeunits) +{ + bool status = false; + + const size_t len = strlen(timeunits); + char *tu = (char *) malloc((len + 1) * sizeof(char)); + + for (size_t i = 0; i < len; i++) tu[i] = (char) tolower((int) timeunits[i]); + + int timeunit = get_time_units(len, tu); + if (timeunit != -1) + { + size_t pos = 0; + while (!isspace(tu[pos]) && tu[pos] != 0) pos++; + if (tu[pos]) + { + while (isspace(tu[pos])) pos++; + + status = strStartsWith(tu + pos, "as") || strStartsWith(tu + pos, "since"); + } + } + + free(tu); + + return status; +} + +bool +is_height_units(const char *units) +{ + int u0 = units[0]; + + // clang-format off + return ((u0=='m' && (!units[1] || strStartsWith(units, "meter"))) + || (!units[2] && units[1]=='m' && (u0=='c' || u0=='d' || u0=='k')) + || (strStartsWith(units, "decimeter")) + || (strStartsWith(units, "centimeter")) + || (strStartsWith(units, "millimeter")) + || (strStartsWith(units, "kilometer"))); + // clang-format on +} + +bool +is_pressure_units(const char *units) +{ + // clang-format off + return (strStartsWith(units, "millibar") + || strStartsWith(units, "mb") + || strStartsWith(units, "hectopas") + || strStartsWith(units, "hPa") + || strStartsWith(units, "Pa")); + // clang-format on +} + +bool +is_DBL_axis(const char *longname) +{ + // clang-format off + return (str_is_equal(longname, "depth below land") + || str_is_equal(longname, "depth_below_land") + || str_is_equal(longname, "levels below the surface")); + // clang-format on +} + +bool +is_depth_axis(const char *stdname, const char *longname) +{ + // clang-format off + return (str_is_equal(stdname, "depth") + || str_is_equal(longname, "depth_below_sea") + || str_is_equal(longname, "depth below sea")); + // clang-format ofn +} + + +bool is_height_axis(const char *stdname, const char *longname) +{ + // clang-format off + return (str_is_equal(stdname, "height") + || str_is_equal(longname, "height") + || str_is_equal(longname, "height above the surface")); + // clang-format on +} + +bool +is_altitude_axis(const char *stdname, const char *longname) +{ + // clang-format off + return (str_is_equal(stdname, "altitude") + || str_is_equal(longname, "altitude")); + // clang-format on +} + +bool +is_reference_axis(const char *stdname, const char *longname) +{ + // clang-format off + return ((str_is_equal(longname, "generalized_height") || str_is_equal(longname, "generalized height")) + && str_is_equal(stdname, "height")); + // clang-format on +} + +bool +is_lon_axis(const char *units, const char *stdname) +{ + bool status = false; + char lc_units[16]; + + memcpy(lc_units, units, 15); + lc_units[15] = 0; + str_to_lower(lc_units); + + if ((strStartsWith(lc_units, "degree") || strStartsWith(lc_units, "radian")) + && (strStartsWith(stdname, "grid_longitude") || strStartsWith(stdname, "longitude"))) + { + status = true; + } + else if (strStartsWith(lc_units, "degree") && !strStartsWith(stdname, "grid_latitude") && !strStartsWith(stdname, "latitude")) + { + int ioff = 6; + if (lc_units[ioff] == 's') ioff++; + if (lc_units[ioff] == ' ') ioff++; + if (lc_units[ioff] == '_') ioff++; + if (lc_units[ioff] == 'e') status = true; + } + + return status; +} + +bool +is_lat_axis(const char *units, const char *stdname) +{ + bool status = false; + char lc_units[16]; + + memcpy(lc_units, units, 15); + lc_units[15] = 0; + str_to_lower(lc_units); + + if ((strStartsWith(lc_units, "degree") || strStartsWith(lc_units, "radian")) + && (strStartsWith(stdname, "grid_latitude") || strStartsWith(stdname, "latitude"))) + { + status = true; + } + else if (strStartsWith(lc_units, "degree") && !strStartsWith(stdname, "grid_longitude") && !strStartsWith(stdname, "longitude")) + { + int ioff = 6; + if (lc_units[ioff] == 's') ioff++; + if (lc_units[ioff] == ' ') ioff++; + if (lc_units[ioff] == '_') ioff++; + if (lc_units[ioff] == 'n' || lc_units[ioff] == 's') status = true; + } + + return status; +} + +bool +is_x_axis(const char *units, const char *stdname) +{ + (void) units; + return (str_is_equal(stdname, "projection_x_coordinate")); +} + +bool +is_y_axis(const char *units, const char *stdname) +{ + (void) units; + return (str_is_equal(stdname, "projection_y_coordinate")); +} + +void +cdf_set_gridtype(const char *attstring, int *gridtype) +{ + // clang-format off + if (str_is_equal(attstring, "gaussian_reduced")) *gridtype = GRID_GAUSSIAN_REDUCED; + else if (str_is_equal(attstring, "gaussian")) *gridtype = GRID_GAUSSIAN; + else if (strStartsWith(attstring, "spectral")) *gridtype = GRID_SPECTRAL; + else if (strStartsWith(attstring, "fourier")) *gridtype = GRID_FOURIER; + else if (str_is_equal(attstring, "trajectory")) *gridtype = GRID_TRAJECTORY; + else if (str_is_equal(attstring, "generic")) *gridtype = GRID_GENERIC; + else if (str_is_equal(attstring, "cell")) *gridtype = GRID_UNSTRUCTURED; + else if (str_is_equal(attstring, "unstructured")) *gridtype = GRID_UNSTRUCTURED; + else if (str_is_equal(attstring, "curvilinear")) ; + else if (str_is_equal(attstring, "characterxy")) *gridtype = GRID_CHARXY; + else if (str_is_equal(attstring, "sinusoidal")) ; + else if (str_is_equal(attstring, "laea")) ; + else if (str_is_equal(attstring, "lcc2")) ; + else if (str_is_equal(attstring, "linear")) ; // ignore grid type linear + else + { + static bool warn = true; + if (warn) + { + warn = false; + Warning("NetCDF attribute grid_type='%s' unsupported!", attstring); + } + } + // clang-format on +} + +void +cdf_set_zaxistype(const char *attstring, int *zaxistype) +{ + // clang-format off + if (str_is_equal(attstring, "toa")) *zaxistype = ZAXIS_TOA; + else if (str_is_equal(attstring, "tropopause")) *zaxistype = ZAXIS_TROPOPAUSE; + else if (str_is_equal(attstring, "cloudbase")) *zaxistype = ZAXIS_CLOUD_BASE; + else if (str_is_equal(attstring, "cloudtop")) *zaxistype = ZAXIS_CLOUD_TOP; + else if (str_is_equal(attstring, "isotherm0")) *zaxistype = ZAXIS_ISOTHERM_ZERO; + else if (str_is_equal(attstring, "seabottom")) *zaxistype = ZAXIS_SEA_BOTTOM; + else if (str_is_equal(attstring, "lakebottom")) *zaxistype = ZAXIS_LAKE_BOTTOM; + else if (str_is_equal(attstring, "sedimentbottom")) *zaxistype = ZAXIS_SEDIMENT_BOTTOM; + else if (str_is_equal(attstring, "sedimentbottomta")) *zaxistype = ZAXIS_SEDIMENT_BOTTOM_TA; + else if (str_is_equal(attstring, "sedimentbottomtw")) *zaxistype = ZAXIS_SEDIMENT_BOTTOM_TW; + else if (str_is_equal(attstring, "mixlayer")) *zaxistype = ZAXIS_MIX_LAYER; + else if (str_is_equal(attstring, "atmosphere")) *zaxistype = ZAXIS_ATMOSPHERE; + else + { + static bool warn = true; + if (warn) + { + warn = false; + Warning("NetCDF attribute level_type='%s' unsupported!", attstring); + } + } + // clang-format on +} + +int +attribute_to_calendar(const char *attstring) +{ + int calendar = CALENDAR_STANDARD; + // clang-format off + if (strStartsWith(attstring, "standard")) calendar = CALENDAR_STANDARD; + else if (strStartsWith(attstring, "gregorian")) calendar = CALENDAR_GREGORIAN; + else if (strStartsWith(attstring, "none")) calendar = CALENDAR_NONE; + else if (strStartsWith(attstring, "proleptic")) calendar = CALENDAR_PROLEPTIC; + else if (strStartsWith(attstring, "360")) calendar = CALENDAR_360DAYS; + else if (strStartsWith(attstring, "365") || + strStartsWith(attstring, "noleap")) calendar = CALENDAR_365DAYS; + else if (strStartsWith(attstring, "366") || + strStartsWith(attstring, "all_leap")) calendar = CALENDAR_366DAYS; + else Warning("calendar >%s< unsupported!", attstring); + // clang-format on + return calendar; +} +#ifndef CDI_KEY_H +#define CDI_KEY_H + + +// CDI key +typedef struct +{ + int key; // CDI key + int type; // KEY_INT, KEY_FLOAT, KEY_BYTES + int length; // number of bytes in v.s + union + { + int i; + double d; + unsigned char *s; + } v; +} cdi_key_t; + +typedef struct +{ + size_t nalloc; // number allocated >= nelems + size_t nelems; // length of the array + cdi_key_t value[MAX_KEYS]; +} cdi_keys_t; + +enum +{ + KEY_INT = 1, + KEY_FLOAT, + KEY_BYTES +}; + +void cdiDefVarKeyInt(cdi_keys_t *keysp, int key, int value); +void cdiDefVarKeyFloat(cdi_keys_t *keysp, int key, double value); +void cdiDefVarKeyBytes(cdi_keys_t *keysp, int key, const unsigned char *bytes, int length); +int cdiInqVarKeyInt(const cdi_keys_t *keysp, int key); +int cdiInqVarKeyBytes(const cdi_keys_t *keysp, int key, unsigned char *bytes, int *length); + +cdi_key_t *find_key(cdi_keys_t *keysp, int key); +const char *cdiInqVarKeyStringPtr(const cdi_keys_t *keysp, int key); + +static inline const char * +cdiInqVarKeyString(const cdi_keys_t *keysp, int key) +{ + const char *string = cdiInqVarKeyStringPtr(keysp, key); + if (string == NULL) string = ""; + return string; +} + +int cdiCopyVarKey(const cdi_keys_t *keysp1, int key, cdi_keys_t *keysp2); +void cdiCopyVarKeys(const cdi_keys_t *keysp1, cdi_keys_t *keysp2); +void cdiDeleteVarKeys(cdi_keys_t *keysp); +void cdiDeleteKeys(int cdiID, int varID); +void cdiPrintKeys(int cdiID, int varID); + +void cdiInitKeys(cdi_keys_t *keysp); + +int cdi_key_compare(cdi_keys_t *keyspa, cdi_keys_t *keyspb, int keynum); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDI_ATT_H +#define CDI_ATT_H + +#ifdef HAVE_CONFIG_H +#endif + +#ifndef CDI_LIMITS_H +#endif + +// CDI attribute +// clang-format off +typedef struct +{ + size_t xsz; // amount of space at xvalue + size_t namesz; // size of name + char *name; // attribute name + int indtype; // internal data type of xvalue (INT, FLT or TXT) + int exdtype; // external data type + // indtype exdtype + // TXT TXT + // INT INT16, INT32 + // FLT FLT32, FLT64 + size_t nelems; // number of elements + void *xvalue; // the actual data +} cdi_att_t; +// clang-format on + +// clang-format off +typedef struct +{ + size_t nalloc; // number allocated >= nelems + size_t nelems; // length of the array + cdi_att_t value[MAX_ATTRIBUTES]; +} cdi_atts_t; +// clang-format on + +int cdiDeleteAtts(int vlistID, int varID); +int cdiAttsGetSize(void *p, int varID, void *context); +void cdiAttsPack(void *p, int varID, void *buf, int size, int *position, void *context); +void cdiAttsUnpack(int cdiID, int varID, void *buf, int size, int *position, void *context); + +int cdi_att_compare(cdi_atts_t *attspa, cdi_atts_t *attspb, int attnum); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef GRID_H +#define GRID_H + +#include <stdbool.h> + + +typedef unsigned char mask_t; + +typedef struct grid_t grid_t; + +enum gridPropInq +{ + GRID_PROP_MASK, + GRID_PROP_MASK_GME, + GRID_PROP_XVALS, + GRID_PROP_YVALS, + GRID_PROP_AREA, + GRID_PROP_XBOUNDS, + GRID_PROP_YBOUNDS, +}; + +struct gridVirtTable +{ + void (*destroy)(grid_t *gridptr); + grid_t *(*copy)(grid_t *gridptr); + void (*copyScalarFields)(grid_t *gridptrOrig, grid_t *gridptrDup); + void (*copyArrayFields)(grid_t *gridptrOrig, grid_t *gridptrDup); + void (*defXVals)(grid_t *gridptr, const double *xvals); + void (*defYVals)(grid_t *gridptr, const double *yvals); + void (*defMask)(grid_t *gridptr, const int *mask); + void (*defMaskGME)(grid_t *gridptr, const int *mask); + void (*defXBounds)(grid_t *gridptr, const double *xbounds); + void (*defYBounds)(grid_t *gridptr, const double *ybounds); + void (*defArea)(grid_t *gridptr, const double *area); + double (*inqXVal)(grid_t *gridptr, SizeType index); + double (*inqYVal)(grid_t *gridptr, SizeType index); + SizeType (*inqXVals)(grid_t *gridptr, double *xvals); + SizeType (*inqXValsPart)(grid_t *gridptr, int start, SizeType length, double *xvals); + SizeType (*inqYVals)(grid_t *gridptr, double *yvals); + SizeType (*inqYValsPart)(grid_t *gridptr, int start, SizeType length, double *yvals); + const double *(*inqXValsPtr)(grid_t *gridptr); + const double *(*inqYValsPtr)(grid_t *gridptr); +#ifndef USE_MPI + int (*inqXIsc)(grid_t *gridptr); + int (*inqYIsc)(grid_t *gridptr); + SizeType (*inqXCvals)(grid_t *gridptr, char **xcvals); + SizeType (*inqYCvals)(grid_t *gridptr, char **ycvals); + const char **(*inqXCvalsPtr)(grid_t *gridptr); + const char **(*inqYCvalsPtr)(grid_t *gridptr); +#endif + double (*inqXInc)(grid_t *gridptr); + double (*inqYInc)(grid_t *gridptr); + // return true if for both grids, any xval and all yval differ + bool (*compareXYFull)(grid_t *gridRef, grid_t *gridTest); + // return if for both grids, x[0], y[0], x[size-1] and y[size-1] are respectively equal + bool (*compareXYAO)(grid_t *gridRef, grid_t *gridTest); + void (*inqArea)(grid_t *gridptr, double *area); + const double *(*inqAreaPtr)(grid_t *gridptr); + /* return 1 if inq property is set */ + int (*inqPropPresence)(grid_t *gridptr, enum gridPropInq inq); + SizeType (*inqMask)(grid_t *gridptr, int *mask); + int (*inqMaskGME)(grid_t *gridptr, int *mask_gme); + SizeType (*inqXBounds)(grid_t *gridptr, double *xbounds); + SizeType (*inqYBounds)(grid_t *gridptr, double *ybounds); + const double *(*inqXBoundsPtr)(grid_t *gridptr); + const double *(*inqYBoundsPtr)(grid_t *gridptr); + int txCode; + int (*getPackSize)(grid_t *gridptr, void *context); + int (*getPackSizeScalars)(grid_t *gridptr, void *context); + int (*getPackSizeArrays)(grid_t *gridptr, void *context); + int (*unpack)(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, int force_id); + grid_t *(*unpackScalars)(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, + int force_id, int *memberMaskP); + void (*unpackArrays)(grid_t *gridptr, int memberMask, char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, + int originNamespace, void *context); + void (*pack)(grid_t *gridptr, void *packBuffer, int packBufferSize, int *packBufferPos, void *context); + /* return member mask */ + int (*packScalars)(grid_t *gridptr, void *packBuffer, int packBufferSize, int *packBufferPos, void *context); + void (*packArrays)(grid_t *gridptr, int memberMask, void *packBuffer, int packBufferSize, int *packBufferPos, void *context); +}; + +struct gridaxis_t +{ + size_t size; // number of values + short flag; // 0: undefined 1:vals 2:first+inc + double first, last, inc; + double *vals; + double *bounds; + cdi_keys_t keys; +#ifndef USE_MPI + int clength; + char **cvals; +#endif +}; + +// GME Grid +struct grid_gme_t +{ + int nd, ni, ni2, ni3; // parameter for GRID_GME +}; + +struct grid_t +{ + char *name; + int self; + size_t size; + int type; // grid type + int datatype; // grid data type (used only internal in gridComplete()) + int proj; // grid projection + int projtype; // grid projection type + mask_t *mask; + mask_t *mask_gme; + double *area; + struct grid_gme_t gme; + int trunc; // parameter for GRID_SPECTRAL + int nvertex; + int *reducedPoints; + int reducedPointsSize; + int np; // number of parallels between a pole and the equator + signed char isCyclic; // three possible states: + // -1 if unknown, + // 0 if found not cyclic, or + // 1 for global cyclic grids + bool lcomplex; + bool hasdims; + struct gridaxis_t x; + struct gridaxis_t y; + const struct gridVirtTable *vtable; + cdi_keys_t keys; + cdi_atts_t atts; + void *extraData; +}; + +void grid_init(grid_t *gridptr); +void cdiGridTypeInit(grid_t *gridptr, int gridtype, size_t size); +void grid_free(grid_t *gridptr); +grid_t *grid_to_pointer(int gridID); +extern const struct gridVirtTable cdiGridVtable; + +unsigned cdiGridCount(void); + +void gridVerifyProj(int gridID); + +double gridInqXincInMeter(int gridID); +double gridInqYincInMeter(int gridID); + +// const double *gridInqXvalsPtr(int gridID); +// const double *gridInqYvalsPtr(int gridID); + +const char **gridInqXCvalsPtr(int gridID); +const char **gridInqYCvalsPtr(int gridID); + +// const double *gridInqXboundsPtr(int gridID); +// const double *gridInqYboundsPtr(int gridID); +const double *gridInqAreaPtr(int gridID); + +int gridInqPropPresence(int gridID, enum gridPropInq inq); + +int gridGenerate(const grid_t *grid); + +// int gridIsEqual(int gridID1, int gridID2); + +void cdiGridGetIndexList(unsigned, int *); + +int gridUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, int force_id); + +/* apply func to each grid */ +enum cdiApplyRet cdiGridApply(enum cdiApplyRet (*func)(int id, void *res, void *data), void *data); + +struct addIfNewRes +{ + int Id; + int isNew; +}; + +struct addIfNewRes cdiVlistAddGridIfNew(int vlistID, grid_t *grid, int mode); + +int gridVerifyProjParamsLCC(struct CDI_GridProjParams *gpp); +int gridVerifyProjParamsSTERE(struct CDI_GridProjParams *gpp); + +bool isGaussianLatitudes(size_t nlats, const double *latitudes); +void gaussianLatitudes(size_t nlats, double *latitudes, double *weights); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _STREAM_CDF_H +#define _STREAM_CDF_H + + +enum +{ + POSITIVE_UP = 1, + POSITIVE_DOWN = 2, +}; + +enum +{ + CDF_MAX_TIME_UNIT_STR /* maximum length of time unit string */ + = TAXIS_MAX_UNIT_STR_LEN /* longest result from tunitNamePtr */ + + 7 /* room for " since " */ + + 7 + 1 + 2 + 1 + 2 /* room for year with 7 digits, + * dashes and 2 digits for month and day */ + + 1 + 2 + 1 + 2 + 1 + 2 /* room for " " and 2 digit hour, minute, + * second */ + + 1 /* and terminating '\0' */ +}; + +int cdfDefVar(stream_t *streamptr, int varID); +void cdfDefCoordinateVars(stream_t *streamptr); +void cdfDefTimestep(stream_t *streamptr, int tsID, size_t valCount); +int cdfInqTimestep(stream_t *streamptr, int tsID); +int cdfInqContents(stream_t *streamptr); + +void cdfEndDef(stream_t *streamptr); +void cdfDefRecord(stream_t *streamptr); + +void cdfCopyRecord(stream_t *streamptr2, stream_t *streamptr1); + +void cdfDefineAttributes(int vlistID, int varID, int fileID, int ncvarID); + +void cdf_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss); +void cdf_write_record(stream_t *streamptr, int memtype, const void *data, size_t nmiss); + +void cdf_read_var(stream_t *streamptr, int varID, int memtype, void *data, size_t *nmiss); +void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data, size_t nmiss); + +void cdf_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, size_t *nmiss); +void cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, size_t nmiss); + +void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype, const int rect[][2], const void *data, size_t nmiss); + +void cdfDefVarDeflate(int ncid, int ncvarid, int deflateLevel); +void cdfDefTime(stream_t *streamptr); + +void cdf_scale_add(size_t size, double *data, double addoffset, double scalefactor); + +int cdfDefDatatype(int datatype, stream_t *streamptr); + +void cdf_create_records(stream_t *streamptr, int tsID); + +#define ChunkSizeMax 65536 +#define ChunkSizeLim 16777216 +size_t calc_chunksize_x(int chunkType, int chunkSize, size_t xsize, bool yIsUndefined); +size_t calc_chunksize_y(int chunkType, size_t gridsize, size_t xsize, size_t ysize); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDF_LAZY_GRID_H_ +#define CDF_LAZY_GRID_H_ + +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_MMAP +#include <unistd.h> +#include <sys/mman.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#endif + +#ifdef HAVE_LIBPTHREAD +#include <pthread.h> +#endif + +#include <string.h> + + +struct xyValGet +{ + double scalefactor, addoffset; + size_t start[3], count[3], size, dimsize; + int datasetNCId, varNCId; + short ndims; +}; + +struct cdfLazyGridIds +{ + int datasetNCId, varNCId; +}; + +struct cdfLazyGrid +{ + grid_t base; + const struct gridVirtTable *baseVtable; + struct cdfLazyGridIds cellAreaGet, xBoundsGet, yBoundsGet; + struct xyValGet xValsGet, yValsGet; +#ifdef HAVE_LIBPTHREAD + pthread_mutex_t loadSerialize; +#endif +}; + +extern double *cdfPendingLoad; + +void cdfLazyGridRenew(struct cdfLazyGrid *restrict *restrict gridpptr, int gridtype); +void cdfBaseGridRenew(struct cdfLazyGrid *restrict *restrict gridpptr, int gridtype); + +void cdfLazyGridDestroy(struct cdfLazyGrid *lazyGrid); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBNETCDF + +static struct gridVirtTable cdfLazyGridVtable; +double *cdfPendingLoad; +#ifdef HAVE_LIBPTHREAD +static pthread_once_t cdfLazyInitialized = PTHREAD_ONCE_INIT; +#else +static bool cdfLazyInitialized; +#endif + +#ifdef HAVE_LIBPTHREAD +#define lock_lazy_load(plGrid) pthread_mutex_lock(&((plGrid)->loadSerialize)) +#define unlock_lazy_load(plGrid) pthread_mutex_unlock(&((plGrid)->loadSerialize)) +#define destroy_lazy_load_lock(plGrid) pthread_mutex_destroy(&((plGrid)->loadSerialize)) +#define init_lazy_load_lock(plGrid) pthread_mutex_init(&((plGrid)->loadSerialize), NULL) +#else +#define lock_lazy_load(plGrid) +#define unlock_lazy_load(plGrid) +#define destroy_lazy_load_lock(plGrid) +#define init_lazy_load_lock(plGrid) +#endif + +void +cdfLazyGridDestroy(struct cdfLazyGrid *lazyGrid) +{ + lazyGrid->base.extraData = NULL; + if (lazyGrid->base.area == cdfPendingLoad) lazyGrid->base.area = NULL; + if (lazyGrid->base.x.vals == cdfPendingLoad) lazyGrid->base.x.vals = NULL; + if (lazyGrid->base.y.vals == cdfPendingLoad) lazyGrid->base.y.vals = NULL; + if (lazyGrid->base.x.bounds == cdfPendingLoad) lazyGrid->base.x.bounds = NULL; + if (lazyGrid->base.y.bounds == cdfPendingLoad) lazyGrid->base.y.bounds = NULL; + destroy_lazy_load_lock(lazyGrid); +} + +static void +cdfLazyGridDelete(grid_t *grid) +{ + struct cdfLazyGrid *cdfGrid = (struct cdfLazyGrid *) grid; + void (*baseDestroy)(grid_t * grid) = cdfGrid->baseVtable->destroy; + cdfLazyGridDestroy(cdfGrid); + baseDestroy(grid); +} + +static void +cdfLazyGridDestroyOnce(void) +{ + /* +#ifdef HAVE_MMAP + size_t pgSize = cdiGetPageSize(false); + munmap(cdfPendingLoad, pgSize); +#endif + */ +} + +static void +cdfLazyGridDefArea(grid_t *grid, const double *area) +{ + struct cdfLazyGrid *cdfGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(cdfGrid); + if (grid->area == cdfPendingLoad) grid->area = NULL; + cdfGrid->cellAreaGet.datasetNCId = -1; + cdfGrid->cellAreaGet.varNCId = -1; + cdfGrid->baseVtable->defArea(grid, area); + unlock_lazy_load(cdfGrid); +} + +static const double * +cdfLazyGridInqAreaPtr(grid_t *grid) +{ + struct cdfLazyGrid *lazyGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(lazyGrid); + if (grid->area == cdfPendingLoad) + { + grid->area = (double *) Malloc(grid->size * sizeof(double)); + cdf_get_var_double(lazyGrid->cellAreaGet.datasetNCId, lazyGrid->cellAreaGet.varNCId, grid->area); + } + unlock_lazy_load(lazyGrid); + return lazyGrid->baseVtable->inqAreaPtr(grid); +} + +static void +cdfLazyGridInqArea(grid_t *grid, double *area) +{ + grid->vtable->inqAreaPtr(grid); + struct cdfLazyGrid *lazyGrid = (struct cdfLazyGrid *) grid; + lazyGrid->baseVtable->inqArea(grid, area); +} + +static void +cdfLazyLoadXYVals(struct xyValGet *valsGet, double **valsp) +{ + double *grid_vals = (double *) Malloc(valsGet->size * sizeof(double)); + *valsp = grid_vals; + if (valsGet->ndims == 3) + cdf_get_vara_double(valsGet->datasetNCId, valsGet->varNCId, valsGet->start, valsGet->count, grid_vals); + else + cdf_get_var_double(valsGet->datasetNCId, valsGet->varNCId, grid_vals); + cdf_scale_add(valsGet->size, grid_vals, valsGet->addoffset, valsGet->scalefactor); +} + +static const double * +cdfLazyGridInqXValsPtr(grid_t *grid) +{ + struct cdfLazyGrid *lazyGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(lazyGrid); + if (grid->x.vals == cdfPendingLoad) cdfLazyLoadXYVals(&lazyGrid->xValsGet, &grid->x.vals); + unlock_lazy_load(lazyGrid); + return lazyGrid->baseVtable->inqXValsPtr(grid); +} + +static const double * +cdfLazyGridInqYValsPtr(grid_t *grid) +{ + struct cdfLazyGrid *lazyGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(lazyGrid); + if (grid->y.vals == cdfPendingLoad) cdfLazyLoadXYVals(&lazyGrid->yValsGet, &grid->y.vals); + unlock_lazy_load(lazyGrid); + return lazyGrid->baseVtable->inqYValsPtr(grid); +} + +static double +cdfLazyGridInqXYVal(grid_t *grid, size_t index, const struct xyValGet *valsGet, double *vals, + const double *(*inqValsPtr)(grid_t *gridptr)) +{ + size_t size = valsGet->size; + double v; + if (vals == cdfPendingLoad) + { + // prevent full load if only first/last values get inspected + if (index == 0 || index == size - 1) + { + size_t indexND[3]; + if (valsGet->ndims == 3) + { + indexND[0] = 0; + indexND[1] = index / valsGet->count[2]; + indexND[2] = index % valsGet->count[2]; + } + else if (valsGet->ndims == 2) + { + indexND[0] = index / grid->x.size; + indexND[1] = index % grid->x.size; + } + else + indexND[0] = index; + cdf_get_var1_double(valsGet->datasetNCId, valsGet->varNCId, indexND, &v); + } + else + { + const double *grid_vals = inqValsPtr(grid); + v = grid_vals[index]; + } + } + else if (vals) + v = vals[index]; + else + v = 0.0; + + return v; +} + +static void +cdfLazyGridDefXVals(grid_t *grid, const double *vals) +{ + struct cdfLazyGrid *cdfGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(cdfGrid); + if (grid->x.vals == cdfPendingLoad) grid->x.vals = NULL; + cdfGrid->xValsGet.datasetNCId = -1; + cdfGrid->xValsGet.varNCId = -1; + cdfGrid->baseVtable->defXVals(grid, vals); + unlock_lazy_load(cdfGrid); +} + +static void +cdfLazyGridDefYVals(grid_t *grid, const double *vals) +{ + struct cdfLazyGrid *cdfGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(cdfGrid); + if (grid->y.vals == cdfPendingLoad) grid->y.vals = NULL; + cdfGrid->yValsGet.datasetNCId = -1; + cdfGrid->yValsGet.varNCId = -1; + cdfGrid->baseVtable->defYVals(grid, vals); + unlock_lazy_load(cdfGrid); +} + +static double +cdfLazyGridInqXVal(grid_t *grid, SizeType index) +{ + struct cdfLazyGrid *lazyGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(lazyGrid); + const double rv = cdfLazyGridInqXYVal(grid, index, &lazyGrid->xValsGet, grid->x.vals, grid->vtable->inqXValsPtr); + unlock_lazy_load(lazyGrid); + return rv; +} + +static double +cdfLazyGridInqYVal(grid_t *grid, SizeType index) +{ + struct cdfLazyGrid *lazyGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(lazyGrid); + const double rv = cdfLazyGridInqXYVal(grid, index, &lazyGrid->yValsGet, grid->y.vals, grid->vtable->inqYValsPtr); + unlock_lazy_load(lazyGrid); + return rv; +} + +static bool +cdfLazyXYValGetCompare(struct cdfLazyGrid *lazyGridRef, struct cdfLazyGrid *lazyGridTest) +{ + struct xyValGet *valsGetXRef = &lazyGridRef->xValsGet, *valsGetYRef = &lazyGridRef->yValsGet, + *valsGetXTest = &lazyGridTest->xValsGet, *valsGetYTest = &lazyGridTest->yValsGet; + if (valsGetXRef->datasetNCId == -1 || valsGetXTest->datasetNCId == -1 || valsGetYRef->datasetNCId == -1 + || valsGetYTest->datasetNCId == -1) + return lazyGridRef->baseVtable->compareXYFull(&lazyGridRef->base, &lazyGridTest->base); + + return valsGetXRef->datasetNCId != valsGetXTest->datasetNCId || valsGetXRef->varNCId != valsGetXTest->varNCId + || valsGetYRef->datasetNCId != valsGetYTest->datasetNCId || valsGetYRef->varNCId != valsGetYTest->varNCId; +} + +static bool +cdfLazyCompareXYFull(grid_t *gridRef, grid_t *gridTest) +{ + bool diff; + struct cdfLazyGrid *lazyGridRef = (struct cdfLazyGrid *) gridRef; + if (gridTest->vtable == &cdfLazyGridVtable) + diff = cdfLazyXYValGetCompare(lazyGridRef, (struct cdfLazyGrid *) gridTest); + else + diff = lazyGridRef->baseVtable->compareXYFull(gridRef, gridTest); + return diff; +} + +static bool +cdfLazyCompareXYAO(grid_t *gridRef, grid_t *gridTest) +{ + bool diff; + struct cdfLazyGrid *lazyGridRef = (struct cdfLazyGrid *) gridRef; + if (gridTest->vtable == &cdfLazyGridVtable) + diff = cdfLazyXYValGetCompare(lazyGridRef, (struct cdfLazyGrid *) gridTest); + else + diff = lazyGridRef->baseVtable->compareXYAO(gridRef, gridTest); + return diff; +} + +static const double * +cdfLazyGridInqXBoundsPtr(grid_t *grid) +{ + struct cdfLazyGrid *lazyGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(lazyGrid); + if (grid->x.bounds == cdfPendingLoad) + { + grid->x.bounds = (double *) Malloc((size_t) grid->nvertex * grid->size * sizeof(double)); + cdf_get_var_double(lazyGrid->xBoundsGet.datasetNCId, lazyGrid->xBoundsGet.varNCId, grid->x.bounds); + } + unlock_lazy_load(lazyGrid); + return lazyGrid->baseVtable->inqXBoundsPtr(grid); +} + +static void +cdfLazyGridDefXBounds(grid_t *grid, const double *xbounds) +{ + struct cdfLazyGrid *cdfGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(cdfGrid); + if (grid->x.bounds == cdfPendingLoad) grid->x.bounds = NULL; + cdfGrid->xBoundsGet.datasetNCId = -1; + cdfGrid->xBoundsGet.varNCId = -1; + cdfGrid->baseVtable->defXBounds(grid, xbounds); + unlock_lazy_load(cdfGrid); +} + +static void +cdfLazyGridDefYBounds(grid_t *grid, const double *ybounds) +{ + struct cdfLazyGrid *cdfGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(cdfGrid); + if (grid->y.bounds == cdfPendingLoad) grid->y.bounds = NULL; + cdfGrid->yBoundsGet.datasetNCId = -1; + cdfGrid->yBoundsGet.varNCId = -1; + cdfGrid->baseVtable->defYBounds(grid, ybounds); + unlock_lazy_load(cdfGrid); +} + +static const double * +cdfLazyGridInqYBoundsPtr(grid_t *grid) +{ + struct cdfLazyGrid *lazyGrid = (struct cdfLazyGrid *) grid; + lock_lazy_load(lazyGrid); + if (grid->y.bounds == cdfPendingLoad) + { + grid->y.bounds = (double *) Malloc((size_t) grid->nvertex * grid->size * sizeof(double)); + cdf_get_var_double(lazyGrid->yBoundsGet.datasetNCId, lazyGrid->yBoundsGet.varNCId, grid->y.bounds); + } + unlock_lazy_load(lazyGrid); + return lazyGrid->baseVtable->inqYBoundsPtr(grid); +} + +static void +cdfLazyGridCopyScalarFields(grid_t *gridptrOrig, grid_t *gridptrDup) +{ + struct cdfLazyGrid *lazyGridDup = (struct cdfLazyGrid *) gridptrDup, *lazyGridOrig = (struct cdfLazyGrid *) gridptrOrig; + lazyGridOrig->baseVtable->copyScalarFields(gridptrOrig, &lazyGridDup->base); + lazyGridDup->baseVtable = lazyGridOrig->baseVtable; + lazyGridDup->cellAreaGet = lazyGridOrig->cellAreaGet; + lazyGridDup->xBoundsGet = lazyGridOrig->xBoundsGet; + lazyGridDup->yBoundsGet = lazyGridOrig->yBoundsGet; + lazyGridDup->xValsGet = lazyGridOrig->xValsGet; + lazyGridDup->yValsGet = lazyGridOrig->yValsGet; + init_lazy_load_lock(lazyGridDup); +} + +static void +cdfLazyGridCopyArrayFields(grid_t *gridptrOrig, grid_t *gridptrDup) +{ + const size_t reducedPointsSize = (size_t) gridptrOrig->reducedPointsSize; + const size_t gridsize = gridptrOrig->size; + const int gridtype = gridptrOrig->type; + const int irregular = (gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED); + + if (reducedPointsSize) + { + gridptrDup->reducedPoints = (int *) Malloc(reducedPointsSize * sizeof(int)); + memcpy(gridptrDup->reducedPoints, gridptrOrig->reducedPoints, reducedPointsSize * sizeof(int)); + } + + if (gridptrOrig->x.vals != NULL && gridptrOrig->x.vals != cdfPendingLoad) + { + const size_t size = irregular ? gridsize : gridptrOrig->x.size; + gridptrDup->x.vals = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->x.vals, gridptrOrig->x.vals, size * sizeof(double)); + } + + if (gridptrOrig->y.vals != NULL && gridptrOrig->y.vals != cdfPendingLoad) + { + const size_t size = irregular ? gridsize : gridptrOrig->y.size; + gridptrDup->y.vals = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->y.vals, gridptrOrig->y.vals, size * sizeof(double)); + } + + if (gridptrOrig->x.bounds != NULL && gridptrOrig->x.bounds != cdfPendingLoad) + { + const size_t size = (irregular ? gridsize : gridptrOrig->x.size) * (size_t) gridptrOrig->nvertex; + gridptrDup->x.bounds = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->x.bounds, gridptrOrig->x.bounds, size * sizeof(double)); + } + + if (gridptrOrig->y.bounds != NULL && gridptrOrig->y.bounds != cdfPendingLoad) + { + const size_t size = (irregular ? gridsize : gridptrOrig->y.size) * (size_t) gridptrOrig->nvertex; + gridptrDup->y.bounds = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->y.bounds, gridptrOrig->y.bounds, size * sizeof(double)); + } + + { + if (gridptrOrig->area != NULL && gridptrOrig->area != cdfPendingLoad) + { + const size_t size = gridsize; + gridptrDup->area = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->area, gridptrOrig->area, size * sizeof(double)); + } + } + + if (gridptrOrig->mask != NULL) + { + const size_t size = gridsize; + gridptrDup->mask = (mask_t *) Malloc(size * sizeof(mask_t)); + memcpy(gridptrDup->mask, gridptrOrig->mask, size * sizeof(mask_t)); + } + + if (gridptrOrig->mask_gme != NULL) + { + const size_t size = gridsize; + gridptrDup->mask_gme = (mask_t *) Malloc(size * sizeof(mask_t)); + memcpy(gridptrDup->mask_gme, gridptrOrig->mask_gme, size * sizeof(mask_t)); + } +} + +static grid_t * +cdfLazyGridCopy(grid_t *gridptrOrig) +{ + struct cdfLazyGrid *lazyGridDup = (struct cdfLazyGrid *) Malloc(sizeof(*lazyGridDup)); + gridptrOrig->vtable->copyScalarFields(gridptrOrig, &lazyGridDup->base); + gridptrOrig->vtable->copyArrayFields(gridptrOrig, &lazyGridDup->base); + return &lazyGridDup->base; +} + +static void +cdfLazyGridInitOnce(void) +{ + cdfLazyGridVtable = cdiGridVtable; + cdfLazyGridVtable.destroy = cdfLazyGridDelete; + cdfLazyGridVtable.copy = cdfLazyGridCopy; + cdfLazyGridVtable.copyScalarFields = cdfLazyGridCopyScalarFields; + cdfLazyGridVtable.copyArrayFields = cdfLazyGridCopyArrayFields; + cdfLazyGridVtable.defArea = cdfLazyGridDefArea; + cdfLazyGridVtable.inqAreaPtr = cdfLazyGridInqAreaPtr; + cdfLazyGridVtable.inqArea = cdfLazyGridInqArea; + cdfLazyGridVtable.inqXValsPtr = cdfLazyGridInqXValsPtr; + cdfLazyGridVtable.inqYValsPtr = cdfLazyGridInqYValsPtr; + cdfLazyGridVtable.inqXVal = cdfLazyGridInqXVal; + cdfLazyGridVtable.inqYVal = cdfLazyGridInqYVal; + cdfLazyGridVtable.defXVals = cdfLazyGridDefXVals; + cdfLazyGridVtable.defYVals = cdfLazyGridDefYVals; + cdfLazyGridVtable.compareXYFull = cdfLazyCompareXYFull; + cdfLazyGridVtable.compareXYAO = cdfLazyCompareXYAO; + cdfLazyGridVtable.defXBounds = cdfLazyGridDefXBounds; + cdfLazyGridVtable.defYBounds = cdfLazyGridDefYBounds; + cdfLazyGridVtable.inqXBoundsPtr = cdfLazyGridInqXBoundsPtr; + cdfLazyGridVtable.inqYBoundsPtr = cdfLazyGridInqYBoundsPtr; + /* create inaccessible memory area, if possible, this serves as + * dummy value for pointers to data not yet loaded */ + /* +#ifdef HAVE_MMAP + { + size_t pgSize = cdiGetPageSize(false); + static const char devZero[] = "/dev/zero"; + int fd = open(devZero, O_RDWR); + if (fd == -1) + SysError("Could not open %s to map anonymous memory", devZero); + void *cdfInvalid = mmap(NULL, pgSize, PROT_NONE, MAP_PRIVATE, fd, 0); + if (cdfInvalid == MAP_FAILED) + SysError("Could not mmap anonymous memory"); + cdfPendingLoad = cdfInvalid; + int rc = close(fd); + if (rc == -1) + SysError("Could not close %s file handle %d after mapping anonymous" + " memory", devZero, fd); + } +#else + */ + cdfPendingLoad = (double *) &cdfPendingLoad; + //#endif + atexit(cdfLazyGridDestroyOnce); +#ifndef HAVE_LIBPTHREAD + cdfLazyInitialized = true; +#endif +} + +static void +cdfBaseGridInit(grid_t *grid, int gridtype) +{ + grid_init(grid); + cdiGridTypeInit(grid, gridtype, 0); +} + +static void +cdfLazyGridInit(struct cdfLazyGrid *grid, int gridtype) +{ +#ifdef HAVE_LIBPTHREAD + pthread_once(&cdfLazyInitialized, cdfLazyGridInitOnce); +#else + if (!cdfLazyInitialized) cdfLazyGridInitOnce(); +#endif + cdfBaseGridInit(&grid->base, gridtype); + grid->baseVtable = grid->base.vtable; + grid->cellAreaGet.datasetNCId = -1; + grid->cellAreaGet.varNCId = -1; + grid->xValsGet.datasetNCId = -1; + grid->xValsGet.varNCId = -1; + grid->yValsGet.datasetNCId = -1; + grid->yValsGet.varNCId = -1; + grid->xBoundsGet.datasetNCId = -1; + grid->xBoundsGet.varNCId = -1; + grid->yBoundsGet.datasetNCId = -1; + grid->yBoundsGet.varNCId = -1; + grid->base.vtable = &cdfLazyGridVtable; + init_lazy_load_lock(grid); +} + +void +cdfLazyGridRenew(struct cdfLazyGrid *restrict *restrict gridpptr, int gridtype) +{ + struct cdfLazyGrid *restrict grid = *gridpptr; + if (!grid) *gridpptr = grid = (struct cdfLazyGrid *) Malloc(sizeof(*grid)); + cdfLazyGridInit(grid, gridtype); +} + +void +cdfBaseGridRenew(struct cdfLazyGrid *restrict *restrict gridpptr, int gridtype) +{ + struct cdfLazyGrid *restrict grid = *gridpptr; + if (!grid) *gridpptr = grid = (struct cdfLazyGrid *) Malloc(sizeof(grid_t)); + cdfBaseGridInit((grid_t *) grid, gridtype); +} + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDI_CKSUM_H_ +#define CDI_CKSUM_H_ + +#include <inttypes.h> + +/* single checksum computation over one array */ +uint32_t cdiCheckSum(int type, int count, const void *data); + +/* composable check-sum computation, + * 0. datatype, + * 1. init, + * 2. partial, appendable computation, and + * 3. final checksum-computation + */ +struct cdiCheckSumState +{ + uint32_t sum; + off_t len; +}; + +void cdiCheckSumRStart(struct cdiCheckSumState *state); +void cdiCheckSumRAdd(struct cdiCheckSumState *state, int type, int count, const void *data); +uint32_t cdiCheckSumRValue(struct cdiCheckSumState state); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <inttypes.h> +#include <sys/types.h> + +void memcrc_r(uint32_t *state, const unsigned char *block, size_t block_len); + +void memcrc_r_eswap(uint32_t *state, const unsigned char *elems, size_t num_elems, size_t elem_size); + +uint32_t memcrc_finish(uint32_t *state, off_t total_size); + +uint32_t memcrc(const unsigned char *b, size_t n); + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifndef SERIALIZE_H +#define SERIALIZE_H + +#include <string.h> + +#ifndef CDI_CKSUM_H_ +#endif +#ifndef CDI_KEY_H_ +#endif +#ifndef ERROR_H +#endif + +/* + * Generic interfaces for (de-)marshalling + */ +int serializeGetSize(int count, int datatype, void *context); +void serializePack(const void *data, int count, int datatype, void *buf, int buf_size, int *position, void *context); +void serializeUnpack(const void *buf, int buf_size, int *position, void *data, int count, int datatype, void *context); + +/* + * (de-)marshalling function for key/value structures + */ +static inline int +serializeKeysGetPackSize(const cdi_keys_t *keysp, void *context) +{ + int packBuffSize = 0; + + int nelems = keysp->nelems; + packBuffSize += serializeGetSize(1, CDI_DATATYPE_INT, context); + for (int keyid = 0; keyid < nelems; keyid++) + { + const cdi_key_t *keyp = &(keysp->value[keyid]); + int type = keyp->type; + packBuffSize += serializeGetSize(1, CDI_DATATYPE_INT, context); // key + packBuffSize += serializeGetSize(1, CDI_DATATYPE_INT, context); // type + if (type == KEY_BYTES) + { + int length = keyp->length; + packBuffSize += serializeGetSize(1, CDI_DATATYPE_INT, context) + serializeGetSize(length, CDI_DATATYPE_TXT, context); + } + else if (type == KEY_INT) + { + packBuffSize += serializeGetSize(1, CDI_DATATYPE_INT, context); + } + else if (type == KEY_FLOAT) + { + packBuffSize += serializeGetSize(1, CDI_DATATYPE_FLT64, context); + } + } + packBuffSize += serializeGetSize(1, CDI_DATATYPE_UINT32, context); + return packBuffSize; +} + +static inline void +serializeKeysPack(const cdi_keys_t *keysp, void *buf, int buf_size, int *position, void *context) +{ + uint32_t d = 0; + + int nelems = keysp->nelems; + serializePack(&nelems, 1, CDI_DATATYPE_INT, buf, buf_size, position, context); + for (int keyid = 0; keyid < nelems; keyid++) + { + const cdi_key_t *keyp = &(keysp->value[keyid]); + int key = keyp->key; + int type = keyp->type; + serializePack(&key, 1, CDI_DATATYPE_INT, buf, buf_size, position, context); + serializePack(&type, 1, CDI_DATATYPE_INT, buf, buf_size, position, context); + if (type == KEY_BYTES) + { + int length = keyp->length; + serializePack(&length, 1, CDI_DATATYPE_INT, buf, buf_size, position, context); + serializePack(keyp->v.s, length, CDI_DATATYPE_TXT, buf, buf_size, position, context); + d ^= cdiCheckSum(CDI_DATATYPE_TXT, length, keyp->v.s); + } + else if (type == KEY_INT) + { + serializePack(&keyp->v.i, 1, CDI_DATATYPE_INT, buf, buf_size, position, context); + } + else if (type == KEY_FLOAT) + { + serializePack(&keyp->v.d, 1, CDI_DATATYPE_FLT64, buf, buf_size, position, context); + } + } + + serializePack(&d, 1, CDI_DATATYPE_UINT32, buf, buf_size, position, context); +} + +static inline void +serializeKeysUnpack(const void *buf, int buf_size, int *position, cdi_keys_t *keysp, void *context) +{ + uint32_t d, d2 = 0; + void *buffer = NULL; + int buffersize = 0; + + int nelems; + serializeUnpack(buf, buf_size, position, &nelems, 1, CDI_DATATYPE_INT, context); + for (int i = 0; i < nelems; ++i) + { + int key, type; + serializeUnpack(buf, buf_size, position, &key, 1, CDI_DATATYPE_INT, context); + serializeUnpack(buf, buf_size, position, &type, 1, CDI_DATATYPE_INT, context); + if (type == KEY_BYTES) + { + int length; + serializeUnpack(buf, buf_size, position, &length, 1, CDI_DATATYPE_INT, context); + if (length > buffersize) + { + buffersize = length; + buffer = realloc(buffer, buffersize); + } + serializeUnpack(buf, buf_size, position, buffer, length, CDI_DATATYPE_TXT, context); + cdiDefVarKeyBytes(keysp, key, (unsigned char *) buffer, length); + d2 ^= cdiCheckSum(CDI_DATATYPE_TXT, length, buffer); + } + else if (type == KEY_INT) + { + int ival; + serializeUnpack(buf, buf_size, position, &ival, 1, CDI_DATATYPE_INT, context); + cdiDefVarKeyInt(keysp, key, ival); + } + else if (type == KEY_FLOAT) + { + double dval; + serializeUnpack(buf, buf_size, position, &dval, 1, CDI_DATATYPE_FLT64, context); + cdiDefVarKeyFloat(keysp, key, dval); + } + } + serializeUnpack(buf, buf_size, position, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(d == d2); + if (buffer) free(buffer); +} + +/* + * (de-)marshalling function for common data structures + */ +static inline int +serializeStrTabGetPackSize(const char **strTab, int numStr, void *context) +{ + xassert(numStr >= 0); + int packBuffSize = 0; + for (size_t i = 0; i < (size_t) numStr; ++i) + { + size_t len = strlen(strTab[i]); + packBuffSize += serializeGetSize(1, CDI_DATATYPE_INT, context) + serializeGetSize((int) len, CDI_DATATYPE_TXT, context); + } + packBuffSize += serializeGetSize(1, CDI_DATATYPE_UINT32, context); + return packBuffSize; +} + +static inline void +serializeStrTabPack(const char **strTab, int numStr, void *buf, int buf_size, int *position, void *context) +{ + uint32_t d = 0; + xassert(numStr >= 0); + for (size_t i = 0; i < (size_t) numStr; ++i) + { + int len = (int) strlen(strTab[i]); + serializePack(&len, 1, CDI_DATATYPE_INT, buf, buf_size, position, context); + serializePack(strTab[i], len, CDI_DATATYPE_TXT, buf, buf_size, position, context); + d ^= cdiCheckSum(CDI_DATATYPE_TXT, len, strTab[i]); + } + serializePack(&d, 1, CDI_DATATYPE_UINT32, buf, buf_size, position, context); +} + +static inline void +serializeStrTabUnpack(const void *buf, int buf_size, int *position, char **strTab, int numStr, void *context) +{ + uint32_t d, d2 = 0; + xassert(numStr >= 0); + for (size_t i = 0; i < (size_t) numStr; ++i) + { + int len; + serializeUnpack(buf, buf_size, position, &len, 1, CDI_DATATYPE_INT, context); + serializeUnpack(buf, buf_size, position, strTab[i], len, CDI_DATATYPE_TXT, context); + strTab[i][len] = '\0'; + d2 ^= cdiCheckSum(CDI_DATATYPE_TXT, len, strTab[i]); + } + serializeUnpack(buf, buf_size, position, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(d == d2); +} + +/* + * Interfaces for marshalling within a single memory domain + */ +int serializeGetSizeInCore(int count, int datatype, void *context); +void serializePackInCore(const void *data, int count, int datatype, void *buf, int buf_size, int *position, void *context); +void serializeUnpackInCore(const void *buf, int buf_size, int *position, void *data, int count, int datatype, void *context); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <inttypes.h> +#include <sys/types.h> +#include <stdlib.h> + + +uint32_t +cdiCheckSum(int type, int count, const void *buffer) +{ + uint32_t s = 0U; + xassert(count >= 0); + size_t elemSize = (size_t) serializeGetSizeInCore(1, type, NULL); + memcrc_r_eswap(&s, (const unsigned char *) buffer, (size_t) count, elemSize); + s = memcrc_finish(&s, (off_t) (elemSize * (size_t) count)); + return s; +} + +void +cdiCheckSumRStart(struct cdiCheckSumState *state) +{ + state->sum = 0U; + state->len = 0; +} + +void +cdiCheckSumRAdd(struct cdiCheckSumState *state, int type, int count, const void *buffer) +{ + size_t elemSize = (size_t) serializeGetSizeInCore(1, type, NULL); + memcrc_r_eswap(&state->sum, (const unsigned char *) buffer, (size_t) count, elemSize); + state->len += (off_t) (elemSize * (size_t) count); +} + +uint32_t +cdiCheckSumRValue(struct cdiCheckSumState state) +{ + return memcrc_finish(&state.sum, state.len); +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <stdio.h> +#include <string.h> +#include <errno.h> + +const char * +cdiStringError(int cdiErrno) +{ + // clang-format off + static const char UnknownError[] = "Unknown Error"; + static const char _ETMOF[] = "Too many open files"; + static const char _EINVAL[] = "Invalid argument"; + static const char _EISDIR[] = "Is a directory"; + static const char _EISEMPTY[] = "File is empty"; + static const char _EUFTYPE[] = "Unsupported file type"; + static const char _ELIBNAVAIL[] = "Unsupported file type (library support not compiled in)"; + static const char _EUFSTRUCT[] = "Unsupported file structure"; + static const char _EUNC4[] = "Unsupported NetCDF4 structure"; + static const char _EDIMSIZE[] = "Invalid dimension size"; + static const char _EQENF[] = "Query entries not found"; + static const char _EQNAVAIL[] = "Query not available for file type"; + static const char _ELIMIT[] = "Internal limits exceeded"; + + switch (cdiErrno) { + case CDI_ESYSTEM: + { + const char *cp = strerror(errno); + if (cp == NULL) break; + return cp; + } + case CDI_ETMOF: return _ETMOF; + case CDI_EINVAL: return _EINVAL; + case CDI_EISDIR: return _EISDIR; + case CDI_EISEMPTY: return _EISEMPTY; + case CDI_EUFTYPE: return _EUFTYPE; + case CDI_ELIBNAVAIL: return _ELIBNAVAIL; + case CDI_EUFSTRUCT: return _EUFSTRUCT; + case CDI_EUNC4: return _EUNC4; + case CDI_EDIMSIZE: return _EDIMSIZE; + case CDI_EQENF: return _EQENF; + case CDI_EQNAVAIL: return _EQNAVAIL; + case CDI_ELIMIT: return _ELIMIT; + } + // clang-format on + return UnknownError; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <stdio.h> +#include <stdlib.h> + +// ================================================================== +#ifdef __cplusplus +extern "C" +{ +#endif + + // clang-format off +void +cdiDecodeDate(int date, int *year, int *month, int *day) +{ + int iyear = date / 10000; + *year = iyear; + int idate = date - iyear * 10000; + if (idate < 0) idate = -idate; + int imonth = idate / 100; + *month = imonth; + *day = idate - imonth * 100; +} + +int +cdiEncodeDate(int year, int month, int day) +{ + int iyear = abs(year); + int date = iyear * 10000 + month * 100 + day; + if (year < 0) date = -date; + + return date; +} + +void +cdiDecodeTime(int time, int *hour, int *minute, int *second) +{ + int ihour = time / 10000, itime = time - ihour * 10000, iminute = itime / 100; + *hour = ihour; + *minute = iminute; + *second = itime - iminute * 100; +} + +int +cdiEncodeTime(int hour, int minute, int second) +{ + return hour * 10000 + minute * 100 + second; +} + // clang-format on + +#ifdef __cplusplus +} +#endif +// ================================================================== + +CdiDate +cdiDate_set(int64_t date) +{ + int64_t iyear = date / 10000; + int year = iyear; + int64_t idate = date - iyear * 10000; + if (idate < 0) idate = -idate; + int64_t imonth = idate / 100; + int month = imonth; + int day = idate - imonth * 100; + + CdiDate cdiDate; + cdiDate.year = year; + cdiDate.month = (short) month; + cdiDate.day = (short) day; + + return cdiDate; +} + +CdiTime +cdiTime_set(int time) +{ + int hour, minute, second, ms = 0; + cdiDecodeTime(time, &hour, &minute, &second); + + CdiTime cdiTime; + cdiTime.hour = (short) hour; + cdiTime.minute = (short) minute; + cdiTime.second = (short) second; + cdiTime.ms = ms; + + return cdiTime; +} + +CdiDateTime +cdiDateTime_set(int64_t date, int time) +{ + CdiDateTime cdiDateTime; + cdiDateTime.date = cdiDate_set(date); + cdiDateTime.time = cdiTime_set(time); + + return cdiDateTime; +} + +int64_t +cdiDate_get(CdiDate cdiDate) +{ + int64_t iyear = abs(cdiDate.year); + int64_t date = iyear * 10000 + cdiDate.month * 100 + cdiDate.day; + if (cdiDate.year < 0) date = -date; + + return date; +} + +int +cdiTime_get(CdiTime cdiTime) +{ + return cdiEncodeTime(cdiTime.hour, cdiTime.minute, cdiTime.second); +} + +CdiDate +cdiDate_encode(int year, int month, int day) +{ + CdiDate cdiDate; + cdiDate.year = year; + cdiDate.month = month; + cdiDate.day = day; + + return cdiDate; +} + +void +cdiDate_decode(CdiDate cdiDate, int *year, int *month, int *day) +{ + *year = cdiDate.year; + *month = cdiDate.month; + *day = cdiDate.day; +} + +CdiTime +cdiTime_encode(int hour, int minute, int second, int ms) +{ + CdiTime cdiTime; + cdiTime.hour = hour; + cdiTime.minute = minute; + cdiTime.second = second; + cdiTime.ms = ms; + + return cdiTime; +} + +void +cdiTime_decode(CdiTime cdiTime, int *hour, int *minute, int *second, int *ms) +{ + *hour = cdiTime.hour; + *minute = cdiTime.minute; + *second = cdiTime.second; + *ms = cdiTime.ms; +} + +void +cdiDate_init(CdiDate *cdiDate) +{ + cdiDate->year = 0; + cdiDate->month = 0; + cdiDate->day = 0; +} + +void +cdiTime_init(CdiTime *cdiTime) +{ + cdiTime->hour = 0; + cdiTime->minute = 0; + cdiTime->second = 0; + cdiTime->ms = 0; +} + +void +cdiDateTime_init(CdiDateTime *cdiDateTime) +{ + cdiDate_init(&cdiDateTime->date); + cdiTime_init(&cdiDateTime->time); +} + +bool +cdiDate_isEQ(const CdiDate cdiDate1, const CdiDate cdiDate2) +{ + // clang-format off + return (cdiDate1.year == cdiDate2.year + && cdiDate1.month == cdiDate2.month + && cdiDate1.day == cdiDate2.day); + // clang-format on +} + +bool +cdiTime_isEQ(const CdiTime cdiTime1, const CdiTime cdiTime2) +{ + // clang-format off + return (cdiTime1.hour == cdiTime2.hour + && cdiTime1.minute == cdiTime2.minute + && cdiTime1.second == cdiTime2.second + && cdiTime1.ms == cdiTime2.ms); + // clang-format on +} + +bool +cdiDateTime_isEQ(const CdiDateTime cdiDateTime1, const CdiDateTime cdiDateTime2) +{ + // clang-format off + return (cdiDateTime1.date.year == cdiDateTime2.date.year + && cdiDateTime1.date.month == cdiDateTime2.date.month + && cdiDateTime1.date.day == cdiDateTime2.date.day + && cdiDateTime1.time.hour == cdiDateTime2.time.hour + && cdiDateTime1.time.minute == cdiDateTime2.time.minute + && cdiDateTime1.time.second == cdiDateTime2.time.second + && cdiDateTime1.time.ms == cdiDateTime2.time.ms); + // clang-format on +} + +bool +cdiDateTime_isNE(const CdiDateTime cdiDateTime1, const CdiDateTime cdiDateTime2) +{ + return !cdiDateTime_isEQ(cdiDateTime1, cdiDateTime2); +} + +bool +cdiDateTime_isLT(const CdiDateTime cdiDateTime1, const CdiDateTime cdiDateTime2) +{ + const int64_t date1 = cdiDate_get(cdiDateTime1.date); + const int64_t date2 = cdiDate_get(cdiDateTime2.date); + const int time1 = cdiTime_get(cdiDateTime1.time); + const int time2 = cdiTime_get(cdiDateTime2.time); + return (date1 < date2 || (date1 == date2 && time1 < time2)); +} + +bool +cdiDateTime_isNull(const CdiDateTime cdiDateTime) +{ + // clang-format off + return (cdiDateTime.date.year == 0 + && cdiDateTime.date.month == 0 + && cdiDateTime.date.day == 0 + && cdiDateTime.time.hour == 0 + && cdiDateTime.time.minute == 0 + && cdiDateTime.time.second == 0 + && cdiDateTime.time.ms == 0); + // clang-format on +} + +#define DATE_FORMAT "%5.4d-%2.2d-%2.2d" +#define TIME_FORMAT "%2.2d:%2.2d:%2.2d" + +const char * +CdiDateTime_string(CdiDateTime cdiDateTime) +{ + int year, month, day; + cdiDate_decode(cdiDateTime.date, &year, &month, &day); + int hour, minute, second, ms; + cdiTime_decode(cdiDateTime.time, &hour, &minute, &second, &ms); + + static char datetimeString[64]; + snprintf(datetimeString, sizeof(datetimeString), DATE_FORMAT "T" TIME_FORMAT, year, month, day, hour, minute, second); + + return datetimeString; +} +#ifndef GRIBAPI_H +#define GRIBAPI_H + +#ifdef HAVE_LIBGRIB_API +#include <grib_api.h> +#ifndef ERROR_H +#endif +#endif + +#ifndef CDI_INT_H +#endif + +// clang-format off + +#define GRIBAPI_MISSVAL -9.E33 + +// GRIB2 Level Types +#define GRIB2_LTYPE_SURFACE 1 +#define GRIB2_LTYPE_CLOUD_BASE 2 +#define GRIB2_LTYPE_CLOUD_TOP 3 +#define GRIB2_LTYPE_ISOTHERM0 4 +#define GRIB2_LTYPE_TROPOPAUSE 7 +#define GRIB2_LTYPE_TOA 8 +#define GRIB2_LTYPE_SEA_BOTTOM 9 +#define GRIB2_LTYPE_ATMOSPHERE 10 +#define GRIB2_LTYPE_ISOBARIC 100 +#define GRIB2_LTYPE_MEANSEA 101 +#define GRIB2_LTYPE_ALTITUDE 102 +#define GRIB2_LTYPE_HEIGHT 103 +#define GRIB2_LTYPE_SIGMA 104 +#define GRIB2_LTYPE_HYBRID 105 +#define GRIB2_LTYPE_LANDDEPTH 106 +#define GRIB2_LTYPE_ISENTROPIC 107 +#define GRIB2_LTYPE_SNOW 114 +#define GRIB2_LTYPE_REFERENCE 150 +#define GRIB2_LTYPE_SEADEPTH 160 // Depth Below Sea Level +#define GRIB2_LTYPE_LAKE_BOTTOM 162 // Lake or River Bottom +#define GRIB2_LTYPE_SEDIMENT_BOTTOM 163 // Bottom Of Sediment Layer +#define GRIB2_LTYPE_SEDIMENT_BOTTOM_TA 164 // Bottom Of Thermally Active Sediment Layer +#define GRIB2_LTYPE_SEDIMENT_BOTTOM_TW 165 // Bottom Of Sediment Layer Penetrated By Thermal Wave +#define GRIB2_LTYPE_MIX_LAYER 166 // Mixing Layer + +// GRIB2 Data representation type (Grid Type) +#define GRIB2_GTYPE_LATLON 0 // Latitude/longitude (or equidistant cylindrical, or Plate Carree) +#define GRIB2_GTYPE_LATLON_ROT 1 // Rotated Latitude/longitude +#define GRIB2_GTYPE_LATLON_STR 2 // Stretched Latitude/longitude +#define GRIB2_GTYPE_LATLON_ROTSTR 3 // Stretched and Rotated Latitude/longitude +#define GRIB2_GTYPE_STERE 20 // Polar stereographic projection +#define GRIB2_GTYPE_LCC 30 // Lambert conformal +#define GRIB2_GTYPE_GAUSSIAN 40 // Gaussian latitude/longitude +#define GRIB2_GTYPE_GAUSSIAN_ROT 41 // Rotated Gaussian latitude/longitude +#define GRIB2_GTYPE_GAUSSIAN_STR 42 // Stretched Gaussian latitude/longitude +#define GRIB2_GTYPE_GAUSSIAN_ROTSTR 43 // Stretched and rotated Gaussian latitude/longitude +#define GRIB2_GTYPE_SPECTRAL 50 // Spherical harmonic coefficients +#define GRIB2_GTYPE_GME 100 // Triangular grid based on an icosahedron (GME) +#define GRIB2_GTYPE_UNSTRUCTURED 101 // General Unstructured Grid + +const char *gribapiLibraryVersionString(void); +void gribContainersNew(stream_t *streamptr); +void gribContainersDelete(stream_t *streamptr); + +#ifdef HAVE_LIBGRIB_API +static inline int my_grib_set_double(grib_handle* h, const char* key, double val) +{ + if (CDI_gribapi_debug) + fprintf(stderr, "grib_set_double(\tgrib_handle* h, \"%s\", %f)\n", key, val); + + const int retVal = grib_set_double(h, key, val); + if (retVal != 0) + fprintf(stderr, "!!! failed call to grib_set_double(\tgrib_handle* h, \"%s\", %f) !!!\n", key, val); + return retVal; +} + +static inline int my_grib_set_long(grib_handle* h, const char* key, long val) +{ + if (CDI_gribapi_debug) + fprintf(stderr, "grib_set_long( \tgrib_handle* h, \"%s\", %ld)\n", key, val); + + const int retVal = grib_set_long(h, key, val); + if (retVal != 0) + fprintf(stderr, "!!! failed call to grib_set_long( \tgrib_handle* h, \"%s\", %ld) !!!\n", key, val); + return retVal; +} + +static inline int my_grib_set_string(grib_handle* h, const char* key, const char* val, size_t* length) +{ + if (CDI_gribapi_debug) + fprintf(stderr, "grib_set_string(\tgrib_handle* h, \"%s\", \"%s\")\n", key, val); + + int ret_val = grib_set_string(h, key, val, length); + if (ret_val != 0) + fprintf(stderr, "!!! grib_set_string(\tgrib_handle* h, \"%s\", \"%s\") !!!\n", key, val); + return ret_val; +} +#endif + +typedef struct { + bool init; + void *gribHandle; +} +gribContainer_t; + +// clang-format on + +#endif /* GRIBAPI_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CGRIBEX_H +#define CGRIBEX_H + +// clang-format off + +#include <stdio.h> +#include <stdbool.h> +#include <sys/types.h> + +#define GRIB_MISSVAL -9.E33 + +// GRIB1 Level Types +#define GRIB1_LTYPE_SURFACE 1 +#define GRIB1_LTYPE_CLOUD_BASE 2 +#define GRIB1_LTYPE_CLOUD_TOP 3 +#define GRIB1_LTYPE_ISOTHERM0 4 +#define GRIB1_LTYPE_TROPOPAUSE 7 +#define GRIB1_LTYPE_TOA 8 +#define GRIB1_LTYPE_SEA_BOTTOM 9 +#define GRIB1_LTYPE_ATMOSPHERE 10 +#define GRIB1_LTYPE_99 99 +#define GRIB1_LTYPE_ISOBARIC 100 +#define GRIB1_LTYPE_ISOBARIC_PA 210 +#define GRIB1_LTYPE_MEANSEA 102 +#define GRIB1_LTYPE_ALTITUDE 103 +#define GRIB1_LTYPE_HEIGHT 105 +#define GRIB1_LTYPE_SIGMA 107 +#define GRIB1_LTYPE_SIGMA_LAYER 108 +#define GRIB1_LTYPE_HYBRID 109 +#define GRIB1_LTYPE_HYBRID_LAYER 110 +#define GRIB1_LTYPE_LANDDEPTH 111 +#define GRIB1_LTYPE_LANDDEPTH_LAYER 112 +#define GRIB1_LTYPE_ISENTROPIC 113 +#define GRIB1_LTYPE_SEADEPTH 160 // Depth Below Sea Level +#define GRIB1_LTYPE_LAKE_BOTTOM 162 // Lake or River Bottom +#define GRIB1_LTYPE_SEDIMENT_BOTTOM 163 // Bottom Of Sediment Layer +#define GRIB1_LTYPE_SEDIMENT_BOTTOM_TA 164 // Bottom Of Thermally Active Sediment Layer +#define GRIB1_LTYPE_SEDIMENT_BOTTOM_TW 165 // Bottom Of Sediment Layer Penetrated By Thermal Wave +#define GRIB1_LTYPE_MIX_LAYER 166 // Mixing Layer + +// GRIB1 Data representation type (Grid Type) [Table 6] +#define GRIB1_GTYPE_LATLON 0 // latitude/longitude +#define GRIB1_GTYPE_LATLON_ROT 10 // rotated latitude/longitude +#define GRIB1_GTYPE_LATLON_STR 20 // stretched latitude/longitude +#define GRIB1_GTYPE_LATLON_ROTSTR 30 // rotated and stretched latitude/longitude +#define GRIB1_GTYPE_GAUSSIAN 4 // gaussian grid +#define GRIB1_GTYPE_GAUSSIAN_ROT 14 // rotated gaussian grid +#define GRIB1_GTYPE_GAUSSIAN_STR 24 // stretched gaussian grid +#define GRIB1_GTYPE_GAUSSIAN_ROTSTR 34 // rotated and stretched gaussian grid +#define GRIB1_GTYPE_LCC 3 // Lambert conformal +#define GRIB1_GTYPE_SPECTRAL 50 // spherical harmonics +#define GRIB1_GTYPE_GME 192 // hexagonal GME grid + +// Macros for the indicator section ( Section 0 ) +#define ISEC0_GRIB_Len (isec0[ 0]) // Number of octets in the GRIB message +#define ISEC0_GRIB_Version (isec0[ 1]) // GRIB edition number + + +// Macros for the product definition section ( Section 1 ) +#define ISEC1_TABLE4_MINUTE 0 +#define ISEC1_TABLE4_HOUR 1 +#define ISEC1_TABLE4_DAY 2 +#define ISEC1_TABLE4_3HOURS 10 +#define ISEC1_TABLE4_6HOURS 11 +#define ISEC1_TABLE4_12HOURS 12 +#define ISEC1_TABLE4_QUARTER 13 +#define ISEC1_TABLE4_30MINUTES 14 + + +#define ISEC1_CodeTable (isec1[ 0]) // Version number of code table +#define ISEC1_CenterID (isec1[ 1]) // Identification of centre +#define ISEC1_ModelID (isec1[ 2]) // Identification of model +#define ISEC1_GridDefinition (isec1[ 3]) // Grid definition +#define ISEC1_Sec2Or3Flag (isec1[ 4]) // Section 2 or 3 included +#define ISEC1_Parameter (isec1[ 5]) // Parameter indicator +#define ISEC1_LevelType (isec1[ 6]) // Type of level indicator +#define ISEC1_Level1 (isec1[ 7]) // Level 1 +#define ISEC1_Level2 (isec1[ 8]) // Level 2 +#define ISEC1_Year (isec1[ 9]) // Year of century (YY) +#define ISEC1_Month (isec1[10]) // Month (MM) +#define ISEC1_Day (isec1[11]) // Day (DD) +#define ISEC1_Hour (isec1[12]) // Hour (HH) +#define ISEC1_Minute (isec1[13]) // Minute (MM) +#define ISEC1_TimeUnit (isec1[14]) // Time unit indicator +#define ISEC1_TimePeriod1 (isec1[15]) // P1 Time period +#define ISEC1_TimePeriod2 (isec1[16]) // P2 Time period +#define ISEC1_TimeRange (isec1[17]) // Time range indicator +#define ISEC1_AvgNum (isec1[18]) // Number of products included in an average +#define ISEC1_AvgMiss (isec1[19]) // Number of products missing from an average +#define ISEC1_Century (isec1[20]) // Century +#define ISEC1_SubCenterID (isec1[21]) // Subcenter identifier +#define ISEC1_DecScaleFactor (isec1[22]) // Decimal scale factor +#define ISEC1_LocalFLag (isec1[23]) // Flag field to indicate local use in isec1 + +#define ISEC1_ECMWF_LocalExtension (isec1[36]) +#define ISEC1_ECMWF_Class (isec1[37]) + + +// Macros for the grid definition section ( Section 2 ) +#define ISEC2_GridType (isec2[ 0]) // Data representation type + +// Triangular grids + +#define ISEC2_GME_NI2 (isec2[ 1]) // Number of factor 2 in factorisation of Ni +#define ISEC2_GME_NI3 (isec2[ 2]) // Number of factor 3 in factorisation of Ni +#define ISEC2_GME_ND (isec2[ 3]) // Nubmer of diamonds +#define ISEC2_GME_NI (isec2[ 4]) // Number of tri. subdiv. of the icosahedron +#define ISEC2_GME_AFlag (isec2[ 5]) // Flag for orientation of diamonds (Table A) +#define ISEC2_GME_LatPP (isec2[ 6]) // Latitude of pole point +#define ISEC2_GME_LonPP (isec2[ 7]) // Longitude of pole point +#define ISEC2_GME_LonMPL (isec2[ 8]) // Longitude of the first diamond +#define ISEC2_GME_BFlag (isec2[ 9]) // Flag for storage sequence (Table B) + +// Spherical harmonic coeficients + +#define ISEC2_PentaJ (isec2[ 1]) // J pentagonal resolution parameter +#define ISEC2_PentaK (isec2[ 2]) // K pentagonal resolution parameter +#define ISEC2_PentaM (isec2[ 3]) // M pentagonal resolution parameter +#define ISEC2_RepType (isec2[ 4]) // Representation type +#define ISEC2_RepMode (isec2[ 5]) // Representation mode + +// Gaussian grids + +#define ISEC2_NumLon (isec2[ 1]) // Number of points along a parallel (Ni) +#define ISEC2_NumLat (isec2[ 2]) // Number of points along a meridian (Nj) +#define ISEC2_FirstLat (isec2[ 3]) // Latitude of the first grid point +#define ISEC2_FirstLon (isec2[ 4]) // Longitude of the first grid point +#define ISEC2_ResFlag (isec2[ 5]) // Resolution flag: 128 regular grid +#define ISEC2_LastLat (isec2[ 6]) // Latitude of the last grid point +#define ISEC2_LastLon (isec2[ 7]) // Longitude of the last grid point +#define ISEC2_LonIncr (isec2[ 8]) // i direction increment +#define ISEC2_LatIncr (isec2[ 9]) // j direction increment +#define ISEC2_NumPar (isec2[ 9]) // Number of parallels between a pole and the E. +#define ISEC2_ScanFlag (isec2[10]) // Scanning mode flags +#define ISEC2_NumVCP (isec2[11]) // Number of vertical coordinate parameters + +// Lambert + +#define ISEC2_Lambert_Lov (isec2[ 6]) // Orientation of the grid +#define ISEC2_Lambert_dx (isec2[ 8]) // X-direction grid length +#define ISEC2_Lambert_dy (isec2[ 9]) // Y-direction grid length +#define ISEC2_Lambert_ProjFlag (isec2[12]) // Projection centre flag +#define ISEC2_Lambert_LatS1 (isec2[13]) // First lat at which the secant cone cuts the sphere +#define ISEC2_Lambert_LatS2 (isec2[14]) // Second lat at which the secant cone cuts the sphere +#define ISEC2_Lambert_LatSP (isec2[19]) // Latitude of the southern pole +#define ISEC2_Lambert_LonSP (isec2[20]) // Longitude of the southern pole + + +#define ISEC2_Reduced (isec2[16]) // 0: regular, 1: reduced grid + +#define ISEC2_ReducedPointsPtr (&isec2[22]) +#define ISEC2_ReducedPoints(i) (isec2[22+i]) // Number of points along each parallel + + +#define ISEC2_LatSP (isec2[12]) // Latitude of the southern pole of rotation +#define ISEC2_LonSP (isec2[13]) // Longitude of the southern pole of rotation + +#define FSEC2_RotAngle (fsec2[ 0]) // Angle of rotation +#define FSEC2_StrFact (fsec2[ 1]) // Stretching factor + +// Macros for the bit map section ( Section 3 ) + +#define ISEC3_PredefBitmap (isec3[ 0]) // Predefined bitmap +#define ISEC3_MissVal (isec3[ 1]) // Missing data value for integers +#define FSEC3_MissVal (fsec3[ 1]) // Missing data value for floats + +// Macros for the binary data section ( Section 4 ) + +#define ISEC4_NumValues (isec4[ 0]) // Number of data values for encode/decode +#define ISEC4_NumBits (isec4[ 1]) // Number of bits used for each encoded value +#define ISEC4_NumNonMissValues (isec4[20]) // Number of non-missing values + + +#ifdef __cplusplus +extern "C" { +#endif + + +void gribFixZSE(int flag); // 1: Fix ZeroShiftError of simple packed spherical harmonics +void gribSetConst(int flag); // 1: Don't pack constant fields on regular grids +void gribSetDebug(int debug); // 1: Debugging +void gribSetRound(int round); +void gribSetRefDP(double refval); +void gribSetRefSP(float refval); +void gribSetValueCheck(int vcheck); + + +void gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2, int *isec3, + float *fsec3, int *isec4, float *fsec4, int klenp, int *kgrib, + int kleng, int *kword, const char *hoper, int *kret); + +void gribExDP(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3, + double *fsec3, int *isec4, double *fsec4, int klenp, int *kgrib, + int kleng, int *kword, const char *hoper, int *kret); + + +const char *cgribexLibraryVersion(void); + +void gribDebug(int debug); +void gribSetCalendar(int calendar); + +void gribDateTimeX(int *isec1, int *date, int *time, int *startDate, int *startTime); +void gribDateTime(int *isec1, int *date, int *time); +int gribRefDate(const int *isec1); +int gribRefTime(const int *isec1); + +bool gribTimeIsFC(const int *isec1); + +void gribPrintSec0(int *isec0); +void gribPrintSec1(int *isec0, int *isec1); +void gribPrintSec2DP(int *isec0, int *isec2, double *fsec2); +void gribPrintSec2SP(int *isec0, int *isec2, float *fsec2); +void gribPrintSec3DP(int *isec0, int *isec3, double *fsec3); +void gribPrintSec3SP(int *isec0, int *isec3, float *fsec3); +void gribPrintSec4DP(int *isec0, int *isec4, double *fsec4); +void gribPrintSec4SP(int *isec0, int *isec4, float *fsec4); +void gribPrintSec4Wave(int *isec4); + +void gribPrintALL(int nrec, long offset, long recpos, long recsize, unsigned char *gribbuffer); +void gribPrintPDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer); +void gribPrintGDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer); +void gribPrintBMS(int nrec, long recpos, long recsize, unsigned char *gribbuffer); +void gribPrintBDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer); +void gribCheck1(int nrec, long recpos, long recsize, unsigned char *gribbuffer); +void gribRepair1(int nrec, long recsize, unsigned char *gribbuffer); + +int gribGetZip(size_t recsize, unsigned char *gribbuffer, size_t *urecsize); + +int gribBzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufsize); +int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufsize); +int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufsize); + +int gribOpen(const char *filename, const char *mode); +void gribClose(int fileID); + +int gribRead(int fileID, void *buffer, size_t *buffersize); +int gribWrite(int fileID, void *buffer, size_t buffersize); +off_t gribGetPos(int fileID); +size_t gribGetSize(int fileID); +int gribCheckSeek(int fileID, long *offset, int *version); +int gribFileSeek(int fileID, long *offset); +size_t gribReadSize(int fileID); +int gribVersion(unsigned char *buffer, size_t buffersize); + +int grib_info_for_grads(off_t recpos, long recsize, unsigned char *gribbuffer, int *intnum, float *fltnum, off_t *bignum); + +double calculate_pfactor_float(const float* spectralField, long fieldTruncation, long subsetTruncation); +double calculate_pfactor_double(const double* spectralField, long fieldTruncation, long subsetTruncation); + +#ifdef __cplusplus +} +#endif + +// clang-format on + +#endif /* CGRIBEX_H */ +#ifdef HAVE_CONFIG_H +#endif + +#include <ctype.h> + + +#ifdef HAVE_LIBCGRIBEX +#endif + +int CDI_Default_Calendar = CALENDAR_PROLEPTIC; + +int CDI_Default_InstID = CDI_UNDEFID; +int CDI_Default_ModelID = CDI_UNDEFID; +int CDI_Default_TableID = CDI_UNDEFID; +// int cdiNcMissingValue = CDI_UNDEFID; +int CDI_Netcdf_Chunksizehint = CDI_UNDEFID; +int CDI_Split_Ltype105 = CDI_UNDEFID; + +bool CDI_Ignore_Att_Coordinates = false; +bool CDI_Coordinates_Lon_Lat = false; +bool CDI_Ignore_Valid_Range = false; +int CDI_Skip_Records = 0; +const char *CDI_GRIB1_Template = NULL; +const char *CDI_GRIB2_Template = NULL; +int CDI_Convention = CDI_CONVENTION_ECHAM; +int CDI_Inventory_Mode = 1; +int CDI_Version_Info = 1; +int CDI_Query_Abort = 1; +int CDI_Convert_Cubesphere = 1; +int CDI_Read_Cell_Corners = 1; +int CDI_CMOR_Mode = 0; +int CDI_Reduce_Dim = 0; +int CDI_Shuffle = 0; +size_t CDI_Netcdf_Hdr_Pad = 0UL; +size_t CDI_Chunk_Cache = 0UL; +size_t CDI_Chunk_Cache_Max = 0UL; +bool CDI_Netcdf_Lazy_Grid_Load = false; + +char *cdiPartabPath = NULL; +int cdiPartabIntern = 1; + +double CDI_Default_Missval = -9.E33; +double CDI_Grid_Missval = -9999.; + +// clang-format off +static const char Filetypes[][9] = { + "UNKNOWN", + "GRIB", + "GRIB2", + "NetCDF", + "NetCDF2", + "NetCDF4", + "NetCDF4c", + "NetCDF5", + "SERVICE", + "EXTRA", + "IEG", + "NCZarr", + "HDF5", +}; +// clang-format on + +int CDI_Debug = 0; // If set to 1, debugging +int CDI_Recopt = 0; + +bool CDI_gribapi_debug = false; +bool CDI_gribapi_grib1 = false; +int cdiDefaultLeveltype = -1; +int cdiDataUnreduced = 0; +int cdiSortName = 0; +int cdiSortParam = 0; +int cdiHaveMissval = 0; + +static long +cdi_getenv_int(const char *envName) +{ + long envValue = -1; + + char *envString = getenv(envName); + if (envString) + { + long fact = 1; + int len = (int) strlen(envString); + for (int loop = 0; loop < len; loop++) + { + if (!isdigit((int) envString[loop])) + { + switch (tolower((int) envString[loop])) + { + case 'k': fact = 1024; break; + case 'm': fact = 1048576; break; + case 'g': fact = 1073741824; break; + default: + fact = 0; + Warning("Invalid number string in %s: %s", envName, envString); + Warning("%s must comprise only digits [0-9].", envName); + break; + } + break; + } + } + + if (fact) envValue = fact * atol(envString); + + if (CDI_Debug) Message("set %s to %ld", envName, envValue); + } + + return envValue; +} + +static void +cdiPrintDefaults(void) +{ + fprintf(stderr, + "default instID : %d\n" + "default modelID : %d\n" + "default tableID : %d\n" + "default missval : %g\n", + CDI_Default_InstID, CDI_Default_ModelID, CDI_Default_TableID, CDI_Default_Missval); +} + +#ifdef HAVE_LIBFDB5 +#include <fdb5/fdb5_config.h> +#endif + +void +cdiPrintVersion(void) +{ + fprintf(stdout, " CDI library version : %s\n", cdiLibraryVersion()); +#ifdef HAVE_LIBCGRIBEX + fprintf(stdout, " cgribex library version : %s\n", cgribexLibraryVersion()); +#endif +#ifdef HAVE_LIBGRIB_API + fprintf(stdout, " ecCodes library version : %s\n", gribapiLibraryVersionString()); +#endif +#ifdef HAVE_LIBNETCDF + fprintf(stdout, " NetCDF library version : %s\n", cdfLibraryVersion()); +#endif +#ifdef HAVE_NC4HDF5 + // fprintf(stdout, " HDF5 library version : %s\n", hdfLibraryVersion()); +#endif +#ifdef HAVE_LIBSERVICE + fprintf(stdout, " exse library version : %s\n", srvLibraryVersion()); +#endif + fprintf(stdout, " FILE library version : %s\n", fileLibraryVersion()); +#ifdef HAVE_LIBFDB5 + fprintf(stdout, " FDB5 library version : %s\n", fdb5_version()); +#endif +} + +static void +cdiPrintDatatypes(void) +{ +#define XSTRING(x) #x +#define STRING(x) XSTRING(x) + + fprintf(stderr, + "+-------------+-------+\n" + "| types | bytes |\n" + "+-------------+-------+\n" + "| void * | %3d |\n" + "+-------------+-------+\n" + "| char | %3d |\n" + "+-------------+-------+\n" + "| bool | %3d |\n" + "| short | %3d |\n" + "| int | %3d |\n" + "| long | %3d |\n" + "| long long | %3d |\n" + "| size_t | %3d |\n" + "| off_t | %3d |\n" + "+-------------+-------+\n" + "| float | %3d |\n" + "| double | %3d |\n" + "| long double | %3d |\n" + "+-------------+-------+\n\n", + (int) sizeof(void *), (int) sizeof(char), (int) sizeof(bool), (int) sizeof(short), (int) sizeof(int), (int) sizeof(long), + (int) sizeof(long long), (int) sizeof(size_t), (int) sizeof(off_t), (int) sizeof(float), (int) sizeof(double), + (int) sizeof(long double)); + + fprintf(stderr, + "+-------------+-----------+\n" + "| INT32 | %-9s |\n" + "| INT64 | %-9s |\n" + "| FLT32 | %-9s |\n" + "| FLT64 | %-9s |\n" + "| SizeType | %-9s |\n" + "+-------------+-----------+\n", + STRING(INT32), STRING(INT64), STRING(FLT32), STRING(FLT64), STRING(CDI_SIZE_TYPE)); + + fprintf(stderr, "\n byte ordering is %s\n\n", + ((HOST_ENDIANNESS == CDI_BIGENDIAN) + ? "BIGENDIAN" + : ((HOST_ENDIANNESS == CDI_LITTLEENDIAN) ? "LITTLEENDIAN" : "Unhandled endianness!"))); + +#undef STRING +#undef XSTRING +} + +void +cdiDebug(int level) +{ + if (level < 0) return; + unsigned ulevel = (unsigned) level; + + if (ulevel == 1 || (ulevel & 2)) CDI_Debug = 1; + + if (CDI_Debug) Message("debug level %d", level); + + if (ulevel == 1 || (ulevel & 4)) memDebug(1); + + if (ulevel == 1 || (ulevel & 8)) fileDebug(1); + + if (ulevel == 1 || (ulevel & 16)) + { +#ifdef HAVE_LIBCGRIBEX + gribSetDebug(1); +#endif +#ifdef HAVE_LIBNETCDF + cdfDebug(1); +#endif +#ifdef HAVE_LIBSERVICE + srvDebug(1); +#endif +#ifdef HAVE_LIBEXTRA + extDebug(1); +#endif +#ifdef HAVE_LIBIEG + iegDebug(1); +#endif + } + + if (CDI_Debug) + { + cdiPrintDefaults(); + cdiPrintDatatypes(); + } +} + +int +cdiHaveFiletype(int filetype) +{ + int status = 0; + + switch (filetype) + { +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: status = 1; break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: status = 1; break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: status = 1; break; +#endif +#ifdef HAVE_LIBGRIB +#if defined HAVE_LIBGRIB_API || defined HAVE_LIBCGRIBEX + case CDI_FILETYPE_GRB: status = 1; break; +#endif +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB2: status = 1; break; +#endif +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NC: status = 1; break; +#ifdef HAVE_NETCDF2 + case CDI_FILETYPE_NC2: status = 1; break; +#endif +#ifdef HAVE_NETCDF4 + case CDI_FILETYPE_NC4: status = 1; break; + case CDI_FILETYPE_NC4C: status = 1; break; +#endif +#ifdef HAVE_NCZARR + case CDI_FILETYPE_NCZARR: status = 1; break; +#endif +#ifdef HAVE_NETCDF5 + case CDI_FILETYPE_NC5: status = 1; break; +#endif +#endif + default: status = 0; break; + } + + return status; +} + +void +cdiDefTableID(int tableID) +{ + CDI_Default_TableID = tableID; + int modelID = CDI_Default_ModelID = tableInqModel(tableID); + CDI_Default_InstID = modelInqInstitut(modelID); +} + +void +cdiSetEccodesGrib1(bool value) +{ +#ifndef HAVE_LIBGRIB_API + if (value) + { + Warning("ecCodes support not compiled in, used CGRIBEX to decode/encode GRIB1 records!"); + value = false; + } +#endif + CDI_gribapi_grib1 = value; +} + +void +cdiInitialize(void) +{ + static bool Init_CDI = false; + + if (!Init_CDI) + { + Init_CDI = true; + char *envstr; + long value; + +#ifdef HAVE_LIBCGRIBEX + gribFixZSE(1); // 1: Fix ZeroShiftError of simple packed spherical harmonics + gribSetConst(1); // 1: Don't pack constant fields on regular grids +#endif +#ifdef HAVE_LIBGRIB_API + grib_multi_support_off(NULL); +#endif + + value = cdi_getenv_int("CDI_DEBUG"); + if (value >= 0) CDI_Debug = (int) value; + + value = cdi_getenv_int("CDI_GRIBAPI_DEBUG"); + if (value >= 0) CDI_gribapi_debug = (bool) value; + + value = cdi_getenv_int("CDI_ECCODES_DEBUG"); + if (value >= 0) CDI_gribapi_debug = (bool) value; + + value = cdi_getenv_int("CDI_ECCODES_GRIB1"); + if (value >= 0) cdiSetEccodesGrib1((bool) value); + + value = cdi_getenv_int("CDI_READ_CELL_CORNERS"); + if (value >= 0) CDI_Read_Cell_Corners = (int) value; + + value = cdi_getenv_int("CDI_RECOPT"); + if (value >= 0) CDI_Recopt = (int) value; + + value = cdi_getenv_int("CDI_REGULARGRID"); + if (value >= 0) cdiDataUnreduced = (int) value; + + value = cdi_getenv_int("CDI_SORTNAME"); + if (value >= 0) cdiSortName = (int) value; + + value = cdi_getenv_int("CDI_SORTPARAM"); + if (value >= 0) cdiSortParam = (int) value; + + value = cdi_getenv_int("CDI_HAVE_MISSVAL"); + if (value >= 0) cdiHaveMissval = (int) value; + + value = cdi_getenv_int("CDI_LEVELTYPE"); + if (value >= 0) cdiDefaultLeveltype = (int) value; + + value = cdi_getenv_int("CDI_NETCDF_HDR_PAD"); + if (value >= 0) CDI_Netcdf_Hdr_Pad = (size_t) value; + + value = cdi_getenv_int("CDI_CHUNK_CACHE"); + if (value >= 0) CDI_Chunk_Cache = (size_t) value; + + value = cdi_getenv_int("CDI_CHUNK_CACHE_MAX"); + if (value >= 0) CDI_Chunk_Cache_Max = (size_t) value; + + envstr = getenv("CDI_GRIB1_TEMPLATE"); + if (envstr) CDI_GRIB1_Template = envstr; + + envstr = getenv("CDI_GRIB2_TEMPLATE"); + if (envstr) CDI_GRIB2_Template = envstr; + + envstr = getenv("CDI_SHUFFLE"); + if (envstr) CDI_Shuffle = atoi(envstr); + + envstr = getenv("CDI_MISSVAL"); + if (envstr) CDI_Default_Missval = atof(envstr); + /* + envstr = getenv("NC_MISSING_VALUE"); + if ( envstr ) cdiNcMissingValue = atoi(envstr); + */ + envstr = getenv("NC_CHUNKSIZEHINT"); + if (envstr) CDI_Netcdf_Chunksizehint = atoi(envstr); + + envstr = getenv("SPLIT_LTYPE_105"); + if (envstr) CDI_Split_Ltype105 = atoi(envstr); + + envstr = getenv("IGNORE_ATT_COORDINATES"); + if (envstr) CDI_Ignore_Att_Coordinates = atoi(envstr) > 0; + + envstr = getenv("CDI_COORDINATES_LONLAT"); + if (envstr) CDI_Coordinates_Lon_Lat = atoi(envstr) > 0; + + envstr = getenv("IGNORE_VALID_RANGE"); + if (envstr) CDI_Ignore_Valid_Range = atoi(envstr) > 0; + + envstr = getenv("CDI_SKIP_RECORDS"); + if (envstr) + { + CDI_Skip_Records = atoi(envstr); + CDI_Skip_Records = CDI_Skip_Records > 0 ? CDI_Skip_Records : 0; + } + + envstr = getenv("CDI_CONVENTION"); + if (envstr) + { + if (str_is_equal(envstr, "CF") || str_is_equal(envstr, "cf")) + { + CDI_Convention = CDI_CONVENTION_CF; + if (CDI_Debug) Message("CDI convention was set to CF!"); + } + } + + envstr = getenv("CDI_INVENTORY_MODE"); + if (envstr) + { + if (strncmp(envstr, "time", 4) == 0) + { + CDI_Inventory_Mode = 2; + if (CDI_Debug) Message("Inventory mode was set to timestep!"); + } + } + + envstr = getenv("CDI_QUERY_ABORT"); + if (envstr) + { + const int ival = atoi(envstr); + if (ival == 0 || ival == 1) + { + CDI_Query_Abort = ival; + if (CDI_Debug) Message("CDI_Query_Abort = %s", envstr); + } + } + + envstr = getenv("CDI_VERSION_INFO"); + if (envstr) + { + const int ival = atoi(envstr); + if (ival == 0 || ival == 1) + { + CDI_Version_Info = ival; + if (CDI_Debug) Message("CDI_Version_Info = %s", envstr); + } + } + + envstr = getenv("CDI_CONVERT_CUBESPHERE"); + if (envstr) + { + const int ival = atoi(envstr); + if (ival == 0 || ival == 1) + { + CDI_Convert_Cubesphere = ival; + if (CDI_Debug) Message("CDI_Convert_Cubesphere = %s", envstr); + } + } + + envstr = getenv("CDI_CALENDAR"); + if (envstr) + { + // clang-format off + if (strncmp(envstr, "standard", 8) == 0) CDI_Default_Calendar = CALENDAR_STANDARD; + else if (strncmp(envstr, "gregorian", 9) == 0) CDI_Default_Calendar = CALENDAR_GREGORIAN; + else if (strncmp(envstr, "proleptic", 9) == 0) CDI_Default_Calendar = CALENDAR_PROLEPTIC; + else if (strncmp(envstr, "360days", 7) == 0) CDI_Default_Calendar = CALENDAR_360DAYS; + else if (strncmp(envstr, "365days", 7) == 0) CDI_Default_Calendar = CALENDAR_365DAYS; + else if (strncmp(envstr, "366days", 7) == 0) CDI_Default_Calendar = CALENDAR_366DAYS; + else if (strncmp(envstr, "none", 4) == 0) CDI_Default_Calendar = CALENDAR_NONE; + // clang-format on + if (CDI_Debug) Message("Default calendar set to %s!", envstr); + } +#ifdef HAVE_LIBCGRIBEX + gribSetCalendar(CDI_Default_Calendar); +#endif + + envstr = getenv("PARTAB_INTERN"); + if (envstr) cdiPartabIntern = atoi(envstr); + + envstr = getenv("PARTAB_PATH"); + if (envstr) cdiPartabPath = strdup(envstr); + } +} + +const char * +strfiletype(int filetype) +{ + const int size = (int) (sizeof(Filetypes) / sizeof(char *)); + return (filetype > 0 && filetype < size) ? Filetypes[filetype] : Filetypes[0]; +} + +void +cdiDefGlobal(const char *string, int value) +{ + // clang-format off + if (str_is_equal(string, "REGULARGRID") ) cdiDataUnreduced = value; + else if (str_is_equal(string, "ECCODES_DEBUG") ) CDI_gribapi_debug = (bool) value; + else if (str_is_equal(string, "ECCODES_GRIB1") ) cdiSetEccodesGrib1((bool) value); + else if (str_is_equal(string, "SORTNAME") ) cdiSortName = value; + else if (str_is_equal(string, "SORTPARAM") ) cdiSortParam = value; + else if (str_is_equal(string, "HAVE_MISSVAL") ) cdiHaveMissval = value; + else if (str_is_equal(string, "NC_CHUNKSIZEHINT") ) CDI_Netcdf_Chunksizehint = value; + else if (str_is_equal(string, "READ_CELL_CORNERS") ) CDI_Read_Cell_Corners = value; + else if (str_is_equal(string, "CMOR_MODE") ) CDI_CMOR_Mode = value; + else if (str_is_equal(string, "REDUCE_DIM") ) CDI_Reduce_Dim = value; + else if (str_is_equal(string, "NETCDF_HDR_PAD") ) CDI_Netcdf_Hdr_Pad = (size_t) value; + else if (str_is_equal(string, "NETCDF_LAZY_GRID_LOAD")) CDI_Netcdf_Lazy_Grid_Load = (bool) value; + else Warning("Unsupported global key: %s", string); + // clang-format on +} + +void +cdiDefMissval(double missval) +{ + cdiInitialize(); + + CDI_Default_Missval = missval; +} + +double +cdiInqMissval(void) +{ + cdiInitialize(); + + return CDI_Default_Missval; +} + +bool +cdiFiletypeIsExse(int filetype) +{ + return (filetype == CDI_FILETYPE_SRV || filetype == CDI_FILETYPE_EXT || filetype == CDI_FILETYPE_IEG); +} + +int +cdiBaseFiletype(int filetype) +{ + switch (filetype) + { + case CDI_FILETYPE_NC: + case CDI_FILETYPE_NC2: + case CDI_FILETYPE_NC4: + case CDI_FILETYPE_NC4C: + case CDI_FILETYPE_NCZARR: + case CDI_FILETYPE_NC5: return CDI_FILETYPE_NETCDF; + } + + return filetype; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <string.h> +#include <stdlib.h> + +static int +sum_found(int listSize, bool *listFound) +{ + int numFound = 0; + for (int i = 0; i < listSize; ++i) numFound += listFound[i]; + return numFound; +} + +static int +sum_not_found(int listSize, bool *listFound) +{ + return listSize - sum_found(listSize, listFound); +} + +void +cdiQueryInit(CdiQuery *query) +{ + query->numEntries = 0; + + query->numNames = 0; + query->names = NULL; + query->namesFound = NULL; + + query->numCellidx = 0; + query->cellidx = NULL; + query->cellidxFound = NULL; + + query->numLevidx = 0; + query->levidx = NULL; + query->levidxFound = NULL; + + query->numStepidx = 0; + query->stepidx = NULL; + query->stepidxFound = NULL; +} + +CdiQuery * +cdiQueryCreate() +{ + CdiQuery *query = (CdiQuery *) malloc(sizeof(CdiQuery)); + cdiQueryInit(query); + return query; +} + +void +cdiQueryDelete(CdiQuery *query) +{ + if (query) + { + if (query->numNames) + { + for (int i = 0; i < query->numNames; ++i) free(query->names[i]); + free(query->names); + free(query->namesFound); + } + + if (query->numCellidx) + { + free(query->cellidx); + free(query->cellidxFound); + } + + if (query->numLevidx) + { + free(query->levidx); + free(query->levidxFound); + } + + if (query->numStepidx) + { + free(query->stepidx); + free(query->stepidxFound); + } + + cdiQueryInit(query); + free(query); + } +} + +int +cdiQueryNumNames(const CdiQuery *query) +{ + return query ? query->numNames : 0; +} + +int +cdiQueryNumCellidx(const CdiQuery *query) +{ + return query ? query->numCellidx : 0; +} + +int +cdiQueryNumStepidx(const CdiQuery *query) +{ + return query ? query->numStepidx : 0; +} + +int +cdiQueryNumEntries(const CdiQuery *query) +{ + return query ? query->numEntries : 0; +} + +void +cdiQuerySetNames(CdiQuery *query, int numEntries, char **names) +{ + if (numEntries) + { + query->numEntries += numEntries; + query->numNames = numEntries; + query->namesFound = (bool *) calloc(numEntries, sizeof(bool)); + query->names = (char **) malloc(numEntries * sizeof(char *)); + for (int i = 0; i < numEntries; ++i) query->names[i] = strdup(names[i]); + } +} + +void +cdiQuerySetCellidx(CdiQuery *query, int numEntries, size_t *cellidx) +{ + if (numEntries) + { + query->numEntries += numEntries; + query->numCellidx = numEntries; + query->cellidxFound = (bool *) calloc(numEntries, sizeof(bool)); + query->cellidx = (size_t *) malloc(numEntries * sizeof(size_t)); + for (int i = 0; i < numEntries; ++i) query->cellidx[i] = cellidx[i]; + } +} + +void +cdiQuerySetLevidx(CdiQuery *query, int numEntries, int *levidx) +{ + if (numEntries) + { + query->numEntries += numEntries; + query->numLevidx = numEntries; + query->levidxFound = (bool *) calloc(numEntries, sizeof(bool)); + query->levidx = (int *) malloc(numEntries * sizeof(int)); + for (int i = 0; i < numEntries; ++i) query->levidx[i] = levidx[i]; + } +} + +void +cdiQuerySetStepidx(CdiQuery *query, int numEntries, int *stepidx) +{ + if (numEntries) + { + query->numEntries += numEntries; + query->numStepidx = numEntries; + query->stepidxFound = (bool *) calloc(numEntries, sizeof(bool)); + query->stepidx = (int *) malloc(numEntries * sizeof(int)); + for (int i = 0; i < numEntries; ++i) query->stepidx[i] = stepidx[i]; + } +} + +size_t +cdiQueryGetCellidx(const CdiQuery *query, int index) +{ + return (index >= 0 && index < query->numCellidx) ? query->cellidx[index] : (size_t) -1; +} + +CdiQuery * +cdiQueryClone(const CdiQuery *query) +{ + CdiQuery *queryOut = cdiQueryCreate(); + + if (query) + { + cdiQuerySetNames(queryOut, query->numNames, query->names); + cdiQuerySetCellidx(queryOut, query->numCellidx, query->cellidx); + cdiQuerySetLevidx(queryOut, query->numLevidx, query->levidx); + cdiQuerySetStepidx(queryOut, query->numStepidx, query->stepidx); + } + + return queryOut; +} + +void +cdiQueryPrint(const CdiQuery *query) +{ + if (query) + { + if (query->numNames) + { + printf("Names:"); + for (int i = 0; i < query->numNames; ++i) printf(" %s", query->names[i]); + printf("\n"); + } + + if (query->numCellidx) + { + printf("Cellidx:"); + for (int i = 0; i < query->numCellidx; ++i) printf(" %zu", query->cellidx[i]); + printf("\n"); + } + + if (query->numLevidx) + { + printf("Levidx:"); + for (int i = 0; i < query->numLevidx; ++i) printf(" %d", query->levidx[i]); + printf("\n"); + } + + if (query->numStepidx) + { + printf("Stepidx:"); + for (int i = 0; i < query->numStepidx; ++i) printf(" %d", query->stepidx[i]); + printf("\n"); + } + } +} + +int +cdiQueryNumEntriesFound(const CdiQuery *query) +{ + int numEntriesFound = 0; + + if (query) + { + if (query->numNames) numEntriesFound += sum_found(query->numNames, query->namesFound); + if (query->numCellidx) numEntriesFound += sum_found(query->numCellidx, query->cellidxFound); + if (query->numLevidx) numEntriesFound += sum_found(query->numLevidx, query->levidxFound); + if (query->numStepidx) numEntriesFound += sum_found(query->numStepidx, query->stepidxFound); + } + + return numEntriesFound; +} + +void +cdiQueryPrintEntriesNotFound(const CdiQuery *query) +{ + if (query) + { + int numEntriesNotFound = cdiQueryNumEntries(query) - cdiQueryNumEntriesFound(query); + if (numEntriesNotFound > 0) + { + if (query->numNames) + { + if (sum_not_found(query->numNames, query->namesFound) > 0) + { + printf("Name not found:"); + for (int i = 0; i < query->numNames; ++i) + if (!query->namesFound[i]) printf(" %s", query->names[i]); + printf("\n"); + } + } + + if (query->numCellidx) + { + if (sum_not_found(query->numCellidx, query->cellidxFound) > 0) + { + printf("Grid cell index not found:"); + for (int i = 0; i < query->numCellidx; ++i) + if (!query->cellidxFound[i]) printf(" %zu", query->cellidx[i]); + printf("\n"); + } + } + + if (query->numLevidx) + { + if (sum_not_found(query->numLevidx, query->levidxFound) > 0) + { + printf("Level index not found:"); + for (int i = 0; i < query->numLevidx; ++i) + if (!query->levidxFound[i]) printf(" %d", query->levidx[i]); + printf("\n"); + } + } + + if (query->numStepidx) + { + if (sum_not_found(query->numStepidx, query->stepidxFound) > 0) + { + printf("Step index not found:"); + for (int i = 0; i < query->numStepidx; ++i) + if (!query->stepidxFound[i]) printf(" %d", query->stepidx[i]); + printf("\n"); + } + } + } + } +} + +int +cdiQueryName(CdiQuery *query, const char *name) +{ + if (query && query->numNames && name && *name) + { + for (int i = 0; i < query->numNames; ++i) + if (strcmp(name, query->names[i]) == 0) + { + query->namesFound[i] = true; + return 0; + } + } + + return -1; +} + +int +cdiQueryCellidx(CdiQuery *query, size_t cellidx) +{ + if (query && query->numCellidx) + { + for (int i = 0; i < query->numCellidx; ++i) + if (query->cellidx[i] == cellidx) + { + query->cellidxFound[i] = true; + return 0; + } + } + + return -1; +} + +int +cdiQueryLevidx(CdiQuery *query, int levidx) +{ + if (query && query->numLevidx) + { + for (int i = 0; i < query->numLevidx; ++i) + if (query->levidx[i] == levidx) + { + query->levidxFound[i] = true; + return 0; + } + } + + return -1; +} + +int +cdiQueryStepidx(CdiQuery *query, int stepidx) +{ + if (query && query->numStepidx) + { + for (int i = 0; i < query->numStepidx; ++i) + if (query->stepidx[i] == stepidx) + { + query->stepidxFound[i] = true; + return 0; + } + } + + return -1; +} +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <limits.h> +#include <stdio.h> +#include <stdlib.h> + +void +cdiDecodeParam(int param, int *pnum, int *pcat, int *pdis) +{ + unsigned uparam = (unsigned) param; + + *pdis = (int) (0xffU & uparam); + *pcat = (int) (0xffU & (uparam >> 8)); + unsigned upnum = 0xffffU & (uparam >> 16); + if (upnum > 0x7fffU) upnum = 0x8000U - upnum; + *pnum = (int) upnum; +} + +int +cdiEncodeParam(int pnum, int pcat, int pdis) +{ + if (pcat < 0 || pcat > 255) pcat = 255; + if (pdis < 0 || pdis > 255) pdis = 255; + + unsigned upnum = (unsigned) pnum; + if (pnum < 0) upnum = (unsigned) (0x8000 - pnum); + + unsigned uparam = (upnum << 16) | (((unsigned) pcat) << 8) | (unsigned) pdis; + + return (int) uparam; +} + +void +cdiParamToString(int param, char *paramstr, int maxlen) +{ + int dis, cat, num; + cdiDecodeParam(param, &num, &cat, &dis); + + size_t umaxlen = maxlen >= 0 ? (unsigned) maxlen : 0U; + int len; + if (dis == 255 && (cat == 255 || cat == 0)) + len = snprintf(paramstr, umaxlen, "%d", num); + else if (dis == 255) + len = snprintf(paramstr, umaxlen, "%d.%d", num, cat); + else + len = snprintf(paramstr, umaxlen, "%d.%d.%d", num, cat, dis); + + if (len >= maxlen || len < 0) fprintf(stderr, "Internal problem (%s): size of input string is too small!\n", __func__); +} + +const char * +cdiUnitNamePtr(int cdi_unit) +{ + const char *cdiUnits[] = { + /* 0 */ "undefined", + /* 1 */ "Pa", + /* 2 */ "hPa", + /* 3 */ "mm", + /* 4 */ "cm", + /* 5 */ "dm", + /* 6 */ "m", + }; + enum + { + numUnits = (int) (sizeof(cdiUnits) / sizeof(char *)) + }; + const char *name = (cdi_unit > 0 && cdi_unit < numUnits) ? cdiUnits[cdi_unit] : NULL; + + return name; +} + +size_t +cdiGetPageSize(bool largePageAlign) +{ + long pagesize = -1L; +#if HAVE_DECL__SC_LARGE_PAGESIZE || HAVE_DECL__SC_PAGE_SIZE || HAVE_DECL__SC_PAGESIZE + bool nameAssigned = false; + int name = 0; +#if HAVE_DECL__SC_LARGE_PAGESIZE + if (largePageAlign) + { + name = _SC_LARGE_PAGESIZE; + nameAssigned = true; + } + else +#else + (void) largePageAlign; +#endif + { +#if HAVE_DECL__SC_PAGESIZE || HAVE_DECL__SC_PAGE_SIZE + name = +#if HAVE_DECL__SC_PAGESIZE + _SC_PAGESIZE; +#else + _SC_PAGE_SIZE; +#endif + nameAssigned = true; +#endif + } + if (nameAssigned) pagesize = sysconf(name); +#endif + if (pagesize == -1L) + pagesize = +#if HAVE_DECL_PAGESIZE + PAGESIZE; +#elif HAVE_DECL_PAGE_SIZE + PAGE_SIZE; +#else + commonPageSize; +#endif + return (size_t) pagesize; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + +// Automatically generated by m214003 at 2023-02-08, do not edit + +// CGRIBEXLIB_VERSION="2.1.0" + +// clang-format off + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5) || defined (__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic warning "-Wstrict-overflow" +#endif + +#ifdef _ARCH_PWR6 +#pragma options nostrict +#include <ppu_intrinsics.h> +#endif + +#ifdef HAVE_CONFIG_H +#endif + +#include <string.h> +#include <ctype.h> +#include <stdarg.h> +#include <stdbool.h> +#include <sys/types.h> +#include <inttypes.h> + + + +#ifndef CGRIBEX_TEMPLATES_H +#define CGRIBEX_TEMPLATES_H + +#define CAT(X,Y) X##_##Y +#define TEMPLATE(X,Y) CAT(X,Y) + +#endif +#ifndef GRIB_INT_H +#define GRIB_INT_H + +#ifdef HAVE_CONFIG_H +#endif + +#include <inttypes.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <math.h> +#include <float.h> + + +#ifndef CGRIBEX_H +#endif +#ifndef ERROR_H +#endif +#ifndef TYPES_H +#endif + + +#ifndef UCHAR +#define UCHAR unsigned char +#endif + + +#if defined (CRAY) || defined (SX) || defined (__uxpch__) +#define VECTORCODE 1 +#endif + + +#ifdef VECTORCODE +#ifdef INT32 +# define GRIBPACK unsigned INT32 +# define PACK_GRIB packInt32 +# define UNPACK_GRIB unpackInt32 +#else +# define GRIBPACK unsigned INT64 +# define PACK_GRIB packInt64 +# define UNPACK_GRIB unpackInt64 +#endif +#else +# define GRIBPACK unsigned char +#endif + +#ifndef HOST_ENDIANNESS +#ifdef __cplusplus +static const uint32_t HOST_ENDIANNESS_temp[1] = { UINT32_C(0x00030201) }; +#define HOST_ENDIANNESS (((const unsigned char *)HOST_ENDIANNESS_temp)[0]) +#else +#define HOST_ENDIANNESS (((const unsigned char *)&(const uint32_t[1]){UINT32_C(0x00030201)})[0]) +#endif +#endif + +#define IS_BIGENDIAN() (HOST_ENDIANNESS == 0) + +#if defined (__xlC__) /* performance problems on IBM */ +#ifndef DBL_IS_NAN +# define DBL_IS_NAN(x) ((x) != (x)) +#endif +#else +#ifndef DBL_IS_NAN +#if defined (HAVE_DECL_ISNAN) +# define DBL_IS_NAN(x) (isnan(x)) +#elif defined (FP_NAN) +# define DBL_IS_NAN(x) (fpclassify(x) == FP_NAN) +#else +# define DBL_IS_NAN(x) ((x) != (x)) +#endif +#endif +#endif + +#ifndef IS_EQUAL +# define IS_NOT_EQUAL(x,y) (x < y || y < x) +# define IS_EQUAL(x,y) (!IS_NOT_EQUAL(x,y)) +#endif + +/* dummy use of unused parameters to silence compiler warnings */ +#ifndef UNUSED +#define UNUSED(x) (void)(x) +#endif + +#define JP24SET 0xFFFFFF /* 2**24 (---> 16777215) */ +#define JP23SET 0x7FFFFF /* 2**23 - 1 (---> 8388607) */ + +#define POW_2_M24 0.000000059604644775390625 /* pow(2.0, -24.0) */ + +#ifdef __cplusplus +extern "C" { +#endif + +#define intpow2(x) (ldexp(1.0, (x))) + +static inline int +gribrec_len(unsigned b1, unsigned b2, unsigned b3) +{ + /* + If bit 7 of b1 is set, we have to rescale by factor of 120. + This is a fixup to get round the restriction on product lengths + due to the count being only 24 bits. It is only possible because + the (default) rounding for GRIB products is 120 bytes. + */ + const int needRescaling = b1 & (1 << 7); + + int gribsize = (int)((((b1&127) << 16)+(b2<<8) + b3)); + + if ( needRescaling ) gribsize *= 120; + + return gribsize; + +} + +unsigned correct_bdslen(unsigned bdslen, long recsize, long gribpos); + +/* CDI converter routines */ + +/* param format: DDDCCCNNN */ + +void cdiDecodeParam(int param, int *pnum, int *pcat, int *pdis); +int cdiEncodeParam(int pnum, int pcat, int pdis); + +/* date format: YYYYMMDD */ +/* time format: hhmmss */ + +void cdiDecodeDate(int date, int *year, int *month, int *day); +int cdiEncodeDate(int year, int month, int day); + +void cdiDecodeTime(int time, int *hour, int *minute, int *second); +int cdiEncodeTime(int hour, int minute, int second); + +/* CALENDAR types */ + +#define CALENDAR_STANDARD 0 /* don't change this value (used also in cgribexlib)! */ +#define CALENDAR_GREGORIAN 1 +#define CALENDAR_PROLEPTIC 2 +#define CALENDAR_360DAYS 3 +#define CALENDAR_365DAYS 4 +#define CALENDAR_366DAYS 5 +#define CALENDAR_NONE 6 + +extern FILE *grprsm; + +extern int CGRIBEX_Debug, CGRIBEX_Fix_ZSE, CGRIBEX_Const; +extern int CGRIBEX_grib_calendar; + +void gprintf(const char *caller, const char *fmt, ...); + +void grsdef(void); + +void prtbin(int kin, int knbit, int *kout, int *kerr); +void confp3(double pval, int *kexp, int *kmant, int kbits, int kround); +double decfp2(int kexp, int kmant); +void ref2ibm(double *pref, int kbits); + +void scale_complex_double(double *fpdata, int pcStart, int pcScale, int trunc, int inv); +void scale_complex_float(float *fpdata, int pcStart, int pcScale, int trunc, int inv); +void scatter_complex_double(double *fpdata, int pcStart, int trunc, int nsp); +void scatter_complex_float(float *fpdata, int pcStart, int trunc, int nsp); +void gather_complex_double(double *fpdata, size_t pcStart, size_t trunc, size_t nsp); +void gather_complex_float(float *fpdata, size_t pcStart, size_t trunc, size_t nsp); + +int qu2reg2(double *pfield, int *kpoint, int klat, int klon, + double *ztemp, double msval, int *kret); +int qu2reg3_double(double *pfield, int *kpoint, int klat, int klon, + double msval, int *kret, int omisng, int operio, int oveggy); +int qu2reg3_float(float *pfield, int *kpoint, int klat, int klon, + float msval, int *kret, int omisng, int operio, int oveggy); + +#ifdef INT32 +long packInt32(unsigned INT32 *up, unsigned char *cp, long bc, long tc); +#endif +long packInt64(unsigned INT64 *up, unsigned char *cp, long bc, long tc); +#ifdef INT32 +long unpackInt32(const unsigned char *cp, unsigned INT32 *up, long bc, long tc); +#endif +long unpackInt64(const unsigned char *cp, unsigned INT64 *up, long bc, long tc); + +void grib_encode_double(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3, + double *fsec3, int *isec4, double *fsec4, int klenp, int *kgrib, + int kleng, int *kword, int efunc, int *kret); +void grib_encode_float(int *isec0, int *isec1, int *isec2, float *fsec2, int *isec3, + float *fsec3, int *isec4, float *fsec4, int klenp, int *kgrib, + int kleng, int *kword, int efunc, int *kret); + +void grib_decode_double(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3, + double *fsec3, int *isec4, double *fsec4, int klenp, int *kgrib, + int kleng, int *kword, int dfunc, int *kret); +void grib_decode_float(int *isec0, int *isec1, int *isec2, float *fsec2, int *isec3, + float *fsec3, int *isec4, float *fsec4, int klenp, int *kgrib, + int kleng, int *kword, int dfunc, int *kret); + + +int grib1Sections(unsigned char *gribbuffer, long gribbufsize, unsigned char **pdsp, + unsigned char **gdsp, unsigned char **bmsp, unsigned char **bdsp, long *gribrecsize); +int grib2Sections(unsigned char *gribbuffer, long gribbufsize, unsigned char **idsp, + unsigned char **lusp, unsigned char **gdsp, unsigned char **pdsp, + unsigned char **drsp, unsigned char **bmsp, unsigned char **bdsp); + +#ifdef __cplusplus +} +#endif + +#endif /* GRIB_INT_H */ +#ifndef GRIBDECODE_H +#define GRIBDECODE_H + +#define UNDEFINED 9.999e20 + + +#define GET_INT3(a,b,c) ((1-(int) ((unsigned) (a & 128) >> 6)) * (int) (((a & 127) << 16)+(b<<8)+c)) +#define GET_INT2(a,b) ((1-(int) ((unsigned) (a & 128) >> 6)) * (int) (((a & 127) << 8) + b)) +#define GET_INT1(a) ((1-(int) ((unsigned) (a & 128) >> 6)) * (int) (a&127)) + +/* this requires a 32-bit default integer machine */ +#define GET_UINT4(a,b,c,d) ((unsigned) ((a << 24) + (b << 16) + (c << 8) + (d))) +#define GET_UINT3(a,b,c) ((unsigned) ((a << 16) + (b << 8) + (c))) +#define GET_UINT2(a,b) ((unsigned) ((a << 8) + (b))) +#define GET_UINT1(a) ((unsigned) (a)) + +#define BUDG_START(s) (s[0]=='B' && s[1]=='U' && s[2]=='D' && s[3]=='G') +#define TIDE_START(s) (s[0]=='T' && s[1]=='I' && s[2]=='D' && s[3]=='E') +#define GRIB_START(s) (s[0]=='G' && s[1]=='R' && s[2]=='I' && s[3]=='B') +#define GRIB_FIN(s) (s[0]=='7' && s[1]=='7' && s[2]=='7' && s[3]=='7') + +/* GRIB1 Section 0: Indicator Section (IS) */ + +#define GRIB1_SECLEN(s) GET_UINT3(s[ 4], s[ 5], s[ 6]) +#define GRIB_EDITION(s) GET_UINT1(s[ 7]) + +/* GRIB1 Section 1: Product Definition Section (PDS) */ + +#define PDS_Len GET_UINT3(pds[ 0], pds[ 1], pds[ 2]) +#define PDS_CodeTable GET_UINT1(pds[ 3]) +#define PDS_CenterID GET_UINT1(pds[ 4]) +#define PDS_ModelID GET_UINT1(pds[ 5]) +#define PDS_GridDefinition GET_UINT1(pds[ 6]) +#define PDS_Sec2Or3Flag GET_UINT1(pds[ 7]) +#define PDS_HAS_GDS ((pds[7] & 128) != 0) +#define PDS_HAS_BMS ((pds[7] & 64) != 0) +#define PDS_Parameter GET_UINT1(pds[ 8]) +#define PDS_LevelType GET_UINT1(pds[ 9]) +#define PDS_Level1 (pds[10]) +#define PDS_Level2 (pds[11]) +#define PDS_Level GET_UINT2(pds[10], pds[11]) +#define PDS_Year GET_INT1(pds[12]) +#define PDS_Month GET_UINT1(pds[13]) +#define PDS_Day GET_UINT1(pds[14]) +#define PDS_Hour GET_UINT1(pds[15]) +#define PDS_Minute GET_UINT1(pds[16]) +#define PDS_Date (PDS_Year*10000+PDS_Month*100+PDS_Day) +#define PDS_Time (PDS_Hour*100+PDS_Minute) +#define PDS_TimeUnit GET_UINT1(pds[17]) +#define PDS_TimePeriod1 GET_UINT1(pds[18]) +#define PDS_TimePeriod2 GET_UINT1(pds[19]) +#define PDS_TimeRange GET_UINT1(pds[20]) +#define PDS_AvgNum GET_UINT2(pds[21], pds[22]) +#define PDS_AvgMiss GET_UINT1(pds[23]) +#define PDS_Century GET_UINT1(pds[24]) +#define PDS_Subcenter GET_UINT1(pds[25]) +#define PDS_DecimalScale GET_INT2(pds[26],pds[27]) + + +/* GRIB1 Section 2: Grid Description Section (GDS) */ + +#define GDS_Len ((gds) == NULL ? 0 : GET_UINT3(gds[0], gds[1], gds[2])) +#define GDS_NV GET_UINT1(gds[ 3]) +#define GDS_PVPL GET_UINT1(gds[ 4]) +#define GDS_PV ((gds[3] == 0) ? -1 : (int) gds[4] - 1) +#define GDS_PL ((gds[4] == 0xFF) ? -1 : (int) gds[3] * 4 + (int) gds[4] - 1) +#define GDS_GridType GET_UINT1(gds[ 5]) + + +/* GRIB1 Triangular grid of DWD */ +#define GDS_GME_NI2 GET_UINT2(gds[ 6], gds[ 7]) +#define GDS_GME_NI3 GET_UINT2(gds[ 8], gds[ 9]) +#define GDS_GME_ND GET_UINT3(gds[10], gds[11], gds[12]) +#define GDS_GME_NI GET_UINT3(gds[13], gds[14], gds[15]) +#define GDS_GME_AFlag GET_UINT1(gds[16]) +#define GDS_GME_LatPP GET_INT3(gds[17], gds[18], gds[19]) +#define GDS_GME_LonPP GET_INT3(gds[20], gds[21], gds[22]) +#define GDS_GME_LonMPL GET_INT3(gds[23], gds[24], gds[25]) +#define GDS_GME_BFlag GET_UINT1(gds[27]) + +/* GRIB1 Spectral */ +#define GDS_PentaJ GET_UINT2(gds[ 6], gds[ 7]) +#define GDS_PentaK GET_UINT2(gds[ 8], gds[ 9]) +#define GDS_PentaM GET_UINT2(gds[10], gds[11]) +#define GDS_RepType GET_UINT1(gds[12]) +#define GDS_RepMode GET_UINT1(gds[13]) + +/* GRIB1 Regular grid */ +#define GDS_NumLon GET_UINT2(gds[ 6], gds[ 7]) +#define GDS_NumLat GET_UINT2(gds[ 8], gds[ 9]) +#define GDS_FirstLat GET_INT3(gds[10], gds[11], gds[12]) +#define GDS_FirstLon GET_INT3(gds[13], gds[14], gds[15]) +#define GDS_ResFlag GET_UINT1(gds[16]) +#define GDS_LastLat GET_INT3(gds[17], gds[18], gds[19]) +#define GDS_LastLon GET_INT3(gds[20], gds[21], gds[22]) +#define GDS_LonIncr GET_UINT2(gds[23], gds[24]) +#define GDS_LatIncr GET_UINT2(gds[25], gds[26]) +#define GDS_NumPar GET_UINT2(gds[25], gds[26]) +#define GDS_ScanFlag GET_UINT1(gds[27]) +#define GDS_LatSP GET_INT3(gds[32], gds[33], gds[34]) +#define GDS_LonSP GET_INT3(gds[35], gds[36], gds[37]) +#define GDS_RotAngle (GET_Real(&(gds[38]))) + +/* GRIB1 Lambert */ +#define GDS_Lambert_Lov GET_INT3(gds[17], gds[18], gds[19]) +#define GDS_Lambert_dx GET_INT3(gds[20], gds[21], gds[22]) +#define GDS_Lambert_dy GET_INT3(gds[23], gds[24], gds[25]) +#define GDS_Lambert_ProjFlag GET_UINT1(gds[26]) +#define GDS_Lambert_LatS1 GET_INT3(gds[28], gds[29], gds[30]) +#define GDS_Lambert_LatS2 GET_INT3(gds[31], gds[32], gds[33]) +#define GDS_Lambert_LatSP GET_INT3(gds[34], gds[35], gds[36]) +#define GDS_Lambert_LonSP GET_INT3(gds[37], gds[37], gds[37]) + +/* GRIB1 Section 3: Bit Map Section (BMS) */ + +#define BMS_Len ((bms) == NULL ? 0 : GET_UINT3(bms[0], bms[1], bms[2])) +#define BMS_UnusedBits (bms[3]) +#define BMS_Bitmap ((bms) == NULL ? NULL : (bms)+6) +#define BMS_BitmapSize (((((bms[0]<<16)+(bms[1]<<8)+bms[2]) - 6)<<3) - bms[3]) + +/* GRIB1 Section 4: Binary Data Section (BDS) */ + +#define BDS_Len GET_UINT3(bds[0], bds[1], bds[2]) +#define BDS_Flag (bds[3]) +#define BDS_BinScale GET_INT2(bds[ 4], bds[ 5]) +#define BDS_RefValue (decfp2((int)bds[ 6], GET_UINT3(bds[7], bds[8], bds[9]))) +#define BDS_NumBits ((int) bds[10]) +#define BDS_RealCoef (decfp2((int)bds[zoff+11], GET_UINT3(bds[zoff+12], bds[zoff+13], bds[zoff+14]))) +#define BDS_PackData ((int) ((bds[zoff+11]<<8) + bds[zoff+12])) +#define BDS_Power GET_INT2(bds[zoff+13], bds[zoff+14]) +#define BDS_Z (bds[13]) + +/* GRIB1 Section 5: End Section (ES) */ + +/* GRIB2 */ + +#define GRIB2_SECLEN(section) (GET_UINT4(section[0], section[1], section[2], section[3])) +#define GRIB2_SECNUM(section) (GET_UINT1(section[4])) + +#endif /* GRIBDECODE_H */ +#ifndef CGRIBEX_GRIB_ENCODE_H +#define CGRIBEX_GRIB_ENCODE_H + +#include <limits.h> + +#define PutnZero(n) \ +{ \ + for ( size_t i___ = z >= 0 ? (size_t)z : 0; i___ < (size_t)(z+n); i___++ ) lGrib[i___] = 0; \ + z += n; \ +} + +#define Put1Byte(Value) (lGrib[z++] = (GRIBPACK)(Value)) +#define Put2Byte(Value) ((lGrib[z++] = (GRIBPACK)((Value) >> 8)), \ + (lGrib[z++] = (GRIBPACK)(Value))) +#define Put3Byte(Value) ((lGrib[z++] = (GRIBPACK)((Value) >> 16)), \ + (lGrib[z++] = (GRIBPACK)((Value) >> 8)), \ + (lGrib[z++] = (GRIBPACK)(Value))) +#define Put4Byte(Value) ((lGrib[z++] = (GRIBPACK)((Value) >> 24)), \ + (lGrib[z++] = (GRIBPACK)((Value) >> 16)), \ + (lGrib[z++] = (GRIBPACK)((Value) >> 8)), \ + (lGrib[z++] = (GRIBPACK)(Value))) + +#define Put1Int(Value) {ival = Value; if ( ival < 0 ) ival = 0x80 - ival; Put1Byte(ival);} +#define Put2Int(Value) {ival = Value; if ( ival < 0 ) ival = 0x8000 - ival; Put2Byte(ival);} +#define Put3Int(Value) {ival = Value; if ( ival < 0 ) ival = 0x800000 - ival; Put3Byte(ival);} + +enum { + BitsPerInt = (int) (sizeof(int) * CHAR_BIT), +}; + + +#define Put1Real(Value) \ +{ \ + confp3(Value, &exponent, &mantissa, BitsPerInt, 1); \ + Put1Byte(exponent); \ + Put3Byte(mantissa); \ +} + +#endif /* CGRIBEX_GRIB_ENCODE_H */ +#ifndef CODEC_COMMON_H +#define CODEC_COMMON_H +#define gribSwapByteOrder_uint16(ui16) ((uint16_t)((ui16<<8) | (ui16>>8))) +#endif /* CODEC_COMMON_H */ +/* +icc -g -Wall -O3 -march=native -std=c99 -qopt-report=5 -DTEST_MINMAXVAL -qopenmp -DOMP_SIMD minmax_val.c + result on hama2 (icc 16.0.0): + float: +minmax_val: fmin: -500000 fmax: 499999 time: 1.22s +simd : fmin: -500000 fmax: 499999 time: 1.20s + double: +minmax_val: fmin: -500000 fmax: 499999 time: 2.86s +orig : fmin: -500000 fmax: 499999 time: 2.74s +simd : fmin: -500000 fmax: 499999 time: 2.70s +avx : fmin: -500000 fmax: 499999 time: 2.99s + +gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL -fopenmp -DOMP_SIMD -Wa,-q minmax_val.c + result on thunder5 (gcc 6.1.0): +float: +minmax_val: fmin: -500000 fmax: 499999 time: 8.25s + simd : fmin: -500000 fmax: 499999 time: 1.24s +double: +minmax_val: fmin: -500000 fmax: 499999 time: 2.73s + orig : fmin: -500000 fmax: 499999 time: 9.24s + simd : fmin: -500000 fmax: 499999 time: 2.78s + avx : fmin: -500000 fmax: 499999 time: 2.90s + +gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL minmax_val.c + result on bailung (gcc 4.8.2): + orig : fmin: -500000 fmax: 499999 time: 4.82s + sse2 : fmin: -500000 fmax: 499999 time: 4.83s + +gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL -fopenmp -DOMP_SIMD -Wa,-q minmax_val.c + result on thunder5 (gcc 4.8.2): + orig : fmin: -500000 fmax: 499999 time: 3.10s + simd : fmin: -500000 fmax: 499999 time: 3.10s # omp simd in gcc 4.9 + avx : fmin: -500000 fmax: 499999 time: 2.84s + +icc -g -Wall -O3 -march=native -std=c99 -qopt-report=5 -DTEST_MINMAXVAL -openmp -DOMP_SIMD minmax_val.c + result on thunder5 (icc 14.0.2): + orig : fmin: -500000 fmax: 499999 time: 2.83s + simd : fmin: -500000 fmax: 499999 time: 2.83s + avx : fmin: -500000 fmax: 499999 time: 2.92s + +xlc_r -g -O3 -qhot -q64 -qarch=auto -qtune=auto -qreport -DTEST_MINMAXVAL minmax_val.c + result on blizzard (xlc 12): + orig : fmin: -500000 fmax: 499999 time: 7.26s + pwr6u6 : fmin: -500000 fmax: 499999 time: 5.92s +*/ +#ifdef _ARCH_PWR6 +#pragma options nostrict +#endif + +#ifdef OMP_SIMD +#include <omp.h> +#endif + +#include <stdlib.h> + +//#undef _GET_X86_COUNTER +//#undef _GET_IBM_COUNTER +//#undef _GET_MACH_COUNTER +//#undef _ARCH_PWR6 + +#if defined(_GET_IBM_COUNTER) +#include <libhpc.h> +#elif defined(_GET_X86_COUNTER) +#include <x86intrin.h> +#elif defined(_GET_MACH_COUNTER) +#include <mach/mach_time.h> +#endif + +#if defined(__GNUC__) && !defined(__ICC) && !defined(__clang__) +#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 4) +#define GNUC_PUSH_POP +#endif +#endif + +#ifndef DISABLE_SIMD +#if defined(__GNUC__) && (__GNUC__ >= 4) +#elif defined(__ICC) && (__ICC >= 1100) +#elif defined(__clang__) +#else +#define DISABLE_SIMD +#endif +#endif + +#ifdef DISABLE_SIMD +#define DISABLE_SIMD_MINMAXVAL +#endif + +#ifndef TEST_MINMAXVAL +#define DISABLE_SIMD_MINMAXVAL +#endif + +#ifdef DISABLE_SIMD_MINMAXVAL +#ifdef ENABLE_AVX +#define _ENABLE_AVX +#endif +#ifdef ENABLE_SSE2 +#define _ENABLE_SSE2 +#endif +#endif + +#ifndef DISABLE_SIMD_MINMAXVAL +#ifdef __AVX__ +#define _ENABLE_AVX +#endif +#ifdef __SSE2__ +#define _ENABLE_SSE2 +#endif +#endif + +#include <float.h> +#include <stdint.h> +#include <inttypes.h> + +#if defined(_ENABLE_AVX) +#include <immintrin.h> +#elif defined(_ENABLE_SSE2) +#include <emmintrin.h> +#endif + + +#if defined(_ENABLE_AVX) + +static +void avx_minmax_val_double(const double *restrict buf, size_t nframes, double *min, double *max) +{ + double fmin[4], fmax[4]; + __m256d current_max, current_min, work; + + // load max and min values into all four slots of the YMM registers + current_min = _mm256_set1_pd(*min); + current_max = _mm256_set1_pd(*max); + + // Work input until "buf" reaches 32 byte alignment + while ( ((unsigned long)buf) % 32 != 0 && nframes > 0) { + + // Load the next double into the work buffer + work = _mm256_set1_pd(*buf); + current_min = _mm256_min_pd(current_min, work); + current_max = _mm256_max_pd(current_max, work); + buf++; + nframes--; + } + + while (nframes >= 16) { + + (void) _mm_prefetch((const char *)(buf+8), _MM_HINT_NTA); + + work = _mm256_load_pd(buf); + current_min = _mm256_min_pd(current_min, work); + current_max = _mm256_max_pd(current_max, work); + buf += 4; + + work = _mm256_load_pd(buf); + current_min = _mm256_min_pd(current_min, work); + current_max = _mm256_max_pd(current_max, work); + buf += 4; + + (void) _mm_prefetch((const char *)(buf+8), _MM_HINT_NTA); + + work = _mm256_load_pd(buf); + current_min = _mm256_min_pd(current_min, work); + current_max = _mm256_max_pd(current_max, work); + buf += 4; + + work = _mm256_load_pd(buf); + current_min = _mm256_min_pd(current_min, work); + current_max = _mm256_max_pd(current_max, work); + buf += 4; + nframes -= 16; + } + + // work through aligned buffers + while (nframes >= 4) { + work = _mm256_load_pd(buf); + current_min = _mm256_min_pd(current_min, work); + current_max = _mm256_max_pd(current_max, work); + buf += 4; + nframes -= 4; + } + + // work through the remainung values + while ( nframes > 0) { + work = _mm256_set1_pd(*buf); + current_min = _mm256_min_pd(current_min, work); + current_max = _mm256_max_pd(current_max, work); + buf++; + nframes--; + } + + // find min & max value through shuffle tricks + + work = current_min; + work = _mm256_shuffle_pd(work, work, 5); + work = _mm256_min_pd (work, current_min); + current_min = work; + work = _mm256_permute2f128_pd(work, work, 1); + work = _mm256_min_pd (work, current_min); + _mm256_storeu_pd(fmin, work); + + work = current_max; + work = current_max; + work = _mm256_shuffle_pd(work, work, 5); + work = _mm256_max_pd (work, current_max); + current_max = work; + work = _mm256_permute2f128_pd(work, work, 1); + work = _mm256_max_pd (work, current_max); + _mm256_storeu_pd(fmax, work); + + *min = fmin[0]; + *max = fmax[0]; + + return; +} + +#elif defined(_ENABLE_SSE2) + +static +void sse2_minmax_val_double(const double *restrict buf, size_t nframes, double *min, double *max) +{ + __m128d current_max, current_min, work; + + // load starting max and min values into all slots of the XMM registers + current_min = _mm_set1_pd(*min); + current_max = _mm_set1_pd(*max); + + // work on input until buf reaches 16 byte alignment + while ( ((unsigned long)buf) % 16 != 0 && nframes > 0) { + + // load one double and replicate + work = _mm_set1_pd(*buf); + current_min = _mm_min_pd(current_min, work); + current_max = _mm_max_pd(current_max, work); + buf++; + nframes--; + } + + while (nframes >= 8) { + // use 64 byte prefetch for double octetts + // __builtin_prefetch(buf+64,0,0); // for GCC 4.3.2 + + + work = _mm_load_pd(buf); + current_min = _mm_min_pd(current_min, work); + current_max = _mm_max_pd(current_max, work); + buf += 2; + work = _mm_load_pd(buf); + current_min = _mm_min_pd(current_min, work); + current_max = _mm_max_pd(current_max, work); + buf += 2; + work = _mm_load_pd(buf); + current_min = _mm_min_pd(current_min, work); + current_max = _mm_max_pd(current_max, work); + buf += 2; + work = _mm_load_pd(buf); + current_min = _mm_min_pd(current_min, work); + current_max = _mm_max_pd(current_max, work); + buf += 2; + nframes -= 8; + } + + // work through smaller chunks of aligned buffers without prefetching + while (nframes >= 2) { + work = _mm_load_pd(buf); + current_min = _mm_min_pd(current_min, work); + current_max = _mm_max_pd(current_max, work); + buf += 2; + nframes -= 2; + } + + // work through the remaining value + while ( nframes > 0) { + // load the last double and replicate + work = _mm_set1_pd(*buf); + current_min = _mm_min_pd(current_min, work); + current_max = _mm_max_pd(current_max, work); + buf++; + nframes--; + } + + // find final min and max value through shuffle tricks + work = current_min; + work = _mm_shuffle_pd(work, work, _MM_SHUFFLE2(0, 1)); + work = _mm_min_pd (work, current_min); + _mm_store_sd(min, work); + work = current_max; + work = _mm_shuffle_pd(work, work, _MM_SHUFFLE2(0, 1)); + work = _mm_max_pd (work, current_max); + _mm_store_sd(max, work); + + return; +} + +#endif // SIMD + +#if defined(_ARCH_PWR6) +static +void pwr6_minmax_val_double_unrolled6(const double *restrict data, size_t datasize, double *fmin, double *fmax) +{ +#define __UNROLL_DEPTH_1 6 + + // to allow pipelining we have to unroll + + { + size_t residual = datasize % __UNROLL_DEPTH_1; + size_t ofs = datasize - residual; + double register dmin[__UNROLL_DEPTH_1]; + double register dmax[__UNROLL_DEPTH_1]; + + for (size_t j = 0; j < __UNROLL_DEPTH_1; ++j) + { + dmin[j] = data[0]; + dmax[j] = data[0]; + } + + for (size_t i = 0; i < datasize - residual; i += __UNROLL_DEPTH_1) + { + for (size_t j = 0; j < __UNROLL_DEPTH_1; ++j) + { + dmin[j] = __fsel(dmin[j] - data[i+j], data[i+j], dmin[j]); + dmax[j] = __fsel(data[i+j] - dmax[j], data[i+j], dmax[j]); + } + } + + for (size_t j = 0; j < residual; ++j) + { + dmin[j] = __fsel(dmin[j] - data[ofs+j], data[ofs+j], dmin[j]); + dmax[j] = __fsel(data[ofs+j] - dmax[j], data[ofs+j], dmax[j]); + } + + for (size_t j = 0; j < __UNROLL_DEPTH_1; ++j) + { + *fmin = __fsel(*fmin - dmin[j], dmin[j], *fmin); + *fmax = __fsel(dmax[j] - *fmax, dmax[j], *fmax); + } + } +#undef __UNROLL_DEPTH_1 +} +#endif + +#if defined(TEST_MINMAXVAL) && defined(__GNUC__) +static +void minmax_val_double_orig(const double *restrict data, size_t datasize, double *fmin, double *fmax) __attribute__ ((noinline)); +static +void minmax_val_double_simd(const double *restrict data, size_t datasize, double *fmin, double *fmax) __attribute__ ((noinline)); +static +void minmax_val_double_omp(const double *restrict data, size_t datasize, double *fmin, double *fmax) __attribute__ ((noinline)); +static +void minmax_val_float(const float *restrict data, long datasize, float *fmin, float *fmax) __attribute__ ((noinline)); +static +void minmax_val_float_simd(const float *restrict data, size_t datasize, float *fmin, float *fmax) __attribute__ ((noinline)); +#endif + +#if defined(GNUC_PUSH_POP) +#pragma GCC push_options +#pragma GCC optimize ("O3", "fast-math") +#endif +static +void minmax_val_double_orig(const double *restrict data, size_t datasize, double *fmin, double *fmax) +{ + double dmin = *fmin, dmax = *fmax; + +#if defined(CRAY) +#pragma _CRI ivdep +#elif defined(SX) +#pragma vdir nodep +#elif defined(__uxp__) +#pragma loop novrec +#elif defined (__ICC) +#pragma ivdep +#endif + for (size_t i = 0; i < datasize; ++i) + { + dmin = (dmin < data[i]) ? dmin : data[i]; + dmax = (dmax > data[i]) ? dmax : data[i]; + } + + *fmin = dmin; + *fmax = dmax; +} + +static +void minmax_val_float(const float *restrict data, long idatasize, float *fmin, float *fmax) +{ + size_t datasize = (size_t)idatasize; + float dmin = *fmin, dmax = *fmax; + +#if defined(CRAY) +#pragma _CRI ivdep +#elif defined(SX) +#pragma vdir nodep +#elif defined(__uxp__) +#pragma loop novrec +#elif defined (__ICC) +#pragma ivdep +#endif + for (size_t i = 0; i < datasize; ++i) + { + dmin = (dmin < data[i]) ? dmin : data[i]; + dmax = (dmax > data[i]) ? dmax : data[i]; + } + + *fmin = dmin; + *fmax = dmax; +} +#if defined(GNUC_PUSH_POP) +#pragma GCC pop_options +#endif + +// TEST +#if defined(OMP_SIMD) + +#if defined(GNUC_PUSH_POP) +#pragma GCC push_options +#pragma GCC optimize ("O3", "fast-math") +#endif +static +void minmax_val_double_omp(const double *restrict data, size_t datasize, double *fmin, double *fmax) +{ + double dmin = *fmin, dmax = *fmax; + +#if defined(_OPENMP) +#pragma omp parallel for simd reduction(min:dmin) reduction(max:dmax) +#endif + for (size_t i = 0; i < datasize; ++i) + { + dmin = (dmin < data[i]) ? dmin : data[i]; + dmax = (dmax > data[i]) ? dmax : data[i]; + } + + *fmin = dmin; + *fmax = dmax; +} + +static +void minmax_val_double_simd(const double *restrict data, size_t datasize, double *fmin, double *fmax) +{ + double dmin = *fmin, dmax = *fmax; + +#ifdef _OPENMP +#pragma omp simd reduction(min:dmin) reduction(max:dmax) +#endif + for (size_t i = 0; i < datasize; ++i) + { + dmin = (dmin < data[i]) ? dmin : data[i]; + dmax = (dmax > data[i]) ? dmax : data[i]; + } + + *fmin = dmin; + *fmax = dmax; +} + +static +void minmax_val_float_simd(const float *restrict data, size_t datasize, float *fmin, float *fmax) +{ + float dmin = *fmin, dmax = *fmax; + +#if defined(_OPENMP) +#pragma omp simd reduction(min:dmin) reduction(max:dmax) +#endif + for (size_t i = 0; i < datasize; ++i) + { + dmin = (dmin < data[i]) ? dmin : data[i]; + dmax = (dmax > data[i]) ? dmax : data[i]; + } + + *fmin = dmin; + *fmax = dmax; +} +#if defined(GNUC_PUSH_POP) +#pragma GCC pop_options +#endif +#endif + +static +void minmax_val_double(const double *restrict data, long idatasize, double *fmin, double *fmax) +{ +#if defined(_GET_X86_COUNTER) || defined(_GET_MACH_COUNTER) + uint64_t start_minmax, end_minmax; +#endif + size_t datasize = (size_t)idatasize; + + if ( idatasize >= 1 ) ; else return; + +#if defined(_GET_X86_COUNTER) + start_minmax = _rdtsc(); +#endif +#if defined(_GET_MACH_COUNTER) + start_minmax = mach_absolute_time(); +#endif + +#if defined(_ENABLE_AVX) + + avx_minmax_val_double(data, datasize, fmin, fmax); + +#elif defined(_ENABLE_SSE2) + + sse2_minmax_val_double(data, datasize, fmin, fmax); + +#else + +#if defined(_ARCH_PWR6) +#define __UNROLL_DEPTH_1 6 + + // to allow pipelining we have to unroll + +#if defined(_GET_IBM_COUNTER) + hpmStart(1, "minmax fsel"); +#endif + + pwr6_minmax_val_double_unrolled6(data, datasize, fmin, fmax); + +#if defined(_GET_IBM_COUNTER) + hpmStop(1); +#endif + +#undef __UNROLL_DEPTH_1 + +#else // original loop + +#if defined(_GET_IBM_COUNTER) + hpmStart(1, "minmax base"); +#endif + + minmax_val_double_orig(data, datasize, fmin, fmax); + +#if defined(_GET_IBM_COUNTER) + hpmStop(1); +#endif + +#endif // _ARCH_PWR6 && original loop +#endif // SIMD + +#if defined(_GET_X86_COUNTER) || defined(_GET_MACH_COUNTER) +#if defined(_GET_X86_COUNTER) + end_minmax = _rdtsc(); +#endif +#if defined(_GET_MACH_COUNTER) + end_minmax = mach_absolute_time(); +#endif +#if defined(_ENABLE_AVX) + printf("AVX minmax cycles:: %" PRIu64 "\n", end_minmax-start_minmax); + fprintf (stderr, "AVX min: %lf max: %lf\n", *fmin, *fmax); +#elif defined(_ENABLE_SSE2) + printf("SSE2 minmax cycles:: %" PRIu64 "\n", end_minmax-start_minmax); + fprintf (stderr, "SSE2 min: %lf max: %lf\n", *fmin, *fmax); +#else + printf("loop minmax cycles:: %" PRIu64 "\n", end_minmax-start_minmax); + fprintf (stderr, "loop min: %lf max: %lf\n", *fmin, *fmax); +#endif +#endif + + return; +} + +#if defined(TEST_MINMAXVAL) + +#include <stdio.h> +#include <sys/time.h> + +static +double dtime() +{ + double tseconds = 0.0; + struct timeval mytime; + gettimeofday(&mytime, NULL); + tseconds = (double) (mytime.tv_sec + (double)mytime.tv_usec*1.0e-6); + return (tseconds); +} + +#define NRUN 10000 + +int main(void) +{ + long datasize = 1000000; + double t_begin, t_end; + + printf("datasize %ld\n", datasize); +#if defined(_OPENMP) + printf("_OPENMP=%d\n", _OPENMP); +#endif + +#if defined(__ICC) + printf("icc\n"); +#elif defined(__clang__) + printf("clang\n"); +#elif defined(__GNUC__) + printf("gcc\n"); +#endif + + { + float fmin, fmax; + float *data_sp = (float*) malloc(datasize*sizeof(float)); + + for (long i = 0; i < datasize/2; ++i) data_sp[i] = (float) (i); + for (long i = datasize/2; i < datasize; ++i) data_sp[i] = (float) (-datasize + i); + + printf("float:\n"); + + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_sp[0]; + minmax_val_float(data_sp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("minmax_val: fmin: %ld fmax: %ld time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin); + +#if defined(OMP_SIMD) + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_sp[0]; + minmax_val_float_simd(data_sp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("simd : fmin: %ld fmax: %ld time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin); +#endif + + free(data_sp); + } + + { + double fmin, fmax; + double *data_dp = (double*) malloc(datasize*sizeof(double)); + + // for (long i = datasize-1; i >= 0; --i) data[i] = (double) (-datasize/2 + i); + for (long i = 0; i < datasize/2; ++i) data_dp[i] = (double) (i); + for (long i = datasize/2; i < datasize; ++i) data_dp[i] = (double) (-datasize + i); + + printf("double:\n"); + + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_dp[0]; + minmax_val_double(data_dp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("minmax_val: fmin: %ld fmax: %ld time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin); + + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_dp[0]; + minmax_val_double_orig(data_dp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("orig : fmin: %ld fmax: %ld time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin); + +#if defined(OMP_SIMD) + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_dp[0]; + minmax_val_double_simd(data_dp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("simd : fmin: %ld fmax: %ld time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin); + + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_dp[0]; + minmax_val_double_omp(data_dp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("openmp %d : fmin: %ld fmax: %ld time: %6.2fs\n", omp_get_max_threads(), (long)fmin, (long) fmax, t_end-t_begin); +#endif + +#if defined(_ENABLE_AVX) + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_dp[0]; + avx_minmax_val_double(data_dp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("avx : fmin: %ld fmax: %ld time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin); +#elif defined(_ENABLE_SSE2) + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_dp[0]; + sse2_minmax_val_double(data_dp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("sse2 : fmin: %ld fmax: %ld time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin); +#endif +#if defined(_ARCH_PWR6) + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + fmin = fmax = data_dp[0]; + pwr6_minmax_val_double_unrolled6(data_dp, datasize, &fmin, &fmax); + } + t_end = dtime(); + printf("pwr6u6 : fmin: %ld fmax: %ld time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin); +#endif + free(data_dp); + } + + return 0; +} +#endif // TEST_MINMAXVAL + +#undef DISABLE_SIMD_MINMAXVAL +#undef _ENABLE_AVX +#undef _ENABLE_SSE2 +#undef GNUC_PUSH_POP +/* +### new version with gribSwapByteOrder_uint16() +icc -g -Wall -O3 -march=native -std=c99 -qopt-report=5 -DTEST_ENCODE encode_array.c + result on hama2 (icc 16.0.2): + float: + orig: val1: 1 val2: 1 val3: 2 valn: 66 time: 1.8731s +unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 2.0898s + double: + orig: val1: 1 val2: 1 val3: 2 valn: 66 time: 3.68089s +unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 4.30798s + avx: val1: 1 val2: 1 val3: 2 valn: 66 time: 4.23864s + +gcc -g -Wall -O3 -march=native -Wa,-q -std=c99 -DTEST_ENCODE encode_array.c + result on hama2 (gcc 6.1.0): +float: + orig: val1: 1 val2: 1 val3: 2 valn: 66 time: 2.22871s +unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 2.30281s +double: + orig: val1: 1 val2: 1 val3: 2 valn: 66 time: 4.2669s +unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 4.81643s + avx: val1: 1 val2: 1 val3: 2 valn: 66 time: 3.98415s + +### +icc -g -Wall -O3 -march=native -std=c99 -qopt-report=5 -DTEST_ENCODE encode_array.c + result on hama2 (icc 16.0.0): + float: + orig: val1: 1 val2: 1 val3: 2 valn: 66 time: 9.10691s +unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 8.63584s + double: + orig: val1: 1 val2: 1 val3: 2 valn: 66 time: 13.5768s +unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 9.17742s + avx: val1: 1 val2: 1 val3: 2 valn: 66 time: 3.9488s + +gcc -g -Wall -O3 -std=c99 -DTEST_ENCODE encode_array.c + result on hama2 (gcc 5.2.0): + float: + orig: val1: 1 val2: 1 val3: 2 valn: 66 time: 5.32775s +unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 7.87125s + double: + orig: val1: 1 val2: 1 val3: 2 valn: 66 time: 7.85873s +unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 12.9979s + +### +gcc -g -Wall -O3 -march=native -std=c99 -DTEST_ENCODE encode_array.c + result on bailung (gcc 4.7): + orig : val1: 1 val2: 1 val3: 2 valn: 66 time: 8.4166s + sse41 : val1: 1 val2: 1 val3: 2 valn: 66 time: 7.1522s + +gcc -g -Wall -O3 -march=native -std=c99 -DTEST_ENCODE encode_array.c + result on thunder5 (gcc 4.7): + orig : val1: 1 val2: 1 val3: 2 valn: 66 time: 6.21976s + avx : val1: 1 val2: 1 val3: 2 valn: 66 time: 4.54485s + +icc -g -Wall -O3 -march=native -std=c99 -vec-report=1 -DTEST_ENCODE encode_array.c + result on thunder5 (icc 13.2): + orig : val1: 1 val2: 1 val3: 2 valn: 66 time: 14.6279s + avx : val1: 1 val2: 1 val3: 2 valn: 66 time: 4.9776s + +xlc_r -g -O3 -qhot -q64 -qarch=auto -qtune=auto -qreport -DTEST_ENCODE encode_array.c + result on blizzard (xlc 12): + orig : val1: 1 val2: 1 val3: 2 valn: 66 time: 132.25s + unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 27.202s + orig : val1: 1 val2: 1 val3: 2 valn: 66 time: 106.627s // without -qhot + unrolled: val1: 1 val2: 1 val3: 2 valn: 66 time: 39.929s // without -qhot +*/ +#ifdef _ARCH_PWR6 +#pragma options nostrict +#endif + +#ifdef TEST_ENCODE +#include <stdio.h> +#include <stdlib.h> +#define GRIBPACK unsigned char + +#ifndef HOST_ENDIANNESS +#ifdef __cplusplus +static const uint32_t HOST_ENDIANNESS_temp[1] = { UINT32_C(0x00030201) }; +#define HOST_ENDIANNESS (((const unsigned char *)HOST_ENDIANNESS_temp)[0]) +#else +#define HOST_ENDIANNESS (((const unsigned char *)&(const uint32_t[1]){UINT32_C(0x00030201)})[0]) +#endif +#endif + +#define IS_BIGENDIAN() (HOST_ENDIANNESS == 0) +#define Error(x,y) +#endif + +//#undef _GET_X86_COUNTER +//#undef _GET_MACH_COUNTER +//#undef _GET_IBM_COUNTER +//#undef _ARCH_PWR6 + +#if defined _GET_IBM_COUNTER +#include <libhpc.h> +#elif defined _GET_X86_COUNTER +#include <x86intrin.h> +#elif defined _GET_MACH_COUNTER +#include <mach/mach_time.h> +#endif + +#include <stdint.h> +#include <math.h> + +#ifndef DISABLE_SIMD +#if defined(__GNUC__) && (__GNUC__ >= 4) +#elif defined(__ICC) && (__ICC >= 1100) +#elif defined(__clang__) +#else +#define DISABLE_SIMD +#endif +#endif + +#ifdef DISABLE_SIMD +#define DISABLE_SIMD_ENCODE +#endif + +//#define DISABLE_SIMD_ENCODE + +#ifdef DISABLE_SIMD_ENCODE +# ifdef ENABLE_AVX +# define _ENABLE_AVX +# endif +# ifdef ENABLE_SSE4_1 +# define _ENABLE_SSE4_1 +# endif +#endif + +#ifndef DISABLE_SIMD_ENCODE +# ifdef __AVX__ +# define _ENABLE_AVX +# endif +# ifdef __SSE4_1__ +# define _ENABLE_SSE4_1 +# endif +#endif + +#if defined _ENABLE_AVX +#include <immintrin.h> +#elif defined _ENABLE_SSE4_1 +#include <smmintrin.h> +#endif + +#if defined _ENABLE_AVX + +static +void avx_encode_array_2byte_double(size_t datasize, + unsigned char * restrict lGrib, + const double * restrict data, + double zref, double factor, size_t *gz) + __attribute__((optimize(2))); +static +void avx_encode_array_2byte_double(size_t datasize, + unsigned char * restrict lGrib, + const double * restrict data, + double zref, double factor, size_t *gz) +{ + const double *dval = data; + __m128i *sgrib = (__m128i *) (lGrib+(*gz)); + + const __m128i swap = _mm_set_epi8(14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1); + + const __m256d c0 = _mm256_set1_pd(zref); + const __m256d c1 = _mm256_set1_pd(factor); + const __m256d c2 = _mm256_set1_pd(0.5); + + __m256d d0, d3, d2, d1; + __m128i i0, i1, i2, i3; + __m128i s0, s1; + + size_t residual = datasize % 16; + + size_t i; + for (i = 0; i < (datasize-residual); i += 16) + { + (void) _mm_prefetch((const char*)(dval+8), _MM_HINT_NTA); + //_____________________________________________________________________________ + + d0 = _mm256_loadu_pd (dval); + d0 = _mm256_sub_pd (d0, c0); + d0 = _mm256_mul_pd (d0, c1); + d0 = _mm256_add_pd (d0, c2); + + i0 = _mm256_cvttpd_epi32 (d0); + + //_____________________________________________________________________________ + + d1 = _mm256_loadu_pd (dval+4); + d1 = _mm256_sub_pd (d1, c0); + d1 = _mm256_mul_pd (d1, c1); + d1 = _mm256_add_pd (d1, c2); + + i1 = _mm256_cvttpd_epi32 (d1); + + //_____________________________________________________________________________ + + s0 = _mm_packus_epi32(i0, i1); + s0 = _mm_shuffle_epi8 (s0, swap); + (void) _mm_storeu_si128 (sgrib, s0); + + //_____________________________________________________________________________ + + (void) _mm_prefetch((const char*)(dval+16), _MM_HINT_NTA); + + //_____________________________________________________________________________ + + d2 = _mm256_loadu_pd (dval+8); + d2 = _mm256_sub_pd (d2, c0); + d2 = _mm256_mul_pd (d2, c1); + d2 = _mm256_add_pd (d2, c2); + + i2 = _mm256_cvttpd_epi32 (d2); + + //_____________________________________________________________________________ + + d3 = _mm256_loadu_pd (dval+12); + d3 = _mm256_sub_pd (d3, c0); + d3 = _mm256_mul_pd (d3, c1); + d3 = _mm256_add_pd (d3, c2); + + i3 = _mm256_cvttpd_epi32 (d3); + + //_____________________________________________________________________________ + + s1 = _mm_packus_epi32(i2, i3); + s1 = _mm_shuffle_epi8 (s1, swap); + (void) _mm_storeu_si128 (sgrib+1, s1); + + //_____________________________________________________________________________ + + dval += 16; + sgrib += 2; + } + + if (i != datasize) + { + uint16_t ui16; + for (size_t j = i; j < datasize; ++j) + { + ui16 = (uint16_t) ((data[j] - zref) * factor + 0.5); + lGrib[*gz+2*j ] = ui16 >> 8; + lGrib[*gz+2*j+1] = ui16; + } + } + + *gz += 2*datasize; + + return; +} + +#define grib_encode_array_2byte_double avx_encode_array_2byte_double + +#elif defined _ENABLE_SSE4_1 + +static +void sse41_encode_array_2byte_double(size_t datasize, + unsigned char * restrict lGrib, + const double * restrict data, + double zref, double factor, size_t *gz) +{ + const double *dval = data; + __m128i *sgrib = (__m128i *) (lGrib+(*gz)); + + const __m128i swap = _mm_set_epi8(14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1); + + const __m128d c0 = _mm_set1_pd(zref); + const __m128d c1 = _mm_set1_pd(factor); + const __m128d c2 = _mm_set1_pd(0.5); + + __m128d d0, d4, d3, d2, d1; + __m128i i0, i1, i2, i3, i4; + __m128i s0, s1; + + size_t residual = datasize % 16; + + size_t i; + for (i = 0; i < (datasize-residual); i += 16) + { + (void) _mm_prefetch((const char*)(dval+8), _MM_HINT_NTA); + //_____________________________________________________________________________ + + d0 = _mm_loadu_pd (dval); + d0 = _mm_sub_pd (d0, c0); + d0 = _mm_mul_pd (d0, c1); + d0 = _mm_add_pd (d0, c2); + + d4 = _mm_loadu_pd (dval+2); + d4 = _mm_sub_pd (d4, c0); + d4 = _mm_mul_pd (d4, c1); + d4 = _mm_add_pd (d4, c2); + + i0 = _mm_cvttpd_epi32 (d0); + i4 = _mm_cvttpd_epi32 (d4); + i0 = _mm_unpacklo_epi64 (i0, i4); + + //_____________________________________________________________________________ + + d1 = _mm_loadu_pd (dval+4); + d1 = _mm_sub_pd (d1, c0); + d1 = _mm_mul_pd (d1, c1); + d1 = _mm_add_pd (d1, c2); + + d4 = _mm_loadu_pd (dval+6); + d4 = _mm_sub_pd (d4, c0); + d4 = _mm_mul_pd (d4, c1); + d4 = _mm_add_pd (d4, c2); + + i1 = _mm_cvttpd_epi32 (d1); + i4 = _mm_cvttpd_epi32 (d4); + i1 = _mm_unpacklo_epi64 (i1, i4); + + //_____________________________________________________________________________ + + s0 = _mm_packus_epi32(i0, i1); + s0 = _mm_shuffle_epi8 (s0, swap); + (void) _mm_storeu_si128 (sgrib, s0); + + //_____________________________________________________________________________ + + (void) _mm_prefetch((const char*)(dval+16), _MM_HINT_NTA); + + //_____________________________________________________________________________ + + d2 = _mm_loadu_pd (dval+8); + d2 = _mm_sub_pd (d2, c0); + d2 = _mm_mul_pd (d2, c1); + d2 = _mm_add_pd (d2, c2); + + d4 = _mm_loadu_pd (dval+10); + d4 = _mm_sub_pd (d4, c0); + d4 = _mm_mul_pd (d4, c1); + d4 = _mm_add_pd (d4, c2); + + i2 = _mm_cvttpd_epi32 (d2); + i4 = _mm_cvttpd_epi32 (d4); + i2 = _mm_unpacklo_epi64 (i2, i4); + + //_____________________________________________________________________________ + + d3 = _mm_loadu_pd (dval+12); + d3 = _mm_sub_pd (d3, c0); + d3 = _mm_mul_pd (d3, c1); + d3 = _mm_add_pd (d3, c2); + + d4 = _mm_loadu_pd (dval+14); + d4 = _mm_sub_pd (d4, c0); + d4 = _mm_mul_pd (d4, c1); + d4 = _mm_add_pd (d4, c2); + + i3 = _mm_cvttpd_epi32 (d3); + i4 = _mm_cvttpd_epi32 (d4); + i3 = _mm_unpacklo_epi64 (i3, i4); + + //_____________________________________________________________________________ + + s1 = _mm_packus_epi32(i2, i3); + s1 = _mm_shuffle_epi8 (s1, swap); + (void) _mm_storeu_si128 (sgrib+1, s1); + + //_____________________________________________________________________________ + + dval += 16; + sgrib += 2; + } + + if (i != datasize) + { + uint16_t ui16; + for (size_t j = i; j < datasize; ++j) + { + ui16 = (uint16_t) ((data[j] - zref) * factor + 0.5); + lGrib[*gz+2*j ] = ui16 >> 8; + lGrib[*gz+2*j+1] = ui16; + } + } + + *gz += 2*datasize; + + return; +} + +#define grib_encode_array_2byte_double sse41_encode_array_2byte_double + +#else + +#define grib_encode_array_2byte_double encode_array_2byte_double + +#endif // SIMD variants + + +#ifdef TEST_ENCODE + +#define CAT(X,Y) X##_##Y +#define TEMPLATE(X,Y) CAT(X,Y) + +#ifdef T +#undef T +#endif +#define T double + +#ifdef T +#undef T +#endif +#define T float + + +#include <sys/time.h> + +static +double dtime() +{ + double tseconds = 0.0; + struct timeval mytime; + gettimeofday(&mytime, NULL); + tseconds = (double) (mytime.tv_sec + (double)mytime.tv_usec*1.0e-6); + return (tseconds); +} + + +static +void pout(char *name, int s, unsigned char *lgrib, long datasize, double tt) +{ + printf("%8s: val1: %d val2: %d val3: %d valn: %d time: %gs\n", + name, (int) lgrib[s*1+1], (int) lgrib[s*2+1], (int) lgrib[s*3+1], (int) lgrib[2*datasize-1], tt); +} + +int main(void) +{ + enum { + datasize = 1000000, + NRUN = 10000, + }; + + double t_begin, t_end; + + float *dataf = (float*) malloc(datasize*sizeof(float)); + double *data = (double*) malloc(datasize*sizeof(double)); + unsigned char *lgrib = (unsigned char*) malloc(2*datasize*sizeof(unsigned char)); + + for (long i = 0; i < datasize; ++i) dataf[i] = (float) (-datasize/2 + i); + for (long i = 0; i < datasize; ++i) data[i] = (double) (-datasize/2 + i); + + int PackStart = 0; + int nbpv = 16; + double zref = data[0]; + size_t z; + double factor = 0.00390625; + int s = 256; + + if ( 0 ) + { + encode_array_float(0, 0, 0, NULL, NULL, 0, 0, NULL); + encode_array_double(0, 0, 0, NULL, NULL, 0, 0, NULL); + } + +#if defined(__ICC) + printf("icc\n"); +#elif defined(__clang__) + printf("clang\n"); +#elif defined(__GNUC__) + printf("gcc\n"); +#endif + + printf("float:\n"); + + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + z = 0; + encode_array_2byte_float(datasize, lgrib, dataf, (float)zref, (float)factor, &z); + } + t_end = dtime(); + pout("orig", s, lgrib, datasize, t_end-t_begin); + + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + z = 0; + encode_array_unrolled_float(nbpv, PackStart, datasize, lgrib, dataf, (float)zref, (float)factor, &z); + } + t_end = dtime(); + pout("unrolled", s, lgrib, datasize, t_end-t_begin); + + printf("double:\n"); + + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + z = 0; + encode_array_2byte_double(datasize, lgrib, data, zref, factor, &z); + } + t_end = dtime(); + pout("orig", s, lgrib, datasize, t_end-t_begin); + + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + z = 0; + encode_array_unrolled_double(nbpv, PackStart, datasize, lgrib, data, zref, factor, &z); + } + t_end = dtime(); + pout("unrolled", s, lgrib, datasize, t_end-t_begin); + +#if defined _ENABLE_AVX + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + z = 0; + avx_encode_array_2byte_double(datasize, lgrib, data, zref, factor, &z); + } + t_end = dtime(); + pout("avx", s, lgrib, datasize, t_end-t_begin); +#elif defined _ENABLE_SSE4_1 + t_begin = dtime(); + for (int i = 0; i < NRUN; ++i) + { + z = 0; + sse41_encode_array_2byte_double(datasize, lgrib, data, zref, factor, &z); + } + t_end = dtime(); + pout("sse41", s, lgrib, datasize, t_end-t_begin); +#endif + + return 0; +} +#endif // TEST_ENCODE + +#undef DISABLE_SIMD_ENCODE +#undef _ENABLE_AVX +#undef _ENABLE_SSE4_1 + +void +confp3(double pval, int *kexp, int *kmant, int kbits, int kround) +{ + /* + + Purpose: + -------- + + Convert floating point number from machine + representation to GRIB representation. + + Input Parameters: + ----------------- + + pval - Floating point number to be converted. + kbits - Number of bits in computer word. + kround - Conversion type. + 0 , Closest number in GRIB format less than + original number. + 1 , Closest number in GRIB format to the + original number (equal to, greater than or + less than original number). + + Output Parameters: + ------------------ + + kexp - 8 Bit signed exponent. + kmant - 24 Bit mantissa. + + Method: + ------- + + Floating point number represented as 8 bit signed + exponent and 24 bit mantissa in integer values. + + Externals. + ---------- + + decfp2 - Decode from IBM floating point format. + + Reference: + ---------- + + WMO Manual on Codes re GRIB representation. + + Comments: + --------- + + Routine aborts if an invalid conversion type parameter + is used or if a 24 bit mantissa is not produced. + + Author: + ------- + + John Hennessy ECMWF 18.06.91 + + Modifications: + -------------- + + Uwe Schulzweida MPIfM 01/04/2001 + + Convert to C from EMOS library version 130 + + Uwe Schulzweida MPIfM 02/08/2002 + + - speed up by factor 1.6 on NEC SX6 + - replace 1.0 / pow(16.0, (double)(iexp - 70)) by rpow16m70tab[iexp] + */ + + // extern int CGRIBEX_Debug; + + /* ----------------------------------------------------------------- */ + /* Section 1 . Initialise */ + /* ----------------------------------------------------------------- */ + + // Check conversion type parameter. + + int iround = kround; + if (iround != 0 && iround != 1) + { + Error("Invalid conversion type = %d", iround); + + // If not aborting, arbitrarily set rounding to 'up'. + iround = 1; + } + + /* ----------------------------------------------------------------- */ + /* Section 2 . Convert value of zero. */ + /* ----------------------------------------------------------------- */ + + if (fabs(pval) <= 0) + { + *kexp = 0; + *kmant = 0; + goto LABEL900; + } + + /* ----------------------------------------------------------------- */ + /* Section 3 . Convert other values. */ + /* ----------------------------------------------------------------- */ + { + const double zeps = (kbits != 32) ? 1.0e-12 : 1.0e-8; + double zref = pval; + + // Sign of value. + const int isign = (zref >= 0.0) ? 0 : 128; + zref = fabs(zref); + + // Exponent. + int iexp = (int) (log(zref) / log(16.0) + 65.0 + zeps); + + // only ANSI C99 has log2 + // iexp = (int) (log2(zref) * 0.25 + 65.0 + zeps); + + if (iexp < 0) iexp = 0; + if (iexp > 127) iexp = 127; + + // double rpowref = zref / pow(16.0, (double)(iexp - 70)); + double rpowref = ldexp(zref, 4 * -(iexp - 70)); + + // Mantissa. + if (iround == 0) + { + /* Closest number in GRIB format less than original number. */ + /* Truncate for positive numbers. */ + /* Round up for negative numbers. */ + *kmant = (isign == 0) ? (int) rpowref : (int) lround(rpowref + 0.5); + } + else + { + /* Closest number in GRIB format to the original number */ + /* (equal to, greater than or less than original number). */ + *kmant = (int) lround(rpowref); + } + + /* Check that mantissa value does not exceed 24 bits. */ + /* If it does, adjust the exponent upwards and recalculate the mantissa. */ + /* 16777215 = 2**24 - 1 */ + if (*kmant > 16777215) + { + + LABEL350: + + ++iexp; + + // Check for exponent overflow during adjustment + if (iexp > 127) + { + Message("Exponent overflow"); + Message("Original number = %30.20f", pval); + Message("Sign = %3d, Exponent = %3d, Mantissa = %12d", isign, iexp, *kmant); + + Error("Exponent overflow"); + + // If not aborting, arbitrarily set value to zero + Message("Value arbitrarily set to zero."); + *kexp = 0; + *kmant = 0; + goto LABEL900; + } + + rpowref = ldexp(zref, 4 * -(iexp - 70)); + + if (iround == 0) + { + /* Closest number in GRIB format less than original number. */ + /* Truncate for positive numbers. */ + /* Round up for negative numbers. */ + *kmant = (isign == 0) ? (int) rpowref : (int) lround(rpowref + 0.5); + } + else + { + /* Closest number in GRIB format to the original number */ + /* (equal to, greater or less than original number). */ + *kmant = (int) lround(rpowref); + } + + // Repeat calculation (with modified exponent) if still have mantissa overflow. + if (*kmant > 16777215) goto LABEL350; + } + + // Add sign bit to exponent. + *kexp = iexp + isign; + } + + /* ----------------------------------------------------------------- */ + /* Section 9. Return */ + /* ----------------------------------------------------------------- */ + +LABEL900: + /* + if ( CGRIBEX_Debug ) + { + double zval; + + Message("Conversion type parameter = %4d", kround); + Message("Original number = %30.20f", pval); + + zval = decfp2(*kexp, *kmant); + + Message("Converted to %30.20f", zval); + Message("Sign = %3d, Exponent = %3d, Mantissa = %12d", isign, iexp, *kmant); + } + */ + return; +} /* confp3 */ +#include <math.h> + + +double decfp2(int kexp, int kmant) +{ + /* + + Purpose: + -------- + + Convert GRIB representation of a floating point + number to machine representation. + + Input Parameters: + ----------------- + + kexp - 8 Bit signed exponent. + kmant - 24 Bit mantissa. + + Output Parameters: + ------------------ + + Return value - Floating point number represented + by kexp and kmant. + + Method: + ------- + + Floating point number represented as 8 bit exponent + and 24 bit mantissa in integer values converted to + machine floating point format. + + Externals: + ---------- + + None. + + Reference: + ---------- + + WMO Manual on Codes re GRIB representation. + + Comments: + --------- + + Rewritten from DECFP, to conform to programming standards. + Sign bit on 0 value now ignored, if present. + If using 32 bit reals, check power of 16 is not so small as to + cause overflows (underflows!); this causes warning to be given + on Fujitsus. + + Author: + ------- + + John Hennessy ECMWF 18.06.91 + + Modifications: + -------------- + + Uwe Schulzweida MPIfM 01/04/2001 + + - Convert to C from EMOS library version 130 + + Uwe Schulzweida MPIfM 02/08/2002 + + - speed up by factor 2 on NEC SX6 + - replace pow(2.0, -24.0) by constant POW_2_M24 + - replace pow(16.0, (double)(iexp - 64)) by pow16m64tab[iexp] + */ + + /* ----------------------------------------------------------------- */ + /* Section 1 . Convert value of 0.0. Ignore sign bit. */ + /* ----------------------------------------------------------------- */ + + if ( (kexp == 128) || (kexp == 0) || (kexp == 255) ) return 0.0; + + /* ----------------------------------------------------------------- */ + /* Section 2 . Convert other values. */ + /* ----------------------------------------------------------------- */ + + /* Sign of value. */ + + int iexp = kexp; + const int isign = (iexp < 128) * 2 - 1; + + iexp -= iexp < 128 ? 0 : 128; + + /* Decode value. */ + + /* pval = isign * pow(2.0, -24.0) * kmant * pow(16.0, (double)(iexp - 64)); */ + + iexp -= 64; + + const double pval = ldexp(1.0, 4 * iexp) * isign * POW_2_M24 * kmant; + + /* ----------------------------------------------------------------- */ + /* Section 9. Return to calling routine. */ + /* ----------------------------------------------------------------- */ + + return pval; +} /* decfp2 */ +#include <stdarg.h> +#include <stdint.h> + + +static +void gribDecodeRefDate(const int *isec1, int *year, int *month, int *day) +{ + int ryear = ISEC1_Year; + + int century = ISEC1_Century; + if (century < 0) century = -century; + century -= 1; + + if (century == -255 && ryear == 127) + { + ryear = 0; + } + else + { + // if ( century != 0 ) + { + if ( ryear == 100 ) + { + ryear = 0; + century += 1; + } + + if ( ryear != 255 ) + { + ryear = century*100 + ryear; + if ( ISEC1_Century < 0 ) ryear = -ryear; + } + else + { + ryear = 1; + } + } + } + + *year = ryear; + *month = ISEC1_Month; + *day = ISEC1_Day; +} + + +int gribRefDate(const int *isec1) +{ + int ryear, rmonth, rday; + gribDecodeRefDate(isec1, &ryear, &rmonth, &rday); + return cdiEncodeDate(ryear, rmonth, rday); +} + +static +void gribDecodeRefTime(const int *isec1, int *hour, int *minute, int *second) +{ + *hour = ISEC1_Hour; + *minute = ISEC1_Minute; + *second = 0; +} + + +int gribRefTime(const int *isec1) +{ + int rhour, rminute, rsecond; + gribDecodeRefTime(isec1, &rhour, &rminute, &rsecond); + return cdiEncodeTime(rhour, rminute, rsecond); +} + + +bool gribTimeIsFC(const int *isec1) +{ + bool isFC = false; + + const int time_period = (ISEC1_TimeRange == 10) ? (ISEC1_TimePeriod1<<8) + ISEC1_TimePeriod2 : ISEC1_TimePeriod1; + + if (time_period > 0 && ISEC1_Day > 0) + { + isFC = (ISEC1_TimeRange == 0 || ISEC1_TimeRange == 10); + } + + return isFC; +} + +static +int getTimeUnitFactor(int timeUnit) +{ + static bool lprint = true; + switch ( timeUnit ) + { + case ISEC1_TABLE4_MINUTE: return 60; break; + case ISEC1_TABLE4_QUARTER: return 900; break; + case ISEC1_TABLE4_30MINUTES: return 1800; break; + case ISEC1_TABLE4_HOUR: return 3600; break; + case ISEC1_TABLE4_3HOURS: return 10800; break; + case ISEC1_TABLE4_6HOURS: return 21600; break; + case ISEC1_TABLE4_12HOURS: return 43200; break; + case ISEC1_TABLE4_DAY: return 86400; break; + default: + if ( lprint ) + { + gprintf(__func__, "Time unit %d unsupported", timeUnit); + lprint = false; + } + break; + } + + return 0; +} + + +void gribDateTimeX(int *isec1, int *date, int *time, int *startDate, int *startTime) +{ + *startDate = 0; + *startTime = 0; + + CdiDateTime rDateTime = cdiDateTime_set(gribRefDate(isec1), gribRefTime(isec1)); + + int64_t time_period = 0, time_period_x = 0; + if (ISEC1_TimeRange == 10) + time_period = (ISEC1_TimePeriod1<<8) + ISEC1_TimePeriod2; + else if (ISEC1_TimeRange >=2 && ISEC1_TimeRange <= 5) + { + time_period_x = ISEC1_TimePeriod1; + time_period = ISEC1_TimePeriod2; + } + else if (ISEC1_TimeRange == 0) + time_period = ISEC1_TimePeriod1; + + if (time_period > 0 && rDateTime.date.day > 0) + { + JulianDate julianDate = julianDate_encode(CGRIBEX_grib_calendar, rDateTime); + + const int timeUnitFactor = getTimeUnitFactor(ISEC1_TimeUnit); + + if (time_period_x > 0) + { + JulianDate julianDate2 = julianDate_add_seconds(julianDate, timeUnitFactor * time_period_x); + CdiDateTime sDateTime = julianDate_decode(CGRIBEX_grib_calendar, julianDate2); + sDateTime.time.second = 0; + *startDate = (int)cdiDate_get(sDateTime.date); + *startTime = cdiTime_get(sDateTime.time); + } + + julianDate = julianDate_add_seconds(julianDate, timeUnitFactor * time_period); + rDateTime = julianDate_decode(CGRIBEX_grib_calendar, julianDate); + } + + *date = (int)cdiDate_get(rDateTime.date); + *time = cdiTime_get(rDateTime.time); +} + + +void gribDateTime(int *isec1, int *date, int *time) +{ + int sdate, stime; + gribDateTimeX(isec1, date, time, &sdate, &stime); +} + + +void gprintf(const char *caller, const char *fmt, ...) +{ + va_list args; + + if ( grprsm == NULL ) Error("GRIBEX initialization missing!"); + + va_start(args, fmt); + + fprintf(grprsm, "%-18s : ", caller); + vfprintf(grprsm, fmt, args); + fputs("\n", grprsm); + + va_end(args); +} + + +void +gribExDP(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3, + double *fsec3, int *isec4, double *fsec4, int klenp, int *kgrib, + int kleng, int *kword, const char *hoper, int *kret) +{ + int yfunc = *hoper; + + if ( yfunc == 'C' ) + { + grib_encode_double(isec0, isec1, isec2, fsec2, isec3, + fsec3, isec4, fsec4, klenp, kgrib, + kleng, kword, yfunc, kret); + } + else if ( yfunc == 'D' || yfunc == 'J' || yfunc == 'R' ) + { + grib_decode_double(isec0, isec1, isec2, fsec2, isec3, + fsec3, isec4, fsec4, klenp, kgrib, + kleng, kword, yfunc, kret); + } + else if ( yfunc == 'V' ) + { + fprintf(stderr, " cgribex: Version is %s\n", cgribexLibraryVersion()); + } + else + { + Error("oper %c unsupported!", yfunc); + *kret=-9; + } +} + + +void +gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2, int *isec3, + float *fsec3, int *isec4, float *fsec4, int klenp, int *kgrib, + int kleng, int *kword, const char *hoper, int *kret) +{ + int yfunc = *hoper; + + if ( yfunc == 'C' ) + { + grib_encode_float(isec0, isec1, isec2, fsec2, isec3, + fsec3, isec4, fsec4, klenp, kgrib, + kleng, kword, yfunc, kret); + } + else if ( yfunc == 'D' || yfunc == 'J' || yfunc == 'R' ) + { + grib_decode_float(isec0, isec1, isec2, fsec2, isec3, + fsec3, isec4, fsec4, klenp, kgrib, + kleng, kword, yfunc, kret); + } + else if ( yfunc == 'V' ) + { + fprintf(stderr, " cgribex: Version is %s\n", cgribexLibraryVersion()); + } + else + { + Error("oper %c unsupported!", yfunc); + *kret=-9; + } +} + +int CGRIBEX_Fix_ZSE = 0; /* 1: Fix ZeroShiftError of simple packed spherical harmonics */ +int CGRIBEX_Const = 0; /* 1: Don't pack constant fields on regular grids */ +int CGRIBEX_Debug = 0; /* 1: Debugging */ + +void +gribSetDebug(int debug) +{ + CGRIBEX_Debug = debug; + + if (CGRIBEX_Debug) Message("debug level %d", debug); +} + +void +gribFixZSE(int flag) +{ + CGRIBEX_Fix_ZSE = flag; + + if (CGRIBEX_Debug) Message("Fix ZeroShiftError set to %d", flag); +} + +void +gribSetConst(int flag) +{ + CGRIBEX_Const = flag; + + if (CGRIBEX_Debug) Message("Const set to %d", flag); +} + +void +gribSetRound(int round) +{ + UNUSED(round); +} + +void +gribSetRefDP(double refval) +{ + UNUSED(refval); +} + +void +gribSetRefSP(float refval) +{ + gribSetRefDP((double) refval); +} + +void +gribSetValueCheck(int vcheck) +{ + UNUSED(vcheck); +} +#include <string.h> +#include <math.h> + + + +void gribPrintSec0(int *isec0) +{ + /* + + Print the information in the Indicator + Section (Section 0) of decoded GRIB data. + + Input Parameters: + + isec0 - Array of decoded integers from Section 0 + + + Converted from EMOS routine GRPRS0. + + Uwe Schulzweida MPIfM 01/04/2001 + + */ + + grsdef(); + + fprintf(grprsm, " \n"); + fprintf(grprsm, " Section 0 - Indicator Section. \n"); + fprintf(grprsm, " -------------------------------------\n"); + fprintf(grprsm, " Length of GRIB message (octets). %9d\n", ISEC0_GRIB_Len); + fprintf(grprsm, " GRIB Edition Number. %9d\n", ISEC0_GRIB_Version); +} + +void gribPrintSec1(int *isec0, int *isec1) +{ + /* + + Print the information in the Product Definition + Section (Section 1) of decoded GRIB data. + + Input Parameters: + + isec0 - Array of decoded integers from Section 0 + + isec1 - Array of decoded integers from Section 1 + + Comments: + + When decoding data from Experimental Edition or Edition 0, + routine GRIBEX adds the additional fields available in + Edition 1. + + + Converted from EMOS routine GRPRS1. + + Uwe Schulzweida MPIfM 01/04/2001 + + */ + + int iprev, icurr, ioffset; + int ibit, ierr, iout, iyear; + int jiloop; + float value; + + char hversion[9]; + /* + char hfirst[121], hsecond[121], hthird[121], hfourth[121]; + */ + + grsdef(); + + /* + ----------------------------------------------------------------- + Section 0 . Print required information. + ----------------------------------------------------------------- + */ + + fprintf(grprsm, " \n"); + fprintf(grprsm, " Section 1 - Product Definition Section.\n"); + fprintf(grprsm, " ---------------------------------------\n"); + + fprintf(grprsm, " Code Table 2 Version Number. %9d\n", isec1[0]); + fprintf(grprsm, " Originating centre identifier. %9d\n", isec1[1]); + fprintf(grprsm, " Model identification. %9d\n", isec1[2]); + fprintf(grprsm, " Grid definition. %9d\n", isec1[3]); + + ibit = 8; + prtbin(isec1[4], ibit, &iout, &ierr); + fprintf(grprsm, " Flag (Code Table 1) %8.8d\n", iout); + fprintf(grprsm, " Parameter identifier (Code Table 2). %9d\n", isec1[5]); + + /* + IERR = CHKTAB2(ISEC1,HFIRST,HSECOND,HTHIRD,HFOURTH) + IF( IERR .EQ. 0 ) THEN + DO JLOOP = 121, 1, -1 + IF( HSECOND(JLOOP:JLOOP).NE.' ' ) THEN + IOFFSET = JLOOP + GOTO 110 + ENDIF + ENDDO + GOTO 120 + 110 CONTINUE + WRITE(*,'(2H ",A,1H")') HSECOND(1:IOFFSET) + 120 CONTINUE + ENDIF + */ + + if ( isec1[5] != 127 ) + { + fprintf(grprsm, " Type of level (Code Table 3). %9d\n", isec1[6]); + fprintf(grprsm, " Value 1 of level (Code Table 3). %9d\n", isec1[7]); + fprintf(grprsm, " Value 2 of level (Code Table 3). %9d\n", isec1[8]); + } + else + { + fprintf(grprsm, " Satellite identifier. %9d\n", isec1[6]); + fprintf(grprsm, " Spectral band. %9d\n", isec1[7]); + } + + iyear = isec1[9]; + if ( iyear != 255 ) + { + int date, time; + /* iyear = ((isec1[20]-1)*100 + isec1[9]); */ + gribDateTime(isec1, &date, &time); + iyear = date/10000; + fprintf(grprsm, " Year of reference time of data. %9d (%4d)\n", isec1[9], iyear); + } + else + { + fprintf(grprsm, " Year of reference time of data MISSING (=255)\n"); + } + + fprintf(grprsm, " Month of reference time of data. %9d\n", isec1[10]); + fprintf(grprsm, " Day of reference time of data. %9d\n", isec1[11]); + fprintf(grprsm, " Hour of reference time of data. %9d\n", isec1[12]); + fprintf(grprsm, " Minute of reference time of data. %9d\n", isec1[13]); + fprintf(grprsm, " Time unit (Code Table 4). %9d\n", isec1[14]); + fprintf(grprsm, " Time range one. %9d\n", isec1[15]); + fprintf(grprsm, " Time range two. %9d\n", isec1[16]); + fprintf(grprsm, " Time range indicator (Code Table 5) %9d\n", isec1[17]); + fprintf(grprsm, " Number averaged. %9d\n", isec1[18]); + fprintf(grprsm, " Number missing from average. %9d\n", isec1[19]); + /* + All ECMWF data in GRIB Editions before Edition 1 is decoded + as 20th century data. Other centres are decoded as missing. + */ + if ( isec0[1] < 1 && isec1[1] != 98 ) + fprintf(grprsm, " Century of reference time of data. Not given\n"); + else + fprintf(grprsm, " Century of reference time of data. %9d\n", isec1[20]); + + /* Print sub-centre */ + fprintf(grprsm, " Sub-centre identifier. %9d\n", ISEC1_SubCenterID); + + /* Decimal scale factor */ + fprintf(grprsm, " Units decimal scaling factor. %9d\n", isec1[22]); + + /* + ----------------------------------------------------------------- + Section 1 . Print local DWD information. + ----------------------------------------------------------------- + */ + if ( (ISEC1_CenterID == 78 || ISEC1_CenterID == 215 || ISEC1_CenterID == 250) && + (isec1[36] == 253 || isec1[36] == 254) ) + { + fprintf(grprsm, " DWD local usage identifier. %9d\n", isec1[36]); + if ( isec1[36] == 253 ) + fprintf(grprsm, " (Database labelling and ensemble forecast)\n"); + if ( isec1[36] == 254 ) + fprintf(grprsm, " (Database labelling)\n"); + + fprintf(grprsm, " Year of database entry %3d (%4d)\n", isec1[43], 1900+isec1[43]); + fprintf(grprsm, " Month of database entry %3d\n", isec1[44]); + fprintf(grprsm, " Day of database entry %3d\n", isec1[45]); + fprintf(grprsm, " Hour of database entry %3d\n", isec1[46]); + fprintf(grprsm, " Minute of database entry %3d\n", isec1[47]); + fprintf(grprsm, " DWD experiment number %9d\n",isec1[48]); + fprintf(grprsm, " DWD run type %9d\n",isec1[49]); + if ( isec1[36] == 253 ) + { + fprintf(grprsm, " User id %9d\n",isec1[50]); + fprintf(grprsm, " Experiment identifier %9d\n",isec1[51]); + fprintf(grprsm, " Ensemble identification type %9d\n",isec1[52]); + fprintf(grprsm, " Number of ensemble members %9d\n",isec1[53]); + fprintf(grprsm, " Actual number of ensemble member %9d\n",isec1[54]); + fprintf(grprsm, " Model version %2d.%2.2d\n",isec1[55],isec1[56]); + } + } + + /* + ----------------------------------------------------------------- + Section 2 . Print local ECMWF information. + ----------------------------------------------------------------- + */ + /* + Regular MARS labelling, or reformatted Washington EPS products. + */ + if ( (ISEC1_CenterID == 98 && ISEC1_LocalFLag == 1) || + (ISEC1_SubCenterID == 98 && ISEC1_LocalFLag == 1) || + (ISEC1_CenterID == 7 && ISEC1_SubCenterID == 98) ) + { + /* Parameters common to all definitions. */ + + fprintf(grprsm, " ECMWF local usage identifier. %9d\n", isec1[36]); + if ( isec1[36] == 1 ) + fprintf(grprsm, " (Mars labelling or ensemble forecast)\n"); + if ( isec1[36] == 2 ) + fprintf(grprsm, " (Cluster means and standard deviations)\n"); + if ( isec1[36] == 3 ) + fprintf(grprsm, " (Satellite image data)\n"); + if ( isec1[36] == 4 ) + fprintf(grprsm, " (Ocean model data)\n"); + if ( isec1[36] == 5 ) + fprintf(grprsm, " (Forecast probability data)\n"); + if ( isec1[36] == 6 ) + fprintf(grprsm, " (Surface temperature data)\n"); + if ( isec1[36] == 7 ) + fprintf(grprsm, " (Sensitivity data)\n"); + if ( isec1[36] == 8 ) + fprintf(grprsm, " (ECMWF re-analysis data)\n"); + if ( isec1[36] == 9 ) + fprintf(grprsm, " (Singular vectors and ensemble perturbations)\n"); + if ( isec1[36] == 10 ) + fprintf(grprsm, " (EPS tubes)\n"); + if ( isec1[36] == 11 ) + fprintf(grprsm, " (Supplementary data used by analysis)\n"); + if ( isec1[36] == 13 ) + fprintf(grprsm, " (Wave 2D spectra direction and frequency)\n"); + + fprintf(grprsm, " Class. %9d\n", isec1[37]); + fprintf(grprsm, " Type. %9d\n", isec1[38]); + fprintf(grprsm, " Stream. %9d\n", isec1[39]); + sprintf(hversion, "%4s", (char*)&isec1[40]); hversion[4] = 0; + fprintf(grprsm, " Version number or Experiment identifier. %4s\n", hversion); + /* + ECMWF Local definition 1. + (MARS labelling or ensemble forecast data) + */ + if ( isec1[36] == 1 ) + { + fprintf(grprsm, " Forecast number. %9d\n", isec1[41]); + if ( isec1[39] != 1090 ) + fprintf(grprsm, " Total number of forecasts. %9d\n", isec1[42]); + + return; + } + /* + ECMWF Local definition 2. + (Cluster means and standard deviations) + */ + if ( isec1[36] == 2 ) + { + fprintf(grprsm, " Cluster number. %9d\n", isec1[41]); + fprintf(grprsm, " Total number of clusters. %9d\n", isec1[42]); + fprintf(grprsm, " Clustering method. %9d\n", isec1[43]); + fprintf(grprsm, " Start time step when clustering. %9d\n", isec1[44]); + fprintf(grprsm, " End time step when clustering. %9d\n", isec1[45]); + fprintf(grprsm, " Northern latitude of domain. %9d\n", isec1[46]); + fprintf(grprsm, " Western longitude of domain. %9d\n", isec1[47]); + fprintf(grprsm, " Southern latitude of domain. %9d\n", isec1[48]); + fprintf(grprsm, " Eastern longitude of domain. %9d\n", isec1[49]); + fprintf(grprsm, " Operational forecast in cluster %9d\n", isec1[50]); + fprintf(grprsm, " Control forecast in cluster %9d\n", isec1[51]); + fprintf(grprsm, " Number of forecasts in cluster. %9d\n", isec1[52]); + + for (int jloop = 0; jloop < isec1[52]; jloop++) + fprintf(grprsm, " Forecast number %9d\n", isec1[jloop+53]); + + return; + } + /* + ECMWF Local definition 3. + (Satellite image data) + */ + if ( isec1[36] == 3 ) + { + fprintf(grprsm, " Satellite spectral band. %9d\n", isec1[41]); + fprintf(grprsm, " Function code. %9d\n", isec1[42]); + return; + } + /* + ECMWF Local definition 4. + (Ocean model data) + */ + if ( isec1[36] == 4 ) + { + fprintf(grprsm, " Satellite spectral band. %9d\n", isec1[41]); + if ( isec1[39] != 1090 ) + fprintf(grprsm, " Function code. %9d\n", isec1[42]); + fprintf(grprsm, " Coordinate structure definition.\n"); + fprintf(grprsm, " Fundamental spatial reference system.%9d\n", isec1[43]); + fprintf(grprsm, " Fundamental time reference. %9d\n", isec1[44]); + fprintf(grprsm, " Space unit flag. %9d\n", isec1[45]); + fprintf(grprsm, " Vertical coordinate definition. %9d\n", isec1[46]); + fprintf(grprsm, " Horizontal coordinate definition. %9d\n", isec1[47]); + fprintf(grprsm, " Time unit flag. %9d\n", isec1[48]); + fprintf(grprsm, " Time coordinate definition. %9d\n", isec1[49]); + fprintf(grprsm, " Position definition. \n"); + fprintf(grprsm, " Mixed coordinate field flag. %9d\n", isec1[50]); + fprintf(grprsm, " Coordinate 1 flag. %9d\n", isec1[51]); + fprintf(grprsm, " Averaging flag. %9d\n", isec1[52]); + fprintf(grprsm, " Position of level 1. %9d\n", isec1[53]); + fprintf(grprsm, " Position of level 2. %9d\n", isec1[54]); + fprintf(grprsm, " Coordinate 2 flag. %9d\n", isec1[55]); + fprintf(grprsm, " Averaging flag. %9d\n", isec1[56]); + fprintf(grprsm, " Position of level 1. %9d\n", isec1[57]); + fprintf(grprsm, " Position of level 2. %9d\n", isec1[58]); + fprintf(grprsm, " Grid Definition.\n"); + fprintf(grprsm, " Coordinate 3 flag (x-axis) %9d\n", isec1[59]); + fprintf(grprsm, " Coordinate 4 flag (y-axis) %9d\n", isec1[60]); + fprintf(grprsm, " Coordinate 4 of first grid point. %9d\n", isec1[61]); + fprintf(grprsm, " Coordinate 3 of first grid point. %9d\n", isec1[62]); + fprintf(grprsm, " Coordinate 4 of last grid point. %9d\n", isec1[63]); + fprintf(grprsm, " Coordinate 3 of last grid point. %9d\n", isec1[64]); + fprintf(grprsm, " i - increment. %9d\n", isec1[65]); + fprintf(grprsm, " j - increment. %9d\n", isec1[66]); + fprintf(grprsm, " Flag for irregular grid coordinates. %9d\n", isec1[67]); + fprintf(grprsm, " Flag for normal or staggered grids. %9d\n", isec1[68]); + fprintf(grprsm, " Further information.\n"); + fprintf(grprsm, " Further information flag. %9d\n", isec1[69]); + fprintf(grprsm, " Auxiliary information.\n"); + fprintf(grprsm, " No. entries in horizontal coordinate %9d\n", isec1[70]); + fprintf(grprsm, " No. entries in mixed coordinate defn.%9d\n", isec1[71]); + fprintf(grprsm, " No. entries in grid coordinate list. %9d\n", isec1[72]); + fprintf(grprsm, " No. entries in auxiliary array. %9d\n", isec1[73]); + /* + Horizontal coordinate supplement. + */ + fprintf(grprsm, " Horizontal coordinate supplement.\n"); + if ( isec1[70] == 0 ) + { + fprintf(grprsm, "(None).\n"); + } + else + { + fprintf(grprsm, "Number of items = %d\n", isec1[70]); + for (int jloop = 0; jloop < isec1[70]; jloop++) + fprintf(grprsm, " %12d\n", isec1[74+jloop]); + } + /* + Mixed coordinate definition. + */ + fprintf(grprsm, " Mixed coordinate definition.\n"); + if ( isec1[71] == 0 ) + { + fprintf(grprsm, "(None).\n"); + } + else + { + fprintf(grprsm, "Number of items = %d\n", isec1[71]); + ioffset = 74 + isec1[70]; + for (int jloop = 0; jloop < isec1[71]; jloop++) + fprintf(grprsm, " %12d\n", isec1[ioffset+jloop]); + } + /* + Grid coordinate list. + */ + fprintf(grprsm, " Grid coordinate list. \n"); + if ( isec1[72] == 0 ) + { + fprintf(grprsm, "(None).\n"); + } + else + { + fprintf(grprsm, "Number of items = %d\n", isec1[72]); + ioffset = 74 + isec1[70] + isec1[71]; + for (int jloop = 0; jloop < isec1[72]; jloop++) + fprintf(grprsm, " %12d\n", isec1[ioffset+jloop]); + } + /* + Auxiliary array. + */ + fprintf(grprsm, " Auxiliary array. \n"); + if ( isec1[73] == 0 ) + { + fprintf(grprsm, "(None).\n"); + } + else + { + fprintf(grprsm, "Number of items = %d\n", isec1[73]); + ioffset = 74 + isec1[70] + isec1[71] + isec1[72]; + for (int jloop = 0; jloop < isec1[73]; jloop++) + fprintf(grprsm, " %12d\n", isec1[ioffset+jloop]); + } + /* + Post-auxiliary array. + */ + fprintf(grprsm, " Post-auxiliary array. \n"); + ioffset = 74 + isec1[70] + isec1[71] + isec1[72] + isec1[73]; + if ( isec1[ioffset] == 0 ) + { + fprintf(grprsm, "(None).\n"); + } + else + { + fprintf(grprsm, "Number of items = %d\n", isec1[ioffset]); + for (int jloop = 1; jloop < isec1[ioffset]; jloop++) + fprintf(grprsm, " %12d\n", isec1[ioffset+jloop]); + } + + return; + } + /* + ECMWF Local definition 5. + (Forecast probability data) + */ + if ( isec1[36] == 5 ) + { + fprintf(grprsm, " Forecast probability number %9d\n", isec1[41]); + fprintf(grprsm, " Total number of forecast probabilities %7d\n", isec1[42]); + fprintf(grprsm, " Threshold units decimal scale factor %9d\n", isec1[43]); + fprintf(grprsm, " Threshold indicator(1=lower,2=upper,3=both) %2d\n", isec1[44]); + if ( isec1[44] != 2 ) + fprintf(grprsm, " Lower threshold value %9d\n", isec1[45]); + if ( isec1[44] != 1 ) + fprintf(grprsm, " Upper threshold value %9d\n", isec1[46]); + return; + } + /* + ECMWF Local definition 6. + (Surface temperature data) + */ + if ( isec1[36] == 6 ) + { + iyear = isec1[43]; + if ( iyear > 100 ) + { + if ( iyear < 19000000 ) iyear = iyear + 19000000; + fprintf(grprsm, " Date of SST field used %9d\n", iyear); + } + else + fprintf(grprsm, "Date of SST field used Not given\n"); + } + if ( isec1[44] == 0 ) + fprintf(grprsm, " Type of SST field (= climatology) %9d\n", isec1[44]); + if ( isec1[44] == 1 ) + fprintf(grprsm, " Type of SST field (= 1/1 degree) %9d\n", isec1[44]); + if ( isec1[44] == 2 ) + fprintf(grprsm, " Type of SST field (= 2/2 degree) %9d\n", isec1[44]); + + fprintf(grprsm, " Number of ICE fields used: %9d\n", isec1[45]); + + for (int jloop = 1; jloop <= isec1[45]; jloop++) + { + iyear = isec1[44+(jloop*2)]; + if ( iyear > 100 ) + { + if ( iyear < 19000000 ) iyear = iyear + 19000000; + fprintf(grprsm, " Date of ICE field%3d %9d\n", jloop, iyear); + fprintf(grprsm, " Satellite number (ICE field%3d) %9d\n", jloop, + isec1[45+(jloop*2)]); + } + else + fprintf(grprsm, "Date of SST field used Not given\n"); + } + /* + ECMWF Local definition 7. + (Sensitivity data) + */ + if ( isec1[36] == 7 ) + { + if ( isec1[38] == 51 ) + fprintf(grprsm, " Forecast number %9d\n", isec1[41]); + if ( isec1[38] != 51 ) + fprintf(grprsm, " Iteration number %9d\n", isec1[41]); + if ( isec1[38] != 52 ) + fprintf(grprsm, " Total number of diagnostics %9d\n", isec1[42]); + if ( isec1[38] == 52 ) + fprintf(grprsm, " No.interations in diag. minimisation %9d\n", isec1[42]); + fprintf(grprsm, " Domain(0=Global,1=Europe,2=N.Hem.,3=S.Hem.) %2d\n", isec1[43]); + fprintf(grprsm, " Diagnostic number %9d\n", isec1[44]); + } + /* + ECMWF Local definition 8. + (ECMWF re-analysis data) + */ + if ( isec1[36] == 8 ) + { + if ( (isec1[39] == 1043) || + (isec1[39] == 1070) || + (isec1[39] == 1071) ) + { + fprintf(grprsm, " Interval between reference times %9d\n", isec1[41]); + for (int jloop = 43; jloop <= 54; jloop++) + { + jiloop = jloop + 8; + fprintf(grprsm, " ERA section 1 octet %2d. %9d\n", + jiloop, isec1[jloop-1]); + } + } + else + { + for (int jloop = 42; jloop <= 54; jloop++) + { + jiloop = jloop + 8; + fprintf(grprsm, " ERA section 1 octet %2d. %9d\n", + jiloop, isec1[jloop-1]); + } + } + return; + } + + if ( isec1[38] > 4 && isec1[38] < 9 ) + { + fprintf(grprsm, " Simulation number. %9d\n", isec1[41]); + fprintf(grprsm, " Total number of simulations. %9d\n", isec1[42]); + } + /* + ECMWF Local definition 9. + (Singular vectors and ensemble perturbations) + */ + if ( isec1[36] == 9 ) + { + if ( isec1[38] == 60 ) + fprintf(grprsm, " Perturbed ensemble forecast number %9d\n", isec1[41]); + if ( isec1[38] == 61 ) + fprintf(grprsm, " Initial state perturbation number %9d\n", isec1[41]); + if ( isec1[38] == 62 ) + fprintf(grprsm, " Singular vector number %9d\n", isec1[41]); + if ( isec1[38] == 62 ) + { + fprintf(grprsm, " Number of iterations %9d\n", isec1[42]); + fprintf(grprsm, " Number of singular vectors computed %9d\n", isec1[43]); + fprintf(grprsm, " Norm used at initial time %9d\n", isec1[44]); + fprintf(grprsm, " Norm used at final time %9d\n", isec1[45]); + fprintf(grprsm, " Multiplication factor %9d\n", isec1[46]); + fprintf(grprsm, " Latitude of north-west corner %9d\n", isec1[47]); + fprintf(grprsm, " Longitude of north-west corner %9d\n", isec1[48]); + fprintf(grprsm, " Latitude of south-east corner %9d\n", isec1[49]); + fprintf(grprsm, " Longitude of south-east corner %9d\n", isec1[50]); + fprintf(grprsm, " Accuracy %9d\n", isec1[51]); + fprintf(grprsm, " Number of singular vectors evolved %9d\n", isec1[52]); + fprintf(grprsm, " Ritz number one %9d\n", isec1[53]); + fprintf(grprsm, " Ritz number two %9d\n", isec1[54]); + } + } + /* + ECMWF Local definition 10. + (EPS tubes) + */ + if ( isec1[36] == 10 ) + { + fprintf(grprsm, " Tube number %9d\n", isec1[41]); + fprintf(grprsm, " Total number of tubes %9d\n", isec1[42]); + fprintf(grprsm, " Central cluster definition %9d\n", isec1[43]); + fprintf(grprsm, " Parameter %9d\n", isec1[44]); + fprintf(grprsm, " Type of level %9d\n", isec1[45]); + fprintf(grprsm, " Northern latitude of domain of tubing%9d\n", isec1[46]); + fprintf(grprsm, " Western longitude of domain of tubing%9d\n", isec1[47]); + fprintf(grprsm, " Southern latitude of domain of tubing%9d\n", isec1[48]); + fprintf(grprsm, " Eastern longitude of domain of tubing%9d\n", isec1[49]); + fprintf(grprsm, " Tube number of operational forecast %9d\n", isec1[50]); + fprintf(grprsm, " Tube number of control forecast %9d\n", isec1[51]); + fprintf(grprsm, " Height/pressure of level %9d\n", isec1[52]); + fprintf(grprsm, " Reference step %9d\n", isec1[53]); + fprintf(grprsm, " Radius of central cluster %9d\n", isec1[54]); + fprintf(grprsm, " Ensemble standard deviation %9d\n", isec1[55]); + fprintf(grprsm, " Dist.of tube extreme to ensemble mean%9d\n", isec1[56]); + fprintf(grprsm, " Number of forecasts in the tube %9d\n", isec1[57]); + + fprintf(grprsm, " List of ensemble forecast numbers:\n"); + for (int jloop = 1; jloop <= isec1[57]; jloop++) + fprintf(grprsm, " %9d\n", isec1[57+jloop]); + } + /* + ECMWF Local definition 11. + (Supplementary data used by the analysis) + */ + if ( isec1[36] == 11 ) + { + fprintf(grprsm, " Details of analysis which used the supplementary data:\n"); + fprintf(grprsm, " Class %9d\n", isec1[41]); + fprintf(grprsm, " Type %9d\n", isec1[42]); + fprintf(grprsm, " Stream %9d\n", isec1[43]); + /* + sprintf(hversion, "%8d", isec1[44]); + fprintf(grprsm, " Version number/experiment identifier: %4s\n", &hversion[4]); + */ + iyear = isec1[45]; + if ( iyear > 50 ) + iyear = iyear + 1900; + else + iyear = iyear + 2000; + + fprintf(grprsm, " Year %9d\n", iyear); + fprintf(grprsm, " Month %9d\n", isec1[46]); + fprintf(grprsm, " Day %9d\n", isec1[47]); + fprintf(grprsm, " Hour %9d\n", isec1[48]); + fprintf(grprsm, " Minute %9d\n", isec1[49]); + fprintf(grprsm, " Century %9d\n", isec1[50]); + fprintf(grprsm, " Originating centre %9d\n", isec1[51]); + fprintf(grprsm, " Sub-centre %9d\n", isec1[52]); + } + /* + ECMWF Local definition 12. + */ + if ( isec1[36] == 12 ) + { + fprintf(grprsm, " (Mean, average, etc)\n"); + fprintf(grprsm, " Start date of the period %8d\n", isec1[41]); + fprintf(grprsm, " Start time of the period %4.4d\n", isec1[42]); + fprintf(grprsm, " Finish date of the period %8d\n", isec1[43]); + fprintf(grprsm, " Finish time of the period %4.4d\n", isec1[44]); + fprintf(grprsm, " Verifying date of the period %8d\n", isec1[45]); + fprintf(grprsm, " Verifying time of the period %4.4d\n", isec1[46]); + fprintf(grprsm, " Code showing method %8d\n", isec1[47]); + fprintf(grprsm, " Number of different time intervals used %5d\n", isec1[48]); + fprintf(grprsm, " List of different time intervals used:\n"); + iprev = isec1[49]; + unsigned icount = 0; + for (int jloop = 1; jloop <= isec1[48]; jloop++) + { + icurr = isec1[48+jloop]; + if ( icurr != iprev ) + { + if ( icount == 1 ) + fprintf(grprsm, " - interval %5.4d used once\n", iprev); + if ( icount == 2 ) + fprintf(grprsm, " - interval %5.4d used twice\n", iprev); + if ( icount > 2 ) + fprintf(grprsm, " - interval %5.4d used %5u times\n", iprev, icount); + iprev = icurr; + icount = 1; + } + else + icount = icount + 1; + } + if ( icount == 1 ) + fprintf(grprsm, " - interval %5.4d used once\n", iprev); + if ( icount == 2 ) + fprintf(grprsm, " - interval %5.4d used twice\n", iprev); + if ( icount > 2 ) + fprintf(grprsm, " - interval %5.4d used %5u times\n", iprev, icount); + } + /* + ECMWF Local definition 13. + (Wave 2D spectra direction and frequency) + */ + if ( isec1[36] == 13 ) + { + fprintf(grprsm, " Direction number %9d\n", isec1[43]); + fprintf(grprsm, " Frequency number %9d\n", isec1[44]); + fprintf(grprsm, " Total number of directions %9d\n", isec1[45]); + fprintf(grprsm, " Total number of frequencies %9d\n", isec1[46]); + fprintf(grprsm, " Scale factor applied to directions %9d\n", isec1[47]); + fprintf(grprsm, " Scale factor applied to frequencies %9d\n", isec1[48]); + fprintf(grprsm, " List of directions:\n"); + for (int jloop = 1; jloop <= isec1[45]; jloop++) + { + value = (float)(isec1[48+jloop])/(float)(isec1[47]); + if ( isec1[43] == jloop ) + fprintf(grprsm, " %2.2d:%15.7f <-- this field value\n", jloop, value); + else + fprintf(grprsm, "%2.2d:%15.7f\n", jloop, value); + } + fprintf(grprsm, " List of frequencies:\n"); + for (int jloop = 1; jloop <= isec1[46]; jloop++) + { + value = (float)(isec1[48+isec1[45]+jloop])/(float)(isec1[48]); + if ( isec1[44] == jloop ) + fprintf(grprsm, " %2.2d:%15.7f <-- this field value\n", jloop, value); + else + fprintf(grprsm, "%2.2d:%15.7f\n", jloop, value); + + if ( isec1[49+isec1[45]+isec1[46]] != 0 ) + { + fprintf(grprsm, " System number (65535 = missing) %9d\n", + isec1[49+isec1[45]+isec1[46]]); + fprintf(grprsm, " Method number (65535 = missing) %9d\n", + isec1[50+isec1[45]+isec1[46]]); + } + } + /* + ECMWF Local definition 14. + (Brightness temperature) + */ + if ( isec1[36] == 14 ) + { + fprintf(grprsm, " Channel number %9d\n", isec1[43]); + fprintf(grprsm, " Scale factor applied to frequencies %9d\n", isec1[44]); + fprintf(grprsm, " Total number of frequencies %9d\n", isec1[45]); + fprintf(grprsm, " List of frequencies:\n"); + for (int jloop = 1; jloop <= isec1[45]; jloop++) + { + value = (float)(isec1[45+jloop])/(float)(isec1[44]); + if ( isec1[43] == jloop ) + fprintf(grprsm, " %3d:%15.9f <-- this channel\n", jloop, value); + else + fprintf(grprsm, " %3d:%15.9f\n", jloop, value); + } + } + /* + ECMWF Local definition 15. + (Ocean ensemble seasonal forecast) + */ + if ( isec1[36] == 15 ) + { + fprintf(grprsm, " Ensemble member number %9d\n", isec1[41]); + fprintf(grprsm, " System number %9d\n", isec1[42]); + fprintf(grprsm, " Method number %9d\n", isec1[43]); + } + /* + ECMWF Local definition 16. + (Seasonal forecast monthly mean atmosphere data) + */ + if ( isec1[36] == 16 ) + { + fprintf(grprsm, " Ensemble member number %9d\n", isec1[41]); + fprintf(grprsm, " System number %9d\n", isec1[43]); + fprintf(grprsm, " Method number %9d\n", isec1[44]); + fprintf(grprsm, " Verifying month %9d\n", isec1[45]); + fprintf(grprsm, " Averaging period %9d\n", isec1[46]); + } + /* + ECMWF Local definition 17. + (Sst or sea-ice used by analysis) + */ + if ( isec1[36] == 17 ) + { + iyear = isec1[43]; + if ( iyear > 100 ) + { + if ( iyear < 19000000 ) iyear = iyear + 19000000; + fprintf(grprsm, " Date of sst/ice field used %9d\n", iyear); + } + else + fprintf(grprsm, " Date of sst/ice field used Not given\n"); + + if ( isec1[44] == 0 ) + fprintf(grprsm, " Type of sst/ice field (= climatology)%9d\n", isec1[44]); + if ( isec1[44] == 1 ) + fprintf(grprsm, " Type of sst/ice field (= 1/1 degree) %9d\n", isec1[44]); + if ( isec1[44] == 2 ) + fprintf(grprsm, " Type of sst/ice field (= 2/2 degree) %9d\n", isec1[44]); + + fprintf(grprsm, " Number of ICE fields used: %9d\n", isec1[45]); + + for (int jloop = 1; jloop < isec1[45]; jloop++) + { + iyear = isec1[44+(jloop*2)]; + if ( iyear > 100 ) + { + if ( iyear < 19000000 ) iyear = iyear + 19000000; + fprintf(grprsm, " Date of ICE field%3d %9d\n", jloop, + iyear); + fprintf(grprsm, " Satellite number (ICE field%3d) %9d\n", jloop, + isec1[45+(jloop*2)]); + } + else + fprintf(grprsm, "Date of sst/ice field used Not given\n"); + } + } + } + } + /* + ----------------------------------------------------------------- + Section 3 . Print Washington ensemble product information. + ----------------------------------------------------------------- + */ + /* + Washington EPS products (but not reformatted Washington EPS + products. + */ + if ( (isec1[1] == 7 && isec1[23] == 1) && (! (ISEC1_SubCenterID == 98)) ) + { + /* CALL KWPRS1 (iSEC0,iSEC1)*/ + } + /* + ----------------------------------------------------------------- + Section 4 . Print local MPIM information. + ----------------------------------------------------------------- + */ + if (isec1[ 1] == 252 && isec1[36] == 1) + { + fprintf(grprsm, " MPIM local usage identifier. %9d\n", isec1[36]); + fprintf(grprsm, " Type of ensemble forecast %9d\n", isec1[37]); + fprintf(grprsm, " Individual ensemble member %9d\n", isec1[38]); + fprintf(grprsm, " Number of forecasts in ensemble %9d\n", isec1[39]); + } +} + +static void printQuasi(int *isec2) +{ + /* + + Print the qusai-regular information in the Grid Description + Section (Section 2) of decoded GRIB data. + + Input Parameters: + + isec2 - Array of decoded integers from Section 2. + + Comments: + + Only data representation types catered for are Gaussian + grid, latitude/longitude grid, Spherical Harmonics, + Polar stereographic and Space view perspective. + + Converted from EMOS routine PTQUASI. + + Uwe Schulzweida MPIfM 01/04/2001 + + */ + + char yout[64]; + + /* + ----------------------------------------------------------------- + Section 1. Print quasi-grid data. + ----------------------------------------------------------------- + */ + // See if scanning is north->south or south->north + fprintf(grprsm, " Number of points along a parallel varies.\n"); + + int ntos = ( fmod((double) isec2[10], 128.) < 64 ); + + if ( ntos ) + fprintf(grprsm, " Number of points. Parallel. (North to South)\n"); + else + fprintf(grprsm, " Number of points. Parallel. (South to North)\n"); + + // Display number of points for each latitude + int latcnt = isec2[2]; + int nextlat = 0; + memset(yout, ' ', (size_t) 11); + + for (int j = 0; j < latcnt; ++j) + { + nextlat = nextlat + 1; + sprintf(yout, "%4d", nextlat); + + // Finished? + if ( nextlat > latcnt ) break; + if ( nextlat == latcnt ) + { + fprintf(grprsm, " %5d %-12s\n", isec2[nextlat+21], yout); + break; + } + // Look for neighbouring latitudes with same number of points + unsigned nrepeat = 0; + + LABEL110: + // If neighbouring latitudes have same number of points increase the repeat count. + if ( isec2[nextlat+21+1] == isec2[nextlat+21] ) + { + nrepeat = nrepeat + 1; + nextlat = nextlat + 1; + if ( nextlat < latcnt ) goto LABEL110; + } + // Display neighbouring latitudes with same number of points as 'nn to mm'. + if ( nrepeat >= 1 ) sprintf(yout+4, "to %5d", nextlat); + fprintf(grprsm, " %5d %-12s\n", isec2[nextlat+21], yout); + memset(yout, ' ', (size_t) 11); + } +} + +void gribPrintSec2DP(int *isec0, int *isec2, double *fsec2) +{ + /* + + Print the information in the Grid Description + Section (Section 2) of decoded GRIB data. + + Input Parameters: + + isec0 - Array of decoded integers from Section 0 + + isec2 - Array of decoded integers from Section 2 + + fsec2 - Array of decoded floats from Section 2 + + Comments: + + Only data representation types catered for are Gaussian + grid, latitude/longitude grid, Spherical Harmonics, + Polar stereographic and Space view perspective. + + + Converted from EMOS routine GRPRS2. + + Uwe Schulzweida MPIfM 01/04/2001 + + */ + + int ibit, iedit, ierr, iout, iresol; + + grsdef(); + /* + ----------------------------------------------------------------- + Section 1 . Print GRIB Edition number. + ----------------------------------------------------------------- + */ + iedit = isec0[1]; + fprintf(grprsm, " \n"); + fprintf(grprsm, " Section 2 - Grid Description Section.\n"); + fprintf(grprsm, " -------------------------------------\n"); + /* + ----------------------------------------------------------------- + Section 2 . Print spherical harmonic data. + ----------------------------------------------------------------- + */ + if ( isec2[0] == 50 || isec2[0] == 60 || + isec2[0] == 70 || isec2[0] == 80 ) + { + fprintf(grprsm, " Data represent type = spectral (Table 6) %9d\n", isec2[0]); + fprintf(grprsm, " J - Pentagonal resolution parameter. %9d\n", isec2[1]); + fprintf(grprsm, " K - Pentagonal resolution parameter. %9d\n", isec2[2]); + fprintf(grprsm, " M - Pentagonal resolution parameter. %9d\n", isec2[3]); + fprintf(grprsm, " Representation type (Table 9) %9d\n", isec2[4]); + fprintf(grprsm, " Representation mode (Table 10). %9d\n", isec2[5]); + for (int i = 7; i <= 11; ++i) + fprintf(grprsm, " Not used. %9d\n", isec2[i-1]); + fprintf(grprsm, " Number of vertical coordinate parameters. %9d\n", isec2[11]); + goto LABEL800; + } + /* + ----------------------------------------------------------------- + Section 3 . Print Gaussian grid data. + ----------------------------------------------------------------- + */ + if ( isec2[0] == 4 || isec2[0] == 14 || + isec2[0] == 24 || isec2[0] == 34 ) + { + fprintf(grprsm, " (Southern latitudes and Western longitudes are negative.)\n"); + fprintf(grprsm, " Data represent type = gaussian (Table 6) %9d\n", isec2[0]); + /* + Quasi-regular grids introduced in Edition 1. + */ + if ( isec2[16] == 0 || iedit < 1 ) + fprintf(grprsm, " Number of points along a parallel. %9d\n", isec2[1]); + else + printQuasi(isec2); + + fprintf(grprsm, " Number of points along a meridian. %9d\n", isec2[2]); + fprintf(grprsm, " Latitude of first grid point. %9d\n", isec2[3]); + fprintf(grprsm, " Longitude of first grid point. %9d\n", isec2[4]); + + ibit = 8; + iresol = isec2[5] + isec2[17] + isec2[18]; + prtbin(iresol, ibit, &iout, &ierr); + + fprintf(grprsm, " Resolution and components flag. %8.8d\n", iout); + fprintf(grprsm, " Latitude of last grid point. %9d\n", isec2[6]); + fprintf(grprsm, " Longitude of last grid point. %9d\n", isec2[7]); + /* + Print increment if given. + */ + if ( isec2[5] == 128 ) + fprintf(grprsm, " i direction (East-West) increment. %9d\n", isec2[8]); + else + fprintf(grprsm, " i direction (East-West) increment Not given\n"); + + fprintf(grprsm, " Number of parallels between pole and equator.%9d\n", isec2[9]); + + ibit = 8; + prtbin(isec2[10], ibit, &iout, &ierr); + + fprintf(grprsm, " Scanning mode flags (Code Table 8) %8.8d\n", iout); + fprintf(grprsm, " Number of vertical coordinate parameters. %9d\n", isec2[11]); + goto LABEL800; + } + /* + ----------------------------------------------------------------- + Section 4 . Print Latitude / longitude grid data. + ----------------------------------------------------------------- + */ + if ( isec2[0] == 0 || isec2[0] == 10 || + isec2[0] == 20 || isec2[0] == 30 ) + { + fprintf(grprsm, " (Southern latitudes and Western longitudes are negative.)\n"); + fprintf(grprsm, " Data represent type = lat/long (Table 6) %9d\n", isec2[0]); + /* + Quasi-regular lat/long grids also possible. + */ + if ( isec2[16] == 0 ) + fprintf(grprsm, " Number of points along a parallel. %9d\n", isec2[1]); + else + printQuasi(isec2); + + fprintf(grprsm, " Number of points along a meridian. %9d\n", isec2[2]); + fprintf(grprsm, " Latitude of first grid point. %9d\n", isec2[3]); + fprintf(grprsm, " Longitude of first grid point. %9d\n", isec2[4]); + + ibit = 8; + iresol = isec2[5] + isec2[17] + isec2[18]; + prtbin(iresol, ibit, &iout, &ierr); + + fprintf(grprsm, " Resolution and components flag. %8.8d\n", iout); + fprintf(grprsm, " Latitude of last grid point. %9d\n", isec2[6]); + fprintf(grprsm, " Longitude of last grid point. %9d\n", isec2[7]); + /* + Print increment if given. + */ + if ( isec2[8] < 0 ) + fprintf(grprsm, " i direction (East-West) increment Not given\n"); + else + fprintf(grprsm, " i direction (East-West) increment. %9d\n", isec2[8]); + + if ( isec2[9] < 0 ) + fprintf(grprsm, " j direction (North-South) increment Not given\n"); + else + fprintf(grprsm, " j direction (North-South) increment. %9d\n", isec2[9]); + + ibit = 8; + prtbin(isec2[10], ibit, &iout, &ierr); + + fprintf(grprsm, " Scanning mode flags (Code Table 8) %8.8d\n", iout); + fprintf(grprsm, " Number of vertical coordinate parameters. %9d\n", isec2[11]); + goto LABEL800; + } + /* + ----------------------------------------------------------------- + Section 5 . Print polar stereographic data. + ----------------------------------------------------------------- + */ + if ( isec2[0] == 5 ) + { + fprintf(grprsm, " (Southern latitudes and Western longitudes are negative.)\n"); + fprintf(grprsm, " Data represent type = polar stereo (Table 6) %9d\n", isec2[0]); + fprintf(grprsm, " Number of points along X axis. %9d\n", isec2[1]); + fprintf(grprsm, " Number of points along Y axis. %9d\n", isec2[2]); + fprintf(grprsm, " Latitude of first grid point. %9d\n", isec2[3]); + fprintf(grprsm, " Longitude of first grid point. %9d\n", isec2[4]); + ibit = 8; + iresol = isec2[17] + isec2[18]; + prtbin(iresol, ibit, &iout, &ierr); + fprintf(grprsm, " Resolution and components flag. %8.8d\n", iout); + fprintf(grprsm, " Orientation of the grid. %9d\n", isec2[6]); + fprintf(grprsm, " X direction increment. %9d\n", isec2[8]); + fprintf(grprsm, " Y direction increment. %9d\n", isec2[9]); + ibit = 8; + prtbin(isec2[10], ibit, &iout, &ierr); + fprintf(grprsm, " Scanning mode flags (Code Table 8) %8.8d\n", iout); + fprintf(grprsm, " Number of vertical coordinate parameters. %9d\n", isec2[11]); + fprintf(grprsm, " Projection centre flag. %9d\n", isec2[12]); + goto LABEL800; + } + /* + ----------------------------------------------------------------- + Section 6 . Print Lambert conformal data. + ----------------------------------------------------------------- + */ + if ( isec2[0] == 3 ) + { + fprintf(grprsm, " (Southern latitudes and Western longitudes are negative.)\n"); + fprintf(grprsm, " Data represent type = Lambert (Table 6) %9d\n", isec2[0]); + fprintf(grprsm, " Number of points along X axis. %9d\n", isec2[1]); + fprintf(grprsm, " Number of points along Y axis. %9d\n", isec2[2]); + fprintf(grprsm, " Latitude of first grid point. %9d\n", isec2[3]); + fprintf(grprsm, " Longitude of first grid point. %9d\n", isec2[4]); + ibit = 8; + iresol = isec2[17] + isec2[18] + isec2[5]; + prtbin(iresol, ibit, &iout, &ierr); + fprintf(grprsm, " Resolution and components flag. %8.8d\n", iout); + fprintf(grprsm, " Orientation of the grid. %9d\n", isec2[6]); + fprintf(grprsm, " X direction increment. %9d\n", isec2[8]); + fprintf(grprsm, " Y direction increment. %9d\n", isec2[9]); + ibit = 8; + prtbin(isec2[10], ibit, &iout, &ierr); + fprintf(grprsm, " Scanning mode flags (Code Table 8) %8.8d\n", iout); + fprintf(grprsm, " Number of vertical coordinate parameters. %9d\n", isec2[11]); + fprintf(grprsm, " Projection centre flag. %9d\n", isec2[12]); + fprintf(grprsm, " Latitude intersection 1 - Latin 1 -. %9d\n", isec2[13]); + fprintf(grprsm, " Latitude intersection 2 - Latin 2 -. %9d\n", isec2[14]); + fprintf(grprsm, " Latitude of Southern Pole. %9d\n", isec2[19]); + fprintf(grprsm, " Longitude of Southern Pole. %9d\n", isec2[20]); + goto LABEL800; + } + /* + ----------------------------------------------------------------- + Section 7 . Print space view perspective or orthographic data. + ----------------------------------------------------------------- + */ + if ( isec2[0] == 90 ) + { + fprintf(grprsm, " (Southern latitudes and Western longitudes are negative.)\n"); + fprintf(grprsm, " Data represent type = space/ortho (Table 6) %9d\n", isec2[0]); + fprintf(grprsm, " Number of points along X axis. %9d\n", isec2[1]); + fprintf(grprsm, " Number of points along Y axis. %9d\n", isec2[2]); + fprintf(grprsm, " Latitude of sub-satellite point. %9d\n", isec2[3]); + fprintf(grprsm, " Longitude of sub-satellite point. %9d\n", isec2[4]); + //iresol = isec2[17] + isec2[18]; + fprintf(grprsm, " Diameter of the earth in x direction. %9d\n", isec2[6]); + fprintf(grprsm, " Y coordinate of sub-satellite point. %9d\n", isec2[9]); + ibit = 8; + prtbin(isec2[10], ibit, &iout, &ierr); + fprintf(grprsm, " Scanning mode flags (Code Table 8) %8.8d\n", iout); + fprintf(grprsm, " Number of vertical coordinate parameters. %9d\n", isec2[11]); + fprintf(grprsm, " Orientation of the grid. %9d\n", isec2[6]); + fprintf(grprsm, " Altitude of the camera. %9d\n", isec2[13]); + fprintf(grprsm, " Y coordinate of origin of sector image. %9d\n", isec2[14]); + fprintf(grprsm, " X coordinate of origin of sector image. %9d\n", isec2[15]); + goto LABEL800; + } + /* + ----------------------------------------------------------------- + Section 7.5 . Print ocean data + ----------------------------------------------------------------- + */ + /* + if ( isec2[0] == 192 && ISEC1_CenterID == 98 ) + { + fprintf(grprsm, " Data represent type = ECMWF ocean (Table 6) %9d\n", isec2[0]); + if ( isec2[1] == 32767 ) + fprintf(grprsm, " Number of points along the first axis. Not used\n"); + else + fprintf(grprsm, " Number of points along the first axis. %9d\n", isec2[1]); + + if ( isec2[2] == 32767 ) + fprintf(grprsm, " Number of points along the second axis. Not used\n"); + else + fprintf(grprsm, " Number of points along the second axis. %9d\n", isec2[2]); + + ibit = 8; + prtbin(isec2[10], ibit, &iout, &ierr); + fprintf(grprsm, " Scanning mode flags (Code Table 8) %8.8d\n", iout); + goto LABEL800; + } + */ + /* + ----------------------------------------------------------------- + Section 7.6 . Print triangular data + ----------------------------------------------------------------- + */ + if ( isec2[0] == 192 /* && ISEC1_CenterID == 78 */ ) + { + fprintf(grprsm, " Data represent type = triangular (Table 6) %9d\n", isec2[0]); + fprintf(grprsm, " Number of factor 2 in factorisation of Ni. %9d\n", isec2[1]); + fprintf(grprsm, " Number of factor 3 in factorisation of Ni. %9d\n", isec2[2]); + fprintf(grprsm, " Number of diamonds (Nd). %9d\n", isec2[3]); + fprintf(grprsm, " Number of triangular subdivisions of the\n"); + fprintf(grprsm, " icosahedron (Ni). %9d\n", isec2[4]); + fprintf(grprsm, " Flag for orientation of diamonds (Table A). %9d\n", isec2[5]); + fprintf(grprsm, " Latitude of pole point. %9d\n", isec2[6]); + fprintf(grprsm, " Longitude of pole point. %9d\n", isec2[7]); + fprintf(grprsm, " Longitude of the first diamond. %9d\n", isec2[8]); + fprintf(grprsm, " Flag for storage sequence (Table B). %9d\n", isec2[9]); + fprintf(grprsm, " Number of vertical coordinate parameters. %9d\n", isec2[11]); + goto LABEL800; + } + /* + ----------------------------------------------------------------- + Drop through to here => representation type not catered for. + ----------------------------------------------------------------- + */ + fprintf(grprsm, "GRPRS2 :Data representation type not catered for -%d\n", isec2[0]); + + goto LABEL900; + /* + ----------------------------------------------------------------- + Section 8 . Print vertical coordinate parameters, + rotated grid information, + stretched grid information, if any. + ----------------------------------------------------------------- + */ + LABEL800:; + /* + Vertical coordinate parameters ... + */ + if ( isec2[11] != 0 ) + { + fprintf(grprsm, " \n"); + fprintf(grprsm, " Vertical Coordinate Parameters.\n"); + fprintf(grprsm, " -------------------------------\n"); + for (int i = 10; i < isec2[11]+10; ++i) + fprintf(grprsm, " %20.12f\n", fsec2[i]); + } + /* + Rotated and stretched grids introduced in Edition 1. + */ + if ( iedit < 1 ) goto LABEL900; + /* + Rotated grid information ... + */ + if ( isec2[0] == 10 || isec2[0] == 30 || + isec2[0] == 14 || isec2[0] == 34 || + isec2[0] == 60 || isec2[0] == 80 || + isec2[0] == 30 ) + { + fprintf(grprsm, " \n"); + fprintf(grprsm, " Latitude of southern pole of rotation. %9d\n", isec2[12]); + fprintf(grprsm, " Longitude of southern pole of rotation. %9d\n", isec2[13]); + fprintf(grprsm, " Angle of rotation. %20.10f\n", fsec2[0]); + } + /* + Stretched grid information ... + */ + if ( isec2[0] == 20 || isec2[0] == 30 || + isec2[0] == 24 || isec2[0] == 34 || + isec2[0] == 70 || isec2[0] == 80 ) + { + fprintf(grprsm, " \n"); + fprintf(grprsm, " Latitude of pole of stretching. %9d\n", isec2[14]); + fprintf(grprsm, " Longitude of pole of stretching. %9d\n", isec2[15]); + fprintf(grprsm, " Stretching factor. %20.10f\n", fsec2[1]); + } + + LABEL900:; + + return; +} + +void gribPrintSec2SP(int *isec0, int *isec2, float *fsec2sp) +{ + int inum = 10 + isec2[11]; + + double *fsec2 = (double*) Malloc((size_t)inum*sizeof(double)); + if ( fsec2 == NULL ) SysError("No Memory!"); + + for (int j = 0; j < inum; ++j) fsec2[j] = fsec2sp[j]; + + gribPrintSec2DP(isec0, isec2, fsec2); + + Free(fsec2); +} + +void gribPrintSec3DP(int *isec0, int *isec3, double *fsec3) +{ + /* + + Print the information in the Bit-Map Section + (Section 3) of decoded GRIB data. + + Input Parameters: + + isec0 - Array of decoded integers from Section 0 + + isec3 - Array of decoded integers from Section 3 + + fsec3 - Array of decoded floats from Section 3 + + + Converted from EMOS routine GRPRS3. + + Uwe Schulzweida MPIfM 01/04/2001 + + */ + + UNUSED(isec0); + + grsdef(); + + fprintf(grprsm, " \n"); + fprintf(grprsm, " Section 3 - Bit-map Section.\n"); + fprintf(grprsm, " -------------------------------------\n"); + + if ( isec3[0] != 0 ) + fprintf(grprsm, " Predetermined bit-map number. %9d\n", isec3[0]); + else + fprintf(grprsm, " No predetermined bit-map.\n"); + + fprintf(grprsm, " Missing data value for integer data. %14d\n", isec3[1]); + + fprintf(grprsm, " Missing data value for real data. %20.6g\n", fsec3[1]); +} + +void gribPrintSec3SP(int *isec0, int *isec3, float *fsec3sp) +{ + double fsec3[2]; + + fsec3[0] = fsec3sp[0]; + fsec3[1] = fsec3sp[1]; + + gribPrintSec3DP(isec0, isec3, fsec3); +} + +void gribPrintSec4DP(int *isec0, int *isec4, double *fsec4) +{ + /* + + Print the information in the Binary Data Section + (Section 4) of decoded GRIB data. + + Input Parameters: + + isec0 - Array of decoded integers from Section 0 + + isec4 - Array of decoded integers from Section 4 + + fsec4 - Array of decoded floats from Section 4 + + + Converted from EMOS routine GRPRS4. + + Uwe Schulzweida MPIfM 01/04/2001 + + */ + int inum; + + UNUSED(isec0); + + grsdef(); + + /* + ----------------------------------------------------------------- + Section 1 . Print integer information from isec4. + ----------------------------------------------------------------- + */ + fprintf(grprsm, " \n"); + fprintf(grprsm, " Section 4 - Binary Data Section.\n"); + fprintf(grprsm, " -------------------------------------\n"); + + fprintf(grprsm, " Number of data values coded/decoded. %9d\n", isec4[0]); + fprintf(grprsm, " Number of bits per data value. %9d\n", isec4[1]); + fprintf(grprsm, " Type of data (0=grid pt, 128=spectral).%9d\n", isec4[2]); + fprintf(grprsm, " Type of packing (0=simple, 64=complex). %9d\n", isec4[3]); + fprintf(grprsm, " Type of data (0=float, 32=integer). %9d\n", isec4[4]); + fprintf(grprsm, " Additional flags (0=none, 16=present). %9d\n", isec4[5]); + fprintf(grprsm, " Reserved. %9d\n", isec4[6]); + fprintf(grprsm, " Number of values (0=single, 64=matrix). %9d\n", isec4[7]); + fprintf(grprsm, " Secondary bit-maps (0=none, 32=present). %9d\n", isec4[8]); + fprintf(grprsm, " Values width (0=constant, 16=variable).%9d\n", isec4[9]); + /* + If complex packing .. + */ + if ( isec4[3] == 64 ) + { + if ( isec4[2] == 128 ) + { + fprintf(grprsm, " Byte offset of start of packed data (N). %9d\n", isec4[15]); + fprintf(grprsm, " Power (P * 1000). %9d\n", isec4[16]); + fprintf(grprsm, " Pentagonal resolution parameter J for subset.%9d\n", isec4[17]); + fprintf(grprsm, " Pentagonal resolution parameter K for subset.%9d\n", isec4[18]); + fprintf(grprsm, " Pentagonal resolution parameter M for subset.%9d\n", isec4[19]); + } + else + { + fprintf(grprsm, " Bits number of 2nd order values (none=>0).%9d\n", isec4[10]); + fprintf(grprsm, " General extend. 2-order packing (0=no,8=yes).%9d\n", isec4[11]); + fprintf(grprsm, " Boustrophedonic ordering (0=no,4=yes).%9d\n", isec4[12]); + fprintf(grprsm, " Spatial differencing order (0=none).%9d\n", isec4[13]+isec4[14]); + } + } + /* + Number of non-missing values + */ + if ( isec4[20] != 0 ) + fprintf(grprsm, " Number of non-missing values %9d\n", isec4[20]); + /* + Information on matrix of values , if present. + */ + if ( isec4[7] == 64 ) + { + fprintf(grprsm, " First dimension (rows) of each matrix. %9d\n", isec4[49]); + fprintf(grprsm, " Second dimension (columns) of each matrix. %9d\n", isec4[50]); + fprintf(grprsm, " First dimension coordinate values definition.%9d\n", isec4[51]); + fprintf(grprsm, " (Code Table 12)\n"); + fprintf(grprsm, " NC1 - Number of coefficients for 1st dimension.%7d\n", isec4[52]); + fprintf(grprsm, " Second dimension coordinate values definition.%8d\n", isec4[53]); + fprintf(grprsm, " (Code Table 12)\n"); + fprintf(grprsm, " NC2 - Number of coefficients for 2nd dimension.%7d\n", isec4[54]); + fprintf(grprsm, " 1st dimension physical signifance (Table 13). %8d\n", isec4[55]); + fprintf(grprsm, " 2nd dimension physical signifance (Table 13).%8d\n", isec4[56]); + } + /* + ----------------------------------------------------------------- + Section 2. Print values from fsec4. + ----------------------------------------------------------------- + */ + + inum = isec4[0]; + if ( inum < 0 ) inum = - inum; + if ( inum > 20 ) inum = 20; + /* + Print first inum values. + */ + fprintf(grprsm, " \n"); + fprintf(grprsm, " First %4d data values.\n", inum); + + if ( isec4[4] == 0 ) + { + /* + Print real values ... + */ + for (int j = 0; j < inum; ++j) + { + if ( fabs(fsec4[j]) > 0 ) + { + if ( fabs(fsec4[j]) >= 0.1 && fabs(fsec4[j]) <= 1.e8 ) + fprintf(grprsm, " %#16.8G \n", fsec4[j]); + else + fprintf(grprsm, " %#20.8E\n", fsec4[j]); + } + else + fprintf(grprsm, " %#16.0f \n", fabs(fsec4[j])); + } + } + else + { + /* + Print integer values ... + */ + fprintf(grprsm, " Print of integer values not supported\n"); + /* + CALL SETPAR(IBIT,IDUM,IDUM) + DO 212 J=1,INUM + INSPT = 0 + CALL INXBIT(IVALUE,1,INSPT,FSEC4(J),1,IBIT,IBIT,'C',IRET) + WRITE (*,9033) IVALUE + 9033 FORMAT(' ',I15) + 212 CONTINUE + ENDIF + */ + } +} + +void gribPrintSec4SP(int *isec0, int *isec4, float *fsec4sp) +{ + double fsec4[20]; + + int inum = isec4[0]; + if ( inum < 0 ) inum = -inum; + if ( inum > 20 ) inum = 20; + + for (int j = 0; j < inum; ++j) fsec4[j] = fsec4sp[j]; + + gribPrintSec4DP(isec0, isec4, fsec4); +} + +void gribPrintSec4Wave(int *isec4) +{ + /* + + Print the wave coordinate information in the Binary Data + Section (Section 4) of decoded GRIB data. + + Input Parameters: + + isec4 - Array of decoded integers from Section 4 + + Comments: + + Wave coordinate information held in isec4 are 32-bit floats, + hence the PTEMP and NTEMP used for printing are 4-byte variables. + + + Converted from EMOS routine GRPRS4W. + + Uwe Schulzweida MPIfM 01/04/2001 + + */ + int ntemp[100]; + float *ptemp; + + grsdef(); + + /* + ----------------------------------------------------------------- + Section 1 . Print integer information from isec4. + ----------------------------------------------------------------- + */ + fprintf(grprsm, " Coefficients defining first dimension coordinates:\n"); + for (int jloop = 0; jloop < isec4[52]; jloop++) + { + ntemp[jloop] = isec4[59 + jloop]; + ptemp = (float *) &ntemp[jloop]; + fprintf(grprsm, "%20.10f\n", *ptemp); + } + fprintf(grprsm, " Coefficients defining second dimension coordinates:\n"); + for (int jloop = 0; jloop < isec4[54]; jloop++) + { + ntemp[jloop] = isec4[59 + isec4[52] + jloop]; + ptemp = (float *) &ntemp[jloop]; + fprintf(grprsm, "%20.10f\n", *ptemp); + } +} +#ifdef HAVE_CONFIG_H +#endif + +#include <string.h> +#include <ctype.h> + + + +int gribOpen(const char *filename, const char *mode) +{ + int fileID = fileOpen(filename, mode); + +#if defined (__sun) + if ( fileID != FILE_UNDEFID && tolower(*mode) == 'r' ) + { + fileSetBufferType(fileID, FILE_BUFTYPE_MMAP); + } +#endif + + return fileID; +} + + +void gribClose(int fileID) +{ + fileClose(fileID); +} + + +off_t gribGetPos(int fileID) +{ + return fileGetPos(fileID); +} + + +int gribCheckSeek(int fileID, long *offset, int *version) +{ + int ierr = gribFileSeek(fileID, offset); + + *version = -1; + if ( !ierr ) + { + char buffer[4]; + if ( fileRead(fileID, buffer, 4) == 4 ) + *version = buffer[3]; + } + + return ierr; +} + + +int gribFileSeek(int fileID, long *offset) +{ + /* position file pointer after GRIB */ + const long GRIB = 0x47524942; + long code = 0; + int ch; + int retry = 4096*4096; + + *offset = 0; + + void *fileptr = filePtr(fileID); + + while ( retry-- ) + { + ch = filePtrGetc(fileptr); + if ( ch == EOF ) return -1; + + code = ( (code << 8) + ch ) & 0xFFFFFFFF; + if ( code == GRIB ) + { + if ( CGRIBEX_Debug ) Message("record offset = %ld", *offset); + return 0; + } + + (*offset)++; + } + + if ( CGRIBEX_Debug ) Message("record offset = %ld", *offset); + + return 1; +} + +static inline +unsigned read3ByteMSBFirst(void *fileptr) +{ + unsigned b1 = (unsigned)(filePtrGetc(fileptr)); + unsigned b2 = (unsigned)(filePtrGetc(fileptr)); + unsigned b3 = (unsigned)(filePtrGetc(fileptr)); + return GET_UINT3(b1, b2, b3); +} + + +size_t gribReadSize(int fileID) +{ + size_t rgribsize = 0; + void *fileptr = filePtr(fileID); + off_t pos = fileGetPos(fileID); + + unsigned gribsize = read3ByteMSBFirst(fileptr); + + int gribversion = filePtrGetc(fileptr); + + if ( gribsize == 24 && gribversion != 1 && gribversion != 2 ) gribversion = 0; + + if ( CGRIBEX_Debug ) Message("gribversion = %d", gribversion); + + if ( gribversion == 0 ) + { + unsigned gdssize = 0, bmssize = 0; + unsigned issize = 4, essize = 4; + + unsigned pdssize = gribsize; + fileSetPos(fileID, (off_t) 3, SEEK_CUR); + if ( CGRIBEX_Debug ) Message("pdssize = %u", pdssize); + int flag = filePtrGetc(fileptr); + if ( CGRIBEX_Debug ) Message("flag = %d", flag); + + fileSetPos(fileID, (off_t) pdssize-8, SEEK_CUR); + + if ( flag & 128 ) + { + gdssize = read3ByteMSBFirst(fileptr); + fileSetPos(fileID, (off_t) gdssize-3, SEEK_CUR); + if ( CGRIBEX_Debug ) Message("gdssize = %u", gdssize); + } + + if ( flag & 64 ) + { + bmssize = read3ByteMSBFirst(fileptr); + fileSetPos(fileID, (off_t) bmssize-3, SEEK_CUR); + if ( CGRIBEX_Debug ) Message("bmssize = %u", bmssize); + } + + unsigned bdssize = read3ByteMSBFirst(fileptr); + if ( CGRIBEX_Debug ) Message("bdssize = %u", bdssize); + + gribsize = issize + pdssize + gdssize + bmssize + bdssize + essize; + rgribsize = (size_t) gribsize; + } + else if ( gribversion == 1 ) + { + if ( gribsize > JP23SET ) // Large GRIB record + { + unsigned pdssize = read3ByteMSBFirst(fileptr); + if ( CGRIBEX_Debug ) Message("pdssize = %u", pdssize); + + int flag = 0; + for (int i = 0; i < 5; ++i) flag = filePtrGetc(fileptr); + if ( CGRIBEX_Debug ) Message("flag = %d", flag); + + fileSetPos(fileID, (off_t) pdssize-8, SEEK_CUR); + + unsigned gdssize = 0; + if ( flag & 128 ) + { + gdssize = read3ByteMSBFirst(fileptr); + fileSetPos(fileID, (off_t) gdssize-3, SEEK_CUR); + if ( CGRIBEX_Debug ) Message("gdssize = %u", gdssize); + } + + unsigned bmssize = 0; + if ( flag & 64 ) + { + bmssize = read3ByteMSBFirst(fileptr); + fileSetPos(fileID, (off_t) bmssize-3, SEEK_CUR); + if ( CGRIBEX_Debug ) Message("bmssize = %u", bmssize); + } + + unsigned bdssize = read3ByteMSBFirst(fileptr); + if ( CGRIBEX_Debug ) Message("bdssize = %u", bdssize); + if ( bdssize <= 120 ) + { + const int issize = 4; + gribsize &= JP23SET; + gribsize *= 120; + bdssize = correct_bdslen(bdssize, gribsize, issize+pdssize+gdssize+bmssize); + if ( CGRIBEX_Debug ) Message("bdssize = %u", bdssize); + + gribsize = issize + pdssize + gdssize + bmssize + bdssize + 4; + } + } + rgribsize = (size_t) gribsize; + } + else if ( gribversion == 2 ) + { + /* we set gribsize the following way because it doesn't matter then + whether int is 4 or 8 bytes long - we don't have to care if the size + really fits: if it does not, the record can not be read at all */ + rgribsize = 0; + for (int i = 0; i < 8; ++i) rgribsize = (rgribsize << 8) | filePtrGetc(fileptr); + } + else + { + rgribsize = 0; + Warning("GRIB version %d unsupported!", gribversion); + } + + if ( filePtrEOF(fileptr) ) rgribsize = 0; + + if ( CGRIBEX_Debug ) Message("gribsize = %zu", rgribsize); + + fileSetPos(fileID, pos, SEEK_SET); + + return rgribsize; +} + + +size_t gribGetSize(int fileID) +{ + long offset; + int ierr = gribFileSeek(fileID, &offset); // position file pointer after GRIB + if ( ierr > 0 ) + { + Warning("GRIB record not found!"); + return 0; + } + + if ( ierr == -1 ) return 0; + else if ( ierr == 1 ) return 0; + + size_t recSize = gribReadSize(fileID); + + if ( CGRIBEX_Debug ) Message("recsize = %zu", recSize); + + fileSetPos(fileID, (off_t) -4, SEEK_CUR); + + return recSize; +} + + +int gribRead(int fileID, void *buffer, size_t *buffersize) +{ + long offset; + int ierr = gribFileSeek(fileID, &offset); // position file pointer after GRIB + if ( ierr > 0 ) + { + Warning("GRIB record not found!"); + return -2; + } + + if ( ierr == -1 ) { *buffersize = 0; return -1; } + else if ( ierr == 1 ) { *buffersize = 0; return -2; } + + size_t recSize = gribReadSize(fileID); + size_t readSize = recSize; + + if ( readSize > *buffersize ) + { + readSize = *buffersize; + ierr = -3; // Tell the caller that the buffer was insufficient. + } + + *buffersize = recSize; // Inform the caller about the record size. + + // Write the stuff to the buffer that has already been read in gribFileSeek(). + memcpy(buffer, "GRIB", 4); + + readSize -= 4; + // Read the rest of the record into the buffer. + size_t nread = fileRead(fileID, (char *)buffer + 4, readSize); + + if ( nread != readSize ) ierr = 1; + + return ierr; +} + + +int gribWrite(int fileID, void *buffer, size_t buffersize) +{ + int nwrite = (int)(fileWrite(fileID, buffer, buffersize)); + if (nwrite != (int) buffersize) + { + perror(__func__); + nwrite = -1; + } + + return nwrite; +} +#include <string.h> +#include <ctype.h> + + +FILE *grprsm = NULL; +int CGRIBEX_grib_calendar = -1; + + +void gribSetCalendar(int calendar) +{ + CGRIBEX_grib_calendar = calendar; +} + + +void grsdef(void) +{ + /* +C----> +C**** GRSDEF - Initial (default) setting of common area variables +C for GRIBEX package. +C +C Purpose. +C -------- +C +C Sets initial values for common area variables for all +C routines of GRIBEX package, if not already done. +C +C** Interface. +C ---------- +C +C CALL GRSDEF +C +C Input Parameters. +C ----------------- +C +C None. +C +C Output Parameters. +C ------------------ +C +C None. +C +C Method. +C ------- +C +C Self-explanatory. +C +C Externals. +C ---------- +C +C None. +C +C Reference. +C ---------- +C +C See subroutine GRIBEX. +C +C Comments. +C --------- +C +C None +C +C Author. +C ------- +C +C J. Clochard, Meteo France, for ECMWF - March 1998. +C +C Modifications. +C -------------- +C +C J. Clochard, Meteo France, for ECMWF - June 1999. +C Add variable NSUBCE. +C Use a static variable to determine if initialisation has already +C been done. NUSER removed . +C Reverse defaults for NEXT2O and NLOC2O, for consistency with +C version 13.023 of software . +C + */ + /* +C ---------------------------------------------------------------- +C* Section 0 . Definition of variables. +C ---------------------------------------------------------------- + */ + char *envString; + char *env_stream; + static bool lfirst = true; + extern int CGRIBEX_Const; + + if ( ! lfirst ) return; + + /* + ---------------------------------------------------------------- + Section 1 . Set values, conditionally. + ---------------------------------------------------------------- + */ + /* + Common area variables have not been set. Set them. + */ + /* + Set GRIB calendar. + */ + if ( CGRIBEX_grib_calendar == -1 ) + { + CGRIBEX_grib_calendar = CALENDAR_PROLEPTIC; + + envString = getenv("GRIB_CALENDAR"); + if ( envString ) + { + if ( strncmp(envString, "standard", 8) == 0 ) + CGRIBEX_grib_calendar = CALENDAR_STANDARD; + else if ( strncmp(envString, "proleptic", 9) == 0 ) + CGRIBEX_grib_calendar = CALENDAR_PROLEPTIC; + else if ( strncmp(envString, "360days", 7) == 0 ) + CGRIBEX_grib_calendar = CALENDAR_360DAYS; + else if ( strncmp(envString, "365days", 7) == 0 ) + CGRIBEX_grib_calendar = CALENDAR_365DAYS; + else if ( strncmp(envString, "366days", 7) == 0 ) + CGRIBEX_grib_calendar = CALENDAR_366DAYS; + else if ( strncmp(envString, "none", 4) == 0 ) + CGRIBEX_grib_calendar = CALENDAR_NONE; + } + } + /* + Set GRIBEX compatibility mode. + */ + envString = getenv("GRIB_GRIBEX_MODE_ON"); + if ( envString != NULL ) + { + if ( atoi(envString) == 1 ) CGRIBEX_Const = 0; + } + + /* + See if output stream needs changing + */ + grprsm = stdout; + env_stream = getenv("GRPRS_STREAM"); + if ( env_stream ) + { + if ( isdigit((int) env_stream[0]) ) + { + int unit; + unit = atoi(env_stream); + if ( unit < 1 || unit > 99 ) + Warning("Invalid number for GRPRS_STREAM: %d", unit); + else if ( unit == 2 ) + grprsm = stderr; + else if ( unit == 6 ) + grprsm = stdout; + else + { + char filename[] = "unit.00"; + sprintf(filename, "%2.2d", unit); + grprsm = fopen(filename, "w"); + if ( ! grprsm ) + SysError("GRPRS_STREAM = %d", unit); + } + } + else + { + if ( env_stream[0] ) + { + grprsm = fopen(env_stream, "w"); + if ( ! grprsm ) + SysError("GRPRS_STREAM = %s", env_stream); + } + } + } + /* + Mark common area values set by user. + */ + lfirst = false; +} + +/* pack 8-bit bytes from 64-bit words to a packed buffer */ +/* same as : for (int i = 0; i < bc; ++i) cp[i] = (unsigned char) up[i]; */ + +long packInt64(unsigned INT64 *up, unsigned char *cp, long bc, long tc) +{ +#if defined (CRAY) + (void) _pack(up, cp, bc, tc); +#else + unsigned char *cp0; + unsigned INT64 upi, *up0, *ip0, *ip1, *ip2, *ip3, *ip4, *ip5, *ip6, *ip7; + long ipack = sizeof(INT64); + + // Bytes until first word boundary in destination buffer + + long head = ( (long) cp ) & (ipack-1); + if ( head != 0 ) head = ipack - head; + + long inner = bc - head; + + // Trailing bytes which do not make a full word + + long trail = inner & (ipack-1); + + // Number of bytes/words to be processed in fast loop + + inner -= trail; + inner /= ipack; + + ip0 = up + head; + ip1 = ip0 + 1; + ip2 = ip0 + 2; + ip3 = ip0 + 3; + ip4 = ip0 + 4; + ip5 = ip0 + 5; + ip6 = ip0 + 6; + ip7 = ip0 + 7; + + up0 = (unsigned INT64 *)(void *)(cp + head); + + /* Here we should process any bytes until the first word boundary + * of our destination buffer + * That code is missing so far because our output buffer is + * word aligned by FORTRAN + */ + + long j = 0; + + if ( IS_BIGENDIAN() ) + { +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (long i = 0; i < inner; ++i) + { + upi = ( ip0[j] << 56 ) + | ( ( ip1[j] & 0xFF ) << 48 ) + | ( ( ip2[j] & 0xFF ) << 40 ) + | ( ( ip3[j] & 0xFF ) << 32 ) + | ( ( ip4[j] & 0xFF ) << 24 ) ; + up0[i] = upi | ( ( ip5[j] & 0xFF ) << 16 ) + | ( ( ip6[j] & 0xFF ) << 8 ) + | ( ip7[j] & 0xFF ) ; + j += ipack; + } + } + else + { + for (long i = 0; i < inner; ++i) + { + upi = ( ip7[j] << 56 ) + | ( ( ip6[j] & 0xFF ) << 48 ) + | ( ( ip5[j] & 0xFF ) << 40 ) + | ( ( ip4[j] & 0xFF ) << 32 ) + | ( ( ip3[j] & 0xFF ) << 24 ) ; + up0[i] = upi | ( ( ip2[j] & 0xFF ) << 16 ) + | ( ( ip1[j] & 0xFF ) << 8 ) + | ( ip0[j] & 0xFF ) ; + j += ipack; + } + } + + cp0 = (unsigned char *) ( up0 + inner ); + if ( trail > 0 ) + { + up0[inner] = 0; + for (long i = 0; i < trail ; ++i) + { + *cp0 = (unsigned char) ip0[ipack*inner+i]; + cp0++; + } + } + + if ( tc != -1 ) + { + bc++; + *cp0 = (unsigned char) tc; + } +#endif + return (bc); +} + +/* unpack 8-bit bytes from a packed buffer with 64-bit words */ +/* same as : for (int i = 0; i < bc; ++i) up[i] = (INT64) cp[i]; */ + +long unpackInt64(const unsigned char *cp, unsigned INT64 *up, long bc, long tc) +{ + const unsigned char *cp0; + unsigned INT64 *ip0, *ip1, *ip2, *ip3, *ip4, *ip5, *ip6, *ip7; + long offset; + long ipack = sizeof(INT64); + + UNUSED(tc); + + // Bytes until first word boundary in source buffer + + long head = ( (long) cp ) & (ipack-1); + if ( head != 0 ) head = ipack - head; + if ( head > bc ) head = bc; + + long inner = bc - head; + + // Trailing bytes which do not make a full word + + long trail = inner & (ipack-1); + + // Number of bytes/words to be processed in fast loop + + inner -= trail; + inner /= ipack; + + ip0 = up + head; + ip1 = ip0 + 1; + ip2 = ip0 + 2; + ip3 = ip0 + 3; + ip4 = ip0 + 4; + ip5 = ip0 + 5; + ip6 = ip0 + 6; + ip7 = ip0 + 7; + + const unsigned INT64 *up0 = (const unsigned INT64 *)(const void *)(cp + head); + + /* Process any bytes until the first word boundary + * of our source buffer + */ + for (long i = 0; i < head; ++i) up[i] = (unsigned INT64) cp[i]; + + long j = 0; + + if ( IS_BIGENDIAN() ) + { +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (long i = 0; i < inner; ++i) + { + ip0[j] = (up0[i] >> 56) & 0xFF; + ip1[j] = (up0[i] >> 48) & 0xFF; + ip2[j] = (up0[i] >> 40) & 0xFF; + ip3[j] = (up0[i] >> 32) & 0xFF; + ip4[j] = (up0[i] >> 24) & 0xFF; + ip5[j] = (up0[i] >> 16) & 0xFF; + ip6[j] = (up0[i] >> 8) & 0xFF; + ip7[j] = (up0[i]) & 0xFF; + + j += ipack; + } + } + else + { + for (long i = 0; i < inner; ++i) + { + ip7[j] = (up0[i] >> 56) & 0xFF; + ip6[j] = (up0[i] >> 48) & 0xFF; + ip5[j] = (up0[i] >> 40) & 0xFF; + ip4[j] = (up0[i] >> 32) & 0xFF; + ip3[j] = (up0[i] >> 24) & 0xFF; + ip2[j] = (up0[i] >> 16) & 0xFF; + ip1[j] = (up0[i] >> 8) & 0xFF; + ip0[j] = (up0[i]) & 0xFF; + + j += ipack; + } + } + + if ( trail > 0 ) + { + offset = head + ipack*inner; + cp0 = cp + offset; + for (long i = 0; i < trail; ++i) up[i+offset] = (unsigned INT64) cp0[i]; + } + /* + if ( tc != -1 ) { + bc++; + *cp0 = (unsigned char) tc; + } + */ + return (bc); +} + +/* pack 8-bit bytes from 32-bit words to a packed buffer */ +/* same as : for (int i = 0; i < bc; ++i) cp[i] = (char) up[i]; */ + +#ifdef INT32 +long packInt32(unsigned INT32 *up, unsigned char *cp, long bc, long tc) +{ + unsigned char *cp0; + unsigned INT32 *up0, *ip0, *ip1, *ip2, *ip3; + long ipack = sizeof(INT32); + + // Bytes until first word boundary in destination buffer + + long head = ( (long) cp ) & (ipack-1); + if ( head != 0 ) head = ipack - head; + + long inner = bc - head; + + // Trailing bytes which do not make a full word + + long trail = inner & (ipack-1); + + // Number of bytes/words to be processed in fast loop + + inner -= trail; + inner /= ipack; + + ip0 = up + head; + ip1 = ip0 + 1; + ip2 = ip0 + 2; + ip3 = ip0 + 3; + + up0 = (unsigned INT32 *)(void *)(cp + head); + + /* Here we should process any bytes until the first word boundary + * of our destination buffer + * That code is missing so far because our output buffer is + * word aligned by FORTRAN + */ + + long j = 0; + + if ( IS_BIGENDIAN() ) + { +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (long i = 0; i < inner; ++i) + { + up0[i] = ( ip0[j] << 24 ) + | ( ( ip1[j] & 0xFF ) << 16 ) + | ( ( ip2[j] & 0xFF ) << 8 ) + | ( ip3[j] & 0xFF ) ; + j += ipack; + } + } + else + { + for (long i = 0; i < inner; ++i) + { + up0[i] = ( ip3[j] << 24 ) + | ( ( ip2[j] & 0xFF ) << 16 ) + | ( ( ip1[j] & 0xFF ) << 8 ) + | ( ip0[j] & 0xFF ) ; + j += ipack; + } + } + + cp0 = (unsigned char *) ( up0 + inner ); + if ( trail > 0 ) + { + up0[inner] = 0; + for (long i = 0; i < trail; ++i) + { + *cp0 = (unsigned char) ip0[ipack*inner+i]; + cp0++; + } + } + + if ( tc != -1 ) + { + bc++; + *cp0 = (unsigned char) tc; + } + + return (bc); +} +#endif + +/* unpack 8-bit bytes from a packed buffer with 32-bit words */ +/* same as : for (int i = 0; i < bc; ++i) up[i] = (INT32) cp[i]; */ + +#ifdef INT32 +long unpackInt32(const unsigned char *cp, unsigned INT32 *up, long bc, long tc) +{ + const unsigned char *cp0; + unsigned INT32 *ip0, *ip1, *ip2, *ip3; + long offset; + long ipack = sizeof(INT32); + + UNUSED(tc); + + // Bytes until first word boundary in source buffer + + long head = ( (long) cp ) & (ipack-1); + if ( head != 0 ) head = ipack - head; + if ( head > bc ) head = bc; + + long inner = bc - head; + + // Trailing bytes which do not make a full word + + long trail = inner & (ipack-1); + + // Number of bytes/words to be processed in fast loop + + inner -= trail; + inner /= ipack; + + ip0 = up + head; + ip1 = ip0 + 1; + ip2 = ip0 + 2; + ip3 = ip0 + 3; + + const unsigned INT32 *up0 = (const unsigned INT32 *)(const void *)(cp + head); + + /* Process any bytes until the first word boundary + * of our source buffer + */ + for (long i = 0; i < head; ++i) up[i] = (unsigned INT32) cp[i]; + + long j = 0; + + if ( IS_BIGENDIAN() ) + { +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (long i = 0; i < inner; ++i) + { + ip0[j] = (up0[i] >> 24) & 0xFF; + ip1[j] = (up0[i] >> 16) & 0xFF; + ip2[j] = (up0[i] >> 8) & 0xFF; + ip3[j] = (up0[i]) & 0xFF; + + j += ipack; + } + } + else + { + for (long i = 0; i < inner; ++i) + { + ip3[j] = (up0[i] >> 24) & 0xFF; + ip2[j] = (up0[i] >> 16) & 0xFF; + ip1[j] = (up0[i] >> 8) & 0xFF; + ip0[j] = (up0[i]) & 0xFF; + + j += ipack; + } + } + + if ( trail > 0 ) + { + offset = head + ipack*inner; + cp0 = cp + offset; + for (long i = 0; i < trail; ++i) up[i+offset] = (unsigned INT32) cp0[i]; + } + /* + if ( tc != -1 ) { + bc++; + *cp0 = (unsigned char) tc; + } + */ + + return (bc); +} +#endif +#include <stdio.h> + + +void prtbin(int kin, int knbit, int *kout, int *kerr) +{ + /* + + Produces a decimal number with ones and zeroes + corresponding to the ones and zeroes of the input + binary number. + eg input number 1011 binary, output number 1011 decimal. + + + Input Parameters: + + kin - Integer variable containing binary number. + + knbit - Number of bits in binary number. + + Output Parameters: + + kout - Integer variable containing decimal value + with ones and zeroes corresponding to those of + the input binary number. + + kerr - 0, If no error. + 1, Number of bits in binary number exceeds + maximum allowed or is less than 1. + + + Converted from EMOS routine PRTBIN. + + Uwe Schulzweida MPIfM 01/04/2001 + + */ + int idec; + int ik; + int itemp; + + /* + Check length of binary number to ensure decimal number + generated will fit in the computer word - in this case will + it fit in a Cray 48 bit integer? + */ + if ( knbit < 1 || knbit > 14 ) + { + *kerr = 1; + printf(" prtbin : Error in binary number length - %3d bits.\n", knbit); + return; + } + else + *kerr = 0; + /* + ----------------------------------------------------------------- + Section 1. Generate required number. + ----------------------------------------------------------------- + */ + *kout = 0; + ik = kin; + idec = 1; + + for (int j = 0; j < knbit; ++j) + { + itemp = ik - ( (ik/2)*2 ); + *kout = (*kout) + itemp * idec; + ik = ik / 2; + idec = idec * 10; + } + + return; +} + +void +ref2ibm(double *pref, int kbits) +{ + /* + + Purpose: + -------- + + Code and check reference value in IBM format + + Input Parameters: + ----------------- + + pref - Reference value + kbits - Number of bits per computer word. + + Output Parameters: + ------------------ + + pref - Reference value + + Method: + ------- + + Codes in IBM format, then decides to ensure that reference + value used for packing is not different from that stored + because of packing differences. + + Externals. + ---------- + + confp3 - Encode into IBM floating point format. + decfp2 - Decode from IBM floating point format. + + Reference: + ---------- + + None. + + Comments: + -------- + + None. + + Author: + ------- + + J.D.Chambers ECMWF 17:05:94 + + Modifications: + -------------- + + Uwe Schulzweida MPIfM 01/04/2001 + + Convert to C from EMOS library version 130 + + */ + + int itrnd; + int kexp, kmant; + double ztemp, zdumm; + extern int CGRIBEX_Debug; + + /* ----------------------------------------------------------------- */ + /* Section 1. Convert to and from IBM format. */ + /* ----------------------------------------------------------------- */ + + /* Convert floating point reference value to IBM representation. */ + + itrnd = 1; + zdumm = ztemp = *pref; + confp3(zdumm, &kexp, &kmant, kbits, itrnd); + + if (kexp == 0 && kmant == 0) return; + + /* Set reference value to that actually stored in the GRIB code. */ + + *pref = decfp2(kexp, kmant); + + /* If the nearest number which can be represented in */ + /* GRIB format is greater than the reference value, */ + /* find the nearest number in GRIB format lower */ + /* than the reference value. */ + + if (ztemp < *pref) + { + /* Convert floating point to GRIB representation */ + /* using truncation to ensure that the converted */ + /* number is smaller than the original one. */ + + itrnd = 0; + zdumm = ztemp; + confp3(zdumm, &kexp, &kmant, kbits, itrnd); + + /* Set reference value to that stored in the GRIB code. */ + + *pref = decfp2(kexp, kmant); + + if (ztemp < *pref) + { + if (CGRIBEX_Debug) + { + Message("Reference value error."); + Message("Notify Met.Applications Section."); + Message("ZTEMP = ", ztemp); + Message("PREF = ", pref); + } + *pref = ztemp; + } + } + + return; +} /* ref2ibm */ +#include <math.h> +#include <string.h> + + +unsigned correct_bdslen(unsigned bdslen, long recsize, long gribpos) +{ + /* + If a very large product, the section 4 length field holds + the number of bytes in the product after section 4 upto + the end of the padding bytes. + This is a fixup to get round the restriction on product lengths + due to the count being only 24 bits. It is only possible because + the (default) rounding for GRIB products is 120 bytes. + */ + if ( recsize > JP23SET && bdslen <= 120 ) bdslen = (unsigned)(recsize - gribpos - bdslen); + return bdslen; +} + + +int grib1Sections(unsigned char *gribbuffer, long gribbufsize, unsigned char **pdsp, + unsigned char **gdsp, unsigned char **bmsp, unsigned char **bdsp, long *gribrecsize) +{ + *gribrecsize = 0; + *pdsp = NULL; + *gdsp = NULL; + *bmsp = NULL; + *bdsp = NULL; + + unsigned char *section = gribbuffer; + unsigned char *is = gribbuffer; + if ( ! GRIB_START(section) ) + { + fprintf(stderr, "Wrong GRIB indicator section: found >%c%c%c%c<\n", + section[0], section[1], section[2], section[3]); + return -1; + } + + unsigned recsize = GET_UINT3(section[4], section[5], section[6]); + + int gribversion = GRIB_EDITION(section); + if ( gribversion != 0 && gribversion != 1 ) + { + fprintf(stderr, "Error while decoding GRIB1 sections: GRIB edition %d records not supported!\n", gribversion); + return -1; + } + + unsigned grib1offset = (gribversion == 1) ? 4 : 0; + + unsigned char *pds = is + 4 + grib1offset; + unsigned char *bufpointer = pds + PDS_Len; + unsigned gribsize = 4 + grib1offset + PDS_Len; + + unsigned char *gds = NULL; + if ( PDS_HAS_GDS ) + { + gds = bufpointer; + bufpointer += GDS_Len; + gribsize += GDS_Len; + } + + unsigned char *bms = NULL; + if ( PDS_HAS_BMS ) + { + bms = bufpointer; + bufpointer += BMS_Len; + gribsize += BMS_Len; + } + + unsigned char *bds = bufpointer; + unsigned bdslen = BDS_Len; + if ( recsize > JP23SET && bdslen <= 120 ) + { + recsize &= JP23SET; + recsize *= 120; + bdslen = correct_bdslen(bdslen, recsize, gribsize); + } + bufpointer += bdslen; + gribsize += bdslen; + gribsize += 4; + + *pdsp = pds; + *gdsp = gds; + *bmsp = bms; + *bdsp = bds; + + *gribrecsize = gribsize; + if ( gribbufsize < gribsize ) + { + fprintf(stderr, "Inconsistent length of GRIB message (grib_buffer_size=%ld < grib_record_size=%u)!\n", gribbufsize, gribsize); + return 1; + } + + if ( !GRIB_FIN(bufpointer) ) // end section - "7777" in ASCII + { + fprintf(stderr, "Missing GRIB end section: found >%c%c%c%c<\n", + bufpointer[0], bufpointer[1], bufpointer[2], bufpointer[3]); + return -2; + } + + return 0; +} + + +int grib2Sections(unsigned char *gribbuffer, long gribbufsize, unsigned char **idsp, + unsigned char **lusp, unsigned char **gdsp, unsigned char **pdsp, + unsigned char **drsp, unsigned char **bmsp, unsigned char **bdsp) +{ + UNUSED(gribbufsize); + + *idsp = NULL; + *lusp = NULL; + *gdsp = NULL; + *pdsp = NULL; + *drsp = NULL; + *bmsp = NULL; + *bdsp = NULL; + + unsigned char *section = gribbuffer; + unsigned sec_len = 16; + + if ( !GRIB_START(section) ) + { + fprintf(stderr, "wrong indicator section >%c%c%c%c<\n", + section[0], section[1], section[2], section[3]); + return -1; + } + + int gribversion = GRIB_EDITION(section); + if ( gribversion != 2 ) + { + fprintf(stderr, "wrong GRIB version %d\n", gribversion); + return -1; + } + + unsigned gribsize = 0; + for (int i = 0; i < 8; ++i) gribsize = (gribsize << 8) | section[8+i]; + + unsigned grib_len = sec_len; + section += sec_len; + + /* section 1 */ + sec_len = GRIB2_SECLEN(section); + int sec_num = GRIB2_SECNUM(section); + //fprintf(stderr, "ids %d %ld\n", sec_num, sec_len); + + if ( sec_num != 1 ) + { + fprintf(stderr, "Unexpected section1 number %d\n", sec_num); + return -1; + } + + *idsp = section; + + grib_len += sec_len; + section += sec_len; + + /* section 2 and 3 */ + sec_len = GRIB2_SECLEN(section); + sec_num = GRIB2_SECNUM(section); + //fprintf(stderr, "lus %d %ld\n", sec_num, sec_len); + + if ( sec_num == 2 ) + { + *lusp = section; + + grib_len += sec_len; + section += sec_len; + + /* section 3 */ + sec_len = GRIB2_SECLEN(section); + //sec_num = GRIB2_SECNUM(section); + //fprintf(stderr, "gds %d %ld\n", sec_num, sec_len); + + *gdsp = section; + } + else if ( sec_num == 3 ) + { + *gdsp = section; + } + else + { + fprintf(stderr, "Unexpected section3 number %d\n", sec_num); + return -1; + } + + grib_len += sec_len; + section += sec_len; + + /* section 4 */ + sec_len = GRIB2_SECLEN(section); + sec_num = GRIB2_SECNUM(section); + //fprintf(stderr, "pds %d %ld\n", sec_num, sec_len); + + if ( sec_num != 4 ) + { + fprintf(stderr, "Unexpected section4 number %d\n", sec_num); + return -1; + } + + *pdsp = section; + + grib_len += sec_len; + section += sec_len; + + /* section 5 */ + sec_len = GRIB2_SECLEN(section); + sec_num = GRIB2_SECNUM(section); + //fprintf(stderr, "drs %d %ld\n", sec_num, sec_len); + + if ( sec_num != 5 ) + { + fprintf(stderr, "Unexpected section5 number %d\n", sec_num); + return -1; + } + + *drsp = section; + + grib_len += sec_len; + section += sec_len; + + /* section 6 */ + sec_len = GRIB2_SECLEN(section); + sec_num = GRIB2_SECNUM(section); + //fprintf(stderr, "bms %d %ld\n", sec_num, sec_len); + + if ( sec_num != 6 ) + { + fprintf(stderr, "Unexpected section6 number %d\n", sec_num); + return -1; + } + + *bmsp = section; + + grib_len += sec_len; + section += sec_len; + + /* section 7 */ + sec_len = GRIB2_SECLEN(section); + sec_num = GRIB2_SECNUM(section); + //fprintf(stderr, "bds %d %ld\n", sec_num, sec_len); + + if ( sec_num != 7 ) + { + fprintf(stderr, "Unexpected section7 number %d\n", sec_num); + return -1; + } + + *bdsp = section; + + grib_len += sec_len; + section += sec_len; + + /* skip multi GRIB sections */ + int msec = 1; + while ( !GRIB_FIN(section) ) + { + sec_len = GRIB2_SECLEN(section); + sec_num = GRIB2_SECNUM(section); + + if ( sec_num < 1 || sec_num > 7 ) break; + + if ( sec_num == 7 ) + fprintf(stderr, "Skipped unsupported multi GRIB section %d!\n", ++msec); + + if ( (grib_len + sec_len) > gribsize ) break; + + grib_len += sec_len; + section += sec_len; + } + + /* end section - "7777" in ASCII */ + if ( !GRIB_FIN(section) ) + { + fprintf(stderr, "Missing end section >%2x %2x %2x %2x<\n", + section[0], section[1], section[2], section[3]); + return -2; + } + + return 0; +} + + +int grib_info_for_grads(off_t recpos, long recsize, unsigned char *gribbuffer, + int *intnum, float *fltnum, off_t *bignum) +{ + long gribsize = 0; + off_t bpos = 0; + + unsigned char *section = gribbuffer; + unsigned char *is = gribbuffer; + if ( ! GRIB_START(section) ) + { + fprintf(stderr, "wrong indicator section >%c%c%c%c<\n", + section[0], section[1], section[2], section[3]); + return -1; + } + + int gribversion = GRIB_EDITION(section); + if ( recsize == 24 && gribversion == 0 ) gribversion = 0; + + unsigned grib1offset = (gribversion == 1) ? 4 : 0; + + unsigned char *pds = is + 4 + grib1offset; + unsigned char *bufpointer = pds + PDS_Len; + gribsize += 4 + grib1offset + PDS_Len; + + unsigned char *gds = NULL; + if ( PDS_HAS_GDS ) + { + gds = bufpointer; + bufpointer += GDS_Len; + gribsize += GDS_Len; + } + + unsigned char *bms = NULL; + if ( PDS_HAS_BMS ) + { + bms = bufpointer; + bufpointer += BMS_Len; + bpos = recpos + gribsize + 6; + gribsize += BMS_Len; + } + + unsigned char *bds = bufpointer; + + off_t dpos = recpos + gribsize + 11; + + unsigned bdslen = BDS_Len; + bdslen = correct_bdslen(bdslen, recsize, bds-gribbuffer); + bufpointer += bdslen; + gribsize += bdslen; + gribsize += 4; + + if ( gribsize > recsize ) + { + fprintf(stderr, "GRIB buffer size %ld too small! Min size = %ld\n", recsize, gribsize); + return 1; + } + + /* end section - "7777" in ascii */ + if ( !GRIB_FIN(bufpointer) ) + { + fprintf(stderr, "Missing end section >%2x %2x %2x %2x<\n", + bufpointer[0], bufpointer[1], bufpointer[2], bufpointer[3]); + } + + int bs = BDS_BinScale; + if ( bs > 32767 ) bs = 32768-bs; + float bsf = ldexpf(1.0f, bs); + + bignum[0] = dpos; + bignum[1] = bms ? bpos : -999; + intnum[0] = BDS_NumBits; + + /* fltnum[0] = 1.0; */ + fltnum[0] = powf(10.0f, (float)PDS_DecimalScale); + fltnum[1] = bsf; + fltnum[2] = (float)BDS_RefValue; + /* + printf("intnum %d %d %d\n", intnum[0], intnum[1], intnum[2]); + printf("fltnum %g %g %g\n", fltnum[0], fltnum[1], fltnum[2]); + */ + return 0; +} + +static +int get_level(unsigned char *pds) +{ + int level = 0; + + if ( PDS_LevelType == 100 ) + level = PDS_Level * 100; + else if ( PDS_LevelType == 99 ) + level = PDS_Level; + else if ( PDS_LevelType == 109 ) + level = PDS_Level; + else + level = PDS_Level1; + + return level; +} + +static +double get_cr(unsigned char *w1, unsigned char *w2) +{ + unsigned s1 = GET_UINT3(w1[0], w1[1], w1[2]); + unsigned s2 = GET_UINT3(w2[0], w2[1], w2[2]); + return ((double)s1)/s2; +} + + +static void grib1PrintALL(int nrec, long offset, long recpos, long recsize, unsigned char *gribbuffer) +{ + static bool header = true; + unsigned char *is = NULL, *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + + if ( header ) + { + fprintf(stdout, + " Rec : Off Position Size : V PDS GDS BMS BDS : Code Level : LType GType: CR LL\n"); +/* ----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ */ + header = false; + } + + is = gribbuffer; + + unsigned gribsize = GET_UINT3(is[4], is[5], is[6]); + + long gribrecsize; + int nerr = grib1Sections(gribbuffer, recsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "%5d :%4ld %8ld %6ld : GRIB message error\n", nrec, offset, recpos, recsize); + return; + } + + int GridType = (gds == NULL) ? -1 : (int)GDS_GridType; + + int level = get_level(pds); + + unsigned bdslen = BDS_Len; + + bool llarge = (gribsize > JP23SET && bdslen <= 120); + + bdslen = correct_bdslen(bdslen, recsize, bds-gribbuffer); + + double cr = (((BDS_Flag >> 4)&1) && (BDS_Z == 128 || BDS_Z == 130)) ? get_cr(&bds[14], &gribbuffer[4]) : 1; + + fprintf(stdout, "%5d :%4ld %8ld %6ld :%2d%4d%5d %6d %6d : %3d %6d : %5d %5d %6.4g %c", + nrec, offset, recpos, recsize, GRIB_EDITION(is), + PDS_Len, GDS_Len, BMS_Len, bdslen, + PDS_Parameter, level, PDS_LevelType, GridType, cr, llarge?'T':'F'); + + if ( nerr > 0 ) fprintf(stdout, " <-- GRIB data corrupted!"); + fprintf(stdout, "\n"); +} + + +static void grib2PrintALL(int nrec, long offset, long recpos, long recsize, unsigned char *gribbuffer) +{ + static bool header = true; + unsigned char *is = NULL, *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + unsigned char *ids = NULL, *lus = NULL, *drs = NULL; + long ids_len = 0, lus_len = 0, gds_len = 0, pds_len = 0, drs_len = 0, bms_len = 0, bds_len = 0; + double cr = 1; + + if ( header ) + { + fprintf(stdout, + " Rec : Off Position Size : V IDS LUS GDS PDS DRS BMS BDS : Parameter Level : LType GType: CR\n"); +/* ----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ */ + header = false; + } + + is = gribbuffer; + + int nerr = grib2Sections(gribbuffer, recsize, &ids, &lus, &gds, &pds, &drs, &bms, &bds); + if ( nerr ) + { + fprintf(stdout, "%5d :%4ld %8ld %6ld : error\n", nrec, offset, recpos, recsize); + return; + } + + if ( ids ) ids_len = GRIB2_SECLEN(ids); + if ( lus ) lus_len = GRIB2_SECLEN(lus); + if ( gds ) gds_len = GRIB2_SECLEN(gds); + if ( pds ) pds_len = GRIB2_SECLEN(pds); + if ( drs ) drs_len = GRIB2_SECLEN(drs); + if ( bms ) bms_len = GRIB2_SECLEN(bms); + if ( bds ) bds_len = GRIB2_SECLEN(bds); + + // double cr = (((BDS_Flag >> 4)&1) && (BDS_Z == 128 || BDS_Z == 130)) ? get_cr(&bds[14], &gribbuffer[4]) : 1; + + int dis = GET_UINT1(is[6]); + int gridtype = GET_UINT2(gds[12],gds[13]); + int paramcat = GET_UINT1(pds[9]); + int paramnum = GET_UINT1(pds[10]); + int level1type = GET_UINT1(pds[22]); + /* level1sf = GET_UINT1(pds[23]); */ + int level1 = GET_UINT4(pds[24],pds[25],pds[26],pds[27]); + /* level2type = GET_UINT1(pds[28]); */ + /* level2sf = GET_UINT1(pds[29]); */ + /* level2 = GET_UINT4(pds[30],pds[31],pds[32],pds[33]); */ + /* + printf("level %d %d %d %d %d %d %d\n", level1type, level1sf, level1, level1*level1sf, level2sf, level2, level2*level2sf); + */ + char paramstr[16]; + sprintf(paramstr, "%d.%d.%d", paramnum, paramcat, dis); + fprintf(stdout, "%5d :%4ld %8ld %6ld :%2d %3ld %3ld %3ld %3ld %4ld %6ld %6ld : %-9s %7d : %5d %5d %6.4g\n", + nrec, offset, recpos, recsize, GRIB_EDITION(is), + ids_len, lus_len, gds_len, pds_len, drs_len, bms_len, bds_len, + paramstr, level1, level1type, gridtype, cr); +} + + +void gribPrintALL(int nrec, long offset, long recpos, long recsize, unsigned char *gribbuffer) +{ + int gribversion = gribVersion(gribbuffer, (size_t)recsize); + + if ( gribversion == 0 || gribversion == 1 ) + grib1PrintALL(nrec, offset, recpos, recsize, gribbuffer); + else if ( gribversion == 2 ) + grib2PrintALL(nrec, offset, recpos, recsize, gribbuffer); + else + { + fprintf(stdout, "%5d :%4ld%9ld%7ld : GRIB version %d unsupported\n", + nrec, offset, recpos, recsize, gribversion); + } +} + + +static void grib1PrintPDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + static int header = 1; + unsigned char *is = NULL, *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + int century, subcenter, decimalscale; + int fc_num = 0; + int year = 0, date; + + UNUSED(recpos); + + if ( header ) + { + fprintf(stdout, + " Rec : PDS Tab Cen Sub Ver Grid Code LTyp Level1 Level2 Date Time P1 P2 TU TR NAVE Scale FCnum CT\n"); +/* ----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ */ + header = 0; + } + + is = gribbuffer; + + long gribrecsize; + int nerr = grib1Sections(gribbuffer, recsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "%5d : GRIB message error\n", nrec); + return; + } + + switch(GRIB_EDITION(is)) + { + case 0: + year = GET_UINT1(pds[12]); + century = 1; + subcenter = 0; + decimalscale = 0; + break; + case 1: + year = PDS_Year; + century = PDS_Century; + subcenter = PDS_Subcenter; + decimalscale = PDS_DecimalScale; + break; + default: + fprintf(stderr, "Grib version %d not supported!", GRIB_EDITION(is)); + exit(EXIT_FAILURE); + } + + if ( PDS_Len > 28 ) + if ( PDS_CenterID == 98 || PDS_Subcenter == 98 || + (PDS_CenterID == 7 && PDS_Subcenter == 98) ) + if ( pds[40] == 1 ) + fc_num = GET_UINT1(pds[49]); + + if ( year < 0 ) + { + date = (-year)*10000+PDS_Month*100+PDS_Day; + century = -century; + } + else + { + date = year*10000+PDS_Month*100+PDS_Day; + } + + fprintf(stdout, "%5d :%4d%4d%4d%4d%4d %4d %4d%4d%7d%7d %8d%6d%3d%3d%3d%3d%5d%6d%5d%4d", nrec, + PDS_Len, PDS_CodeTable, PDS_CenterID, subcenter, PDS_ModelID, + PDS_GridDefinition, PDS_Parameter, PDS_LevelType, PDS_Level1, PDS_Level2, + date, PDS_Time, PDS_TimePeriod1, PDS_TimePeriod2, PDS_TimeUnit, PDS_TimeRange, + PDS_AvgNum, decimalscale, fc_num, century); + + if ( nerr > 0 ) fprintf(stdout, " <-- GRIB data corrupted!"); + fprintf(stdout, "\n"); +} + + +void gribPrintPDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + int gribversion = gribVersion(gribbuffer, (size_t)recsize); + + if ( gribversion == 0 || gribversion == 1 ) + grib1PrintPDS(nrec, recpos, recsize, gribbuffer); + /* + else if ( gribversion == 2 ) + grib2PrintPDS(nrec, recpos, recsize, gribbuffer); + */ + else + { + fprintf(stdout, "%5d :%4ld%9ld%7ld : GRIB version %d unsupported\n", + nrec, 0L, recpos, recsize, gribversion); + } +} + + +static void grib1PrintGDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + static int header = 1; + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + + UNUSED(recpos); + + if ( header ) + { + fprintf(stdout, + " Rec : GDS NV PVPL Typ : xsize ysize Lat1 Lon1 Lat2 Lon2 dx dy\n"); +/* ----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ */ + header = 0; + } + + long gribrecsize; + int nerr = grib1Sections(gribbuffer, recsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "%5d : GRIB message error\n", nrec); + return; + } + + fprintf(stdout, "%5d :", nrec); + + if ( gds ) + fprintf(stdout, "%4d%4d%4d %4d :%6d%6d%7d%7d%7d%7d%6d%6d", + GDS_Len, GDS_NV, GDS_PVPL, GDS_GridType, + GDS_NumLon, GDS_NumLat, + GDS_FirstLat, GDS_FirstLon, + GDS_LastLat, GDS_LastLon, + GDS_LonIncr, GDS_LatIncr); + else + fprintf(stdout, " Grid Description Section not defined"); + + if ( nerr > 0 ) fprintf(stdout, " <-- GRIB data corrupted!"); + fprintf(stdout, "\n"); +} + + +void gribPrintGDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + int gribversion = gribVersion(gribbuffer, (size_t)recsize); + + if ( gribversion == 0 || gribversion == 1 ) + grib1PrintGDS(nrec, recpos, recsize, gribbuffer); + /* + else if ( gribversion == 2 ) + grib2PrintGDS(nrec, recpos, recsize, gribbuffer); + */ + else + { + fprintf(stdout, "%5d :%4ld%9ld%7ld : GRIB version %d unsupported\n", + nrec, 0L, recpos, recsize, gribversion); + } +} + + +static void grib1PrintBMS(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + static int header = 1; + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + + UNUSED(recpos); + + if ( header ) + { + fprintf(stdout, + " Rec : Code Level BMS Size\n"); +/* ----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ */ + header = 0; + } + + long gribrecsize; + int nerr = grib1Sections(gribbuffer, recsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "%5d : GRIB message error\n", nrec); + return; + } + + int level = get_level(pds); + + fprintf(stdout, "%5d :", nrec); + + if ( bms ) + fprintf(stdout, "%4d%7d %7d %7d", + PDS_Parameter, level, BMS_Len, BMS_BitmapSize); + else + fprintf(stdout, "%4d%7d Bit Map Section not defined", PDS_Parameter, level); + + if ( nerr > 0 ) fprintf(stdout, " <-- GRIB data corrupted!"); + fprintf(stdout, "\n"); +} + + +void gribPrintBMS(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + int gribversion = gribVersion(gribbuffer, (size_t)recsize); + + if ( gribversion == 0 || gribversion == 1 ) + grib1PrintBMS(nrec, recpos, recsize, gribbuffer); + /* + else if ( gribversion == 2 ) + grib2PrintBMS(nrec, recpos, recsize, gribbuffer); + */ + else + { + fprintf(stdout, "%5d :%4ld%9ld%7ld : GRIB version %d unsupported\n", + nrec, 0L, recpos, recsize, gribversion); + } +} + + +static void grib1PrintBDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + static int header = 1; + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + double scale; + + UNUSED(recpos); + + if ( header ) + { + fprintf(stdout, + " Rec : Code Level BDS Flag Scale RefValue Bits CR\n"); +/* ----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ */ + header = 0; + } + + long gribrecsize; + int nerr = grib1Sections(gribbuffer, recsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "%5d : GRIB message error\n", nrec); + return; + } + + int level = get_level(pds); + + double cr = (((BDS_Flag >> 4)&1) && BDS_Z == 128) ? get_cr(&bds[17], &bds[20]) : 1; + + double refval = BDS_RefValue; + + if ( BDS_BinScale < 0 ) + scale = 1.0/pow(2.0, (double) -BDS_BinScale); + else + scale = pow(2.0, (double) BDS_BinScale); + + if ( PDS_DecimalScale ) + { + double decscale = pow(10.0, (double)-PDS_DecimalScale); + refval *= decscale; + scale *= decscale; + } + + fprintf(stdout, "%5d :", nrec); + + if ( bds ) + fprintf(stdout, "%4d%7d %7d %4d %8.5g %11.5g%4d %6.4g", + PDS_Parameter, level, + BDS_Len, BDS_Flag, scale, refval, BDS_NumBits, cr); + else + fprintf(stdout, " Binary Data Section not defined"); + + if ( nerr > 0 ) fprintf(stdout, " <-- GRIB data corrupted!"); + fprintf(stdout, "\n"); +} + + +void gribPrintBDS(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + int gribversion = gribVersion(gribbuffer, (size_t)recsize); + + if ( gribversion == 0 || gribversion == 1 ) + grib1PrintBDS(nrec, recpos, recsize, gribbuffer); + /* + else if ( gribversion == 2 ) + grib2PrintBDS(nrec, recpos, recsize, gribbuffer); + */ + else + { + fprintf(stdout, "%5d :%4ld%9ld%7ld : GRIB version %d unsupported\n", + nrec, 0L, recpos, recsize, gribversion); + } +} + + +void gribCheck1(int nrec, long recpos, long recsize, unsigned char *gribbuffer) +{ + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + + UNUSED(recpos); + + long gribrecsize; + int nerr = grib1Sections(gribbuffer, recsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "%5d : GRIB message error\n", nrec); + return; + } + + if ( nerr > 0 ) + { + fprintf(stdout, "%5d : <-- GRIB data corrupted!\n", nrec); + return; + } + + int level = get_level(pds); + + double cr = (((BDS_Flag >> 4)&1) && BDS_Z == 128) ? get_cr(&bds[17], &bds[20]) : 1; + + if ( IS_EQUAL(cr, 1) && BDS_NumBits == 24 ) + fprintf(stdout, "GRIB record %5d : code = %4d level = %7d\n", nrec, PDS_Parameter, level); +} + + +static +void repair1(unsigned char *gbuf, long gbufsize) +{ + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + /* int recLen; */ + unsigned char *source; + size_t sourceLen; + int bds_nbits, bds_flag, lspherc, lcomplex /*, lcompress */; + int bds_head = 11; + int bds_ext = 0, bds_ubits; + int datstart = 0; + + long gribrecsize; + int nerr = grib1Sections(gbuf, gbufsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "GRIB message error\n"); + return; + } + + if ( nerr > 0 ) + { + fprintf(stdout, "GRIB data corrupted!\n"); + return; + } + + unsigned bds_len = BDS_Len; + bds_nbits = BDS_NumBits; + bds_flag = BDS_Flag; + bds_ubits = bds_flag & 15; + lspherc = bds_flag >> 7; + lcomplex = (bds_flag >> 6)&1; + /* lcompress = (bds_flag >> 4)&1; */ + + if ( lspherc ) + { + if ( lcomplex ) + { + int jup, ioff; + jup = bds[15]; + ioff = (jup+1)*(jup+2); + bds_ext = 4 + 3 + 4*ioff; + } + else + { + bds_ext = 4; + } + } + + datstart = bds_head + bds_ext; + + source = bds + datstart; + + sourceLen = (size_t)(((((bds_len - datstart)*8-bds_ubits)/bds_nbits)*bds_nbits)/8); + + if ( bds_nbits == 24 ) + { + unsigned char *pbuf = (unsigned char*) Malloc(sourceLen);; + size_t nelem = sourceLen/3; + for (size_t i = 0; i < nelem; ++i) + { + pbuf[3*i ] = source[ i]; + pbuf[3*i+1] = source[ nelem+i]; + pbuf[3*i+2] = source[2*nelem+i]; + } + memcpy(source, pbuf, sourceLen); + Free(pbuf); + } +} + + +void gribRepair1(int nrec, long recsize, unsigned char *gribbuffer) +{ + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + + long gribrecsize; + int nerr = grib1Sections(gribbuffer, recsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "%5d : GRIB message error\n", nrec); + return; + } + + if ( nerr > 0 ) + { + fprintf(stdout, "%5d : <-- GRIB data corrupted!\n", nrec); + return; + } + + int level = get_level(pds); + + double cr = (((BDS_Flag >> 4)&1) && BDS_Z == 128) ? get_cr(&bds[17], &bds[20]) : 1; + + if ( IS_EQUAL(cr, 1) && BDS_NumBits == 24 ) + { + fprintf(stdout, "Repair GRIB record %5d : code = %4d level = %7d\n", nrec, PDS_Parameter, level); + repair1(gribbuffer, recsize); + } +} +#include <stdio.h> +#include <string.h> + +#if defined (HAVE_CONFIG_H) +#endif + +#if defined (HAVE_LIBSZ) +#if defined(__cplusplus) +extern "C" { +#endif +#include <szlib.h> +#ifdef __cplusplus +} +#endif + +#define OPTIONS_MASK (SZ_RAW_OPTION_MASK | SZ_MSB_OPTION_MASK | SZ_NN_OPTION_MASK) + +#define PIXELS_PER_BLOCK (8) +#define PIXELS_PER_SCANLINE (PIXELS_PER_BLOCK*128) + +#define MIN_COMPRESS (0.95) +#define MIN_SIZE (256) +#endif + +#define Z_SZIP 128 + +#if defined (HAVE_LIBSZ) || defined (HAVE_LIBAEC) +#define SetLen3(var, offset, value) ((var[offset+0] = 0xFF & (value >> 16)), \ + (var[offset+1] = 0xFF & (value >> 8)), \ + (var[offset+2] = 0xFF & (value ))) +#define SetLen4(var, offset, value) ((var[offset+0] = 0xFF & (value >> 24)), \ + (var[offset+1] = 0xFF & (value >> 16)), \ + (var[offset+2] = 0xFF & (value >> 8)), \ + (var[offset+3] = 0xFF & (value ))) +#endif + +int gribGetZip(size_t recsize, unsigned char *gribbuffer, size_t *urecsize) +{ + int compress = 0; + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + + int gribversion = gribVersion(gribbuffer, recsize); + + if ( gribversion == 2 ) return compress; + + long gribrecsize; + int nerr = grib1Sections(gribbuffer, (long)recsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "GRIB message error\n"); + return compress; + } + + if ( nerr > 0 ) + { + fprintf(stdout, "GRIB data corrupted!\n"); + return compress; + } + + /* bds_len = BDS_Len; */ + /* bds_nbits = BDS_NumBits; */ + int bds_flag = BDS_Flag; + /* lspherc = bds_flag >> 7; */ + /* lcomplex = (bds_flag >> 6)&1; */ + int lcompress = (bds_flag >> 4)&1; + + size_t gribsize = 0; + if ( lcompress ) + { + compress = BDS_Z; + if ( compress == Z_SZIP ) gribsize = (size_t) GET_UINT3(bds[14], bds[15], bds[16]); + } + + *urecsize = gribsize; + + return compress; +} + + +int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufsize) +{ +#if ! defined(HAVE_LIBSZ) + static int libszwarn = 1; +#endif + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + bool llarge = false; + + unsigned gribLen = GET_UINT3(dbuf[4], dbuf[5], dbuf[6]); + + int rec_len = gribLen; + + long gribrecsize; + int nerr = grib1Sections(dbuf, dbufsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "GRIB message error\n"); + return gribrecsize; + } + + if ( nerr > 0 ) + { + fprintf(stdout, "GRIB data corrupted!\n"); + return gribrecsize; + } + + int bds_zoffset = 12; + + int bds_len = BDS_Len; + if ( gribLen > JP23SET && bds_len <= 120 ) + { + gribLen &= JP23SET; + gribLen *= 120; + bds_len = correct_bdslen(bds_len, gribLen, bds-dbuf); + llarge = true; + bds_zoffset += 2; + } + + if ( gribLen > JP24SET || llarge ) return gribLen; + +#if defined(HAVE_LIBSZ) + { + int bds_zstart = 14; + unsigned gribLenOld = 0; + int bds_head = 11; + int bds_ext = 0; + unsigned char *pbuf = NULL; + + int bds_nbits = BDS_NumBits; + int bds_flag = BDS_Flag; + int bds_ubits = bds_flag & 15; + int lspherc = bds_flag >> 7; + int lcomplex = (bds_flag >> 6)&1; + /* lcompress = (bds_flag >> 4)&1; */ + + if ( bds_nbits != 8 && bds_nbits != 16 && bds_nbits != 24 && bds_nbits != 32 ) + { + static bool linfo = true; + if ( linfo && bds_nbits != 0 ) + { + linfo = false; + fprintf(stderr, "GRIB szip supports only 8, 16, 24 and 32 bit data!\n"); + } + return rec_len; + } + + int bits_per_sample = (bds_nbits == 24) ? 8 : bds_nbits; + + SZ_com_t sz_param; /* szip parameter block */ + sz_param.options_mask = OPTIONS_MASK; + sz_param.bits_per_pixel = bits_per_sample; + sz_param.pixels_per_block = PIXELS_PER_BLOCK; + sz_param.pixels_per_scanline = PIXELS_PER_SCANLINE; + + if ( lspherc ) + { + bds_ext = 4; + if ( lcomplex ) + { + int jup = bds[15]; + int ioff = (jup+1)*(jup+2); + bds_ext += 3 + 4*ioff; + } + } + + size_t datstart = bds_head + bds_ext; + + size_t datsize = ((((bds_len - datstart)*8-bds_ubits)/bds_nbits)*bds_nbits)/8; + + if ( datsize < MIN_SIZE ) return rec_len; + /* + fprintf(stderr, "%d %d %d %d\n", bds_len, datstart, bds_len - datstart, datsize); + */ + size_t sourceLen = datsize; + size_t destLen = sbufsize; + + unsigned char *source = bds + datstart; + unsigned char *dest = sbuf; + + if ( bds_nbits == 24 ) + { + long nelem = sourceLen/3; + pbuf = (unsigned char*) Malloc(sourceLen); + for (long i = 0; i < nelem; ++i) + { + pbuf[ i] = source[3*i ]; + pbuf[ nelem+i] = source[3*i+1]; + pbuf[2*nelem+i] = source[3*i+2]; + } + source = pbuf; + } + + int status = SZ_BufftoBuffCompress(dest, &destLen, source, sourceLen, &sz_param); + if ( status != SZ_OK ) + { + if ( status == SZ_NO_ENCODER_ERROR ) + Warning("SZ_NO_ENCODER_ERROR code %3d level %3d", PDS_Parameter, PDS_Level2); + else if ( status == SZ_PARAM_ERROR ) + Warning("SZ_PARAM_ERROR code %3d level %3d", PDS_Parameter, PDS_Level2); + else if ( status == SZ_MEM_ERROR ) + Warning("SZ_MEM_ERROR code %3d level %3d", PDS_Parameter, PDS_Level2); + else if ( status == SZ_OUTBUFF_FULL ) + /*Warning("SZ_OUTBUFF_FULL code %3d level %3d", PDS_Parameter, PDS_Level2)*/; + else + Warning("SZ ERROR: %d code %3d level %3d", status, PDS_Parameter, PDS_Level2); + } + + if ( pbuf ) Free(pbuf); + /* + fprintf(stderr, "sourceLen, destLen %d %d\n", sourceLen, destLen); + */ + if ( destLen < MIN_COMPRESS*sourceLen ) + { + source = bds + datstart + bds_zoffset; + memcpy(source, dest, destLen); + + /* ----++++ number of unused bits at end of section) */ + + BDS_Flag -= bds_ubits; + + gribLenOld = gribLen; + + if ( bds_ext ) + for (long i = bds_ext-1; i >= 0; --i) + bds[bds_zoffset+bds_head+i] = bds[bds_head+i]; + + /* + fprintf(stderr, "destLen, datsize, datstart %d %d %d\n", destLen, datsize, datstart); + */ + /* memcpy(bds + datstart + bds_zoffset, source, destLen); */ + /* + fprintf(stderr, "z>>> %d %d %d %d <<<\n", (int) bds[0+datstart+bds_zoffset], + (int)bds[1+datstart+bds_zoffset], (int)bds[2+datstart+bds_zoffset], (int)bds[3+datstart+bds_zoffset]); + */ + if ( llarge ) + { + if ( gribLenOld%120 ) + { + fprintf(stderr, "Internal problem, record length not multiple of 120!"); + while ( gribLenOld%120 ) gribLenOld++; + } + // gribLenOld = gribLenOld / (-120); + // gribLenOld = JP23SET - gribLenOld + 1; + + SetLen3(bds, bds_zstart, gribLenOld); + SetLen4(bds, bds_zstart+3, sourceLen); + SetLen4(bds, bds_zstart+7, destLen); + } + else + { + SetLen3(bds, bds_zstart, gribLenOld); + SetLen3(bds, bds_zstart+3, sourceLen); + SetLen3(bds, bds_zstart+6, destLen); + } + + int bdsLen = datstart + bds_zoffset + destLen; + + bds[11] = 0; + bds[12] = 0; + + BDS_Z = Z_SZIP; + + BDS_Flag += 16; + if ( (bdsLen%2) == 1 ) + { + BDS_Flag += 8; + bds[bdsLen++] = 0; + } + + SetLen3(bds, 0, bdsLen); + + gribLen = (bds - dbuf) + bdsLen; + + dbuf[gribLen++] = '7'; + dbuf[gribLen++] = '7'; + dbuf[gribLen++] = '7'; + dbuf[gribLen++] = '7'; + + if ( llarge ) + { + long bdslen = gribLen - 4; + + /* + If a very large product, the section 4 length field holds + the number of bytes in the product after section 4 upto + the end of the padding bytes. + This is a fixup to get round the restriction on product lengths + due to the count being only 24 bits. It is only possible because + the (default) rounding for GRIB products is 120 bytes. + */ + while ( gribLen%120 ) dbuf[gribLen++] = 0; + + long itemp = gribLen / (-120); + itemp = JP23SET - itemp + 1; + + SetLen3(dbuf, 4, itemp); + + bdslen = gribLen - bdslen; + + SetLen3(bds, 0, bdslen); + } + else + { + SetLen3(dbuf, 4, gribLen); + } + } + else + { + } + /* + fprintf(stderr, "%3d %3d griblen in %6d out %6d CR %g slen %6d dlen %6d CR %g\n", + PDS_Parameter, PDS_Level1, gribLenOld, gribLen, + ((double)gribLenOld)/gribLen, sourceLen, destLen, + ((double)sourceLen)/destLen); + */ + } + +#else + + UNUSED(sbuf); + UNUSED(sbufsize); + + if ( libszwarn ) + { + Warning("Compression disabled, szlib not available!"); + libszwarn = 0; + } +#endif + + if ( llarge ) + while ( gribLen%120 ) dbuf[gribLen++] = 0; + else + while ( gribLen & 7 ) dbuf[gribLen++] = 0; + + rec_len = gribLen; + + return rec_len; +} + + +int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufsize) +{ +#if ! defined(HAVE_LIBSZ) + static int libszwarn = 1; +#endif + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + size_t gribLen = 0; + size_t destLen, sourceLen; + enum { bds_head = 11 }; + int bds_ext = 0; + + UNUSED(dbufsize); + + long gribrecsize; + int nerr = grib1Sections(sbuf, sbufsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "GRIB message error\n"); + return 0; + } + + if ( nerr > 0 ) + { + fprintf(stdout, "GRIB data corrupted!\n"); + return 0; + } + + //unsigned bds_len = BDS_Len; + bool llarge = false; + + int bds_zoffset = 12; + if ( llarge ) bds_zoffset += 2; + + int bds_nbits = BDS_NumBits; + int bds_flag = BDS_Flag; + int lspherc = bds_flag >> 7; + int lcomplex = (bds_flag >> 6)&1; + /* lcompress = (bds_flag >> 4)&1; */ + + if ( lspherc ) + { + if ( lcomplex ) + { + int jup = bds[bds_zoffset+15]; + int ioff = (jup+1)*(jup+2); + bds_ext = 4 + 3 + 4*ioff; + } + else + { + bds_ext = 4; + } + } + + size_t datstart = bds_head + (size_t)bds_ext; + + unsigned char *source = bds + datstart + bds_zoffset; + if ( llarge ) + sourceLen = ((size_t) ((bds[21]<<24)+(bds[22]<<16)+(bds[23]<<8)+bds[24])); + else + sourceLen = ((size_t) ((bds[20]<<16)+(bds[21]<<8)+bds[22])); + + nerr = grib1Sections(dbuf, sbufsize, &pds, &gds, &bms, &bds, &gribrecsize); + if ( nerr < 0 ) + { + fprintf(stdout, "GRIB message error\n"); + return 0; + } + + if ( nerr > 0 ) + { + fprintf(stdout, "GRIB data corrupted!\n"); + return 0; + } + + unsigned char *dest = bds + datstart; + if ( llarge ) + destLen = ((size_t) ((bds[17]<<24)+(bds[18]<<16)+(bds[19]<<8)+bds[20])); + else + destLen = ((size_t) ((bds[17]<<16)+(bds[18]<<8)+bds[19])); + + BDS_Flag = (unsigned char)(BDS_Flag - 16); + + size_t bdsLen = datstart + destLen; + +#if defined(HAVE_LIBSZ) + { + int bds_zstart = 14; + unsigned recLen = GET_UINT3(bds[bds_zstart], bds[bds_zstart+1], bds[bds_zstart+2]); + + int bits_per_sample = (bds_nbits == 24) ? 8 : bds_nbits; + + SZ_com_t sz_param; /* szip parameter block */ + sz_param.options_mask = OPTIONS_MASK; + sz_param.bits_per_pixel = bits_per_sample; + sz_param.pixels_per_block = PIXELS_PER_BLOCK; + sz_param.pixels_per_scanline = PIXELS_PER_SCANLINE; + + if ( bds_ext ) + for (long i = 0; i < bds_ext; ++i) + bds[bds_head+i] = bds[bds_zoffset+bds_head+i]; + + /* fprintf(stderr, "gribUnzip: sourceLen %ld; destLen %ld\n", (long)sourceLen, (long)destLen); + fprintf(stderr, "gribUnzip: sourceOff %d; destOff %d\n", bds[12], bds[11]); + fprintf(stderr, "gribUnzip: reclen %d; bdslen %d\n", recLen, bdsLen); + */ + + size_t tmpLen = destLen; + + int status = SZ_BufftoBuffDecompress(dest, &tmpLen, source, sourceLen, &sz_param); + if ( status != SZ_OK ) + { + if ( status == SZ_NO_ENCODER_ERROR ) + Warning("SZ_NO_ENCODER_ERROR code %3d level %3d", PDS_Parameter, PDS_Level2); + else if ( status == SZ_PARAM_ERROR ) + Warning("SZ_PARAM_ERROR code %3d level %3d", PDS_Parameter, PDS_Level2); + else if ( status == SZ_MEM_ERROR ) + Warning("SZ_MEM_ERROR code %3d level %3d", PDS_Parameter, PDS_Level2); + else if ( status == SZ_OUTBUFF_FULL ) + Warning("SZ_OUTBUFF_FULL code %3d level %3d", PDS_Parameter, PDS_Level2); + else + Warning("SZ ERROR: %d code %3d level %3d", status, PDS_Parameter, PDS_Level2); + } + /* + fprintf(stderr, "gribUnzip: sl = %ld dl = %ld tl = %ld\n", + (long)sourceLen, (long)destLen,(long) tmpLen); + */ + if ( tmpLen != destLen ) + Warning("unzip size differ: code %3d level %3d ibuflen %ld ubuflen %ld", + PDS_Parameter, PDS_Level2, (long) destLen, (long) tmpLen); + + if ( bds_nbits == 24 ) + { + long nelem = tmpLen/3; + unsigned char *pbuf = (unsigned char*) Malloc(tmpLen); + for (long i = 0; i < nelem; ++i) + { + pbuf[3*i ] = dest[ i]; + pbuf[3*i+1] = dest[ nelem+i]; + pbuf[3*i+2] = dest[2*nelem+i]; + } + memcpy(dest, pbuf, tmpLen); + Free(pbuf); + } + + int bds_ubits = BDS_Flag & 15; + BDS_Flag -= bds_ubits; + + if ( (bdsLen%2) == 1 ) + { + BDS_Flag += 8; + bds[bdsLen++] = 0; + } + + SetLen3(bds, 0, bdsLen); + + gribLen = (bds - dbuf) + bdsLen; + + dbuf[gribLen++] = '7'; + dbuf[gribLen++] = '7'; + dbuf[gribLen++] = '7'; + dbuf[gribLen++] = '7'; + + if ( llarge ) + { + long itemp; + bdsLen = gribLen - 4; + /* + If a very large product, the section 4 length field holds + the number of bytes in the product after section 4 upto + the end of the padding bytes. + This is a fixup to get round the restriction on product lengths + due to the count being only 24 bits. It is only possible because + the (default) rounding for GRIB products is 120 bytes. + */ + while ( gribLen%120 ) dbuf[gribLen++] = 0; + + if ( gribLen != (size_t)recLen ) + fprintf(stderr, "Internal problem, recLen and gribLen differ!\n"); + + itemp = gribLen / (-120); + itemp = JP23SET - itemp + 1; + + SetLen3(dbuf, 4, itemp); + + bdsLen = gribLen - bdsLen; + + SetLen3(bds, 0, bdsLen); + } + else + { + SetLen3(dbuf, 4, recLen); + } + /* + fprintf(stderr, "recLen, gribLen, bdsLen %d %d %d\n", recLen, gribLen, bdsLen); + */ + if ( llarge ) + while ( gribLen%120 ) dbuf[gribLen++] = 0; + else + while ( gribLen & 7 ) dbuf[gribLen++] = 0; + /* + fprintf(stderr, "recLen, gribLen, bdsLen %d %d %d\n", recLen, gribLen, bdsLen); + */ + } +#else + UNUSED(bds_nbits); + UNUSED(sourceLen); + UNUSED(source); + UNUSED(bdsLen); + UNUSED(dest); + + if ( libszwarn ) + { + Warning("Decompression disabled, szlib not available!"); + libszwarn = 0; + } +#endif + + return (int)gribLen; +} +#include <stdio.h> +#include <math.h> + + +static void +scm0_double(double *pdl, double *pdr, double *pfl, double *pfr, int klg); + + +static +int rowina2(double *p, int ko, int ki, double *pw, + int kcode, double msval, int *kret) +{ + /* System generated locals */ + int pw_dim1, pw_offset, i_1; + + /* Local variables */ + double zwt1, zrdi, zpos; + int ip; + double zdo, zwt; + + /* Parameter adjustments */ + --p; + pw_dim1 = ko + 3; + pw_offset = pw_dim1; + pw -= pw_offset; + + /* **** ROWINA2 - Interpolation of row of values. */ + /* Input Parameters. */ + /* ----------------- */ + /* P - Row of values to be interpolated. */ + /* Dimension must be at least KO. */ + /* KO - Number of values required. */ + /* KI - Number of values in P on input. */ + /* PW - Working array. */ + /* Dimension must be at least (0:KO+2,3). */ + /* KCODE - Interpolation required. */ + /* 1 , linear. */ + /* 3 , cubic. */ + /* PMSVAL - Value used for missing data indicator. */ + + /* Output Parameters. */ + /* ------------------ */ + /* P - Now contains KO values. */ + /* KRET - Return code */ + /* 0, OK */ + /* Non-zero, error */ + + /* Author. */ + /* ------- */ + /* J.D.Chambers ECMWF 22.07.94 */ + + /* ******************************** */ + /* Section 1. Linear interpolation .. */ + /* ******************************** */ + + *kret = 0; + + if ( kcode == 1 ) + { + /* Move input values to work array */ + for (int jl = 1; jl <= ki; ++jl) + pw[jl + pw_dim1] = p[jl]; + + /* Arrange wrap-around value in work array */ + pw[ki + 1 + pw_dim1] = p[1]; + + /* Set up constants to be used to figure out weighting for */ + /* values in interpolation. */ + zrdi = (double) ki; + zdo = 1.0 / (double) ko; + + /* Loop through the output points */ + for (int jl = 1; jl <= ko; ++jl) + { + + /* Calculate weight from the start of row */ + zpos = (jl - 1) * zdo; + zwt = zpos * zrdi; + + /* Get the current array position(minus 1) from the weight - */ + /* note the implicit truncation. */ + ip = (int) zwt; + + /* If the left value is missing, use the right value */ + if ( IS_EQUAL(pw[ip + 1 + pw_dim1], msval) ) + { + p[jl] = pw[ip + 2 + pw_dim1]; + } + /* If the right value is missing, use the left value */ + else if ( IS_EQUAL(pw[ip + 2 + pw_dim1], msval) ) + { + p[jl] = pw[ip + 1 + pw_dim1]; + } + /* If neither missing, interpolate ... */ + else + { + + /* Adjust the weight to range (0.0 to 1.0) */ + zwt -= ip; + + /* Interpolate using the weighted values on either side */ + /* of the output point position */ + p[jl] = (1.0 - zwt) * pw[ip + 1 + pw_dim1] + + zwt * pw[ip + 2 + pw_dim1]; + } + } + + /* ******************************* */ + /* Section 2. Cubic interpolation .. */ + /* ******************************* */ + + } + else if ( kcode == 3 ) + { + i_1 = ki; + for (int jl = 1; jl <= i_1; ++jl) + { + if ( IS_EQUAL(p[jl], msval) ) + { + fprintf(stderr," ROWINA2: "); + fprintf(stderr," Cubic interpolation not supported"); + fprintf(stderr," for fields containing missing data.\n"); + *kret = 1; + goto L900; + } + pw[jl + pw_dim1] = p[jl]; + } + pw[pw_dim1] = p[ki]; + pw[ki + 1 + pw_dim1] = p[1]; + pw[ki + 2 + pw_dim1] = p[2]; + i_1 = ki; + for (int jl = 1; jl <= i_1; ++jl) + { + pw[jl + (pw_dim1 << 1)] = + - pw[jl - 1 + pw_dim1] / 3.0 - + pw[jl + pw_dim1] * 0.5 + + pw[jl + 1 + pw_dim1] - pw[jl + 2 + pw_dim1] / 6.0; + pw[jl + 1 + pw_dim1 * 3] = + pw[jl - 1 + pw_dim1] / 6.0 - + pw[jl + pw_dim1] + + pw[jl + 1 + pw_dim1] * 0.5 + + pw[jl + 2 + pw_dim1] / 3.0; + } + + scm0_double(&pw[(pw_dim1 << 1) + 1], &pw[pw_dim1 * 3 + 2], + &pw[pw_dim1 + 1], &pw[pw_dim1 + 2], ki); + + zrdi = (double) ki; + zdo = 1.0 / (double) ko; + for (int jl = 1; jl <= ko; ++jl) + { + zpos = (jl - 1) * zdo; + zwt = zpos * zrdi; + ip = (int) zwt + 1; + zwt = zwt + 1.0 - ip; + zwt1 = 1.0 - zwt; + p[jl] = ((3.0 - zwt1 * 2.0) * pw[ip + pw_dim1] + + zwt * pw[ip + (pw_dim1 << 1)]) * zwt1 * zwt1 + + ((3.0 - zwt * 2.0) * pw[ip + 1 + pw_dim1] - + zwt1 * pw[ip + 1 + pw_dim1 * 3]) * zwt * zwt; + } + + } + else + { + /* ************************************** */ + /* Section 3. Invalid interpolation code .. */ + /* ************************************** */ + fprintf(stderr," ROWINA2:"); + fprintf(stderr," Invalid interpolation code = %2d\n",kcode); + *kret = 2; + } + +L900: + return 0; +} /* rowina2 */ + + + +int qu2reg2(double *pfield, int *kpoint, int klat, int klon, + double *ztemp, double msval, int *kret) +{ + /* System generated locals */ + int i_1, i_2; + int kcode = 1; + + /* Local variables */ + int ilii, ilio, icode; + double *zline = NULL; + double *zwork = NULL; + int iregno, iquano; + + + zline = (double*) Malloc(2*(size_t)klon*sizeof(double)); + if ( zline == NULL ) SysError("No Memory!"); + + zwork = (double*) Malloc(3*(2*(size_t)klon+3)*sizeof(double)); + if ( zwork == NULL ) SysError("No Memory!"); + + /* Parameter adjustments */ + --pfield; + --kpoint; + +/* **** QU2REG - Convert quasi-regular grid data to regular. */ +/* Input Parameters. */ +/* ----------------- */ +/* PFIELD - Array containing quasi-regular grid */ +/* data. */ +/* KPOINT - Array containing list of the number of */ +/* points on each latitude (or longitude) of */ +/* the quasi-regular grid. */ +/* KLAT - Number of latitude lines */ +/* KLON - Number of longitude lines */ +/* KCODE - Interpolation required. */ +/* 1 , linear - data quasi-regular on */ +/* latitude lines. */ +/* 3 , cubic - data quasi-regular on */ +/* latitude lines. */ +/* 11, linear - data quasi-regular on */ +/* longitude lines. */ +/* 13, cubic - data quasi-regular on */ +/* longitude lines. */ +/* PMSVAL - Value used for missing data indicator. */ +/* Output Parameters. */ +/* ------------------ */ +/* KRET - return code */ +/* 0 = OK */ +/* non-zero indicates fatal error */ +/* PFIELD - Array containing regular grid data. */ +/* Author. */ +/* ------- */ +/* J.D.Chambers ECMWF 22.07.94 */ +/* J.D.Chambers ECMWF 13.09.94 */ +/* Add return code KRET and remove calls to ABORT. */ + + +/* ------------------------------ */ +/* Section 1. Set initial values. */ +/* ------------------------------ */ + + *kret = 0; + +/* Check input parameters. */ + + if (kcode != 1 && kcode != 3 && kcode != 11 && kcode != 13) { + fprintf(stderr," QU2REG :"); + fprintf(stderr," Invalid interpolation type code = %2d\n",kcode); + *kret = 1; + goto L900; + } + +/* Set array indices to 0. */ + + ilii = 0; + ilio = 0; + +/* Establish values of loop parameters. */ + + if (kcode > 10) { + +/* Quasi-regular along longitude lines. */ + + iquano = klon; + iregno = klat; + icode = kcode - 10; + } else { + +/* Quasi-regular along latitude lines. */ + + iquano = klat; + iregno = klon; + icode = kcode; + } + +/* -------------------------------------------------------- */ +/** Section 2. Interpolate field from quasi to regular grid. */ +/* -------------------------------------------------------- */ + + i_1 = iquano; + for (int j230 = 1; j230 <= i_1; ++j230) { + + if (iregno != kpoint[j230]) { + +/* Line contains less values than required,so */ +/* extract quasi-regular grid values for a line */ + + i_2 = kpoint[j230]; + for (int j210 = 1; j210 <= i_2; ++j210) { + ++ilii; + zline[j210 - 1] = pfield[ilii]; + } + +/* and interpolate this line. */ + + rowina2(zline, iregno, kpoint[j230], zwork, icode, msval, kret); + if (*kret != 0) goto L900; + +/* Add regular grid values for this line to the + temporary array. */ + + i_2 = iregno; + for (int j220 = 1; j220 <= i_2; ++j220) { + ++ilio; + ztemp[ilio - 1] = zline[j220 - 1]; + } + + } else { + +/* Line contains the required number of values, so add */ +/* this line to the temporary array. */ + + i_2 = iregno; + for (int j225 = 1; j225 <= i_2; ++j225) { + ++ilio; + ++ilii; + ztemp[ilio - 1] = pfield[ilii]; + } + } + } + + /* Copy temporary array to user array. */ + + i_1 = klon * klat; + for (int j240 = 1; j240 <= i_1; ++j240) { + pfield[j240] = ztemp[j240 - 1]; + } + +/* -------------------------------------------------------- */ +/* Section 9. Return to calling routine. Format statements. */ +/* -------------------------------------------------------- */ + +L900: + + Free(zline); + Free(zwork); + + return 0; +} /* qu2reg2 */ + + + +#ifdef T +#undef T +#endif +#define T double +#ifdef T + +/* calculate_pfactor: source code from grib_api-1.8.0 */ +double TEMPLATE(calculate_pfactor,T)(const T *spectralField, long fieldTruncation, long subsetTruncation) +{ + /*long n_vals = ((fieldTruncation+1)*(fieldTruncation+2));*/ + long loop, index, m, n = 0; + double zeps = 1.0e-15; + long ismin = (subsetTruncation+1), ismax = (fieldTruncation+1); + double weightedSumOverX = 0.0, weightedSumOverY = 0.0, sumOfWeights = 0.0; + double numerator = 0.0, denominator = 0.0; + + // Setup the weights + + double range = (double) (ismax - ismin +1); + + double *weights = (double*) Malloc(((size_t)ismax+1)*sizeof(double)); + for( loop = ismin; loop <= ismax; loop++ ) + weights[loop] = range / (double) (loop-ismin+1); + + // Compute norms + // Handle values 2 at a time (real and imaginary parts). + double *norms = (double*) Malloc(((size_t)ismax+1)*sizeof(double)); + + for( loop = 0; loop < ismax+1; loop++ ) norms[loop] = 0.0; + + // Form norms for the rows which contain part of the unscaled subset. + + index = -2; + for( m = 0; m < subsetTruncation; m++ ) + for( n = m; n <= fieldTruncation; n++ ) { + index += 2; + if( n >= subsetTruncation ) { + double tval = spectralField[index]; + tval=tval<0?-tval:tval; + norms[n] = norms[n] > tval ? norms[n] : tval; + tval = spectralField[index+1]; + tval=tval<0?-tval:tval; + norms[n] = norms[n] > tval ? norms[n] : tval; + } + } + + // Form norms for the rows which do not contain part of the unscaled subset. + + for( m = subsetTruncation; m <= fieldTruncation; m++ ) + for( n = m; n <= fieldTruncation; n++ ) { + double tval = spectralField[index]; + index += 2; + tval=tval<0?-tval:tval; + norms[n] = norms[n] > tval ? norms[n] : tval; + tval = spectralField[index+1]; + tval=tval<0?-tval:tval; + norms[n] = norms[n] > tval ? norms[n] : tval; + } + + // Ensure the norms have a value which is not too small in case of problems with math functions (e.g. LOG). + + for( loop = ismin; loop <= ismax; loop++ ) { + norms[n] = norms[n] > zeps ? norms[n] : zeps; + if( IS_EQUAL(norms[n], zeps) ) weights[n] = 100.0 * zeps; + } + + // Do linear fit to find the slope + + for( loop = ismin; loop <= ismax; loop++ ) { + double x = log( (double) (loop*(loop+1)) ); + double y = log( norms[loop] ); + weightedSumOverX += x * weights[loop]; + weightedSumOverY += y * weights[loop]; + sumOfWeights = sumOfWeights + weights[loop]; + } + weightedSumOverX /= sumOfWeights; + weightedSumOverY /= sumOfWeights; + + // Perform a least square fit for the equation + + for( loop = ismin; loop <= ismax; loop++ ) { + + double x = log( (double)(loop*(loop+1)) ); + double y = log( norms[loop] ); + numerator += weights[loop] * (y-weightedSumOverY) * (x-weightedSumOverX); + denominator += weights[loop] * ((x-weightedSumOverX) * (x-weightedSumOverX)); + } + double slope = numerator / denominator; + + Free(weights); + Free(norms); + + double pFactor = -slope; + if( pFactor < -9999.9 ) pFactor = -9999.9; + if( pFactor > 9999.9 ) pFactor = 9999.9; + + return pFactor; +} + +void TEMPLATE(scale_complex,T)(T *fpdata, int pcStart, int pcScale, int trunc, int inv) +{ + + if ( pcScale < -10000 || pcScale > 10000 ) + { + fprintf(stderr, " %s: Invalid power given %6d\n", __func__, pcScale); + return; + } + + // Setup scaling factors = n(n+1)^^p for n = 1 to truncation + + if ( pcScale != 0 ) + { + double *scale = (double*) Malloc(((size_t)trunc+1)*sizeof(double)); + const double power = (double) pcScale / 1000.; + scale[0] = 1.0; + + if (pcScale != 1000) + for (int n = 1; n <= trunc; ++n) scale[n] = pow((double) (n*(n+1)), power); + else + for (int n = 1; n <= trunc; ++n) scale[n] = (double) (n*(n+1)); + + if ( inv ) + for (int n = 1; n <= trunc; ++n) scale[n] = 1.0 / scale[n]; + + // Scale the values + + size_t index = 0; + + for (int m = 0; m < pcStart; ++m) + for (int n = m; n <= trunc; n++, index += 2) + if ( n >= pcStart ) + { + fpdata[index ] = (T)(fpdata[index ] * scale[n]); + fpdata[index+1] = (T)(fpdata[index+1] * scale[n]); + } + + for (int m = pcStart; m <= trunc; ++m) + for (int n = m; n <= trunc; n++, index += 2) + { + fpdata[index ] = (T)(fpdata[index ] * scale[n]); + fpdata[index+1] = (T)(fpdata[index+1] * scale[n]); + } + Free(scale); + } +} + + +void TEMPLATE(scatter_complex,T)(T *fpdata, int pcStart, int trunc, int nsp) +{ + T *fphelp = (T*) Malloc((size_t)nsp*sizeof(T)); + size_t inext = 0; + size_t pcStart_ = pcStart >= 0 ? (size_t)pcStart : 0U; + size_t trunc_ = trunc >= 0 ? (size_t)trunc : 0U; + for (size_t m = 0, index = 0; m <= pcStart_; ++m) + { + size_t n_copies = pcStart_ <= trunc_ ? (pcStart_ + 1 - m) * 2 : 0; + for (size_t i = 0; i < n_copies; ++i) fphelp[index + i] = fpdata[inext + i]; + inext += n_copies; + index += m <= trunc_ ? (trunc_ - m + 1) * 2 : 0; + } + for (size_t m = 0, index = 0; m <= trunc_; ++m) + { + size_t advIdx = m <= pcStart_ ? (pcStart_ - m + 1) * 2 : 0; + index += advIdx; + size_t copyStart = m > pcStart_ ? m : pcStart_ + 1; + size_t n_copies = copyStart <= trunc_ ? (trunc_ - copyStart + 1) * 2 : 0; + for (size_t i = 0; i < n_copies; ++i) fphelp[index + i] = fpdata[inext + i]; + inext += n_copies; + index += n_copies; + } + for (size_t m = 0; m < (size_t)nsp; ++m) fpdata[m] = fphelp[m]; + + Free(fphelp); +} + + +void TEMPLATE(gather_complex,T)(T *fpdata, size_t pcStart, size_t trunc, size_t nsp) +{ + T *restrict fphelp = (T*) Malloc(nsp*sizeof(T)); + size_t inext = 0; + + for (size_t m = 0, index = 0; m <= pcStart; ++m) + for (size_t n = m; n <= trunc; ++n) + { + if ( pcStart >= n ) + { + fphelp[inext++] = fpdata[index]; + fphelp[inext++] = fpdata[index+1]; + } + index += 2; + } + + for (size_t m = 0, index = 0; m <= trunc; ++m) + for (size_t n = m; n <= trunc; ++n) + { + if ( n > pcStart ) + { + fphelp[inext++] = fpdata[index]; + fphelp[inext++] = fpdata[index+1]; + } + index += 2; + } + + for (size_t m = 0; m < nsp; ++m) fpdata[m] = fphelp[m]; + + Free(fphelp); +} + + +static void TEMPLATE(scm0,T)(T *pdl, T *pdr, T *pfl, T *pfr, int klg) +{ + /* **** SCM0 - Apply SCM0 limiter to derivative estimates. */ + /* output: */ + /* pdl = the limited derivative at the left edge of the interval */ + /* pdr = the limited derivative at the right edge of the interval */ + /* inputs */ + /* pdl = the original derivative at the left edge */ + /* pdr = the original derivative at the right edge */ + /* pfl = function value at the left edge of the interval */ + /* pfr = function value at the right edge of the interval */ + /* klg = number of intervals where the derivatives are limited */ + + /* define constants */ + + double zeps = 1.0e-12; + double zfac = (1.0 - zeps) * 3.0; + + for (int jl = 0; jl < klg; ++jl) + { + double r_1; + if ( (r_1 = pfr[jl] - pfl[jl], fabs(r_1)) > zeps ) + { + double zalpha = pdl[jl] / (pfr[jl] - pfl[jl]); + double zbeta = pdr[jl] / (pfr[jl] - pfl[jl]); + if ( zalpha <= 0.0 ) pdl[jl] = 0.0; + if ( zbeta <= 0.0 ) pdr[jl] = 0.0; + if ( zalpha > zfac ) pdl[jl] = (T)(zfac * (pfr[jl] - pfl[jl])); + if ( zbeta > zfac ) pdr[jl] = (T)(zfac * (pfr[jl] - pfl[jl])); + } + else + { + pdl[jl] = 0.0; + pdr[jl] = 0.0; + } + } +} /* scm0 */ + +static +int TEMPLATE(rowina3,T)(T *p, int ko, int ki, T *pw, + int kcode, T msval, int *kret, int omisng, int operio, int oveggy) +{ + /* +C----> +C**** ROWINA3 - Interpolation of row of values. +C +C Purpose. +C -------- +C +C Interpolate a row of values. +C +C +C** Interface. +C ---------- +C +C CALL ROWINA3( P, KO, KI, PW, KCODE, PMSVAL, KRET, OMISNG, OPERIO) +C +C +C Input Parameters. +C ----------------- +C +C P - Row of values to be interpolated. +C Dimension must be at least KO. +C +C KO - Number of values required. +C +C KI - Number of values in P on input. +C +C PW - Working array. +C Dimension must be at least (0:KO+2,3). +C +C KCODE - Interpolation required. +C 1 , linear. +C 3 , cubic. +C +C PMSVAL - Value used for missing data indicator. +C +C OMISNG - True if missing values are present in field. +C +C OPERIO - True if input field is periodic. +C +C OVEGGY - True if 'nearest neighbour' processing must be used +C for interpolation +C +C Output Parameters. +C ------------------ +C +C P - Now contains KO values. +C KRET - Return code +C 0, OK +C Non-zero, error +C +C +C Method. +C ------- +C +C Linear or cubic interpolation performed as required. +C +C Comments. +C --------- +C +C This is a version of ROWINA which allows for missing data +C values and hence for bitmapped fields. +C +C +C Author. +C ------- +C +C J.D.Chambers ECMWF 22.07.94 +C +C +C Modifications. +C -------------- +C +C J.D.Chambers ECMWF 13.09.94 +C Add return code KRET and remove calls to ABORT. +C +C J. Clochard, Meteo France, for ECMWF - January 1998. +C Addition of OMISNG and OPERIO arguments. +C +C +C ----------------------------------------------------------------- +*/ + /* System generated locals */ + int pw_dim1, pw_offset, i_1; + + /* Local variables */ + int ip; + double zwt1, zrdi, zpos; + double zdo, zwt; + + UNUSED(omisng); + + /* Parameter adjustments */ + --p; + pw_dim1 = ko + 3; + pw_offset = pw_dim1; + pw -= pw_offset; + + *kret = 0; + + if ( kcode == 1 ) + { + /* Move input values to work array */ + for (int jl = 1; jl <= ki; ++jl) + pw[jl + pw_dim1] = p[jl]; + + if ( operio ) + { + /* Arrange wrap-around value in work array */ + pw[ki + 1 + pw_dim1] = p[1]; + + /* Set up constants to be used to figure out weighting for */ + /* values in interpolation. */ + zrdi = (double) ki; + zdo = 1.0 / (double) ko; + } + else + { + /* Repeat last value, to cope with "implicit truncation" below */ + pw[ki + 1 + pw_dim1] = p[ki]; + + /* Set up constants to be used to figure out weighting for */ + /* values in interpolation. */ + zrdi = (double) (ki-1); + zdo = 1.0 / (double) (ko-1); + } + + /* Loop through the output points */ + for (int jl = 1; jl <= ko; ++jl) + { + + /* Calculate weight from the start of row */ + zpos = (jl - 1) * zdo; + zwt = zpos * zrdi; + + /* Get the current array position(minus 1) from the weight - */ + /* note the implicit truncation. */ + ip = (int) zwt; + + /* Adjust the weight to range (0.0 to 1.0) */ + zwt -= ip; + + /* If 'nearest neighbour' processing must be used */ + if ( oveggy ) + { + if ( zwt < 0.5 ) + p[jl] = pw[ip + 1 + pw_dim1]; + else + p[jl] = pw[ip + 2 + pw_dim1]; + } + else + { + /* If the left value is missing, use the right value */ + if ( IS_EQUAL(pw[ip + 1 + pw_dim1], msval) ) + { + p[jl] = pw[ip + 2 + pw_dim1]; + } + /* If the right value is missing, use the left value */ + else if ( IS_EQUAL(pw[ip + 2 + pw_dim1], msval) ) + { + p[jl] = pw[ip + 1 + pw_dim1]; + } + /* If neither missing, interpolate ... */ + else + { + /* Interpolate using the weighted values on either side */ + /* of the output point position */ + p[jl] = (T)((1.0 - zwt) * pw[ip+1 + pw_dim1] + + zwt * pw[ip+2 + pw_dim1]); + } + } + } + } + else if ( kcode == 3 ) + { + /* ******************************* */ + /* Section 2. Cubic interpolation .. */ + /* ******************************* */ + i_1 = ki; + for (int jl = 1; jl <= i_1; ++jl) + { + if ( IS_EQUAL(p[jl], msval) ) + { + fprintf(stderr," ROWINA3: "); + fprintf(stderr," Cubic interpolation not supported"); + fprintf(stderr," for fields containing missing data.\n"); + *kret = 1; + goto L900; + } + pw[jl + pw_dim1] = p[jl]; + } + pw[pw_dim1] = p[ki]; + pw[ki + 1 + pw_dim1] = p[1]; + pw[ki + 2 + pw_dim1] = p[2]; + i_1 = ki; + for (int jl = 1; jl <= i_1; ++jl) + { + pw[jl + (pw_dim1 << 1)] = + (T)(- pw[jl - 1 + pw_dim1] / 3.0 - + pw[jl + pw_dim1] * 0.5 + + pw[jl + 1 + pw_dim1] - pw[jl + 2 + pw_dim1] / 6.0); + pw[jl + 1 + pw_dim1 * 3] = + (T)(pw[jl - 1 + pw_dim1] / 6.0 - + pw[jl + pw_dim1] + + pw[jl + 1 + pw_dim1] * 0.5 + + pw[jl + 2 + pw_dim1] / 3.0); + } + + TEMPLATE(scm0,T)(&pw[(pw_dim1 << 1) + 1], &pw[pw_dim1 * 3 + 2], + &pw[pw_dim1 + 1], &pw[pw_dim1 + 2], ki); + + zrdi = (double) ki; + zdo = 1.0 / (double) ko; + for (int jl = 1; jl <= ko; ++jl) + { + zpos = (jl - 1) * zdo; + zwt = zpos * zrdi; + ip = (int) zwt + 1; + zwt = zwt + 1.0 - ip; + zwt1 = 1.0 - zwt; + p[jl] = (T)(((3.0 - zwt1 * 2.0) * pw[ip + pw_dim1] + + zwt * pw[ip + (pw_dim1 << 1)]) * zwt1 * zwt1 + + ((3.0 - zwt * 2.0) * pw[ip + 1 + pw_dim1] - + zwt1 * pw[ip + 1 + pw_dim1 * 3]) * zwt * zwt); + } + + } + else + { + /* ************************************** */ + /* Section 3. Invalid interpolation code .. */ + /* ************************************** */ + fprintf(stderr," ROWINA3:"); + fprintf(stderr," Invalid interpolation code = %2d\n",kcode); + *kret = 2; + } + +L900: + return 0; +} /* rowina3 */ + + +int TEMPLATE(qu2reg3,T)(T *pfield, int *kpoint, int klat, int klon, + T msval, int *kret, int omisng, int operio, int oveggy) +{ + /* +C**** QU2REG3 - Convert quasi-regular grid data to regular. +C +C Purpose. +C -------- +C +C Convert quasi-regular grid data to regular, +C using either a linear or cubic interpolation. +C +C +C** Interface. +C ---------- +C +C CALL QU2REG3(PFIELD,KPOINT,KLAT,KLON,KCODE,PMSVAL,OMISNG,OPERIO, +C X OVEGGY) +C +C +C Input Parameters. +C ----------------- +C +C PFIELD - Array containing quasi-regular grid data. +C +C KPOINT - Array containing list of the number of +C points on each latitude (or longitude) of +C the quasi-regular grid. +C +C KLAT - Number of latitude lines +C +C KLON - Number of longitude lines +C +C KCODE - Interpolation required. +C 1 , linear - data quasi-regular on latitude lines. +C 3 , cubic - data quasi-regular on latitude lines. +C 11, linear - data quasi-regular on longitude lines. +C 13, cubic - data quasi-regular on longitude lines. +C +C PMSVAL - Value used for missing data indicator. +C +C OMISNG - True if missing values are present in field. +C +C OPERIO - True if input field is periodic. +C +C OVEGGY - True if 'nearest neighbour' processing must be used +C for interpolation +C +C +C Output Parameters. +C ------------------ +C +C KRET - return code +C 0 = OK +C non-zero indicates fatal error +C +C +C Output Parameters. +C ------------------ +C +C PFIELD - Array containing regular grid data. +C +C +C Method. +C ------- +C +C Data is interpolated and expanded into a temporary array, +C which is then copied back into the user's array. +C Returns an error code if an invalid interpolation is requested +C or field size exceeds array dimensions. +C +C Comments. +C --------- +C +C This routine is an adaptation of QU2REG to allow missing data +C values, and hence bit mapped fields. +C +C +C Author. +C ------- +C +C J.D.Chambers ECMWF 22.07.94 +C +C +C Modifications. +C -------------- +C +C J.D.Chambers ECMWF 13.09.94 +C Add return code KRET and remove calls to ABORT. +C +C J.D.Chambers ECMWF Feb 1997 +C Allow for 64-bit pointers +C +C J. Clochard, Meteo France, for ECMWF - January 1998. +C Addition of OMISNG and OPERIO arguments. +C Fix message for longitude number out of bounds, and routine +C name in title and formats. +C +*/ + /* System generated locals */ + int i_1, i_2; + int kcode = 1; + + /* Local variables */ + int ilii, ilio, icode; + int iregno, iquano; + + T *ztemp = (T*) Malloc((size_t)klon*(size_t)klat*sizeof(T)); + T *zline = (T*) Malloc(2*(size_t)klon*sizeof(T)); + T *zwork = (T*) Malloc(3*(2*(size_t)klon+3)*sizeof(T)); + + /* Parameter adjustments */ + --pfield; + --kpoint; + +/* ------------------------------ */ +/* Section 1. Set initial values. */ +/* ------------------------------ */ + + *kret = 0; + +/* Check input parameters. */ + + if (kcode != 1 && kcode != 3 && kcode != 11 && kcode != 13) { + fprintf(stderr," QU2REG :"); + fprintf(stderr," Invalid interpolation type code = %2d\n",kcode); + *kret = 1; + goto L900; + } + +/* Set array indices to 0. */ + + ilii = 0; + ilio = 0; + +/* Establish values of loop parameters. */ + + if (kcode > 10) { + +/* Quasi-regular along longitude lines. */ + + iquano = klon; + iregno = klat; + icode = kcode - 10; + } else { + +/* Quasi-regular along latitude lines. */ + + iquano = klat; + iregno = klon; + icode = kcode; + } + +/* -------------------------------------------------------- */ +/** Section 2. Interpolate field from quasi to regular grid. */ +/* -------------------------------------------------------- */ + + i_1 = iquano; + for (int j230 = 1; j230 <= i_1; ++j230) { + + if (iregno != kpoint[j230]) { + +/* Line contains less values than required,so */ +/* extract quasi-regular grid values for a line */ + + i_2 = kpoint[j230]; + for (int j210 = 1; j210 <= i_2; ++j210) { + ++ilii; + zline[j210 - 1] = pfield[ilii]; + } + +/* and interpolate this line. */ + + TEMPLATE(rowina3,T)(zline, iregno, kpoint[j230], zwork, icode, msval, kret, omisng, operio , oveggy); + if (*kret != 0) goto L900; + +/* Add regular grid values for this line to the + temporary array. */ + + i_2 = iregno; + for (int j220 = 1; j220 <= i_2; ++j220) { + ++ilio; + ztemp[ilio - 1] = zline[j220 - 1]; + } + + } else { + +/* Line contains the required number of values, so add */ +/* this line to the temporary array. */ + + i_2 = iregno; + for (int j225 = 1; j225 <= i_2; ++j225) { + ++ilio; + ++ilii; + ztemp[ilio - 1] = pfield[ilii]; + } + } + } + +/* Copy temporary array to user array. */ + + i_1 = klon * klat; + for (int j240 = 1; j240 <= i_1; ++j240) { + pfield[j240] = ztemp[j240 - 1]; + } + +/* -------------------------------------------------------- */ +/* Section 9. Return to calling routine. Format statements. */ +/* -------------------------------------------------------- */ + +L900: + + Free(zwork); + Free(zline); + Free(ztemp); + + return 0; +} /* qu2reg3 */ + +#endif /* T */ + +/* + * Local Variables: + * mode: c + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + +#ifdef T +#undef T +#endif +#define T float +#ifdef T + +/* calculate_pfactor: source code from grib_api-1.8.0 */ +double TEMPLATE(calculate_pfactor,T)(const T *spectralField, long fieldTruncation, long subsetTruncation) +{ + /*long n_vals = ((fieldTruncation+1)*(fieldTruncation+2));*/ + long loop, index, m, n = 0; + double zeps = 1.0e-15; + long ismin = (subsetTruncation+1), ismax = (fieldTruncation+1); + double weightedSumOverX = 0.0, weightedSumOverY = 0.0, sumOfWeights = 0.0; + double numerator = 0.0, denominator = 0.0; + + // Setup the weights + + double range = (double) (ismax - ismin +1); + + double *weights = (double*) Malloc(((size_t)ismax+1)*sizeof(double)); + for( loop = ismin; loop <= ismax; loop++ ) + weights[loop] = range / (double) (loop-ismin+1); + + // Compute norms + // Handle values 2 at a time (real and imaginary parts). + double *norms = (double*) Malloc(((size_t)ismax+1)*sizeof(double)); + + for( loop = 0; loop < ismax+1; loop++ ) norms[loop] = 0.0; + + // Form norms for the rows which contain part of the unscaled subset. + + index = -2; + for( m = 0; m < subsetTruncation; m++ ) + for( n = m; n <= fieldTruncation; n++ ) { + index += 2; + if( n >= subsetTruncation ) { + double tval = spectralField[index]; + tval=tval<0?-tval:tval; + norms[n] = norms[n] > tval ? norms[n] : tval; + tval = spectralField[index+1]; + tval=tval<0?-tval:tval; + norms[n] = norms[n] > tval ? norms[n] : tval; + } + } + + // Form norms for the rows which do not contain part of the unscaled subset. + + for( m = subsetTruncation; m <= fieldTruncation; m++ ) + for( n = m; n <= fieldTruncation; n++ ) { + double tval = spectralField[index]; + index += 2; + tval=tval<0?-tval:tval; + norms[n] = norms[n] > tval ? norms[n] : tval; + tval = spectralField[index+1]; + tval=tval<0?-tval:tval; + norms[n] = norms[n] > tval ? norms[n] : tval; + } + + // Ensure the norms have a value which is not too small in case of problems with math functions (e.g. LOG). + + for( loop = ismin; loop <= ismax; loop++ ) { + norms[n] = norms[n] > zeps ? norms[n] : zeps; + if( IS_EQUAL(norms[n], zeps) ) weights[n] = 100.0 * zeps; + } + + // Do linear fit to find the slope + + for( loop = ismin; loop <= ismax; loop++ ) { + double x = log( (double) (loop*(loop+1)) ); + double y = log( norms[loop] ); + weightedSumOverX += x * weights[loop]; + weightedSumOverY += y * weights[loop]; + sumOfWeights = sumOfWeights + weights[loop]; + } + weightedSumOverX /= sumOfWeights; + weightedSumOverY /= sumOfWeights; + + // Perform a least square fit for the equation + + for( loop = ismin; loop <= ismax; loop++ ) { + + double x = log( (double)(loop*(loop+1)) ); + double y = log( norms[loop] ); + numerator += weights[loop] * (y-weightedSumOverY) * (x-weightedSumOverX); + denominator += weights[loop] * ((x-weightedSumOverX) * (x-weightedSumOverX)); + } + double slope = numerator / denominator; + + Free(weights); + Free(norms); + + double pFactor = -slope; + if( pFactor < -9999.9 ) pFactor = -9999.9; + if( pFactor > 9999.9 ) pFactor = 9999.9; + + return pFactor; +} + +void TEMPLATE(scale_complex,T)(T *fpdata, int pcStart, int pcScale, int trunc, int inv) +{ + + if ( pcScale < -10000 || pcScale > 10000 ) + { + fprintf(stderr, " %s: Invalid power given %6d\n", __func__, pcScale); + return; + } + + // Setup scaling factors = n(n+1)^^p for n = 1 to truncation + + if ( pcScale != 0 ) + { + double *scale = (double*) Malloc(((size_t)trunc+1)*sizeof(double)); + const double power = (double) pcScale / 1000.; + scale[0] = 1.0; + + if (pcScale != 1000) + for (int n = 1; n <= trunc; ++n) scale[n] = pow((double) (n*(n+1)), power); + else + for (int n = 1; n <= trunc; ++n) scale[n] = (double) (n*(n+1)); + + if ( inv ) + for (int n = 1; n <= trunc; ++n) scale[n] = 1.0 / scale[n]; + + // Scale the values + + size_t index = 0; + + for (int m = 0; m < pcStart; ++m) + for (int n = m; n <= trunc; n++, index += 2) + if ( n >= pcStart ) + { + fpdata[index ] = (T)(fpdata[index ] * scale[n]); + fpdata[index+1] = (T)(fpdata[index+1] * scale[n]); + } + + for (int m = pcStart; m <= trunc; ++m) + for (int n = m; n <= trunc; n++, index += 2) + { + fpdata[index ] = (T)(fpdata[index ] * scale[n]); + fpdata[index+1] = (T)(fpdata[index+1] * scale[n]); + } + Free(scale); + } +} + + +void TEMPLATE(scatter_complex,T)(T *fpdata, int pcStart, int trunc, int nsp) +{ + T *fphelp = (T*) Malloc((size_t)nsp*sizeof(T)); + size_t inext = 0; + size_t pcStart_ = pcStart >= 0 ? (size_t)pcStart : 0U; + size_t trunc_ = trunc >= 0 ? (size_t)trunc : 0U; + for (size_t m = 0, index = 0; m <= pcStart_; ++m) + { + size_t n_copies = pcStart_ <= trunc_ ? (pcStart_ + 1 - m) * 2 : 0; + for (size_t i = 0; i < n_copies; ++i) fphelp[index + i] = fpdata[inext + i]; + inext += n_copies; + index += m <= trunc_ ? (trunc_ - m + 1) * 2 : 0; + } + for (size_t m = 0, index = 0; m <= trunc_; ++m) + { + size_t advIdx = m <= pcStart_ ? (pcStart_ - m + 1) * 2 : 0; + index += advIdx; + size_t copyStart = m > pcStart_ ? m : pcStart_ + 1; + size_t n_copies = copyStart <= trunc_ ? (trunc_ - copyStart + 1) * 2 : 0; + for (size_t i = 0; i < n_copies; ++i) fphelp[index + i] = fpdata[inext + i]; + inext += n_copies; + index += n_copies; + } + for (size_t m = 0; m < (size_t)nsp; ++m) fpdata[m] = fphelp[m]; + + Free(fphelp); +} + + +void TEMPLATE(gather_complex,T)(T *fpdata, size_t pcStart, size_t trunc, size_t nsp) +{ + T *restrict fphelp = (T*) Malloc(nsp*sizeof(T)); + size_t inext = 0; + + for (size_t m = 0, index = 0; m <= pcStart; ++m) + for (size_t n = m; n <= trunc; ++n) + { + if ( pcStart >= n ) + { + fphelp[inext++] = fpdata[index]; + fphelp[inext++] = fpdata[index+1]; + } + index += 2; + } + + for (size_t m = 0, index = 0; m <= trunc; ++m) + for (size_t n = m; n <= trunc; ++n) + { + if ( n > pcStart ) + { + fphelp[inext++] = fpdata[index]; + fphelp[inext++] = fpdata[index+1]; + } + index += 2; + } + + for (size_t m = 0; m < nsp; ++m) fpdata[m] = fphelp[m]; + + Free(fphelp); +} + + +static void TEMPLATE(scm0,T)(T *pdl, T *pdr, T *pfl, T *pfr, int klg) +{ + /* **** SCM0 - Apply SCM0 limiter to derivative estimates. */ + /* output: */ + /* pdl = the limited derivative at the left edge of the interval */ + /* pdr = the limited derivative at the right edge of the interval */ + /* inputs */ + /* pdl = the original derivative at the left edge */ + /* pdr = the original derivative at the right edge */ + /* pfl = function value at the left edge of the interval */ + /* pfr = function value at the right edge of the interval */ + /* klg = number of intervals where the derivatives are limited */ + + /* define constants */ + + double zeps = 1.0e-12; + double zfac = (1.0 - zeps) * 3.0; + + for (int jl = 0; jl < klg; ++jl) + { + double r_1; + if ( (r_1 = pfr[jl] - pfl[jl], fabs(r_1)) > zeps ) + { + double zalpha = pdl[jl] / (pfr[jl] - pfl[jl]); + double zbeta = pdr[jl] / (pfr[jl] - pfl[jl]); + if ( zalpha <= 0.0 ) pdl[jl] = 0.0; + if ( zbeta <= 0.0 ) pdr[jl] = 0.0; + if ( zalpha > zfac ) pdl[jl] = (T)(zfac * (pfr[jl] - pfl[jl])); + if ( zbeta > zfac ) pdr[jl] = (T)(zfac * (pfr[jl] - pfl[jl])); + } + else + { + pdl[jl] = 0.0; + pdr[jl] = 0.0; + } + } +} /* scm0 */ + +static +int TEMPLATE(rowina3,T)(T *p, int ko, int ki, T *pw, + int kcode, T msval, int *kret, int omisng, int operio, int oveggy) +{ + /* +C----> +C**** ROWINA3 - Interpolation of row of values. +C +C Purpose. +C -------- +C +C Interpolate a row of values. +C +C +C** Interface. +C ---------- +C +C CALL ROWINA3( P, KO, KI, PW, KCODE, PMSVAL, KRET, OMISNG, OPERIO) +C +C +C Input Parameters. +C ----------------- +C +C P - Row of values to be interpolated. +C Dimension must be at least KO. +C +C KO - Number of values required. +C +C KI - Number of values in P on input. +C +C PW - Working array. +C Dimension must be at least (0:KO+2,3). +C +C KCODE - Interpolation required. +C 1 , linear. +C 3 , cubic. +C +C PMSVAL - Value used for missing data indicator. +C +C OMISNG - True if missing values are present in field. +C +C OPERIO - True if input field is periodic. +C +C OVEGGY - True if 'nearest neighbour' processing must be used +C for interpolation +C +C Output Parameters. +C ------------------ +C +C P - Now contains KO values. +C KRET - Return code +C 0, OK +C Non-zero, error +C +C +C Method. +C ------- +C +C Linear or cubic interpolation performed as required. +C +C Comments. +C --------- +C +C This is a version of ROWINA which allows for missing data +C values and hence for bitmapped fields. +C +C +C Author. +C ------- +C +C J.D.Chambers ECMWF 22.07.94 +C +C +C Modifications. +C -------------- +C +C J.D.Chambers ECMWF 13.09.94 +C Add return code KRET and remove calls to ABORT. +C +C J. Clochard, Meteo France, for ECMWF - January 1998. +C Addition of OMISNG and OPERIO arguments. +C +C +C ----------------------------------------------------------------- +*/ + /* System generated locals */ + int pw_dim1, pw_offset, i_1; + + /* Local variables */ + int ip; + double zwt1, zrdi, zpos; + double zdo, zwt; + + UNUSED(omisng); + + /* Parameter adjustments */ + --p; + pw_dim1 = ko + 3; + pw_offset = pw_dim1; + pw -= pw_offset; + + *kret = 0; + + if ( kcode == 1 ) + { + /* Move input values to work array */ + for (int jl = 1; jl <= ki; ++jl) + pw[jl + pw_dim1] = p[jl]; + + if ( operio ) + { + /* Arrange wrap-around value in work array */ + pw[ki + 1 + pw_dim1] = p[1]; + + /* Set up constants to be used to figure out weighting for */ + /* values in interpolation. */ + zrdi = (double) ki; + zdo = 1.0 / (double) ko; + } + else + { + /* Repeat last value, to cope with "implicit truncation" below */ + pw[ki + 1 + pw_dim1] = p[ki]; + + /* Set up constants to be used to figure out weighting for */ + /* values in interpolation. */ + zrdi = (double) (ki-1); + zdo = 1.0 / (double) (ko-1); + } + + /* Loop through the output points */ + for (int jl = 1; jl <= ko; ++jl) + { + + /* Calculate weight from the start of row */ + zpos = (jl - 1) * zdo; + zwt = zpos * zrdi; + + /* Get the current array position(minus 1) from the weight - */ + /* note the implicit truncation. */ + ip = (int) zwt; + + /* Adjust the weight to range (0.0 to 1.0) */ + zwt -= ip; + + /* If 'nearest neighbour' processing must be used */ + if ( oveggy ) + { + if ( zwt < 0.5 ) + p[jl] = pw[ip + 1 + pw_dim1]; + else + p[jl] = pw[ip + 2 + pw_dim1]; + } + else + { + /* If the left value is missing, use the right value */ + if ( IS_EQUAL(pw[ip + 1 + pw_dim1], msval) ) + { + p[jl] = pw[ip + 2 + pw_dim1]; + } + /* If the right value is missing, use the left value */ + else if ( IS_EQUAL(pw[ip + 2 + pw_dim1], msval) ) + { + p[jl] = pw[ip + 1 + pw_dim1]; + } + /* If neither missing, interpolate ... */ + else + { + /* Interpolate using the weighted values on either side */ + /* of the output point position */ + p[jl] = (T)((1.0 - zwt) * pw[ip+1 + pw_dim1] + + zwt * pw[ip+2 + pw_dim1]); + } + } + } + } + else if ( kcode == 3 ) + { + /* ******************************* */ + /* Section 2. Cubic interpolation .. */ + /* ******************************* */ + i_1 = ki; + for (int jl = 1; jl <= i_1; ++jl) + { + if ( IS_EQUAL(p[jl], msval) ) + { + fprintf(stderr," ROWINA3: "); + fprintf(stderr," Cubic interpolation not supported"); + fprintf(stderr," for fields containing missing data.\n"); + *kret = 1; + goto L900; + } + pw[jl + pw_dim1] = p[jl]; + } + pw[pw_dim1] = p[ki]; + pw[ki + 1 + pw_dim1] = p[1]; + pw[ki + 2 + pw_dim1] = p[2]; + i_1 = ki; + for (int jl = 1; jl <= i_1; ++jl) + { + pw[jl + (pw_dim1 << 1)] = + (T)(- pw[jl - 1 + pw_dim1] / 3.0 - + pw[jl + pw_dim1] * 0.5 + + pw[jl + 1 + pw_dim1] - pw[jl + 2 + pw_dim1] / 6.0); + pw[jl + 1 + pw_dim1 * 3] = + (T)(pw[jl - 1 + pw_dim1] / 6.0 - + pw[jl + pw_dim1] + + pw[jl + 1 + pw_dim1] * 0.5 + + pw[jl + 2 + pw_dim1] / 3.0); + } + + TEMPLATE(scm0,T)(&pw[(pw_dim1 << 1) + 1], &pw[pw_dim1 * 3 + 2], + &pw[pw_dim1 + 1], &pw[pw_dim1 + 2], ki); + + zrdi = (double) ki; + zdo = 1.0 / (double) ko; + for (int jl = 1; jl <= ko; ++jl) + { + zpos = (jl - 1) * zdo; + zwt = zpos * zrdi; + ip = (int) zwt + 1; + zwt = zwt + 1.0 - ip; + zwt1 = 1.0 - zwt; + p[jl] = (T)(((3.0 - zwt1 * 2.0) * pw[ip + pw_dim1] + + zwt * pw[ip + (pw_dim1 << 1)]) * zwt1 * zwt1 + + ((3.0 - zwt * 2.0) * pw[ip + 1 + pw_dim1] - + zwt1 * pw[ip + 1 + pw_dim1 * 3]) * zwt * zwt); + } + + } + else + { + /* ************************************** */ + /* Section 3. Invalid interpolation code .. */ + /* ************************************** */ + fprintf(stderr," ROWINA3:"); + fprintf(stderr," Invalid interpolation code = %2d\n",kcode); + *kret = 2; + } + +L900: + return 0; +} /* rowina3 */ + + +int TEMPLATE(qu2reg3,T)(T *pfield, int *kpoint, int klat, int klon, + T msval, int *kret, int omisng, int operio, int oveggy) +{ + /* +C**** QU2REG3 - Convert quasi-regular grid data to regular. +C +C Purpose. +C -------- +C +C Convert quasi-regular grid data to regular, +C using either a linear or cubic interpolation. +C +C +C** Interface. +C ---------- +C +C CALL QU2REG3(PFIELD,KPOINT,KLAT,KLON,KCODE,PMSVAL,OMISNG,OPERIO, +C X OVEGGY) +C +C +C Input Parameters. +C ----------------- +C +C PFIELD - Array containing quasi-regular grid data. +C +C KPOINT - Array containing list of the number of +C points on each latitude (or longitude) of +C the quasi-regular grid. +C +C KLAT - Number of latitude lines +C +C KLON - Number of longitude lines +C +C KCODE - Interpolation required. +C 1 , linear - data quasi-regular on latitude lines. +C 3 , cubic - data quasi-regular on latitude lines. +C 11, linear - data quasi-regular on longitude lines. +C 13, cubic - data quasi-regular on longitude lines. +C +C PMSVAL - Value used for missing data indicator. +C +C OMISNG - True if missing values are present in field. +C +C OPERIO - True if input field is periodic. +C +C OVEGGY - True if 'nearest neighbour' processing must be used +C for interpolation +C +C +C Output Parameters. +C ------------------ +C +C KRET - return code +C 0 = OK +C non-zero indicates fatal error +C +C +C Output Parameters. +C ------------------ +C +C PFIELD - Array containing regular grid data. +C +C +C Method. +C ------- +C +C Data is interpolated and expanded into a temporary array, +C which is then copied back into the user's array. +C Returns an error code if an invalid interpolation is requested +C or field size exceeds array dimensions. +C +C Comments. +C --------- +C +C This routine is an adaptation of QU2REG to allow missing data +C values, and hence bit mapped fields. +C +C +C Author. +C ------- +C +C J.D.Chambers ECMWF 22.07.94 +C +C +C Modifications. +C -------------- +C +C J.D.Chambers ECMWF 13.09.94 +C Add return code KRET and remove calls to ABORT. +C +C J.D.Chambers ECMWF Feb 1997 +C Allow for 64-bit pointers +C +C J. Clochard, Meteo France, for ECMWF - January 1998. +C Addition of OMISNG and OPERIO arguments. +C Fix message for longitude number out of bounds, and routine +C name in title and formats. +C +*/ + /* System generated locals */ + int i_1, i_2; + int kcode = 1; + + /* Local variables */ + int ilii, ilio, icode; + int iregno, iquano; + + T *ztemp = (T*) Malloc((size_t)klon*(size_t)klat*sizeof(T)); + T *zline = (T*) Malloc(2*(size_t)klon*sizeof(T)); + T *zwork = (T*) Malloc(3*(2*(size_t)klon+3)*sizeof(T)); + + /* Parameter adjustments */ + --pfield; + --kpoint; + +/* ------------------------------ */ +/* Section 1. Set initial values. */ +/* ------------------------------ */ + + *kret = 0; + +/* Check input parameters. */ + + if (kcode != 1 && kcode != 3 && kcode != 11 && kcode != 13) { + fprintf(stderr," QU2REG :"); + fprintf(stderr," Invalid interpolation type code = %2d\n",kcode); + *kret = 1; + goto L900; + } + +/* Set array indices to 0. */ + + ilii = 0; + ilio = 0; + +/* Establish values of loop parameters. */ + + if (kcode > 10) { + +/* Quasi-regular along longitude lines. */ + + iquano = klon; + iregno = klat; + icode = kcode - 10; + } else { + +/* Quasi-regular along latitude lines. */ + + iquano = klat; + iregno = klon; + icode = kcode; + } + +/* -------------------------------------------------------- */ +/** Section 2. Interpolate field from quasi to regular grid. */ +/* -------------------------------------------------------- */ + + i_1 = iquano; + for (int j230 = 1; j230 <= i_1; ++j230) { + + if (iregno != kpoint[j230]) { + +/* Line contains less values than required,so */ +/* extract quasi-regular grid values for a line */ + + i_2 = kpoint[j230]; + for (int j210 = 1; j210 <= i_2; ++j210) { + ++ilii; + zline[j210 - 1] = pfield[ilii]; + } + +/* and interpolate this line. */ + + TEMPLATE(rowina3,T)(zline, iregno, kpoint[j230], zwork, icode, msval, kret, omisng, operio , oveggy); + if (*kret != 0) goto L900; + +/* Add regular grid values for this line to the + temporary array. */ + + i_2 = iregno; + for (int j220 = 1; j220 <= i_2; ++j220) { + ++ilio; + ztemp[ilio - 1] = zline[j220 - 1]; + } + + } else { + +/* Line contains the required number of values, so add */ +/* this line to the temporary array. */ + + i_2 = iregno; + for (int j225 = 1; j225 <= i_2; ++j225) { + ++ilio; + ++ilii; + ztemp[ilio - 1] = pfield[ilii]; + } + } + } + +/* Copy temporary array to user array. */ + + i_1 = klon * klat; + for (int j240 = 1; j240 <= i_1; ++j240) { + pfield[j240] = ztemp[j240 - 1]; + } + +/* -------------------------------------------------------- */ +/* Section 9. Return to calling routine. Format statements. */ +/* -------------------------------------------------------- */ + +L900: + + Free(zwork); + Free(zline); + Free(ztemp); + + return 0; +} /* qu2reg3 */ + +#endif /* T */ + +/* + * Local Variables: + * mode: c + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <string.h> + + + +int gribVersion(unsigned char *is, size_t buffersize) +{ + if ( buffersize < 8 ) + Error("Buffer too small (current size %d)!", (int) buffersize); + + return GRIB_EDITION(is); +} + +static +double GET_Real(unsigned char *grib) +{ + int iexp = GET_UINT1(grib[0]); + int imant = GET_UINT3(grib[1], grib[2], grib[3]); + + return decfp2(iexp, imant); +} + +static +int decodeIS(unsigned char *is, int *isec0, int *iret) +{ + // Octets 1 - 4 : The letters G R I B. Four 8 bit fields. + + // Check letters -> GRIB, BUDG or TIDE. + + // Check that 'GRIB' is found where expected. + bool lgrib = GRIB_START(is); + + // ECMWF pseudo-grib data uses 'BUDG' and 'TIDE'. + bool lbudg = BUDG_START(is); + bool ltide = TIDE_START(is); + + // Data is not GRIB or pseudo-grib. + if ( lgrib == false && lbudg == false && ltide == false ) + { + *iret = 305; + gprintf(__func__, "Input data is not GRIB or pseudo-grib."); + gprintf(__func__, "Return code = %d", *iret); + } + if ( lbudg || ltide ) + { + *iret = 305; + gprintf(__func__, "Pseudo-grib data unsupported."); + gprintf(__func__, "Return code = %d", *iret); + } + + // Octets 5 - 7 : Length of message. One 24 bit field. + ISEC0_GRIB_Len = GRIB1_SECLEN(is); + + // Octet 8 : GRIB Edition Number. One 8 bit field. + ISEC0_GRIB_Version = GRIB_EDITION(is); + + if ( ISEC0_GRIB_Version > 1 ) + Error("GRIB version %d unsupported!", ISEC0_GRIB_Version); + + int grib1offset = ISEC0_GRIB_Version * 4; + + int isLen = 4 + grib1offset; + + return isLen; +} + +static +void decodePDS_ECMWF_local_Extension_1(unsigned char *pds, int *isec1) +{ + isec1[36] = GET_UINT1(pds[40]); /* extension identifier */ + isec1[37] = GET_UINT1(pds[41]); /* Class */ + isec1[38] = GET_UINT1(pds[42]); /* Type */ + isec1[39] = GET_UINT2(pds[43],pds[44]); /* Stream */ + /* isec1[40] = GET_UINT4(pds[45],pds[46],pds[47],pds[48]); */ + memcpy((char*) &isec1[40], &pds[45], 4); + isec1[41] = GET_UINT1(pds[49]); /* Forecast number */ + isec1[42] = GET_UINT1(pds[50]); /* Total number of forecasts */ +} + +static +void decodePDS_DWD_local_Extension_254(unsigned char *pds, int *isec1) +{ + isec1[36] = GET_UINT1(pds[40]); /* extension identifier */ + for (int i = 0; i < 11; ++i) isec1[37+i] = GET_UINT1(pds[41+i]); + + int isvn = GET_UINT2(pds[52],pds[53]); + + isec1[48] = isvn % 0x8000; /* DWD experiment identifier */ + isec1[49] = isvn >> 15; /* DWD run type (0=main, 2=ass, 3=test) */ +} + +static +void decodePDS_DWD_local_Extension_253(unsigned char *pds, int *isec1) +{ + isec1[36] = GET_UINT1(pds[40]); /* extension identifier */ + for (int i = 0; i < 11; ++i) isec1[37+i] = GET_UINT1(pds[41+i]); + + int isvn = GET_UINT2(pds[52],pds[53]); + + isec1[48] = isvn % 0x8000; /* DWD experiment identifier */ + isec1[49] = isvn >> 15; /* DWD run type (0=main, 2=ass, 3=test) */ + isec1[50] = GET_UINT1(pds[54]); /* User id, specified by table */ + isec1[51] = GET_UINT2(pds[55],pds[56]); /* Experiment identifier */ + isec1[52] = GET_UINT2(pds[57],pds[58]); /* Ensemble identification by table */ + isec1[53] = GET_UINT2(pds[59],pds[60]); /* Number of ensemble members */ + isec1[54] = GET_UINT2(pds[61],pds[62]); /* Actual number of ensemble member */ + isec1[55] = GET_UINT1(pds[63]); /* Model major version number */ + isec1[56] = GET_UINT1(pds[64]); /* Model minor version number */ +} + +static +void decodePDS_MPIM_local_Extension_1(unsigned char *pds, int *isec1) +{ + isec1[36] = GET_UINT1(pds[40]); /* extension identifier */ + isec1[37] = GET_UINT1(pds[41]); /* type of ensemble forecast */ + isec1[38] = GET_UINT2(pds[42],pds[43]); /* individual ensemble member */ + isec1[39] = GET_UINT2(pds[44],pds[45]); /* number of forecasts in ensemble */ +} + +static +int decodePDS(unsigned char *pds, int *isec0, int *isec1) +{ + int pdsLen = PDS_Len; + + ISEC1_CodeTable = PDS_CodeTable; + ISEC1_CenterID = PDS_CenterID; + ISEC1_ModelID = PDS_ModelID; + ISEC1_GridDefinition = PDS_GridDefinition; + ISEC1_Sec2Or3Flag = PDS_Sec2Or3Flag; + ISEC1_Parameter = PDS_Parameter; + ISEC1_LevelType = PDS_LevelType; + + if ( (ISEC1_LevelType != 20) && + (ISEC1_LevelType != GRIB1_LTYPE_99) && + (ISEC1_LevelType != GRIB1_LTYPE_ISOBARIC) && + (ISEC1_LevelType != GRIB1_LTYPE_ISOBARIC_PA) && + (ISEC1_LevelType != GRIB1_LTYPE_ALTITUDE) && + (ISEC1_LevelType != GRIB1_LTYPE_HEIGHT) && + (ISEC1_LevelType != GRIB1_LTYPE_SIGMA) && + (ISEC1_LevelType != GRIB1_LTYPE_HYBRID) && + (ISEC1_LevelType != GRIB1_LTYPE_LANDDEPTH) && + (ISEC1_LevelType != GRIB1_LTYPE_ISENTROPIC) && + (ISEC1_LevelType != 115) && + (ISEC1_LevelType != 117) && + (ISEC1_LevelType != 125) && + (ISEC1_LevelType != 127) && + (ISEC1_LevelType != GRIB1_LTYPE_SEADEPTH) && + (ISEC1_LevelType != 210) ) + { + ISEC1_Level1 = PDS_Level1; + ISEC1_Level2 = PDS_Level2; + } + else + { + ISEC1_Level1 = PDS_Level; + ISEC1_Level2 = 0; + } + + /* ISEC1_Year = PDS_Year; */ + ISEC1_Month = PDS_Month; + ISEC1_Day = PDS_Day; + ISEC1_Hour = PDS_Hour; + ISEC1_Minute = PDS_Minute; + ISEC1_TimeUnit = PDS_TimeUnit; + ISEC1_TimePeriod1 = PDS_TimePeriod1; + ISEC1_TimePeriod2 = PDS_TimePeriod2; + ISEC1_TimeRange = PDS_TimeRange; + ISEC1_AvgNum = PDS_AvgNum; + ISEC1_AvgMiss = PDS_AvgMiss; + + if ( ISEC0_GRIB_Version == 1 ) + { + ISEC1_Year = PDS_Year; + ISEC1_Century = PDS_Century; + ISEC1_SubCenterID = PDS_Subcenter; + ISEC1_DecScaleFactor = PDS_DecimalScale; + } + else + { + int year = GET_UINT1(pds[12]); + if ( year <= 100 ) + { + ISEC1_Year = year; + ISEC1_Century = 1; + } + else + { + ISEC1_Year = year%100; + ISEC1_Century = 1 + (year-ISEC1_Year)/100; + } + ISEC1_SubCenterID = 0; + ISEC1_DecScaleFactor = 0; + } + + if ( ISEC1_Year < 0 ) + { + ISEC1_Year = -ISEC1_Year; + ISEC1_Century = -ISEC1_Century; + } + + ISEC1_LocalFLag = 0; + if ( pdsLen > 28 ) + { + int localextlen = pdsLen-28; + + if ( localextlen > 4000 ) + { + Warning("PDS larger than 4000 bytes not supported!"); + } + else + { + ISEC1_LocalFLag = 1; + + if ( ISEC1_CenterID == 78 || ISEC1_CenterID == 215 || ISEC1_CenterID == 250 ) + { + if ( pds[40] == 254 ) + decodePDS_DWD_local_Extension_254(pds, isec1); + else if ( pds[40] == 253 ) + decodePDS_DWD_local_Extension_253(pds, isec1); + } + else if ( (ISEC1_CenterID == 98 && ISEC1_LocalFLag == 1) || + (ISEC1_SubCenterID == 98 && ISEC1_LocalFLag == 1) || + (ISEC1_CenterID == 7 && ISEC1_SubCenterID == 98) ) + { + if ( pds[40] == 1 ) + decodePDS_ECMWF_local_Extension_1(pds, isec1); + } + else if ( ISEC1_CenterID == 252 && ISEC1_LocalFLag == 1 ) + { + if ( pds[40] == 1 ) + decodePDS_MPIM_local_Extension_1(pds, isec1); + } + else + { + for (int i = 0; i < localextlen; ++i) isec1[24+i] = pds[28+i]; + } + } + } + + return pdsLen; +} + + +static void gribPrintSec2_double(int *isec0, int *isec2, double *fsec2) {gribPrintSec2DP(isec0, isec2, fsec2);} +static void gribPrintSec3_double(int *isec0, int *isec3, double *fsec3) {gribPrintSec3DP(isec0, isec3, fsec3);} +static void gribPrintSec4_double(int *isec0, int *isec4, double *fsec4) {gribPrintSec4DP(isec0, isec4, fsec4);} +static void gribPrintSec2_float(int *isec0, int *isec2, float *fsec2) {gribPrintSec2SP(isec0, isec2, fsec2);} +static void gribPrintSec3_float(int *isec0, int *isec3, float *fsec3) {gribPrintSec3SP(isec0, isec3, fsec3);} +static void gribPrintSec4_float(int *isec0, int *isec4, float *fsec4) {gribPrintSec4SP(isec0, isec4, fsec4);} + + +#ifdef T +#undef T +#endif +#define T double +#ifdef T + +#include <inttypes.h> + +static +void TEMPLATE(decode_array_common,T)(const unsigned char *restrict igrib, long jlend, int NumBits, + T fmin, T zscale, T *restrict fpdata) +{ + /* code from wgrib routine BDS_unpack */ + const unsigned char *bits = igrib; + unsigned int tbits = 0; + int n_bits = NumBits; + int t_bits = 0; + + const unsigned jmask = (1U << n_bits) - 1U; + for (long i = 0; i < jlend; ++i) + { + if (n_bits - t_bits > 8) + { + tbits = (tbits << 16) | ((unsigned)bits[0] << 8) | ((unsigned)bits[1]); + bits += 2; + t_bits += 16; + } + + while ( t_bits < n_bits ) + { + tbits = (tbits * 256) + *bits++; + t_bits += 8; + } + t_bits -= n_bits; + fpdata[i] = (float)((tbits >> t_bits) & jmask); + } + // at least this vectorizes :) + for (long i = 0; i < jlend; ++i) + fpdata[i] = fmin + zscale*fpdata[i]; +} + +static +void TEMPLATE(decode_array_common2,T)(const unsigned char *restrict igrib, long jlend, int NumBits, + T fmin, T zscale, T *restrict fpdata) +{ + static const unsigned mask[] = {0,1,3,7,15,31,63,127,255}; + static const double shift[9] = {1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0}; + + // code from wgrib routine BDS_unpack + const unsigned char *bits = igrib; + int n_bits = NumBits; + int c_bits, j_bits; + + // older unoptimized code, not often used + c_bits = 8; + for (long i = 0; i < jlend; ++i) + { + double jj = 0.0; + j_bits = n_bits; + while (c_bits <= j_bits) + { + if (c_bits == 8) + { + jj = jj * 256.0 + (double) (*bits++); + j_bits -= 8; + } + else + { + jj = (jj * shift[c_bits]) + (double) (*bits & mask[c_bits]); + bits++; + j_bits -= c_bits; + c_bits = 8; + } + } + + if (j_bits) + { + c_bits -= j_bits; + jj = (jj * shift[j_bits]) + (double) (((unsigned)*bits >> c_bits) & mask[j_bits]); + } + fpdata[i] = (T)(fmin + zscale*jj); + } +} + +static +void TEMPLATE(decode_array_2byte,T)(size_t jlend, const unsigned char *restrict igrib, + T *fpdata, T fmin, T zscale) +{ + const uint16_t *restrict sgrib = (const uint16_t *)(const void *)(igrib); + + if ( IS_BIGENDIAN() ) + { + for (size_t i = 0; i < jlend; ++i) + { + fpdata[i] = fmin + zscale * sgrib[i]; + } + } + else + { + for (size_t i = 0; i < jlend; ++i) + { + uint16_t ui16 = gribSwapByteOrder_uint16(sgrib[i]); + fpdata[i] = fmin + zscale * ui16; + } + } +} + +static +void TEMPLATE(decode_array,T)(const unsigned char *restrict igrib, long jlend, int numBits, + T fmin, T zscale, T *restrict fpdata) +{ +#if defined _GET_X86_COUNTER || defined _GET_MACH_COUNTER + uint64_t start_decode, end_decode; +#endif + +#ifdef VECTORCODE + GRIBPACK *lgrib = NULL; + + if ( numBits%8 == 0 ) + { + long jlenc = jlend * numBits / 8; + if ( jlenc > 0 ) + { + lgrib = (GRIBPACK*) Malloc(jlenc*sizeof(GRIBPACK)); + if ( lgrib == NULL ) SysError("No Memory!"); + + (void) UNPACK_GRIB(igrib, lgrib, jlenc, -1L); + } + } + + if ( numBits == 0 ) + { + for (long i = 0; i < jlend; ++i) + fpdata[i] = fmin; + } + else if ( numBits == 8 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (int)lgrib[i]; + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 16 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (((int)lgrib[2*i ] << 8) + (int)lgrib[2*i+1]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 24 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (((int)lgrib[3*i ] << 16) + ((int)lgrib[3*i+1] << 8) + + (int)lgrib[3*i+2]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 32 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (((unsigned int)lgrib[4*i ] << 24) + ((unsigned int)lgrib[4*i+1] << 16) + + ((unsigned int)lgrib[4*i+2] << 8) + (unsigned int)lgrib[4*i+3]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits <= 25 ) + { + TEMPLATE(decode_array_common,T)(igrib, jlend, numBits, fmin, zscale, fpdata); + } + else if ( numBits > 25 && numBits < 32 ) + { + TEMPLATE(decode_array_common2,T)(igrib, jlend, numBits, fmin, zscale, fpdata); + } + else + { + Error("Unimplemented packing factor %d!", numBits); + } + + if ( lgrib ) Free(lgrib); + +#else + if ( numBits == 0 ) + { + for (long i = 0; i < jlend; ++i) + fpdata[i] = fmin; + } + else if ( numBits == 8 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (int)igrib[i]; + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 16 ) + { + TEMPLATE(decode_array_2byte,T)((size_t) jlend, igrib, fpdata, fmin, zscale); + } + else if ( numBits == 24 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (T)(((int)igrib[3*i ] << 16) + ((int)igrib[3*i+1] << 8) + + (int)igrib[3*i+2]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 32 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (T)(((unsigned int)igrib[4*i ] << 24) + ((unsigned int)igrib[4*i+1] << 16) + + ((unsigned int)igrib[4*i+2] << 8) + (unsigned int)igrib[4*i+3]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits <= 25 ) + { + TEMPLATE(decode_array_common,T)(igrib, jlend, numBits, fmin, zscale, fpdata); + } + else if ( numBits > 25 && numBits < 32 ) + { + TEMPLATE(decode_array_common2,T)(igrib, jlend, numBits, fmin, zscale, fpdata); + } + else + { + Error("Unimplemented packing factor %d!", numBits); + } +#endif +} + +#endif /* T */ + +/* + * Local Variables: + * mode: c + * End: + */ + +#ifdef T +#undef T +#endif +#define T float +#ifdef T + +#include <inttypes.h> + +static +void TEMPLATE(decode_array_common,T)(const unsigned char *restrict igrib, long jlend, int NumBits, + T fmin, T zscale, T *restrict fpdata) +{ + /* code from wgrib routine BDS_unpack */ + const unsigned char *bits = igrib; + unsigned int tbits = 0; + int n_bits = NumBits; + int t_bits = 0; + + const unsigned jmask = (1U << n_bits) - 1U; + for (long i = 0; i < jlend; ++i) + { + if (n_bits - t_bits > 8) + { + tbits = (tbits << 16) | ((unsigned)bits[0] << 8) | ((unsigned)bits[1]); + bits += 2; + t_bits += 16; + } + + while ( t_bits < n_bits ) + { + tbits = (tbits * 256) + *bits++; + t_bits += 8; + } + t_bits -= n_bits; + fpdata[i] = (float)((tbits >> t_bits) & jmask); + } + // at least this vectorizes :) + for (long i = 0; i < jlend; ++i) + fpdata[i] = fmin + zscale*fpdata[i]; +} + +static +void TEMPLATE(decode_array_common2,T)(const unsigned char *restrict igrib, long jlend, int NumBits, + T fmin, T zscale, T *restrict fpdata) +{ + static const unsigned mask[] = {0,1,3,7,15,31,63,127,255}; + static const double shift[9] = {1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0}; + + // code from wgrib routine BDS_unpack + const unsigned char *bits = igrib; + int n_bits = NumBits; + int c_bits, j_bits; + + // older unoptimized code, not often used + c_bits = 8; + for (long i = 0; i < jlend; ++i) + { + double jj = 0.0; + j_bits = n_bits; + while (c_bits <= j_bits) + { + if (c_bits == 8) + { + jj = jj * 256.0 + (double) (*bits++); + j_bits -= 8; + } + else + { + jj = (jj * shift[c_bits]) + (double) (*bits & mask[c_bits]); + bits++; + j_bits -= c_bits; + c_bits = 8; + } + } + + if (j_bits) + { + c_bits -= j_bits; + jj = (jj * shift[j_bits]) + (double) (((unsigned)*bits >> c_bits) & mask[j_bits]); + } + fpdata[i] = (T)(fmin + zscale*jj); + } +} + +static +void TEMPLATE(decode_array_2byte,T)(size_t jlend, const unsigned char *restrict igrib, + T *fpdata, T fmin, T zscale) +{ + const uint16_t *restrict sgrib = (const uint16_t *)(const void *)(igrib); + + if ( IS_BIGENDIAN() ) + { + for (size_t i = 0; i < jlend; ++i) + { + fpdata[i] = fmin + zscale * sgrib[i]; + } + } + else + { + for (size_t i = 0; i < jlend; ++i) + { + uint16_t ui16 = gribSwapByteOrder_uint16(sgrib[i]); + fpdata[i] = fmin + zscale * ui16; + } + } +} + +static +void TEMPLATE(decode_array,T)(const unsigned char *restrict igrib, long jlend, int numBits, + T fmin, T zscale, T *restrict fpdata) +{ +#if defined _GET_X86_COUNTER || defined _GET_MACH_COUNTER + uint64_t start_decode, end_decode; +#endif + +#ifdef VECTORCODE + GRIBPACK *lgrib = NULL; + + if ( numBits%8 == 0 ) + { + long jlenc = jlend * numBits / 8; + if ( jlenc > 0 ) + { + lgrib = (GRIBPACK*) Malloc(jlenc*sizeof(GRIBPACK)); + if ( lgrib == NULL ) SysError("No Memory!"); + + (void) UNPACK_GRIB(igrib, lgrib, jlenc, -1L); + } + } + + if ( numBits == 0 ) + { + for (long i = 0; i < jlend; ++i) + fpdata[i] = fmin; + } + else if ( numBits == 8 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (int)lgrib[i]; + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 16 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (((int)lgrib[2*i ] << 8) + (int)lgrib[2*i+1]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 24 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (((int)lgrib[3*i ] << 16) + ((int)lgrib[3*i+1] << 8) + + (int)lgrib[3*i+2]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 32 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (((unsigned int)lgrib[4*i ] << 24) + ((unsigned int)lgrib[4*i+1] << 16) + + ((unsigned int)lgrib[4*i+2] << 8) + (unsigned int)lgrib[4*i+3]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits <= 25 ) + { + TEMPLATE(decode_array_common,T)(igrib, jlend, numBits, fmin, zscale, fpdata); + } + else if ( numBits > 25 && numBits < 32 ) + { + TEMPLATE(decode_array_common2,T)(igrib, jlend, numBits, fmin, zscale, fpdata); + } + else + { + Error("Unimplemented packing factor %d!", numBits); + } + + if ( lgrib ) Free(lgrib); + +#else + if ( numBits == 0 ) + { + for (long i = 0; i < jlend; ++i) + fpdata[i] = fmin; + } + else if ( numBits == 8 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (int)igrib[i]; + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 16 ) + { + TEMPLATE(decode_array_2byte,T)((size_t) jlend, igrib, fpdata, fmin, zscale); + } + else if ( numBits == 24 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (T)(((int)igrib[3*i ] << 16) + ((int)igrib[3*i+1] << 8) + + (int)igrib[3*i+2]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits == 32 ) + for (long i = 0; i < jlend; ++i) + { + T dval = (T)(((unsigned int)igrib[4*i ] << 24) + ((unsigned int)igrib[4*i+1] << 16) + + ((unsigned int)igrib[4*i+2] << 8) + (unsigned int)igrib[4*i+3]); + fpdata[i] = fmin + zscale * dval; + } + else if ( numBits <= 25 ) + { + TEMPLATE(decode_array_common,T)(igrib, jlend, numBits, fmin, zscale, fpdata); + } + else if ( numBits > 25 && numBits < 32 ) + { + TEMPLATE(decode_array_common2,T)(igrib, jlend, numBits, fmin, zscale, fpdata); + } + else + { + Error("Unimplemented packing factor %d!", numBits); + } +#endif +} + +#endif /* T */ + +/* + * Local Variables: + * mode: c + * End: + */ + + +#ifdef T +#undef T +#endif +#define T double +#ifdef T + +static +int TEMPLATE(decodeGDS,T)(unsigned char *gds, int *isec0, int *isec2, T *fsec2, int *numGridVals) +{ + // int imisng = 0; + bool ReducedGrid = false, VertCoorTab = false; +#ifdef VECTORCODE + unsigned char *igrib; + GRIBPACK *lgrib = NULL; + size_t lGribLen = 0; +#endif + + *numGridVals = 0; + + memset(isec2, 0, 22*sizeof(int)); + + const unsigned gdsLen = GDS_Len; + + unsigned ipvpl = GDS_PVPL; + if ( ipvpl == 0 ) ipvpl = 0xFF; + + if ( ipvpl != 0xFF ) + { // Either vct or reduced grid + if ( GDS_NV != 0 ) + { // we have vct + VertCoorTab = true; + const unsigned ipl = 4*GDS_NV + ipvpl - 1; + if ( ipl < gdsLen ) ReducedGrid = true; + } + else + { + VertCoorTab = false; + ReducedGrid = true; + } + // ReducedGrid = (gdsLen - 32 - 4*GDS_NV); + } + + if ( ISEC0_GRIB_Version == 0 ) VertCoorTab = ((gdsLen - 32) > 0); + + if ( ReducedGrid ) + { + const unsigned locnl = GDS_PVPL - 1 + (VertCoorTab * 4 * GDS_NV); + const unsigned jlenl = (gdsLen - locnl) >> 1; + if ( jlenl == GDS_NumLat ) + { + *numGridVals = 0; + ISEC2_Reduced = true; + for (unsigned i = 0; i < jlenl; ++i) + { + ISEC2_ReducedPoints(i) = GET_UINT2(gds[locnl+2*i], gds[locnl+2*i+1]); + *numGridVals += ISEC2_ReducedPoints(i); + } + } + else + { + ReducedGrid = false; + } + } + + ISEC2_GridType = GDS_GridType; + + // Gaussian grid definition. + + if ( ISEC2_GridType == GRIB1_GTYPE_LATLON || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN || + ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) + { + ISEC2_NumLat = GDS_NumLat; + if ( ! ReducedGrid ) + { + ISEC2_NumLon = GDS_NumLon; + *numGridVals = ISEC2_NumLon*ISEC2_NumLat; + } + ISEC2_FirstLat = GDS_FirstLat; + ISEC2_FirstLon = GDS_FirstLon; + ISEC2_ResFlag = GDS_ResFlag; + ISEC2_LastLat = GDS_LastLat; + ISEC2_LastLon = GDS_LastLon; + ISEC2_LonIncr = GDS_LonIncr; + + ISEC2_NumPar = GDS_NumPar; + ISEC2_ScanFlag = GDS_ScanFlag; + if ( ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) + { + ISEC2_LatSP = GDS_LatSP; + ISEC2_LonSP = GDS_LonSP; + FSEC2_RotAngle = (T)GDS_RotAngle; + } + // if ( Lons != Longitudes || Lats != Latitudes ) Error("Latitude/Longitude Conflict"); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN_ROT || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN_STR || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN_ROTSTR ) + { + // iret = decodeGDS_GG(gds, gdspos, isec0, isec2, imisng); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_LATLON || + ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT || + ISEC2_GridType == GRIB1_GTYPE_LATLON_STR || + ISEC2_GridType == GRIB1_GTYPE_LATLON_ROTSTR ) + { + // iret = decodeGDS_LL(gds, gdspos, isec0, isec2, imisng); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_LCC ) + { + ISEC2_NumLon = GDS_NumLon; + ISEC2_NumLat = GDS_NumLat; + *numGridVals = ISEC2_NumLon*ISEC2_NumLat; + ISEC2_FirstLat = GDS_FirstLat; + ISEC2_FirstLon = GDS_FirstLon; + ISEC2_ResFlag = GDS_ResFlag; + ISEC2_Lambert_Lov = GDS_Lambert_Lov; + ISEC2_Lambert_dx = GDS_Lambert_dx; + ISEC2_Lambert_dy = GDS_Lambert_dy; + ISEC2_Lambert_LatS1 = GDS_Lambert_LatS1; + ISEC2_Lambert_LatS2 = GDS_Lambert_LatS2; + ISEC2_Lambert_LatSP = GDS_Lambert_LatSP; + ISEC2_Lambert_LonSP = GDS_Lambert_LonSP; + ISEC2_Lambert_ProjFlag = GDS_Lambert_ProjFlag; + ISEC2_ScanFlag = GDS_ScanFlag; + } + else if ( ISEC2_GridType == GRIB1_GTYPE_SPECTRAL ) + { + ISEC2_PentaJ = GDS_PentaJ; // Truncation + ISEC2_PentaK = GDS_PentaK; + ISEC2_PentaM = GDS_PentaM; + ISEC2_RepType = GDS_RepType; + ISEC2_RepMode = GDS_RepMode; + *numGridVals = (ISEC2_PentaJ+1)*(ISEC2_PentaJ+2); + isec2[ 6] = 0; + isec2[ 7] = 0; + isec2[ 8] = 0; + isec2[ 9] = 0; + isec2[10] = 0; + // iret = decodeGDS_SH(gds, gdspos, isec0, isec2, imisng); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_GME ) + { + ISEC2_GME_NI2 = GDS_GME_NI2; + ISEC2_GME_NI3 = GDS_GME_NI3; + ISEC2_GME_ND = GDS_GME_ND; + ISEC2_GME_NI = GDS_GME_NI; + ISEC2_GME_AFlag = GDS_GME_AFlag; + ISEC2_GME_LatPP = GDS_GME_LatPP; + ISEC2_GME_LonPP = GDS_GME_LonPP; + ISEC2_GME_LonMPL = GDS_GME_LonMPL; + ISEC2_GME_BFlag = GDS_GME_BFlag; + *numGridVals = (ISEC2_GME_NI+1)*(ISEC2_GME_NI+1)*10; + // iret = decodeGDS_TR(gds, gdspos, isec0, isec2, imisng); + } + else + { + static bool lwarn = true; + ISEC2_NumLon = GDS_NumLon; + ISEC2_NumLat = GDS_NumLat; + *numGridVals = ISEC2_NumLon*ISEC2_NumLat; + if ( lwarn ) + { + lwarn = false; + Message("GRIB gridtype %d unsupported", ISEC2_GridType); + } + } + + // Vertical coordinate parameters for hybrid levels. + // Get number of vertical coordinate parameters, if any. + + ISEC2_NumVCP = 0; + + isec2[17] = 0; + isec2[18] = 0; + + if ( VertCoorTab ) + { + int locnv; + if ( ISEC0_GRIB_Version == 0 ) + { + locnv = 32; + ISEC2_NumVCP = (gdsLen - 32) >> 2; + } + else + { + locnv = GDS_PVPL - 1; + ISEC2_NumVCP = GDS_NV; + } +#if defined (SX) + lGribLen = 4*ISEC2_NumVCP; + lgrib = (GRIBPACK*) Malloc(lGribLen*sizeof(GRIBPACK)); + + igrib = &gds[locnv]; + if ( ISEC2_NumVCP > 0 ) (void) UNPACK_GRIB(igrib, lgrib, lGribLen, -1L); + for (int i = 0; i < ISEC2_NumVCP; ++i) + { + const int iexp = lgrib[4*i]; + const int imant = GET_UINT3(lgrib[4*i+1], lgrib[4*i+2], lgrib[4*i+3]); + fsec2[10+i] = POW_2_M24 * imant * ldexp(1.0, 4 * (iexp - 64)); + } + + Free(lgrib); +#else + for (int i = 0; i < ISEC2_NumVCP; ++i) + { + const int iexp = gds[locnv+4*i]; + const int imant = GET_UINT3(gds[locnv+4*i+1], gds[locnv+4*i+2], gds[locnv+4*i+3]); + fsec2[10+i] = (T)decfp2(iexp,imant); + } +#endif + } + + return gdsLen; +} + +#define ldexp_double ldexp +#define ldexp_float ldexpf +#define pow_double pow +#define pow_float powf + +static +void TEMPLATE(decodeBDS,T)(int decscale, unsigned char *bds, int *isec2, int *isec4, + T *fsec4, int fsec4len, int dfunc, int bdsLen, int numGridVals, int *iret) +{ + int ioff = 0; + enum { bds_head = 11 }; + T zscale = 0.; + T fmin = 0.; + T *fpdata = fsec4; + + *iret = 0; + unsigned char *igrib = bds; + + memset(isec4, 0, 42*sizeof(int)); + + // 4 bit flag / 4 bit count of unused bits at end of block octet. + + const int bds_flag = BDS_Flag; + + // 0------- grid point + // 1------- spherical harmonics + + const bool lspherc = (bds_flag >> 7)&1; + if ( lspherc ) isec4[2] = 128; + else isec4[2] = 0; + + // -0------ simple packing + // -1------ complex packing + + const bool lcomplex = (bds_flag >> 6)&1; + if ( lcomplex ) isec4[3] = 64; + else isec4[3] = 0; + + // ---0---- No additional flags + // ---1---- No additional flags + + const bool lcompress = (bds_flag >> 4)&1; + + unsigned zoff; + if ( lcompress ) + { isec4[5] = 16; isec4[6] = BDS_Z; zoff = 12; } + else + { isec4[5] = 0; isec4[6] = 0; zoff = 0; } + + // ----++++ number of unused bits at end of section) + + const int bds_ubits = bds_flag & 0xF; + + // scale factor (2 bytes) + const int jscale = BDS_BinScale; + + // check for missing data indicators. + + const int iexp = bds[ 6]; + const int imant = GET_UINT3(bds[ 7], bds[ 8], bds[ 9]); + + const int imiss = (jscale == 0xFFFF && iexp == 0xFF && imant == 0xFFFFFF); + + // convert reference value and scale factor. + + if ( ! (dfunc == 'J') && imiss == 0 ) + { + fmin = (T)BDS_RefValue; + zscale = TEMPLATE(ldexp,T)((T)1.0, jscale); + } + + // get number of bits in each data value. + + ISEC4_NumBits = BDS_NumBits; + + // octet number of start of packed data calculated from start of block 4 - 1 + + unsigned locnd = zoff + bds_head; + + // if data is in spherical harmonic form, distinguish between simple/complex packing (lcomplex = 0/1) + + if ( lspherc ) + { + if ( !lcomplex ) + { + // no unpacked binary data present octet number of start of packed data + // calculated from start of block 4 - 1 + + ioff = 1; + locnd += 4*ioff; // RealCoef + + // get real (0,0) coefficient in grib format and convert to floating point. + if ( dfunc != 'J' ) + { + if ( imiss ) *fpdata++ = 0.0; + else *fpdata++ = (T)BDS_RealCoef; + } + } + else // complex packed spherical harmonics + { + isec4[15] = BDS_PackData; + // scaling factor + isec4[16] = BDS_Power; + + // pentagonal resolution parameters of the unpacked section of data field + + const int jup = bds[zoff+15]; + const int kup = bds[zoff+16]; + const int mup = bds[zoff+17]; + + isec4[zoff+17] = jup; + isec4[zoff+18] = kup; + isec4[zoff+19] = mup; + + // unpacked binary data + + locnd += 4; // 2 + power + locnd += 3; // j, k, m + ioff = (jup+1)*(jup+2); + + if ( dfunc != 'J' ) + for (int i = 0; i < ioff; ++i) + { + if ( imiss ) + *fpdata++ = 0.0; + else + { + const int iexp2 = (bds[locnd+4*i]); + const int imant2 = GET_UINT3(bds[locnd+4*i+1], bds[locnd+4*i+2], bds[locnd+4*i+3]); + *fpdata++ = (T)decfp2(iexp2,imant2); + } + } + + locnd += 4*ioff; /* RealCoef */ + } + } + else + { + if ( lcomplex ) + { + *iret = 1999; + gprintf(__func__, " Second order packed grids unsupported!"); + gprintf(__func__, " Return code = %d", *iret); + return; + } + } + + // Decode data values to floating point and store in fsec4. + // First calculate the number of data values. + // Take into account that spherical harmonics can be packed + // simple (lcomplex = 0) or complex (lcomplex = 1) + + int jlend = bdsLen - locnd; + + if ( ISEC4_NumBits == 0 ) + { + if ( jlend > 1 ) + { + *iret = 2001; + gprintf(__func__, " Number of bits per data value = 0!"); + gprintf(__func__, " Return code = %d", *iret); + return; + } + + if ( numGridVals == 0 ) + { + *iret = 2002; + gprintf(__func__, " Constant field unsupported for this grid type!"); + gprintf(__func__, " Return code = %d", *iret); + return; + } + + jlend = numGridVals; + jlend -= ioff; + } + else + { + jlend = (int) (((long)jlend*8 - bds_ubits) / ISEC4_NumBits); + } + + ISEC4_NumValues = jlend + ioff; + ISEC4_NumNonMissValues = 0; + + if ( lcompress ) + { + const size_t len = ((size_t) ((bds[17]<<16)+(bds[18]<<8)+bds[19])); + + ISEC4_NumValues = (int)(len*8/(size_t)ISEC4_NumBits); + + if ( lspherc ) ISEC4_NumValues += lcomplex ? ioff : 1; + } + + if ( dfunc == 'J' ) return; + + // check length of output array. + + if ( ISEC4_NumValues > fsec4len ) + { + *iret = 710; + gprintf(__func__, " Output array too small. Length = %d", fsec4len); + gprintf(__func__, " Number of values = %d", ISEC4_NumValues); + gprintf(__func__, " Return code = %d", *iret); + return; + } + + if ( imiss ) memset((char *)fpdata, 0, (size_t)jlend*sizeof(T)); + else + { + igrib += locnd; + + TEMPLATE(decode_array,T)(igrib, jlend, ISEC4_NumBits, fmin, zscale, fpdata); + } + + if ( lspherc && lcomplex ) + { + int pcStart = isec4[19], pcScale = isec4[16]; + TEMPLATE(scatter_complex,T)(fsec4, pcStart, ISEC2_PentaJ, ISEC4_NumValues); + TEMPLATE(scale_complex,T)(fsec4, pcStart, pcScale, ISEC2_PentaJ, 1); + } + + if ( CGRIBEX_Fix_ZSE ) // Fix ZeroShiftError of simple packed spherical harmonics + if ( lspherc && !lcomplex ) + { + // 20100705: Fix ZeroShiftError - Edi Kirk + if ( IS_NOT_EQUAL(fsec4[1], 0.0) ) + { + const T zserr = fsec4[1]; + for (int i = 1; i < ISEC4_NumValues; ++i) fsec4[i] -= zserr; + } + } + + if ( decscale ) + { + const T scale = TEMPLATE(pow,T)((T)10.0, (T)-decscale); + for (int i = 0; i < ISEC4_NumValues; ++i) fsec4[i] *= scale; + } +} + + +void TEMPLATE(grib_decode,T)(int *isec0, int *isec1, int *isec2, T *fsec2, int *isec3, + T *fsec3, int *isec4, T *fsec4, int fsec4len, int *kgrib, + int kleng, int *kword, int dfunc, int *iret) +{ + UCHAR *bms = NULL; + bool lsect2 = false, lsect3 = false; + static bool lmissvalinfo = true; + + UNUSED(kleng); + + *iret = 0; + + grsdef(); + + ISEC2_Reduced = false; + + // ---------------------------------------------------------------- + // IS Indicator Section (Section 0) + // ---------------------------------------------------------------- + UCHAR *is = (UCHAR *) &kgrib[0]; + int isLen = decodeIS(is, isec0, iret); + + int gribLen = ISEC0_GRIB_Len; + + /* + When decoding or calculating length, previous editions + of the GRIB code must be taken into account. + + In the table below, covering sections 0 and 1 of the GRIB + code, octet numbering is from the beginning of the GRIB + message; + * indicates that the value is not available in the code edition; + R indicates reserved, should be set to 0; + Experimental edition is considered as edition -1. + + GRIB code edition -1 has fixed length of 20 octets for + section 1, the length not included in the message. + GRIB code edition 0 has fixed length of 24 octets for + section 1, the length being included in the message. + GRIB code edition 1 can have different lengths for section + 1, the minimum being 28 octets, length being included in + the message. + + Octet numbers for code + editions + + Contents. -1 0 1 + --------- ---------------------- + Letters GRIB 1-4 1-4 1-4 + Total length of GRIB message. * * 5-7 + GRIB code edition number * * 8 + Length of Section 1. * 5-7 9-11 + Reserved octet (R). * 8(R) * + Version no. of Code Table 2. * * 12 + Identification of centre. 5 9 13 + Generating process. 6 10 14 + Grid definition . 7 11 15 + Flag (Code Table 1). 8 12 16 + Indicator of parameter. 9 13 17 + Indicator of type of level. 10 14 18 + Height, pressure etc of levels. 11-12 15-16 19-20 + Year of century. 13 17 21 + Month. 14 18 22 + Day. 15 19 23 + Hour. 16 20 24 + Minute. 17 21 25 + Indicator of unit of time. 18 22 26 + P1 - Period of time. 19 23 27 + P2 - Period of time 20(R) 24 28 + or reserved octet (R). + Time range indicator. 21(R) 25 29 + or reserved octet (R). + Number included in average. 22-23(R) 26-27 30-31 + or reserved octet (R). + Number missing from average. 24(R) 28(R) 32 + or reserved octet (R). + Century of data. * * 33 + Designates sub-centre if not 0. * * 34 + Decimal scale factor. * * 35-36 + Reserved. Set to 0. * * 37-48 + (Need not be present) + For originating centre use only. * * 49-nn + (Need not be present) + + Identify which GRIB code edition is being decoded. + + In GRIB edition 1, the edition number is in octet 8. + In GRIB edition 0, octet 8 is reserved and set to 0. + In GRIB edition -1, octet 8 is a flag field and can have a + a valid value of 0, 1, 2 or 3. + + However, GRIB edition number 0 has a fixed + length of 24, included in the message, for section 1, so + if the value extracted from octets 5-7 is 24 and that from + octet 8 is 0, it is safe to assume edition 0 of the code. + + */ + + // Set length of GRIB message to missing data value. + if ( ISEC0_GRIB_Len == 24 && ISEC0_GRIB_Version == 0 ) ISEC0_GRIB_Len = 0; + + // ---------------------------------------------------------------- + // PDS Product Definition Section (Section 1) + // ---------------------------------------------------------------- + UCHAR *pds = is + isLen; + int pdsLen = decodePDS(pds, isec0, isec1); + + // ---------------------------------------------------------------- + // GDS Grid Description Section (Section 2) + // ---------------------------------------------------------------- + int numGridVals = 0; + int gdsLen = 0; + const bool gdsIncluded = ISEC1_Sec2Or3Flag & 128; + if ( gdsIncluded ) + { + UCHAR *gds = is + isLen + pdsLen; + gdsLen = TEMPLATE(decodeGDS,T)(gds, isec0, isec2, fsec2, &numGridVals); + } + + // ---------------------------------------------------------------- + // BMS Bit-Map Section Section (Section 3) + // ---------------------------------------------------------------- + isec3[0] = 0; + int bmsLen = 0, bitmapSize = 0, imaskSize = 0; + const bool bmsIncluded = ISEC1_Sec2Or3Flag & 64; + if ( bmsIncluded ) + { + bms = is + isLen + pdsLen + gdsLen; + bmsLen = BMS_Len; + + imaskSize = (bmsLen > 6) ? (bmsLen - 6)<<3 : 0; + bitmapSize = imaskSize - BMS_UnusedBits; + } + + // ---------------------------------------------------------------- + // BDS Binary Data Section (Section 4) + // ---------------------------------------------------------------- + UCHAR *bds = is + isLen + pdsLen + gdsLen + bmsLen; + int bdsLen = BDS_Len; + /* + If a very large product, the section 4 length field holds + the number of bytes in the product after section 4 upto + the end of the padding bytes. + This is a fixup to get round the restriction on product lengths + due to the count being only 24 bits. It is only possible because + the (default) rounding for GRIB products is 120 bytes. + */ + const bool llarge = (gribLen > JP23SET && bdsLen <= 120); + if ( llarge ) + { + gribLen &= JP23SET; + gribLen *= 120; + ISEC0_GRIB_Len = gribLen; + bdsLen = correct_bdslen(bdsLen, gribLen, isLen+pdsLen+gdsLen+bmsLen); + } + + TEMPLATE(decodeBDS,T)(ISEC1_DecScaleFactor, bds, isec2, isec4, fsec4, fsec4len, dfunc, bdsLen, numGridVals, iret); + + if ( *iret != 0 ) return; + + ISEC4_NumNonMissValues = ISEC4_NumValues; + + if ( bitmapSize > 0 ) + { + if ( dfunc != 'L' && dfunc != 'J' ) + if ( DBL_IS_NAN(FSEC3_MissVal) && lmissvalinfo ) + { + lmissvalinfo = false; + FSEC3_MissVal = (T)GRIB_MISSVAL; + Message("Missing value = NaN is unsupported, set to %g!", GRIB_MISSVAL); + } + + // ISEC4_NumNonMissValues = ISEC4_NumValues; + ISEC4_NumValues = bitmapSize; + + if ( dfunc != 'J' || bitmapSize == ISEC4_NumNonMissValues ) + { + GRIBPACK bitmap; + /* + unsigned char *bitmap; + bitmap = BMS_Bitmap; + int j = ISEC4_NumNonMissValues; + for (int i = ISEC4_NumValues-1; i >= 0; --i) + { + fsec4[i] = ((bitmap[i/8]>>(7-(i&7)))&1) ? fsec4[--j] : FSEC3_MissVal; + } + */ + + GRIBPACK *imask = (GRIBPACK*) Malloc((size_t)imaskSize*sizeof(GRIBPACK)); + +#ifdef VECTORCODE + (void) UNPACK_GRIB(BMS_Bitmap, imask, imaskSize/8, -1L); + GRIBPACK *pbitmap = imask; +#else + GRIBPACK *pbitmap = BMS_Bitmap; +#endif + +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (int i = imaskSize/8-1; i >= 0; --i) + { + bitmap = pbitmap[i]; + imask[i*8+0] = 1 & (bitmap >> 7); + imask[i*8+1] = 1 & (bitmap >> 6); + imask[i*8+2] = 1 & (bitmap >> 5); + imask[i*8+3] = 1 & (bitmap >> 4); + imask[i*8+4] = 1 & (bitmap >> 3); + imask[i*8+5] = 1 & (bitmap >> 2); + imask[i*8+6] = 1 & (bitmap >> 1); + imask[i*8+7] = 1 & (bitmap); + } + + int j = 0; + for (int i = 0; i < ISEC4_NumValues; ++i) + if ( imask[i] ) j++; + + if ( ISEC4_NumNonMissValues != j ) + { + if ( dfunc != 'J' && ISEC4_NumBits != 0 ) + Warning("Bitmap (%d) and data (%d) section differ, using bitmap section!", j, ISEC4_NumNonMissValues); + + ISEC4_NumNonMissValues = j; + } + + if ( dfunc != 'J' ) + { +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (int i = ISEC4_NumValues-1; i >= 0; --i) + fsec4[i] = imask[i] ? fsec4[--j] : FSEC3_MissVal; + } + + Free(imask); + } + } + + if ( ISEC2_Reduced ) + { + int nvalues = 0; + int nlat = ISEC2_NumLat; + int nlon = ISEC2_ReducedPointsPtr[0]; + for (int ilat = 0; ilat < nlat; ++ilat) nvalues += ISEC2_ReducedPoints(ilat); + for (int ilat = 1; ilat < nlat; ++ilat) + if ( ISEC2_ReducedPoints(ilat) > nlon ) nlon = ISEC2_ReducedPoints(ilat); + + // int dlon = ISEC2_LastLon-ISEC2_FirstLon; + // if ( dlon < 0 ) dlon += 360000; + + if ( nvalues != ISEC4_NumValues ) *iret = -801; + + //printf("nlat %d nlon %d \n", nlat, nlon); + //printf("nvalues %d %d\n", nvalues, ISEC4_NumValues); + + if ( dfunc == 'R' && *iret == -801 ) + gprintf(__func__, "Number of values (%d) and sum of lons per row (%d) differ, abort conversion to regular Gaussian grid!", + ISEC4_NumValues, nvalues); + + if ( dfunc == 'R' && *iret != -801 ) + { + ISEC2_Reduced = 0; + ISEC2_NumLon = nlon; + ISEC4_NumValues = nlon*nlat; + + lsect3 = bitmapSize > 0; + int lperio = 1; + int lveggy = (ISEC1_CodeTable == 128) && (ISEC1_CenterID == 98) && + ((ISEC1_Parameter == 27) || (ISEC1_Parameter == 28) || + (ISEC1_Parameter == 29) || (ISEC1_Parameter == 30) || + (ISEC1_Parameter == 39) || (ISEC1_Parameter == 40) || + (ISEC1_Parameter == 41) || (ISEC1_Parameter == 42) || + (ISEC1_Parameter == 43)); + + (void) TEMPLATE(qu2reg3,T)(fsec4, ISEC2_ReducedPointsPtr, nlat, nlon, FSEC3_MissVal, iret, lsect3, lperio, lveggy); + + if ( bitmapSize > 0 ) + { + int j = 0; + for (int i = 0; i < ISEC4_NumValues; ++i) + if ( IS_NOT_EQUAL(fsec4[i], FSEC3_MissVal) ) j++; + + ISEC4_NumNonMissValues = j; + } + } + } + + if ( ISEC0_GRIB_Version == 1 ) isLen = 8; + const int esLen = 4; + gribLen = isLen + pdsLen + gdsLen + bmsLen + bdsLen + esLen; + + if ( !llarge && ISEC0_GRIB_Len && ISEC0_GRIB_Len < gribLen ) + Warning("Inconsistent length of GRIB message (grib_message_size=%d < grib_record_size=%d)!", ISEC0_GRIB_Len, gribLen); + + ISEC0_GRIB_Len = gribLen; + + *kword = (int)(((size_t)gribLen + sizeof(int) - 1) / sizeof(int)); + + // ---------------------------------------------------------------- + // Section 9 . Abort/return to calling routine. + // ---------------------------------------------------------------- + bool ldebug = false, l_iorj = false; + if ( ldebug ) + { + gprintf(__func__, "Section 9."); + gprintf(__func__, "Output values set -"); + + gribPrintSec0(isec0); + gribPrintSec1(isec0, isec1); + // Print section 2 if present. + if ( lsect2 ) TEMPLATE(gribPrintSec2,T)(isec0, isec2, fsec2); + + if ( ! l_iorj ) + { + // Print section 3 if present. + if ( lsect3 ) TEMPLATE(gribPrintSec3,T)(isec0, isec3, fsec3); + + TEMPLATE(gribPrintSec4,T)(isec0, isec4, fsec4); + // Special print for 2D spectra wave field real values in section 4 + if ( (isec1[ 0] == 140) && + (isec1[ 1] == 98) && + (isec1[23] == 1) && + ((isec1[39] == 1045) || (isec1[39] == 1081)) && + ((isec1[ 5] == 250) || (isec1[ 5] == 251)) ) + gribPrintSec4Wave(isec4); + } + } +} + +#endif /* T */ + +/* + * Local Variables: + * mode: c + * End: + */ + +#ifdef T +#undef T +#endif +#define T float +#ifdef T + +static +int TEMPLATE(decodeGDS,T)(unsigned char *gds, int *isec0, int *isec2, T *fsec2, int *numGridVals) +{ + // int imisng = 0; + bool ReducedGrid = false, VertCoorTab = false; +#ifdef VECTORCODE + unsigned char *igrib; + GRIBPACK *lgrib = NULL; + size_t lGribLen = 0; +#endif + + *numGridVals = 0; + + memset(isec2, 0, 22*sizeof(int)); + + const unsigned gdsLen = GDS_Len; + + unsigned ipvpl = GDS_PVPL; + if ( ipvpl == 0 ) ipvpl = 0xFF; + + if ( ipvpl != 0xFF ) + { // Either vct or reduced grid + if ( GDS_NV != 0 ) + { // we have vct + VertCoorTab = true; + const unsigned ipl = 4*GDS_NV + ipvpl - 1; + if ( ipl < gdsLen ) ReducedGrid = true; + } + else + { + VertCoorTab = false; + ReducedGrid = true; + } + // ReducedGrid = (gdsLen - 32 - 4*GDS_NV); + } + + if ( ISEC0_GRIB_Version == 0 ) VertCoorTab = ((gdsLen - 32) > 0); + + if ( ReducedGrid ) + { + const unsigned locnl = GDS_PVPL - 1 + (VertCoorTab * 4 * GDS_NV); + const unsigned jlenl = (gdsLen - locnl) >> 1; + if ( jlenl == GDS_NumLat ) + { + *numGridVals = 0; + ISEC2_Reduced = true; + for (unsigned i = 0; i < jlenl; ++i) + { + ISEC2_ReducedPoints(i) = GET_UINT2(gds[locnl+2*i], gds[locnl+2*i+1]); + *numGridVals += ISEC2_ReducedPoints(i); + } + } + else + { + ReducedGrid = false; + } + } + + ISEC2_GridType = GDS_GridType; + + // Gaussian grid definition. + + if ( ISEC2_GridType == GRIB1_GTYPE_LATLON || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN || + ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) + { + ISEC2_NumLat = GDS_NumLat; + if ( ! ReducedGrid ) + { + ISEC2_NumLon = GDS_NumLon; + *numGridVals = ISEC2_NumLon*ISEC2_NumLat; + } + ISEC2_FirstLat = GDS_FirstLat; + ISEC2_FirstLon = GDS_FirstLon; + ISEC2_ResFlag = GDS_ResFlag; + ISEC2_LastLat = GDS_LastLat; + ISEC2_LastLon = GDS_LastLon; + ISEC2_LonIncr = GDS_LonIncr; + + ISEC2_NumPar = GDS_NumPar; + ISEC2_ScanFlag = GDS_ScanFlag; + if ( ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) + { + ISEC2_LatSP = GDS_LatSP; + ISEC2_LonSP = GDS_LonSP; + FSEC2_RotAngle = (T)GDS_RotAngle; + } + // if ( Lons != Longitudes || Lats != Latitudes ) Error("Latitude/Longitude Conflict"); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN_ROT || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN_STR || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN_ROTSTR ) + { + // iret = decodeGDS_GG(gds, gdspos, isec0, isec2, imisng); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_LATLON || + ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT || + ISEC2_GridType == GRIB1_GTYPE_LATLON_STR || + ISEC2_GridType == GRIB1_GTYPE_LATLON_ROTSTR ) + { + // iret = decodeGDS_LL(gds, gdspos, isec0, isec2, imisng); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_LCC ) + { + ISEC2_NumLon = GDS_NumLon; + ISEC2_NumLat = GDS_NumLat; + *numGridVals = ISEC2_NumLon*ISEC2_NumLat; + ISEC2_FirstLat = GDS_FirstLat; + ISEC2_FirstLon = GDS_FirstLon; + ISEC2_ResFlag = GDS_ResFlag; + ISEC2_Lambert_Lov = GDS_Lambert_Lov; + ISEC2_Lambert_dx = GDS_Lambert_dx; + ISEC2_Lambert_dy = GDS_Lambert_dy; + ISEC2_Lambert_LatS1 = GDS_Lambert_LatS1; + ISEC2_Lambert_LatS2 = GDS_Lambert_LatS2; + ISEC2_Lambert_LatSP = GDS_Lambert_LatSP; + ISEC2_Lambert_LonSP = GDS_Lambert_LonSP; + ISEC2_Lambert_ProjFlag = GDS_Lambert_ProjFlag; + ISEC2_ScanFlag = GDS_ScanFlag; + } + else if ( ISEC2_GridType == GRIB1_GTYPE_SPECTRAL ) + { + ISEC2_PentaJ = GDS_PentaJ; // Truncation + ISEC2_PentaK = GDS_PentaK; + ISEC2_PentaM = GDS_PentaM; + ISEC2_RepType = GDS_RepType; + ISEC2_RepMode = GDS_RepMode; + *numGridVals = (ISEC2_PentaJ+1)*(ISEC2_PentaJ+2); + isec2[ 6] = 0; + isec2[ 7] = 0; + isec2[ 8] = 0; + isec2[ 9] = 0; + isec2[10] = 0; + // iret = decodeGDS_SH(gds, gdspos, isec0, isec2, imisng); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_GME ) + { + ISEC2_GME_NI2 = GDS_GME_NI2; + ISEC2_GME_NI3 = GDS_GME_NI3; + ISEC2_GME_ND = GDS_GME_ND; + ISEC2_GME_NI = GDS_GME_NI; + ISEC2_GME_AFlag = GDS_GME_AFlag; + ISEC2_GME_LatPP = GDS_GME_LatPP; + ISEC2_GME_LonPP = GDS_GME_LonPP; + ISEC2_GME_LonMPL = GDS_GME_LonMPL; + ISEC2_GME_BFlag = GDS_GME_BFlag; + *numGridVals = (ISEC2_GME_NI+1)*(ISEC2_GME_NI+1)*10; + // iret = decodeGDS_TR(gds, gdspos, isec0, isec2, imisng); + } + else + { + static bool lwarn = true; + ISEC2_NumLon = GDS_NumLon; + ISEC2_NumLat = GDS_NumLat; + *numGridVals = ISEC2_NumLon*ISEC2_NumLat; + if ( lwarn ) + { + lwarn = false; + Message("GRIB gridtype %d unsupported", ISEC2_GridType); + } + } + + // Vertical coordinate parameters for hybrid levels. + // Get number of vertical coordinate parameters, if any. + + ISEC2_NumVCP = 0; + + isec2[17] = 0; + isec2[18] = 0; + + if ( VertCoorTab ) + { + int locnv; + if ( ISEC0_GRIB_Version == 0 ) + { + locnv = 32; + ISEC2_NumVCP = (gdsLen - 32) >> 2; + } + else + { + locnv = GDS_PVPL - 1; + ISEC2_NumVCP = GDS_NV; + } +#if defined (SX) + lGribLen = 4*ISEC2_NumVCP; + lgrib = (GRIBPACK*) Malloc(lGribLen*sizeof(GRIBPACK)); + + igrib = &gds[locnv]; + if ( ISEC2_NumVCP > 0 ) (void) UNPACK_GRIB(igrib, lgrib, lGribLen, -1L); + for (int i = 0; i < ISEC2_NumVCP; ++i) + { + const int iexp = lgrib[4*i]; + const int imant = GET_UINT3(lgrib[4*i+1], lgrib[4*i+2], lgrib[4*i+3]); + fsec2[10+i] = POW_2_M24 * imant * ldexp(1.0, 4 * (iexp - 64)); + } + + Free(lgrib); +#else + for (int i = 0; i < ISEC2_NumVCP; ++i) + { + const int iexp = gds[locnv+4*i]; + const int imant = GET_UINT3(gds[locnv+4*i+1], gds[locnv+4*i+2], gds[locnv+4*i+3]); + fsec2[10+i] = (T)decfp2(iexp,imant); + } +#endif + } + + return gdsLen; +} + +#define ldexp_double ldexp +#define ldexp_float ldexpf +#define pow_double pow +#define pow_float powf + +static +void TEMPLATE(decodeBDS,T)(int decscale, unsigned char *bds, int *isec2, int *isec4, + T *fsec4, int fsec4len, int dfunc, int bdsLen, int numGridVals, int *iret) +{ + int ioff = 0; + enum { bds_head = 11 }; + T zscale = 0.; + T fmin = 0.; + T *fpdata = fsec4; + + *iret = 0; + unsigned char *igrib = bds; + + memset(isec4, 0, 42*sizeof(int)); + + // 4 bit flag / 4 bit count of unused bits at end of block octet. + + const int bds_flag = BDS_Flag; + + // 0------- grid point + // 1------- spherical harmonics + + const bool lspherc = (bds_flag >> 7)&1; + if ( lspherc ) isec4[2] = 128; + else isec4[2] = 0; + + // -0------ simple packing + // -1------ complex packing + + const bool lcomplex = (bds_flag >> 6)&1; + if ( lcomplex ) isec4[3] = 64; + else isec4[3] = 0; + + // ---0---- No additional flags + // ---1---- No additional flags + + const bool lcompress = (bds_flag >> 4)&1; + + unsigned zoff; + if ( lcompress ) + { isec4[5] = 16; isec4[6] = BDS_Z; zoff = 12; } + else + { isec4[5] = 0; isec4[6] = 0; zoff = 0; } + + // ----++++ number of unused bits at end of section) + + const int bds_ubits = bds_flag & 0xF; + + // scale factor (2 bytes) + const int jscale = BDS_BinScale; + + // check for missing data indicators. + + const int iexp = bds[ 6]; + const int imant = GET_UINT3(bds[ 7], bds[ 8], bds[ 9]); + + const int imiss = (jscale == 0xFFFF && iexp == 0xFF && imant == 0xFFFFFF); + + // convert reference value and scale factor. + + if ( ! (dfunc == 'J') && imiss == 0 ) + { + fmin = (T)BDS_RefValue; + zscale = TEMPLATE(ldexp,T)((T)1.0, jscale); + } + + // get number of bits in each data value. + + ISEC4_NumBits = BDS_NumBits; + + // octet number of start of packed data calculated from start of block 4 - 1 + + unsigned locnd = zoff + bds_head; + + // if data is in spherical harmonic form, distinguish between simple/complex packing (lcomplex = 0/1) + + if ( lspherc ) + { + if ( !lcomplex ) + { + // no unpacked binary data present octet number of start of packed data + // calculated from start of block 4 - 1 + + ioff = 1; + locnd += 4*ioff; // RealCoef + + // get real (0,0) coefficient in grib format and convert to floating point. + if ( dfunc != 'J' ) + { + if ( imiss ) *fpdata++ = 0.0; + else *fpdata++ = (T)BDS_RealCoef; + } + } + else // complex packed spherical harmonics + { + isec4[15] = BDS_PackData; + // scaling factor + isec4[16] = BDS_Power; + + // pentagonal resolution parameters of the unpacked section of data field + + const int jup = bds[zoff+15]; + const int kup = bds[zoff+16]; + const int mup = bds[zoff+17]; + + isec4[zoff+17] = jup; + isec4[zoff+18] = kup; + isec4[zoff+19] = mup; + + // unpacked binary data + + locnd += 4; // 2 + power + locnd += 3; // j, k, m + ioff = (jup+1)*(jup+2); + + if ( dfunc != 'J' ) + for (int i = 0; i < ioff; ++i) + { + if ( imiss ) + *fpdata++ = 0.0; + else + { + const int iexp2 = (bds[locnd+4*i]); + const int imant2 = GET_UINT3(bds[locnd+4*i+1], bds[locnd+4*i+2], bds[locnd+4*i+3]); + *fpdata++ = (T)decfp2(iexp2,imant2); + } + } + + locnd += 4*ioff; /* RealCoef */ + } + } + else + { + if ( lcomplex ) + { + *iret = 1999; + gprintf(__func__, " Second order packed grids unsupported!"); + gprintf(__func__, " Return code = %d", *iret); + return; + } + } + + // Decode data values to floating point and store in fsec4. + // First calculate the number of data values. + // Take into account that spherical harmonics can be packed + // simple (lcomplex = 0) or complex (lcomplex = 1) + + int jlend = bdsLen - locnd; + + if ( ISEC4_NumBits == 0 ) + { + if ( jlend > 1 ) + { + *iret = 2001; + gprintf(__func__, " Number of bits per data value = 0!"); + gprintf(__func__, " Return code = %d", *iret); + return; + } + + if ( numGridVals == 0 ) + { + *iret = 2002; + gprintf(__func__, " Constant field unsupported for this grid type!"); + gprintf(__func__, " Return code = %d", *iret); + return; + } + + jlend = numGridVals; + jlend -= ioff; + } + else + { + jlend = (int) (((long)jlend*8 - bds_ubits) / ISEC4_NumBits); + } + + ISEC4_NumValues = jlend + ioff; + ISEC4_NumNonMissValues = 0; + + if ( lcompress ) + { + const size_t len = ((size_t) ((bds[17]<<16)+(bds[18]<<8)+bds[19])); + + ISEC4_NumValues = (int)(len*8/(size_t)ISEC4_NumBits); + + if ( lspherc ) ISEC4_NumValues += lcomplex ? ioff : 1; + } + + if ( dfunc == 'J' ) return; + + // check length of output array. + + if ( ISEC4_NumValues > fsec4len ) + { + *iret = 710; + gprintf(__func__, " Output array too small. Length = %d", fsec4len); + gprintf(__func__, " Number of values = %d", ISEC4_NumValues); + gprintf(__func__, " Return code = %d", *iret); + return; + } + + if ( imiss ) memset((char *)fpdata, 0, (size_t)jlend*sizeof(T)); + else + { + igrib += locnd; + + TEMPLATE(decode_array,T)(igrib, jlend, ISEC4_NumBits, fmin, zscale, fpdata); + } + + if ( lspherc && lcomplex ) + { + int pcStart = isec4[19], pcScale = isec4[16]; + TEMPLATE(scatter_complex,T)(fsec4, pcStart, ISEC2_PentaJ, ISEC4_NumValues); + TEMPLATE(scale_complex,T)(fsec4, pcStart, pcScale, ISEC2_PentaJ, 1); + } + + if ( CGRIBEX_Fix_ZSE ) // Fix ZeroShiftError of simple packed spherical harmonics + if ( lspherc && !lcomplex ) + { + // 20100705: Fix ZeroShiftError - Edi Kirk + if ( IS_NOT_EQUAL(fsec4[1], 0.0) ) + { + const T zserr = fsec4[1]; + for (int i = 1; i < ISEC4_NumValues; ++i) fsec4[i] -= zserr; + } + } + + if ( decscale ) + { + const T scale = TEMPLATE(pow,T)((T)10.0, (T)-decscale); + for (int i = 0; i < ISEC4_NumValues; ++i) fsec4[i] *= scale; + } +} + + +void TEMPLATE(grib_decode,T)(int *isec0, int *isec1, int *isec2, T *fsec2, int *isec3, + T *fsec3, int *isec4, T *fsec4, int fsec4len, int *kgrib, + int kleng, int *kword, int dfunc, int *iret) +{ + UCHAR *bms = NULL; + bool lsect2 = false, lsect3 = false; + static bool lmissvalinfo = true; + + UNUSED(kleng); + + *iret = 0; + + grsdef(); + + ISEC2_Reduced = false; + + // ---------------------------------------------------------------- + // IS Indicator Section (Section 0) + // ---------------------------------------------------------------- + UCHAR *is = (UCHAR *) &kgrib[0]; + int isLen = decodeIS(is, isec0, iret); + + int gribLen = ISEC0_GRIB_Len; + + /* + When decoding or calculating length, previous editions + of the GRIB code must be taken into account. + + In the table below, covering sections 0 and 1 of the GRIB + code, octet numbering is from the beginning of the GRIB + message; + * indicates that the value is not available in the code edition; + R indicates reserved, should be set to 0; + Experimental edition is considered as edition -1. + + GRIB code edition -1 has fixed length of 20 octets for + section 1, the length not included in the message. + GRIB code edition 0 has fixed length of 24 octets for + section 1, the length being included in the message. + GRIB code edition 1 can have different lengths for section + 1, the minimum being 28 octets, length being included in + the message. + + Octet numbers for code + editions + + Contents. -1 0 1 + --------- ---------------------- + Letters GRIB 1-4 1-4 1-4 + Total length of GRIB message. * * 5-7 + GRIB code edition number * * 8 + Length of Section 1. * 5-7 9-11 + Reserved octet (R). * 8(R) * + Version no. of Code Table 2. * * 12 + Identification of centre. 5 9 13 + Generating process. 6 10 14 + Grid definition . 7 11 15 + Flag (Code Table 1). 8 12 16 + Indicator of parameter. 9 13 17 + Indicator of type of level. 10 14 18 + Height, pressure etc of levels. 11-12 15-16 19-20 + Year of century. 13 17 21 + Month. 14 18 22 + Day. 15 19 23 + Hour. 16 20 24 + Minute. 17 21 25 + Indicator of unit of time. 18 22 26 + P1 - Period of time. 19 23 27 + P2 - Period of time 20(R) 24 28 + or reserved octet (R). + Time range indicator. 21(R) 25 29 + or reserved octet (R). + Number included in average. 22-23(R) 26-27 30-31 + or reserved octet (R). + Number missing from average. 24(R) 28(R) 32 + or reserved octet (R). + Century of data. * * 33 + Designates sub-centre if not 0. * * 34 + Decimal scale factor. * * 35-36 + Reserved. Set to 0. * * 37-48 + (Need not be present) + For originating centre use only. * * 49-nn + (Need not be present) + + Identify which GRIB code edition is being decoded. + + In GRIB edition 1, the edition number is in octet 8. + In GRIB edition 0, octet 8 is reserved and set to 0. + In GRIB edition -1, octet 8 is a flag field and can have a + a valid value of 0, 1, 2 or 3. + + However, GRIB edition number 0 has a fixed + length of 24, included in the message, for section 1, so + if the value extracted from octets 5-7 is 24 and that from + octet 8 is 0, it is safe to assume edition 0 of the code. + + */ + + // Set length of GRIB message to missing data value. + if ( ISEC0_GRIB_Len == 24 && ISEC0_GRIB_Version == 0 ) ISEC0_GRIB_Len = 0; + + // ---------------------------------------------------------------- + // PDS Product Definition Section (Section 1) + // ---------------------------------------------------------------- + UCHAR *pds = is + isLen; + int pdsLen = decodePDS(pds, isec0, isec1); + + // ---------------------------------------------------------------- + // GDS Grid Description Section (Section 2) + // ---------------------------------------------------------------- + int numGridVals = 0; + int gdsLen = 0; + const bool gdsIncluded = ISEC1_Sec2Or3Flag & 128; + if ( gdsIncluded ) + { + UCHAR *gds = is + isLen + pdsLen; + gdsLen = TEMPLATE(decodeGDS,T)(gds, isec0, isec2, fsec2, &numGridVals); + } + + // ---------------------------------------------------------------- + // BMS Bit-Map Section Section (Section 3) + // ---------------------------------------------------------------- + isec3[0] = 0; + int bmsLen = 0, bitmapSize = 0, imaskSize = 0; + const bool bmsIncluded = ISEC1_Sec2Or3Flag & 64; + if ( bmsIncluded ) + { + bms = is + isLen + pdsLen + gdsLen; + bmsLen = BMS_Len; + + imaskSize = (bmsLen > 6) ? (bmsLen - 6)<<3 : 0; + bitmapSize = imaskSize - BMS_UnusedBits; + } + + // ---------------------------------------------------------------- + // BDS Binary Data Section (Section 4) + // ---------------------------------------------------------------- + UCHAR *bds = is + isLen + pdsLen + gdsLen + bmsLen; + int bdsLen = BDS_Len; + /* + If a very large product, the section 4 length field holds + the number of bytes in the product after section 4 upto + the end of the padding bytes. + This is a fixup to get round the restriction on product lengths + due to the count being only 24 bits. It is only possible because + the (default) rounding for GRIB products is 120 bytes. + */ + const bool llarge = (gribLen > JP23SET && bdsLen <= 120); + if ( llarge ) + { + gribLen &= JP23SET; + gribLen *= 120; + ISEC0_GRIB_Len = gribLen; + bdsLen = correct_bdslen(bdsLen, gribLen, isLen+pdsLen+gdsLen+bmsLen); + } + + TEMPLATE(decodeBDS,T)(ISEC1_DecScaleFactor, bds, isec2, isec4, fsec4, fsec4len, dfunc, bdsLen, numGridVals, iret); + + if ( *iret != 0 ) return; + + ISEC4_NumNonMissValues = ISEC4_NumValues; + + if ( bitmapSize > 0 ) + { + if ( dfunc != 'L' && dfunc != 'J' ) + if ( DBL_IS_NAN(FSEC3_MissVal) && lmissvalinfo ) + { + lmissvalinfo = false; + FSEC3_MissVal = (T)GRIB_MISSVAL; + Message("Missing value = NaN is unsupported, set to %g!", GRIB_MISSVAL); + } + + // ISEC4_NumNonMissValues = ISEC4_NumValues; + ISEC4_NumValues = bitmapSize; + + if ( dfunc != 'J' || bitmapSize == ISEC4_NumNonMissValues ) + { + GRIBPACK bitmap; + /* + unsigned char *bitmap; + bitmap = BMS_Bitmap; + int j = ISEC4_NumNonMissValues; + for (int i = ISEC4_NumValues-1; i >= 0; --i) + { + fsec4[i] = ((bitmap[i/8]>>(7-(i&7)))&1) ? fsec4[--j] : FSEC3_MissVal; + } + */ + + GRIBPACK *imask = (GRIBPACK*) Malloc((size_t)imaskSize*sizeof(GRIBPACK)); + +#ifdef VECTORCODE + (void) UNPACK_GRIB(BMS_Bitmap, imask, imaskSize/8, -1L); + GRIBPACK *pbitmap = imask; +#else + GRIBPACK *pbitmap = BMS_Bitmap; +#endif + +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (int i = imaskSize/8-1; i >= 0; --i) + { + bitmap = pbitmap[i]; + imask[i*8+0] = 1 & (bitmap >> 7); + imask[i*8+1] = 1 & (bitmap >> 6); + imask[i*8+2] = 1 & (bitmap >> 5); + imask[i*8+3] = 1 & (bitmap >> 4); + imask[i*8+4] = 1 & (bitmap >> 3); + imask[i*8+5] = 1 & (bitmap >> 2); + imask[i*8+6] = 1 & (bitmap >> 1); + imask[i*8+7] = 1 & (bitmap); + } + + int j = 0; + for (int i = 0; i < ISEC4_NumValues; ++i) + if ( imask[i] ) j++; + + if ( ISEC4_NumNonMissValues != j ) + { + if ( dfunc != 'J' && ISEC4_NumBits != 0 ) + Warning("Bitmap (%d) and data (%d) section differ, using bitmap section!", j, ISEC4_NumNonMissValues); + + ISEC4_NumNonMissValues = j; + } + + if ( dfunc != 'J' ) + { +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (int i = ISEC4_NumValues-1; i >= 0; --i) + fsec4[i] = imask[i] ? fsec4[--j] : FSEC3_MissVal; + } + + Free(imask); + } + } + + if ( ISEC2_Reduced ) + { + int nvalues = 0; + int nlat = ISEC2_NumLat; + int nlon = ISEC2_ReducedPointsPtr[0]; + for (int ilat = 0; ilat < nlat; ++ilat) nvalues += ISEC2_ReducedPoints(ilat); + for (int ilat = 1; ilat < nlat; ++ilat) + if ( ISEC2_ReducedPoints(ilat) > nlon ) nlon = ISEC2_ReducedPoints(ilat); + + // int dlon = ISEC2_LastLon-ISEC2_FirstLon; + // if ( dlon < 0 ) dlon += 360000; + + if ( nvalues != ISEC4_NumValues ) *iret = -801; + + //printf("nlat %d nlon %d \n", nlat, nlon); + //printf("nvalues %d %d\n", nvalues, ISEC4_NumValues); + + if ( dfunc == 'R' && *iret == -801 ) + gprintf(__func__, "Number of values (%d) and sum of lons per row (%d) differ, abort conversion to regular Gaussian grid!", + ISEC4_NumValues, nvalues); + + if ( dfunc == 'R' && *iret != -801 ) + { + ISEC2_Reduced = 0; + ISEC2_NumLon = nlon; + ISEC4_NumValues = nlon*nlat; + + lsect3 = bitmapSize > 0; + int lperio = 1; + int lveggy = (ISEC1_CodeTable == 128) && (ISEC1_CenterID == 98) && + ((ISEC1_Parameter == 27) || (ISEC1_Parameter == 28) || + (ISEC1_Parameter == 29) || (ISEC1_Parameter == 30) || + (ISEC1_Parameter == 39) || (ISEC1_Parameter == 40) || + (ISEC1_Parameter == 41) || (ISEC1_Parameter == 42) || + (ISEC1_Parameter == 43)); + + (void) TEMPLATE(qu2reg3,T)(fsec4, ISEC2_ReducedPointsPtr, nlat, nlon, FSEC3_MissVal, iret, lsect3, lperio, lveggy); + + if ( bitmapSize > 0 ) + { + int j = 0; + for (int i = 0; i < ISEC4_NumValues; ++i) + if ( IS_NOT_EQUAL(fsec4[i], FSEC3_MissVal) ) j++; + + ISEC4_NumNonMissValues = j; + } + } + } + + if ( ISEC0_GRIB_Version == 1 ) isLen = 8; + const int esLen = 4; + gribLen = isLen + pdsLen + gdsLen + bmsLen + bdsLen + esLen; + + if ( !llarge && ISEC0_GRIB_Len && ISEC0_GRIB_Len < gribLen ) + Warning("Inconsistent length of GRIB message (grib_message_size=%d < grib_record_size=%d)!", ISEC0_GRIB_Len, gribLen); + + ISEC0_GRIB_Len = gribLen; + + *kword = (int)(((size_t)gribLen + sizeof(int) - 1) / sizeof(int)); + + // ---------------------------------------------------------------- + // Section 9 . Abort/return to calling routine. + // ---------------------------------------------------------------- + bool ldebug = false, l_iorj = false; + if ( ldebug ) + { + gprintf(__func__, "Section 9."); + gprintf(__func__, "Output values set -"); + + gribPrintSec0(isec0); + gribPrintSec1(isec0, isec1); + // Print section 2 if present. + if ( lsect2 ) TEMPLATE(gribPrintSec2,T)(isec0, isec2, fsec2); + + if ( ! l_iorj ) + { + // Print section 3 if present. + if ( lsect3 ) TEMPLATE(gribPrintSec3,T)(isec0, isec3, fsec3); + + TEMPLATE(gribPrintSec4,T)(isec0, isec4, fsec4); + // Special print for 2D spectra wave field real values in section 4 + if ( (isec1[ 0] == 140) && + (isec1[ 1] == 98) && + (isec1[23] == 1) && + ((isec1[39] == 1045) || (isec1[39] == 1081)) && + ((isec1[ 5] == 250) || (isec1[ 5] == 251)) ) + gribPrintSec4Wave(isec4); + } + } +} + +#endif /* T */ + +/* + * Local Variables: + * mode: c + * End: + */ + +// GRIB block 0 - indicator block +static +void encodeIS(GRIBPACK *lGrib, long *gribLen) +{ + long z; + // z = *gribLen; + + lGrib[0] = 'G'; + lGrib[1] = 'R'; + lGrib[2] = 'I'; + lGrib[3] = 'B'; + + // lGrib[4]-lGrib[6] contains full length of grib record. + // included before finished CODEGB + + z = 7; + Put1Byte(1); // grib version + z = 8; + + *gribLen = z; +} + +// GRIB block 5 - end block +static +void encodeES(GRIBPACK *lGrib, long *gribLen, long bdsstart) +{ + long z = *gribLen; + + lGrib[z++] = '7'; + lGrib[z++] = '7'; + lGrib[z++] = '7'; + lGrib[z++] = '7'; + + if (z > JP24SET) + { + long bdslen = z - 4; + // fprintf(stderr, "Abort: GRIB record too large (max = %d)!\n", JP23SET); + // exit(1); + /* + If a very large product, the section 4 length field holds + the number of bytes in the product after section 4 upto + the end of the padding bytes. + This is a fixup to get round the restriction on product lengths + due to the count being only 24 bits. It is only possible because + the (default) rounding for GRIB products is 120 bytes. + */ + while (z%120) lGrib[z++] = 0; + + if (z > JP23SET*120) + { + fprintf(stderr, "Abort: GRIB1 record too large (size = %ld; max = %d)!\n", z, JP23SET*120); + exit(1); + } + + long itemp = z / (-120); + itemp = JP23SET - itemp + 1; + + lGrib[4] = (GRIBPACK)(itemp >> 16); + lGrib[5] = (GRIBPACK)(itemp >> 8); + lGrib[6] = (GRIBPACK)itemp; + + bdslen = z - bdslen; + lGrib[bdsstart ] = (GRIBPACK)(bdslen >> 16); + lGrib[bdsstart+1] = (GRIBPACK)(bdslen >> 8); + lGrib[bdsstart+2] = (GRIBPACK)bdslen; + } + else + { + lGrib[4] = (GRIBPACK)(z >> 16); + lGrib[5] = (GRIBPACK)(z >> 8); + lGrib[6] = (GRIBPACK)z; + + while (z%8) lGrib[z++] = 0; + } + + *gribLen = z; +} + +// GRIB block 1 - product definition block. + +#define DWD_extension_253_len 38 +#define DWD_extension_254_len 26 +#define ECMWF_extension_1_len 24 +#define MPIM_extension_1_len 18 + +static +long getLocalExtLen(int *isec1) +{ + long extlen = 0; + + if (ISEC1_LocalFLag) + { + if (ISEC1_CenterID == 78 || ISEC1_CenterID == 215 || ISEC1_CenterID == 250) + { + if (isec1[36] == 254) extlen = DWD_extension_254_len; + else if (isec1[36] == 253) extlen = DWD_extension_253_len; + } + else if (ISEC1_CenterID == 98) + { + if (isec1[36] == 1) extlen = ECMWF_extension_1_len; + } + else if (ISEC1_CenterID == 252) + { + if (isec1[36] == 1) extlen = MPIM_extension_1_len; + } + } + + return extlen; +} + +static +long getPdsLen(int *isec1) +{ + long pdslen = 28; + + pdslen += getLocalExtLen(isec1); + + return pdslen; +} + +static +void encodePDS_DWD_local_Extension_254(GRIBPACK *lGrib, long *zs, int *isec1) +{ + long z = *zs; + + const long localextlen = getLocalExtLen(isec1); + for (long i = 0; i < localextlen-2; i++) Put1Byte(isec1[24+i]); + + int isvn = isec1[49] << 15 | isec1[48]; // DWD experiment identifier + Put2Byte(isvn); // DWD run type (0=main, 2=ass, 3=test) + + *zs = z; +} + +static +void encodePDS_DWD_local_Extension_253(GRIBPACK *lGrib, long *zs, int *isec1) +{ + long z = *zs; + + const long localextlen = DWD_extension_254_len; + for (long i = 0; i < localextlen-2; i++) Put1Byte(isec1[24+i]); + + int isvn = isec1[49] << 15 | isec1[48]; /* DWD experiment identifier */ + Put2Byte(isvn); /* DWD run type (0=main, 2=ass, 3=test) */ + Put1Byte(isec1[50]); /* 55 User id, specified by table */ + Put2Byte(isec1[51]); /* 56 Experiment identifier */ + Put2Byte(isec1[52]); /* 58 Ensemble identification by table */ + Put2Byte(isec1[53]); /* 60 Number of ensemble members */ + Put2Byte(isec1[54]); /* 62 Actual number of ensemble member */ + Put1Byte(isec1[55]); /* 64 Model major version number */ + Put1Byte(isec1[56]); /* 65 Model minor version number */ + Put1Byte(0); /* 66 Blank for even buffer length */ + + *zs = z; +} + +static +void encodePDS_ECMWF_local_Extension_1(GRIBPACK *lGrib, long *zs, int *isec1) +{ + long z = *zs; + + const long localextlen = getLocalExtLen(isec1); + for (long i = 0; i < localextlen-12; i++) Put1Byte(isec1[24+i]); + /* 12 bytes explicitly encoded below: */ + Put1Byte(isec1[36]); /* ECMWF local GRIB use definition identifier */ + /* 1=MARS labelling or ensemble fcst. data */ + Put1Byte(isec1[37]); /* Class */ + Put1Byte(isec1[38]); /* Type */ + Put2Byte(isec1[39]); /* Stream */ + + // Version number or experiment identifier + Put1Byte(((unsigned char*) &isec1[40])[0]); + Put1Byte(((unsigned char*) &isec1[40])[1]); + Put1Byte(((unsigned char*) &isec1[40])[2]); + Put1Byte(((unsigned char*) &isec1[40])[3]); + + Put1Byte(isec1[41]); /* Ensemble forecast number */ + Put1Byte(isec1[42]); /* Total number of forecasts in ensemble */ + Put1Byte(0); /* (Spare) */ + + *zs = z; +} + +static +void encodePDS_MPIM_local_Extension_1(GRIBPACK *lGrib, long *zs, int *isec1) +{ + long z = *zs; + + const long localextlen = getLocalExtLen(isec1); + for (long i = 0; i < localextlen-6; i++) Put1Byte(isec1[24+i]); + /* 6 bytes explicitly encoded below: */ + Put1Byte(isec1[36]); /* MPIM local GRIB use definition identifier */ + /* (extension identifier) */ + Put1Byte(isec1[37]); /* type of ensemble forecast */ + Put2Byte(isec1[38]); /* individual ensemble member */ + Put2Byte(isec1[39]); /* number of forecasts in ensemble */ + + *zs = z; +} + +// GRIB BLOCK 1 - PRODUCT DESCRIPTION SECTION +static +void encodePDS(GRIBPACK *lpds, long pdsLen, int *isec1) +{ + GRIBPACK *lGrib = lpds; + long z = 0; + int ival; + + int century = ISEC1_Century; + int year = ISEC1_Year; + + if ( century < 0 ) + { + century = -century; + year = -year; + } + + Put3Byte(pdsLen); /* 0 Length of Block 1 */ + Put1Byte(ISEC1_CodeTable); /* 3 Local table number */ + Put1Byte(ISEC1_CenterID); /* 4 Identification of centre */ + Put1Byte(ISEC1_ModelID); /* 5 Identification of model */ + Put1Byte(ISEC1_GridDefinition); /* 6 Grid definition */ + Put1Byte(ISEC1_Sec2Or3Flag); /* 7 Block 2 included */ + Put1Byte(ISEC1_Parameter); /* 8 Parameter Code */ + Put1Byte(ISEC1_LevelType); /* 9 Type of level */ + if ( (ISEC1_LevelType != 20) && + (ISEC1_LevelType != GRIB1_LTYPE_99) && + (ISEC1_LevelType != GRIB1_LTYPE_ISOBARIC) && + (ISEC1_LevelType != GRIB1_LTYPE_ISOBARIC_PA) && + (ISEC1_LevelType != GRIB1_LTYPE_ALTITUDE) && + (ISEC1_LevelType != GRIB1_LTYPE_HEIGHT) && + (ISEC1_LevelType != GRIB1_LTYPE_SIGMA) && + (ISEC1_LevelType != GRIB1_LTYPE_HYBRID) && + (ISEC1_LevelType != GRIB1_LTYPE_LANDDEPTH) && + (ISEC1_LevelType != GRIB1_LTYPE_ISENTROPIC) && + (ISEC1_LevelType != 115) && + (ISEC1_LevelType != 117) && + (ISEC1_LevelType != 125) && + (ISEC1_LevelType != 127) && + (ISEC1_LevelType != 160) && + (ISEC1_LevelType != 210) ) + { + Put1Byte(ISEC1_Level1); + Put1Byte(ISEC1_Level2); + } + else + { + Put2Byte(ISEC1_Level1); /* 10 Level */ + } + + Put1Int(year); /* 12 Year of Century */ + Put1Byte(ISEC1_Month); /* 13 Month */ + Put1Byte(ISEC1_Day); /* 14 Day */ + Put1Byte(ISEC1_Hour); /* 15 Hour */ + Put1Byte(ISEC1_Minute); /* 16 Minute */ + + Put1Byte(ISEC1_TimeUnit); /* 17 Time unit */ + if ( ISEC1_TimeRange == 10 ) + { + Put1Byte(ISEC1_TimePeriod1); + Put1Byte(ISEC1_TimePeriod2); + } + else if ( ISEC1_TimeRange == 113 || ISEC1_TimeRange == 0 ) + { + Put1Byte(ISEC1_TimePeriod1); + Put1Byte(0); + } + else if ( ISEC1_TimeRange == 5 || ISEC1_TimeRange == 4 || + ISEC1_TimeRange == 3 || ISEC1_TimeRange == 2 ) + { + Put1Byte(ISEC1_TimePeriod1); + Put1Byte(ISEC1_TimePeriod2); + } + else + { + Put1Byte(0); + Put1Byte(0); + } + Put1Byte(ISEC1_TimeRange); /* 20 Timerange flag */ + Put2Byte(ISEC1_AvgNum); /* 21 Average */ + + Put1Byte(ISEC1_AvgMiss); /* 23 Missing from averages */ + Put1Byte(century); /* 24 Century */ + Put1Byte(ISEC1_SubCenterID); /* 25 Subcenter */ + Put2Int(ISEC1_DecScaleFactor); /* 26 Decimal scale factor */ + + if ( ISEC1_LocalFLag ) + { + if ( ISEC1_CenterID == 78 || ISEC1_CenterID == 215 || ISEC1_CenterID == 250 ) + { + if ( isec1[36] == 254 ) encodePDS_DWD_local_Extension_254(lGrib, &z, isec1); + else if ( isec1[36] == 253 ) encodePDS_DWD_local_Extension_253(lGrib, &z, isec1); + } + else if ( ISEC1_CenterID == 98 ) + { + if ( isec1[36] == 1 ) encodePDS_ECMWF_local_Extension_1(lGrib, &z, isec1); + } + else if ( ISEC1_CenterID == 252 ) + { + if ( isec1[36] == 1 ) encodePDS_MPIM_local_Extension_1(lGrib, &z, isec1); + } + else + { + const long localextlen = getLocalExtLen(isec1); + for (long i = 0; i < localextlen; i++) Put1Byte(isec1[24+i]); + } + } +} + + + + +#ifdef T +#undef T +#endif +#define T double +#ifdef T + + +#define CGRIBEX_FPSCALE(data) (((data) - zref) * factor + 0.5) + +static +void TEMPLATE(encode_array_common,T)(int numBits, size_t packStart, size_t datasize, GRIBPACK *lGrib, + const T *data, T zref, T factor, size_t *gz) +{ + size_t z = *gz; + unsigned int ival; + int cbits, jbits; + unsigned int c; + + // code from gribw routine flist2bitstream + + cbits = 8; + c = 0; + for (size_t i = packStart; i < datasize; ++i) + { + // note float -> unsigned int .. truncate + ival = (unsigned int)(CGRIBEX_FPSCALE(data[i])); + /* + if ( ival > max_nbpv_pow2 ) ival = max_nbpv_pow2; + if ( ival < 0 ) ival = 0; + */ + jbits = numBits; + while ( cbits <= jbits ) + { + if ( cbits == 8 ) + { + jbits -= 8; + lGrib[z++] = (ival >> jbits) & 0xFF; + } + else + { + jbits -= cbits; + lGrib[z++] = (GRIBPACK)((c << cbits) + + ((ival >> jbits) & ((1U << cbits) - 1))); + cbits = 8; + c = 0; + } + } + /* now jbits < cbits */ + if ( jbits ) + { + c = (c << jbits) + (ival & ((1U << jbits)-1)); + cbits -= jbits; + } + } + if ( cbits != 8 ) lGrib[z++] = (GRIBPACK)(c << cbits); + + *gz = z; +} + + +static +void TEMPLATE(encode_array_2byte,T)(size_t datasize, GRIBPACK *restrict lGrib, + const T *restrict data, T zref, T factor, size_t *gz) +{ + uint16_t *restrict sgrib = (uint16_t *)(void *)(lGrib+*gz); + + if (IS_BIGENDIAN()) + { + for (size_t i = 0; i < datasize; ++i) + sgrib[i] = (uint16_t) CGRIBEX_FPSCALE(data[i]); + } + else + { + for (size_t i = 0; i < datasize; ++i) + { + uint16_t ui16 = (uint16_t) CGRIBEX_FPSCALE(data[i]); + sgrib[i] = gribSwapByteOrder_uint16(ui16); + } + } + + *gz += 2*datasize; +} + +static +void TEMPLATE(encode_array,T)(int numBits, size_t packStart, size_t datasize, + GRIBPACK *restrict lGrib, + const T *restrict data, + T zref, T factor, size_t *gz) +{ + size_t z = *gz; + + data += packStart; + datasize -= packStart; + + if (numBits == 8) + { + for (size_t i = 0; i < datasize; ++i) + { + lGrib[z++] = (GRIBPACK) CGRIBEX_FPSCALE(data[i]); + } + } + else if (numBits == 16) + { + if (sizeof(T) == sizeof(double)) + { + grib_encode_array_2byte_double(datasize, lGrib, (const double *)(const void *)data, zref, factor, &z); + } + else + { + TEMPLATE(encode_array_2byte,T)(datasize, lGrib, data, zref, factor, &z); + } + } + else if (numBits == 24) + { + for (size_t i = 0; i < datasize; ++i) + { + uint32_t ui32 = (uint32_t) CGRIBEX_FPSCALE(data[i]); + lGrib[z++] = (GRIBPACK)(ui32 >> 16); + lGrib[z++] = (GRIBPACK)(ui32 >> 8); + lGrib[z++] = (GRIBPACK)ui32; + } + } + else if (numBits == 32) + { + for (size_t i = 0; i < datasize; ++i) + { + uint32_t ui32 = (uint32_t) CGRIBEX_FPSCALE(data[i]); + lGrib[z++] = (GRIBPACK)(ui32 >> 24); + lGrib[z++] = (GRIBPACK)(ui32 >> 16); + lGrib[z++] = (GRIBPACK)(ui32 >> 8); + lGrib[z++] = (GRIBPACK)ui32; + } + } + else if (numBits > 0 && numBits <= 32) + { + TEMPLATE(encode_array_common,T)(numBits, 0, datasize, lGrib, data, zref, factor, &z); + } + else if (numBits == 0) + { + } + else + { + Error("Unimplemented packing factor %d!", numBits); + } + + *gz = z; +} + +static +void TEMPLATE(encode_array_unrolled,T)(int numBits, size_t packStart, size_t datasize, + GRIBPACK *restrict lGrib, + const T *restrict data, + T zref, T factor, size_t *gz) +{ + size_t z = *gz; +#ifdef _ARCH_PWR6 + enum { CGRIBEX__UNROLL_DEPTH_2 = 8 }; +#else + enum { CGRIBEX__UNROLL_DEPTH_2 = 128 }; +#endif + size_t residual; + size_t ofs; + double dval[CGRIBEX__UNROLL_DEPTH_2]; + + data += packStart; + datasize -= packStart; + residual = datasize % CGRIBEX__UNROLL_DEPTH_2; + ofs = datasize - residual; + + // reducing FP operations to single FMA is slowing down on pwr6 ... + + if ( numBits == 8 ) + { +#ifdef _GET_IBM_COUNTER + hpmStart(2, "pack 8 bit unrolled"); +#endif + unsigned char *cgrib = (unsigned char *) (lGrib + z); + size_t i; + for (i = 0; i < datasize - residual; i += CGRIBEX__UNROLL_DEPTH_2) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[i+j]); + } + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { +#ifdef _ARCH_PWR6 + *cgrib++ = (unsigned long) dval[j]; +#else + *cgrib++ = (unsigned char) dval[j]; +#endif + } + z += CGRIBEX__UNROLL_DEPTH_2; + } + for (size_t j = 0; j < residual; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[i+j]); + } + for (size_t j = 0; j < residual; ++j) + { +#ifdef _ARCH_PWR6 + *cgrib++ = (unsigned long) dval[j]; +#else + *cgrib++ = (unsigned char) dval[j]; +#endif + } + z += residual; + +#ifdef _GET_IBM_COUNTER + hpmStop(2); +#endif + } + else if ( numBits == 16 ) + { +#ifdef _GET_IBM_COUNTER + hpmStart(3, "pack 16 bit unrolled"); +#endif +#ifdef _ARCH_PWR6 + unsigned long ival; +#else + uint16_t ival; +#endif + uint16_t *sgrib = (uint16_t *)(void *)(lGrib+z); + + for (size_t i = 0; i < datasize - residual; i += CGRIBEX__UNROLL_DEPTH_2) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + dval[j] = CGRIBEX_FPSCALE(data[j]); + if ( IS_BIGENDIAN() ) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { +#ifdef _ARCH_PWR6 + *sgrib++ = (unsigned long) dval[j]; +#else + *sgrib++ = (uint16_t) dval[j]; +#endif + } + z += 2*CGRIBEX__UNROLL_DEPTH_2; + } + else + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { + ival = (uint16_t) dval[j]; + *sgrib++ = gribSwapByteOrder_uint16(ival); + } + z += 2*CGRIBEX__UNROLL_DEPTH_2; + } + } + for (size_t j = 0; j < residual; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[j]); + } + if ( IS_BIGENDIAN() ) + { + for (size_t j = 0; j < residual; ++j) + { +#ifdef _ARCH_PWR6 + *sgrib++ = (unsigned long) dval[j]; +#else + *sgrib++ = (uint16_t) dval[j]; +#endif + } + z += 2*residual; + } + else + { + for (size_t j = 0; j < residual; ++j) + { + ival = (uint16_t) dval[j]; + lGrib[z ] = (GRIBPACK)(ival >> 8); + lGrib[z+1] = (GRIBPACK)ival; + z += 2; + } + } +#ifdef _GET_IBM_COUNTER + hpmStop(3); +#endif + } + else if ( numBits == 24 ) + { +#ifdef _GET_IBM_COUNTER + hpmStart(4, "pack 24 bit unrolled"); +#endif +#ifdef _ARCH_PWR6 + unsigned long ival; +#else + uint32_t ival; +#endif + for (size_t i = 0; i < datasize - residual; i += CGRIBEX__UNROLL_DEPTH_2) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[j]); + } + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { +#ifdef _ARCH_PWR6 + ival = (unsigned long) dval[j]; +#else + ival = (uint32_t) dval[j]; +#endif + lGrib[z ] = (GRIBPACK)(ival >> 16); + lGrib[z+1] = (GRIBPACK)(ival >> 8); + lGrib[z+2] = (GRIBPACK)ival; + z += 3; + } + } + for (size_t j = 0; j < residual; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[j]); + } + for (size_t j = 0; j < residual; ++j) + { + ival = (uint32_t) dval[j]; + lGrib[z ] = (GRIBPACK)(ival >> 16); + lGrib[z+1] = (GRIBPACK)(ival >> 8); + lGrib[z+2] = (GRIBPACK)ival; + z += 3; + } +#ifdef _GET_IBM_COUNTER + hpmStop(4); +#endif + } + else if ( numBits == 32 ) + { +#ifdef _GET_IBM_COUNTER + hpmStart(5, "pack 32 bit unrolled"); +#endif +#ifdef _ARCH_PWR6 + unsigned long ival; +#else + uint32_t ival; +#endif + unsigned int *igrib = (unsigned int *)(void *)(lGrib + z); + for (size_t i = 0; i < datasize - residual; i += CGRIBEX__UNROLL_DEPTH_2) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) dval[j] = CGRIBEX_FPSCALE(data[i+j]); + + if ( IS_BIGENDIAN() ) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { +#ifdef _ARCH_PWR6 + *igrib = (unsigned long) dval[j]; +#else + *igrib = (uint32_t) dval[j]; +#endif + igrib++; + z += 4; + } + } + else + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { + ival = (uint32_t) dval[j]; + lGrib[z ] = (GRIBPACK)(ival >> 24); + lGrib[z+1] = (GRIBPACK)(ival >> 16); + lGrib[z+2] = (GRIBPACK)(ival >> 8); + lGrib[z+3] = (GRIBPACK)ival; + z += 4; + } + } + } + for (size_t j = 0; j < residual; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[ofs+j]); + } + if ( IS_BIGENDIAN() ) + { + for (size_t j = 0; j < residual; ++j) + { +#ifdef _ARCH_PWR6 + *igrib = (unsigned long) dval[j]; +#else + *igrib = (uint32_t) dval[j]; +#endif + igrib++; + z += 4; + } + } + else + { + for (size_t j = 0; j < residual; ++j) + { + ival = (uint32_t) dval[j]; + lGrib[z ] = (GRIBPACK)(ival >> 24); + lGrib[z+1] = (GRIBPACK)(ival >> 16); + lGrib[z+2] = (GRIBPACK)(ival >> 8); + lGrib[z+3] = (GRIBPACK)ival; + z += 4; + } + } +#ifdef _GET_IBM_COUNTER + hpmStop(5); +#endif + } + else if ( numBits > 0 && numBits <= 32 ) + { + TEMPLATE(encode_array_common,T)(numBits, 0, datasize, lGrib, data, zref, factor, &z); + } + else if ( numBits == 0 ) + { + } + else + { + Error("Unimplemented packing factor %d!", numBits); + } + + *gz = z; +} + +#ifdef CGRIBEX_FPSCALE +#undef CGRIBEX_FPSCALE +#endif + +#endif /* T */ + +#ifdef T +#undef T +#endif +#define T float +#ifdef T + + +#define CGRIBEX_FPSCALE(data) (((data) - zref) * factor + 0.5) + +static +void TEMPLATE(encode_array_common,T)(int numBits, size_t packStart, size_t datasize, GRIBPACK *lGrib, + const T *data, T zref, T factor, size_t *gz) +{ + size_t z = *gz; + unsigned int ival; + int cbits, jbits; + unsigned int c; + + // code from gribw routine flist2bitstream + + cbits = 8; + c = 0; + for (size_t i = packStart; i < datasize; ++i) + { + // note float -> unsigned int .. truncate + ival = (unsigned int)(CGRIBEX_FPSCALE(data[i])); + /* + if ( ival > max_nbpv_pow2 ) ival = max_nbpv_pow2; + if ( ival < 0 ) ival = 0; + */ + jbits = numBits; + while ( cbits <= jbits ) + { + if ( cbits == 8 ) + { + jbits -= 8; + lGrib[z++] = (ival >> jbits) & 0xFF; + } + else + { + jbits -= cbits; + lGrib[z++] = (GRIBPACK)((c << cbits) + + ((ival >> jbits) & ((1U << cbits) - 1))); + cbits = 8; + c = 0; + } + } + /* now jbits < cbits */ + if ( jbits ) + { + c = (c << jbits) + (ival & ((1U << jbits)-1)); + cbits -= jbits; + } + } + if ( cbits != 8 ) lGrib[z++] = (GRIBPACK)(c << cbits); + + *gz = z; +} + + +static +void TEMPLATE(encode_array_2byte,T)(size_t datasize, GRIBPACK *restrict lGrib, + const T *restrict data, T zref, T factor, size_t *gz) +{ + uint16_t *restrict sgrib = (uint16_t *)(void *)(lGrib+*gz); + + if (IS_BIGENDIAN()) + { + for (size_t i = 0; i < datasize; ++i) + sgrib[i] = (uint16_t) CGRIBEX_FPSCALE(data[i]); + } + else + { + for (size_t i = 0; i < datasize; ++i) + { + uint16_t ui16 = (uint16_t) CGRIBEX_FPSCALE(data[i]); + sgrib[i] = gribSwapByteOrder_uint16(ui16); + } + } + + *gz += 2*datasize; +} + +static +void TEMPLATE(encode_array,T)(int numBits, size_t packStart, size_t datasize, + GRIBPACK *restrict lGrib, + const T *restrict data, + T zref, T factor, size_t *gz) +{ + size_t z = *gz; + + data += packStart; + datasize -= packStart; + + if (numBits == 8) + { + for (size_t i = 0; i < datasize; ++i) + { + lGrib[z++] = (GRIBPACK) CGRIBEX_FPSCALE(data[i]); + } + } + else if (numBits == 16) + { + if (sizeof(T) == sizeof(double)) + { + grib_encode_array_2byte_double(datasize, lGrib, (const double *)(const void *)data, zref, factor, &z); + } + else + { + TEMPLATE(encode_array_2byte,T)(datasize, lGrib, data, zref, factor, &z); + } + } + else if (numBits == 24) + { + for (size_t i = 0; i < datasize; ++i) + { + uint32_t ui32 = (uint32_t) CGRIBEX_FPSCALE(data[i]); + lGrib[z++] = (GRIBPACK)(ui32 >> 16); + lGrib[z++] = (GRIBPACK)(ui32 >> 8); + lGrib[z++] = (GRIBPACK)ui32; + } + } + else if (numBits == 32) + { + for (size_t i = 0; i < datasize; ++i) + { + uint32_t ui32 = (uint32_t) CGRIBEX_FPSCALE(data[i]); + lGrib[z++] = (GRIBPACK)(ui32 >> 24); + lGrib[z++] = (GRIBPACK)(ui32 >> 16); + lGrib[z++] = (GRIBPACK)(ui32 >> 8); + lGrib[z++] = (GRIBPACK)ui32; + } + } + else if (numBits > 0 && numBits <= 32) + { + TEMPLATE(encode_array_common,T)(numBits, 0, datasize, lGrib, data, zref, factor, &z); + } + else if (numBits == 0) + { + } + else + { + Error("Unimplemented packing factor %d!", numBits); + } + + *gz = z; +} + +static +void TEMPLATE(encode_array_unrolled,T)(int numBits, size_t packStart, size_t datasize, + GRIBPACK *restrict lGrib, + const T *restrict data, + T zref, T factor, size_t *gz) +{ + size_t z = *gz; +#ifdef _ARCH_PWR6 + enum { CGRIBEX__UNROLL_DEPTH_2 = 8 }; +#else + enum { CGRIBEX__UNROLL_DEPTH_2 = 128 }; +#endif + size_t residual; + size_t ofs; + double dval[CGRIBEX__UNROLL_DEPTH_2]; + + data += packStart; + datasize -= packStart; + residual = datasize % CGRIBEX__UNROLL_DEPTH_2; + ofs = datasize - residual; + + // reducing FP operations to single FMA is slowing down on pwr6 ... + + if ( numBits == 8 ) + { +#ifdef _GET_IBM_COUNTER + hpmStart(2, "pack 8 bit unrolled"); +#endif + unsigned char *cgrib = (unsigned char *) (lGrib + z); + size_t i; + for (i = 0; i < datasize - residual; i += CGRIBEX__UNROLL_DEPTH_2) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[i+j]); + } + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { +#ifdef _ARCH_PWR6 + *cgrib++ = (unsigned long) dval[j]; +#else + *cgrib++ = (unsigned char) dval[j]; +#endif + } + z += CGRIBEX__UNROLL_DEPTH_2; + } + for (size_t j = 0; j < residual; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[i+j]); + } + for (size_t j = 0; j < residual; ++j) + { +#ifdef _ARCH_PWR6 + *cgrib++ = (unsigned long) dval[j]; +#else + *cgrib++ = (unsigned char) dval[j]; +#endif + } + z += residual; + +#ifdef _GET_IBM_COUNTER + hpmStop(2); +#endif + } + else if ( numBits == 16 ) + { +#ifdef _GET_IBM_COUNTER + hpmStart(3, "pack 16 bit unrolled"); +#endif +#ifdef _ARCH_PWR6 + unsigned long ival; +#else + uint16_t ival; +#endif + uint16_t *sgrib = (uint16_t *)(void *)(lGrib+z); + + for (size_t i = 0; i < datasize - residual; i += CGRIBEX__UNROLL_DEPTH_2) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + dval[j] = CGRIBEX_FPSCALE(data[j]); + if ( IS_BIGENDIAN() ) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { +#ifdef _ARCH_PWR6 + *sgrib++ = (unsigned long) dval[j]; +#else + *sgrib++ = (uint16_t) dval[j]; +#endif + } + z += 2*CGRIBEX__UNROLL_DEPTH_2; + } + else + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { + ival = (uint16_t) dval[j]; + *sgrib++ = gribSwapByteOrder_uint16(ival); + } + z += 2*CGRIBEX__UNROLL_DEPTH_2; + } + } + for (size_t j = 0; j < residual; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[j]); + } + if ( IS_BIGENDIAN() ) + { + for (size_t j = 0; j < residual; ++j) + { +#ifdef _ARCH_PWR6 + *sgrib++ = (unsigned long) dval[j]; +#else + *sgrib++ = (uint16_t) dval[j]; +#endif + } + z += 2*residual; + } + else + { + for (size_t j = 0; j < residual; ++j) + { + ival = (uint16_t) dval[j]; + lGrib[z ] = (GRIBPACK)(ival >> 8); + lGrib[z+1] = (GRIBPACK)ival; + z += 2; + } + } +#ifdef _GET_IBM_COUNTER + hpmStop(3); +#endif + } + else if ( numBits == 24 ) + { +#ifdef _GET_IBM_COUNTER + hpmStart(4, "pack 24 bit unrolled"); +#endif +#ifdef _ARCH_PWR6 + unsigned long ival; +#else + uint32_t ival; +#endif + for (size_t i = 0; i < datasize - residual; i += CGRIBEX__UNROLL_DEPTH_2) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[j]); + } + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { +#ifdef _ARCH_PWR6 + ival = (unsigned long) dval[j]; +#else + ival = (uint32_t) dval[j]; +#endif + lGrib[z ] = (GRIBPACK)(ival >> 16); + lGrib[z+1] = (GRIBPACK)(ival >> 8); + lGrib[z+2] = (GRIBPACK)ival; + z += 3; + } + } + for (size_t j = 0; j < residual; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[j]); + } + for (size_t j = 0; j < residual; ++j) + { + ival = (uint32_t) dval[j]; + lGrib[z ] = (GRIBPACK)(ival >> 16); + lGrib[z+1] = (GRIBPACK)(ival >> 8); + lGrib[z+2] = (GRIBPACK)ival; + z += 3; + } +#ifdef _GET_IBM_COUNTER + hpmStop(4); +#endif + } + else if ( numBits == 32 ) + { +#ifdef _GET_IBM_COUNTER + hpmStart(5, "pack 32 bit unrolled"); +#endif +#ifdef _ARCH_PWR6 + unsigned long ival; +#else + uint32_t ival; +#endif + unsigned int *igrib = (unsigned int *)(void *)(lGrib + z); + for (size_t i = 0; i < datasize - residual; i += CGRIBEX__UNROLL_DEPTH_2) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) dval[j] = CGRIBEX_FPSCALE(data[i+j]); + + if ( IS_BIGENDIAN() ) + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { +#ifdef _ARCH_PWR6 + *igrib = (unsigned long) dval[j]; +#else + *igrib = (uint32_t) dval[j]; +#endif + igrib++; + z += 4; + } + } + else + { + for (size_t j = 0; j < CGRIBEX__UNROLL_DEPTH_2; ++j) + { + ival = (uint32_t) dval[j]; + lGrib[z ] = (GRIBPACK)(ival >> 24); + lGrib[z+1] = (GRIBPACK)(ival >> 16); + lGrib[z+2] = (GRIBPACK)(ival >> 8); + lGrib[z+3] = (GRIBPACK)ival; + z += 4; + } + } + } + for (size_t j = 0; j < residual; ++j) + { + dval[j] = CGRIBEX_FPSCALE(data[ofs+j]); + } + if ( IS_BIGENDIAN() ) + { + for (size_t j = 0; j < residual; ++j) + { +#ifdef _ARCH_PWR6 + *igrib = (unsigned long) dval[j]; +#else + *igrib = (uint32_t) dval[j]; +#endif + igrib++; + z += 4; + } + } + else + { + for (size_t j = 0; j < residual; ++j) + { + ival = (uint32_t) dval[j]; + lGrib[z ] = (GRIBPACK)(ival >> 24); + lGrib[z+1] = (GRIBPACK)(ival >> 16); + lGrib[z+2] = (GRIBPACK)(ival >> 8); + lGrib[z+3] = (GRIBPACK)ival; + z += 4; + } + } +#ifdef _GET_IBM_COUNTER + hpmStop(5); +#endif + } + else if ( numBits > 0 && numBits <= 32 ) + { + TEMPLATE(encode_array_common,T)(numBits, 0, datasize, lGrib, data, zref, factor, &z); + } + else if ( numBits == 0 ) + { + } + else + { + Error("Unimplemented packing factor %d!", numBits); + } + + *gz = z; +} + +#ifdef CGRIBEX_FPSCALE +#undef CGRIBEX_FPSCALE +#endif + +#endif /* T */ + + +#ifdef T +#undef T +#endif +#define T double +#ifdef T + +// GRIB BLOCK 2 - GRID DESCRIPTION SECTION +static +void TEMPLATE(encodeGDS,T)(GRIBPACK *lGrib, long *gribLen, int *isec2, T *fsec2) +{ + long z = *gribLen; + int exponent, mantissa; + int ival; + int gdslen = 32; + + if ( ISEC2_GridType == GRIB1_GTYPE_LCC ) gdslen += 10; + + if ( ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) gdslen += 10; + + const int pvoffset = (ISEC2_NumVCP || ISEC2_Reduced) ? gdslen + 1 : 0xFF; + + if ( ISEC2_Reduced ) gdslen += 2 * ISEC2_NumLat; + + gdslen += ISEC2_NumVCP * 4; + + Put3Byte(gdslen); /* 0- 2 Length of Block 2 Byte 0 */ + Put1Byte(ISEC2_NumVCP); /* 3 NV */ + Put1Byte(pvoffset); /* 4 PV */ + Put1Byte(ISEC2_GridType); /* 5 LatLon=0 Gauss=4 Spectral=50 */ + + if ( ISEC2_GridType == GRIB1_GTYPE_SPECTRAL ) + { + Put2Byte(ISEC2_PentaJ); /* 6- 7 Pentagonal resolution J */ + Put2Byte(ISEC2_PentaK); /* 8- 9 Pentagonal resolution K */ + Put2Byte(ISEC2_PentaM); /* 10-11 Pentagonal resolution M */ + Put1Byte(ISEC2_RepType); /* 12 Representation type */ + Put1Byte(ISEC2_RepMode); /* 13 Representation mode */ + PutnZero(18); /* 14-31 reserved */ + } + else if ( ISEC2_GridType == GRIB1_GTYPE_GME ) + { + Put2Byte(ISEC2_GME_NI2); + Put2Byte(ISEC2_GME_NI3); + Put3Byte(ISEC2_GME_ND); + Put3Byte(ISEC2_GME_NI); + Put1Byte(ISEC2_GME_AFlag); + Put3Int(ISEC2_GME_LatPP); + Put3Int(ISEC2_GME_LonPP); + Put3Int(ISEC2_GME_LonMPL); + Put1Byte(ISEC2_GME_BFlag); + PutnZero(5); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_LCC ) + { + Put2Byte(ISEC2_NumLon); /* 6- 7 Longitudes */ + + Put2Byte(ISEC2_NumLat); /* 8- 9 Latitudes */ + Put3Int(ISEC2_FirstLat); + Put3Int(ISEC2_FirstLon); + Put1Byte(ISEC2_ResFlag); /* 16 Resolution flag */ + Put3Int(ISEC2_Lambert_Lov); /* 17-19 */ + Put3Int(ISEC2_Lambert_dx); /* 20-22 */ + Put3Int(ISEC2_Lambert_dy); /* 23-25 */ + Put1Byte(ISEC2_Lambert_ProjFlag);/* 26 Projection flag */ + Put1Byte(ISEC2_ScanFlag); /* 27 Scanning mode */ + Put3Int(ISEC2_Lambert_LatS1); /* 28-30 */ + Put3Int(ISEC2_Lambert_LatS2); /* 31-33 */ + Put3Int(ISEC2_Lambert_LatSP); /* 34-36 */ + Put3Int(ISEC2_Lambert_LonSP); /* 37-39 */ + PutnZero(2); /* 34-41 */ + } + else if ( ISEC2_GridType == GRIB1_GTYPE_LATLON || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN || + ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) + { + const int numlon = ISEC2_Reduced ? 0xFFFF : ISEC2_NumLon; + Put2Byte(numlon); /* 6- 7 Number of Longitudes */ + + Put2Byte(ISEC2_NumLat); /* 8- 9 Number of Latitudes */ + Put3Int(ISEC2_FirstLat); + Put3Int(ISEC2_FirstLon); + Put1Byte(ISEC2_ResFlag); /* 16 Resolution flag */ + Put3Int(ISEC2_LastLat); + Put3Int(ISEC2_LastLon); + const unsigned lonIncr = (ISEC2_ResFlag == 0) ? 0xFFFF : (unsigned)ISEC2_LonIncr; + const unsigned latIncr = (ISEC2_ResFlag == 0) ? 0xFFFF : (unsigned)ISEC2_LatIncr; + Put2Byte(lonIncr); /* 23-24 i - direction increment */ + if ( ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN ) + Put2Byte(ISEC2_NumPar); /* 25-26 Latitudes Pole->Equator */ + else + Put2Byte(latIncr); /* 25-26 j - direction increment */ + + Put1Byte(ISEC2_ScanFlag); /* 27 Scanning mode */ + PutnZero(4); /* 28-31 reserved */ + + if ( ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) + { + Put3Int(ISEC2_LatSP); + Put3Int(ISEC2_LonSP); + Put1Real((double)(FSEC2_RotAngle)); + } + } + else + { + Error("Unsupported grid type %d", ISEC2_GridType); + } + +#if defined (SX) +#pragma vdir novector /* vectorization gives wrong results on NEC */ +#endif + for (long i = 0; i < ISEC2_NumVCP; ++i) + { + Put1Real((double)(fsec2[10+i])); + } + + if ( ISEC2_Reduced ) + for (long i = 0; i < ISEC2_NumLat; ++i) Put2Byte(ISEC2_ReducedPoints(i)); + + *gribLen = z; +} + +// GRIB BLOCK 3 - BIT MAP SECTION +static +void TEMPLATE(encodeBMS,T)(GRIBPACK *lGrib, long *gribLen, T *fsec3, int *isec4, T *data, long *datasize) +{ + long z = *gribLen; + static bool lmissvalinfo = true; + // unsigned int c, imask; + + if ( DBL_IS_NAN(FSEC3_MissVal) && lmissvalinfo) + { + lmissvalinfo = false; + Message("Missing value = NaN is unsupported!"); + } + + const long bitmapSize = ISEC4_NumValues; + const long imaskSize = ((bitmapSize+7)>>3)<<3; + GRIBPACK *bitmap = &lGrib[z+6]; + long fsec4size = 0; + +#ifdef VECTORCODE + unsigned int *imask = (unsigned int*) Malloc(imaskSize*sizeof(unsigned int)); + memset(imask, 0, imaskSize*sizeof(int)); + +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (long i = 0; i < bitmapSize; ++i) + { + if ( IS_NOT_EQUAL(data[i], FSEC3_MissVal) ) + { + data[fsec4size++] = data[i]; + imask[i] = 1; + } + } + +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (long i = 0; i < imaskSize/8; ++i) + { + bitmap[i] = (imask[i*8+0] << 7) | (imask[i*8+1] << 6) | + (imask[i*8+2] << 5) | (imask[i*8+3] << 4) | + (imask[i*8+4] << 3) | (imask[i*8+5] << 2) | + (imask[i*8+6] << 1) | (imask[i*8+7]); + } + + Free(imask); +#else + for (long i = 0; i < imaskSize/8; ++i) bitmap[i] = 0; + + for (long i = 0; i < bitmapSize; ++i) + { + if ( IS_NOT_EQUAL(data[i], FSEC3_MissVal) ) + { + data[fsec4size++] = data[i]; + bitmap[i/8] |= (GRIBPACK)(1<<(7-(i&7))); + } + } +#endif + + const long bmsLen = imaskSize/8 + 6; + const long bmsUnusedBits = imaskSize - bitmapSize; + + Put3Byte(bmsLen); /* 0- 2 Length of Block 3 Byte 0 */ + Put1Byte(bmsUnusedBits); + Put2Byte(0); + + *gribLen += bmsLen; + + *datasize = fsec4size; +} + +#define pow_double pow +#define pow_float powf + +// GRIB BLOCK 4 - BINARY DATA SECTION +static +int TEMPLATE(encodeBDS,T)(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *isec4, long datasize, T *data, + long *datstart, long *datsize, int code) +{ + // Uwe Schulzweida, 11/04/2003 : Check that number of bits per value is not exceeded + // Uwe Schulzweida, 6/05/2003 : Copy result to fpval to prevent integer overflow + + size_t z = (size_t)*gribLen; + int numBits; + int ival; + long PackStart = 0; + int Flag = 0; + int binscale = 0; + int bds_head = 11; + int bds_ext = 0; + /* ibits = BitsPerInt; */ + int exponent, mantissa; + bool lspherc = false; + int isubset = 0, itemp = 0, itrunc = 0; + T factor = 1, fmin, fmax; + const double jpepsln = 1.0e-12; // -----> tolerance used to check equality + // of floating point numbers - needed + // on some platforms (eg vpp700, linux) + extern int CGRIBEX_Const; // 1: Don't pack constant fields on regular grids + + if ( isec2 ) + { + /* If section 2 is present, it says if data is spherical harmonic */ + + lspherc = ( isec2[0] == 50 || isec2[0] == 60 || + isec2[0] == 70 || isec2[0] == 80 ); + + isec4[2] = lspherc ? 128 : 0; + } + else + { + /* Section 4 says if it's spherical harmonic data.. */ + + lspherc = ( isec4[2] == 128 ); + } + + /* Complex packing supported for spherical harmonics. */ + + const bool lcomplex = ( lspherc && ( isec4[3] == 64 ) ) || + ( lspherc && isec2 && ( isec2[5] == 2 ) ); + + // Check input specification is consistent + + if ( lcomplex && isec2 ) + { + if ( ( isec4[3] != 64 ) && ( isec2[5] == 2 ) ) + { + gprintf(__func__, " COMPLEX mismatch. isec4[3] = %d\n", isec4[3]); + gprintf(__func__, " COMPLEX mismatch. isec2[5] = %d\n", isec2[5]); + return (807); + } + else if ( ( isec4[3] == 64 ) && ( isec2[5] != 2 ) ) + { + gprintf(__func__, " COMPLEX mismatch. isec4[3] = %d\n", isec4[3]); + gprintf(__func__, " COMPLEX mismatch. isec2[5] = %d\n", isec2[5]); + return (807); + } + else if ( lcomplex ) + { + // Truncation of full spectrum, which is supposed triangular, has to be diagnosed. Define also sub-set truncation. + isubset = isec4[17]; + // When encoding, use the total number of data. + itemp = isec4[0]; + itrunc = (int) (sqrt(itemp*4 + 1.) - 3) / 2; + } + } + + if ( decscale ) + { + const T scale = TEMPLATE(pow,T)((T)10.0, (T)decscale); + for (long i = 0; i < datasize; ++i) data[i] *= scale; + } + + if ( lspherc ) + { + if ( lcomplex ) + { + const int jup = isubset; + const int ioff = (jup+1)*(jup+2); + bds_ext = 4 + 3 + 4*ioff; + PackStart = ioff; + Flag = 192; + } + else + { + bds_ext = 4; + PackStart = 1; + Flag = 128; + } + } + + *datstart = bds_head + bds_ext; + + int nbpv = numBits = ISEC4_NumBits; + + if ( lspherc && lcomplex ) + { + const int pcStart = isubset; + const int pcScale = isec4[16]; + TEMPLATE(scale_complex,T)(data, pcStart, pcScale, itrunc, 0); + TEMPLATE(gather_complex,T)(data, (size_t)pcStart, (size_t)itrunc, (size_t)datasize); + } + + fmin = fmax = data[PackStart]; + + TEMPLATE(minmax_val,T)(data+PackStart, datasize-PackStart, &fmin, &fmax); + + double zref = (double)fmin; + if (!(zref < DBL_MAX && zref > -DBL_MAX)) + { + gprintf(__func__, "Minimum value out of range: %g!", zref); + return (707); + } + + if ( CGRIBEX_Const && !lspherc ) + { + if ( IS_EQUAL(fmin, fmax) ) nbpv = 0; + } + + long blockLength = (*datstart) + (nbpv*(datasize - PackStart) + 7)/8; + blockLength += blockLength & 1; + + const long unused_bits = blockLength*8 - (*datstart)*8 - nbpv*(datasize - PackStart); + + Flag += unused_bits; + + + // Adjust number of bits per value if full integer length to avoid hitting most significant bit (sign bit). + // if( nbpv == ibits ) nbpv = nbpv - 1; + /* + Calculate the binary scaling factor to spread the range of values over the number of bits per value. + Limit scaling to 2**-126 to 2**127 (using IEEE 32-bit floatsas a guideline). + */ + const double range = fabs(fmax - fmin); + + if ( fabs(fmin) < FLT_MIN ) fmin = 0; + /* + Have to allow tolerance in comparisons on some platforms (eg vpp700 and linux), + such as 0.9999999999999999 = 1.0, to avoid clipping ranges which are a power of 2. + */ + if ( range <= jpepsln ) + { + binscale = 0; + } + else if ( IS_NOT_EQUAL(fmin, 0.0) && (fabs(range/fmin) <= jpepsln) ) + { + binscale = 0; + } + else if ( fabs(range-1.0) <= jpepsln ) + { + binscale = 1 - nbpv; + } + else if ( range > 1.0 ) + { + const double rangec = range + jpepsln; + double p2 = 2.0; + int jloop = 1; + while ( jloop < 128 && p2 <= rangec ) + { + p2 *= 2.0; + ++jloop; + } + if (jloop < 128) + binscale = jloop - nbpv; + else + { + gprintf(__func__, "Problem calculating binary scale value for encode code %d!", code); + gprintf(__func__, "> range %g rangec %g fmin %g fmax %g", range, rangec, fmin, fmax); + return (707); + } + } + else + { + const double rangec = range - jpepsln; + double p05 = 0.5; + int jloop = 1; + while ( jloop < 127 && p05 >= rangec ) + { + p05 *= 0.5; + jloop++; + } + if ( jloop < 127 ) + { + binscale = 1 - jloop - nbpv; + } + else + { + gprintf(__func__, "Problem calculating binary scale value for encode code %d!", code); + gprintf(__func__, "< range %g rangec %g fmin %g fmax %g", range, rangec, fmin, fmax); + return (707); + } + } + + const uint64_t max_nbpv_pow2 = (uint64_t) ((1ULL << nbpv) - 1); + + if ( binscale != 0 ) + { + while ( (uint64_t)(ldexp(range, -binscale)+0.5) > max_nbpv_pow2 ) binscale++; + + factor = (T)intpow2(-binscale); + } + + ref2ibm(&zref, BitsPerInt); + + Put3Byte(blockLength); // 0-2 Length of Block 4 + Put1Byte(Flag); // 3 Flag & Unused bits + if ( binscale < 0 ) binscale = 32768 - binscale; + Put2Byte(binscale); // 4-5 Scale factor + Put1Real(zref); // 6-9 Reference value + Put1Byte(nbpv); // 10 Packing size + + if ( lspherc ) + { + if ( lcomplex ) + { + const int jup = isubset; + int ioff = (int)z + bds_ext; + if ( ioff > 0xFFFF ) ioff = 0; + Put2Byte(ioff); + Put2Int(isec4[16]); + Put1Byte(jup); + Put1Byte(jup); + Put1Byte(jup); + for (long i = 0; i < ((jup+1)*(jup+2)); ++i) Put1Real((double)(data[i])); + } + else + { + Put1Real((double)(data[0])); + } + } + + *datsize = ((datasize-PackStart)*nbpv + 7)/8; + +#if defined (_ARCH_PWR6) + TEMPLATE(encode_array_unrolled,T)(nbpv, (size_t)PackStart, (size_t)datasize, lGrib, data, (T)zref, factor, &z); +#else + TEMPLATE(encode_array,T)(nbpv, (size_t)PackStart, (size_t)datasize, lGrib, data, (T)zref, factor, &z); +#endif + + if ( unused_bits >= 8 ) Put1Byte(0); // Fillbyte + + *gribLen = (long)z; + + return 0; +} + + +void TEMPLATE(grib_encode,T)(int *isec0, int *isec1, int *isec2, T *fsec2, int *isec3, + T *fsec3, int *isec4, T *fsec4, int klenp, int *kgrib, + int kleng, int *kword, int efunc, int *kret) +{ + long gribLen = 0; // Counter of GRIB length for output + long fsec4size = 0; + long datstart, datsize; + + UNUSED(isec3); + UNUSED(efunc); + + grsdef(); + + unsigned char *CGrib = (unsigned char *) kgrib; + + const bool gdsIncluded = ISEC1_Sec2Or3Flag & 128; + const bool bmsIncluded = ISEC1_Sec2Or3Flag & 64; + + // set max header len + size_t len = 16384; + + // add data len + const size_t numBytes = (size_t)((ISEC4_NumBits+7)>>3); + + len += numBytes*(size_t)klenp; + + // add bitmap len + if ( bmsIncluded ) len += (size_t)((klenp+7)>>3); + +#ifdef VECTORCODE + GRIBPACK *lGrib = (GRIBPACK*) Malloc(len*sizeof(GRIBPACK)); + if ( lGrib == NULL ) SysError("No Memory!"); +#else + GRIBPACK *lGrib = CGrib; +#endif + + const long isLen = 8; + encodeIS(lGrib, &gribLen); + GRIBPACK *lpds = &lGrib[isLen]; + const long pdsLen = getPdsLen(isec1); + + encodePDS(lpds, pdsLen, isec1); + gribLen += pdsLen; + /* + if ( ( isec4[3] == 64 ) && ( isec2[5] == 2 ) ) + { + static bool lwarn_cplx = true; + + if ( lwarn_cplx ) + Message("Complex packing of spectral data unsupported, using simple packing!"); + + isec2[5] = 1; + isec4[3] = 0; + + lwarn_cplx = false; + } + */ + if ( gdsIncluded ) TEMPLATE(encodeGDS,T)(lGrib, &gribLen, isec2, fsec2); + /* + ---------------------------------------------------------------- + BMS Bit-Map Section Section (Section 3) + ---------------------------------------------------------------- + */ + if ( bmsIncluded ) + { + TEMPLATE(encodeBMS,T)(lGrib, &gribLen, fsec3, isec4, fsec4, &fsec4size); + } + else + { + fsec4size = ISEC4_NumValues; + } + + const long bdsstart = gribLen; + int status = TEMPLATE(encodeBDS,T)(lGrib, &gribLen, ISEC1_DecScaleFactor, isec2, + isec4, fsec4size, fsec4, &datstart, &datsize, ISEC1_Parameter); + if ( status ) + { + *kret = status; + return; + } + + encodeES(lGrib, &gribLen, bdsstart); + + if ( (size_t) gribLen > (size_t)kleng*sizeof(int) ) + Error("kgrib buffer too small! kleng = %d gribLen = %d", kleng, gribLen); + +#ifdef VECTORCODE + if ( (size_t) gribLen > len ) + Error("lGrib buffer too small! len = %d gribLen = %d", len, gribLen); + + (void) PACK_GRIB(lGrib, (unsigned char *)CGrib, gribLen, -1L); + + Free(lGrib); +#endif + + ISEC0_GRIB_Len = (int)gribLen; + ISEC0_GRIB_Version = 1; + + *kword = (int)((gribLen + (long)sizeof(int) - 1) / (long)sizeof(int)); + + *kret = status; +} + +#endif /* T */ + +/* + * Local Variables: + * mode: c + * End: + */ + +#ifdef T +#undef T +#endif +#define T float +#ifdef T + +// GRIB BLOCK 2 - GRID DESCRIPTION SECTION +static +void TEMPLATE(encodeGDS,T)(GRIBPACK *lGrib, long *gribLen, int *isec2, T *fsec2) +{ + long z = *gribLen; + int exponent, mantissa; + int ival; + int gdslen = 32; + + if ( ISEC2_GridType == GRIB1_GTYPE_LCC ) gdslen += 10; + + if ( ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) gdslen += 10; + + const int pvoffset = (ISEC2_NumVCP || ISEC2_Reduced) ? gdslen + 1 : 0xFF; + + if ( ISEC2_Reduced ) gdslen += 2 * ISEC2_NumLat; + + gdslen += ISEC2_NumVCP * 4; + + Put3Byte(gdslen); /* 0- 2 Length of Block 2 Byte 0 */ + Put1Byte(ISEC2_NumVCP); /* 3 NV */ + Put1Byte(pvoffset); /* 4 PV */ + Put1Byte(ISEC2_GridType); /* 5 LatLon=0 Gauss=4 Spectral=50 */ + + if ( ISEC2_GridType == GRIB1_GTYPE_SPECTRAL ) + { + Put2Byte(ISEC2_PentaJ); /* 6- 7 Pentagonal resolution J */ + Put2Byte(ISEC2_PentaK); /* 8- 9 Pentagonal resolution K */ + Put2Byte(ISEC2_PentaM); /* 10-11 Pentagonal resolution M */ + Put1Byte(ISEC2_RepType); /* 12 Representation type */ + Put1Byte(ISEC2_RepMode); /* 13 Representation mode */ + PutnZero(18); /* 14-31 reserved */ + } + else if ( ISEC2_GridType == GRIB1_GTYPE_GME ) + { + Put2Byte(ISEC2_GME_NI2); + Put2Byte(ISEC2_GME_NI3); + Put3Byte(ISEC2_GME_ND); + Put3Byte(ISEC2_GME_NI); + Put1Byte(ISEC2_GME_AFlag); + Put3Int(ISEC2_GME_LatPP); + Put3Int(ISEC2_GME_LonPP); + Put3Int(ISEC2_GME_LonMPL); + Put1Byte(ISEC2_GME_BFlag); + PutnZero(5); + } + else if ( ISEC2_GridType == GRIB1_GTYPE_LCC ) + { + Put2Byte(ISEC2_NumLon); /* 6- 7 Longitudes */ + + Put2Byte(ISEC2_NumLat); /* 8- 9 Latitudes */ + Put3Int(ISEC2_FirstLat); + Put3Int(ISEC2_FirstLon); + Put1Byte(ISEC2_ResFlag); /* 16 Resolution flag */ + Put3Int(ISEC2_Lambert_Lov); /* 17-19 */ + Put3Int(ISEC2_Lambert_dx); /* 20-22 */ + Put3Int(ISEC2_Lambert_dy); /* 23-25 */ + Put1Byte(ISEC2_Lambert_ProjFlag);/* 26 Projection flag */ + Put1Byte(ISEC2_ScanFlag); /* 27 Scanning mode */ + Put3Int(ISEC2_Lambert_LatS1); /* 28-30 */ + Put3Int(ISEC2_Lambert_LatS2); /* 31-33 */ + Put3Int(ISEC2_Lambert_LatSP); /* 34-36 */ + Put3Int(ISEC2_Lambert_LonSP); /* 37-39 */ + PutnZero(2); /* 34-41 */ + } + else if ( ISEC2_GridType == GRIB1_GTYPE_LATLON || + ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN || + ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) + { + const int numlon = ISEC2_Reduced ? 0xFFFF : ISEC2_NumLon; + Put2Byte(numlon); /* 6- 7 Number of Longitudes */ + + Put2Byte(ISEC2_NumLat); /* 8- 9 Number of Latitudes */ + Put3Int(ISEC2_FirstLat); + Put3Int(ISEC2_FirstLon); + Put1Byte(ISEC2_ResFlag); /* 16 Resolution flag */ + Put3Int(ISEC2_LastLat); + Put3Int(ISEC2_LastLon); + const unsigned lonIncr = (ISEC2_ResFlag == 0) ? 0xFFFF : (unsigned)ISEC2_LonIncr; + const unsigned latIncr = (ISEC2_ResFlag == 0) ? 0xFFFF : (unsigned)ISEC2_LatIncr; + Put2Byte(lonIncr); /* 23-24 i - direction increment */ + if ( ISEC2_GridType == GRIB1_GTYPE_GAUSSIAN ) + Put2Byte(ISEC2_NumPar); /* 25-26 Latitudes Pole->Equator */ + else + Put2Byte(latIncr); /* 25-26 j - direction increment */ + + Put1Byte(ISEC2_ScanFlag); /* 27 Scanning mode */ + PutnZero(4); /* 28-31 reserved */ + + if ( ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT ) + { + Put3Int(ISEC2_LatSP); + Put3Int(ISEC2_LonSP); + Put1Real((double)(FSEC2_RotAngle)); + } + } + else + { + Error("Unsupported grid type %d", ISEC2_GridType); + } + +#if defined (SX) +#pragma vdir novector /* vectorization gives wrong results on NEC */ +#endif + for (long i = 0; i < ISEC2_NumVCP; ++i) + { + Put1Real((double)(fsec2[10+i])); + } + + if ( ISEC2_Reduced ) + for (long i = 0; i < ISEC2_NumLat; ++i) Put2Byte(ISEC2_ReducedPoints(i)); + + *gribLen = z; +} + +// GRIB BLOCK 3 - BIT MAP SECTION +static +void TEMPLATE(encodeBMS,T)(GRIBPACK *lGrib, long *gribLen, T *fsec3, int *isec4, T *data, long *datasize) +{ + long z = *gribLen; + static bool lmissvalinfo = true; + // unsigned int c, imask; + + if ( DBL_IS_NAN(FSEC3_MissVal) && lmissvalinfo) + { + lmissvalinfo = false; + Message("Missing value = NaN is unsupported!"); + } + + const long bitmapSize = ISEC4_NumValues; + const long imaskSize = ((bitmapSize+7)>>3)<<3; + GRIBPACK *bitmap = &lGrib[z+6]; + long fsec4size = 0; + +#ifdef VECTORCODE + unsigned int *imask = (unsigned int*) Malloc(imaskSize*sizeof(unsigned int)); + memset(imask, 0, imaskSize*sizeof(int)); + +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (long i = 0; i < bitmapSize; ++i) + { + if ( IS_NOT_EQUAL(data[i], FSEC3_MissVal) ) + { + data[fsec4size++] = data[i]; + imask[i] = 1; + } + } + +#if defined (CRAY) +#pragma _CRI ivdep +#endif +#if defined (SX) +#pragma vdir nodep +#endif +#ifdef __uxpch__ +#pragma loop novrec +#endif + for (long i = 0; i < imaskSize/8; ++i) + { + bitmap[i] = (imask[i*8+0] << 7) | (imask[i*8+1] << 6) | + (imask[i*8+2] << 5) | (imask[i*8+3] << 4) | + (imask[i*8+4] << 3) | (imask[i*8+5] << 2) | + (imask[i*8+6] << 1) | (imask[i*8+7]); + } + + Free(imask); +#else + for (long i = 0; i < imaskSize/8; ++i) bitmap[i] = 0; + + for (long i = 0; i < bitmapSize; ++i) + { + if ( IS_NOT_EQUAL(data[i], FSEC3_MissVal) ) + { + data[fsec4size++] = data[i]; + bitmap[i/8] |= (GRIBPACK)(1<<(7-(i&7))); + } + } +#endif + + const long bmsLen = imaskSize/8 + 6; + const long bmsUnusedBits = imaskSize - bitmapSize; + + Put3Byte(bmsLen); /* 0- 2 Length of Block 3 Byte 0 */ + Put1Byte(bmsUnusedBits); + Put2Byte(0); + + *gribLen += bmsLen; + + *datasize = fsec4size; +} + +#define pow_double pow +#define pow_float powf + +// GRIB BLOCK 4 - BINARY DATA SECTION +static +int TEMPLATE(encodeBDS,T)(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *isec4, long datasize, T *data, + long *datstart, long *datsize, int code) +{ + // Uwe Schulzweida, 11/04/2003 : Check that number of bits per value is not exceeded + // Uwe Schulzweida, 6/05/2003 : Copy result to fpval to prevent integer overflow + + size_t z = (size_t)*gribLen; + int numBits; + int ival; + long PackStart = 0; + int Flag = 0; + int binscale = 0; + int bds_head = 11; + int bds_ext = 0; + /* ibits = BitsPerInt; */ + int exponent, mantissa; + bool lspherc = false; + int isubset = 0, itemp = 0, itrunc = 0; + T factor = 1, fmin, fmax; + const double jpepsln = 1.0e-12; // -----> tolerance used to check equality + // of floating point numbers - needed + // on some platforms (eg vpp700, linux) + extern int CGRIBEX_Const; // 1: Don't pack constant fields on regular grids + + if ( isec2 ) + { + /* If section 2 is present, it says if data is spherical harmonic */ + + lspherc = ( isec2[0] == 50 || isec2[0] == 60 || + isec2[0] == 70 || isec2[0] == 80 ); + + isec4[2] = lspherc ? 128 : 0; + } + else + { + /* Section 4 says if it's spherical harmonic data.. */ + + lspherc = ( isec4[2] == 128 ); + } + + /* Complex packing supported for spherical harmonics. */ + + const bool lcomplex = ( lspherc && ( isec4[3] == 64 ) ) || + ( lspherc && isec2 && ( isec2[5] == 2 ) ); + + // Check input specification is consistent + + if ( lcomplex && isec2 ) + { + if ( ( isec4[3] != 64 ) && ( isec2[5] == 2 ) ) + { + gprintf(__func__, " COMPLEX mismatch. isec4[3] = %d\n", isec4[3]); + gprintf(__func__, " COMPLEX mismatch. isec2[5] = %d\n", isec2[5]); + return (807); + } + else if ( ( isec4[3] == 64 ) && ( isec2[5] != 2 ) ) + { + gprintf(__func__, " COMPLEX mismatch. isec4[3] = %d\n", isec4[3]); + gprintf(__func__, " COMPLEX mismatch. isec2[5] = %d\n", isec2[5]); + return (807); + } + else if ( lcomplex ) + { + // Truncation of full spectrum, which is supposed triangular, has to be diagnosed. Define also sub-set truncation. + isubset = isec4[17]; + // When encoding, use the total number of data. + itemp = isec4[0]; + itrunc = (int) (sqrt(itemp*4 + 1.) - 3) / 2; + } + } + + if ( decscale ) + { + const T scale = TEMPLATE(pow,T)((T)10.0, (T)decscale); + for (long i = 0; i < datasize; ++i) data[i] *= scale; + } + + if ( lspherc ) + { + if ( lcomplex ) + { + const int jup = isubset; + const int ioff = (jup+1)*(jup+2); + bds_ext = 4 + 3 + 4*ioff; + PackStart = ioff; + Flag = 192; + } + else + { + bds_ext = 4; + PackStart = 1; + Flag = 128; + } + } + + *datstart = bds_head + bds_ext; + + int nbpv = numBits = ISEC4_NumBits; + + if ( lspherc && lcomplex ) + { + const int pcStart = isubset; + const int pcScale = isec4[16]; + TEMPLATE(scale_complex,T)(data, pcStart, pcScale, itrunc, 0); + TEMPLATE(gather_complex,T)(data, (size_t)pcStart, (size_t)itrunc, (size_t)datasize); + } + + fmin = fmax = data[PackStart]; + + TEMPLATE(minmax_val,T)(data+PackStart, datasize-PackStart, &fmin, &fmax); + + double zref = (double)fmin; + if (!(zref < DBL_MAX && zref > -DBL_MAX)) + { + gprintf(__func__, "Minimum value out of range: %g!", zref); + return (707); + } + + if ( CGRIBEX_Const && !lspherc ) + { + if ( IS_EQUAL(fmin, fmax) ) nbpv = 0; + } + + long blockLength = (*datstart) + (nbpv*(datasize - PackStart) + 7)/8; + blockLength += blockLength & 1; + + const long unused_bits = blockLength*8 - (*datstart)*8 - nbpv*(datasize - PackStart); + + Flag += unused_bits; + + + // Adjust number of bits per value if full integer length to avoid hitting most significant bit (sign bit). + // if( nbpv == ibits ) nbpv = nbpv - 1; + /* + Calculate the binary scaling factor to spread the range of values over the number of bits per value. + Limit scaling to 2**-126 to 2**127 (using IEEE 32-bit floatsas a guideline). + */ + const double range = fabs(fmax - fmin); + + if ( fabs(fmin) < FLT_MIN ) fmin = 0; + /* + Have to allow tolerance in comparisons on some platforms (eg vpp700 and linux), + such as 0.9999999999999999 = 1.0, to avoid clipping ranges which are a power of 2. + */ + if ( range <= jpepsln ) + { + binscale = 0; + } + else if ( IS_NOT_EQUAL(fmin, 0.0) && (fabs(range/fmin) <= jpepsln) ) + { + binscale = 0; + } + else if ( fabs(range-1.0) <= jpepsln ) + { + binscale = 1 - nbpv; + } + else if ( range > 1.0 ) + { + const double rangec = range + jpepsln; + double p2 = 2.0; + int jloop = 1; + while ( jloop < 128 && p2 <= rangec ) + { + p2 *= 2.0; + ++jloop; + } + if (jloop < 128) + binscale = jloop - nbpv; + else + { + gprintf(__func__, "Problem calculating binary scale value for encode code %d!", code); + gprintf(__func__, "> range %g rangec %g fmin %g fmax %g", range, rangec, fmin, fmax); + return (707); + } + } + else + { + const double rangec = range - jpepsln; + double p05 = 0.5; + int jloop = 1; + while ( jloop < 127 && p05 >= rangec ) + { + p05 *= 0.5; + jloop++; + } + if ( jloop < 127 ) + { + binscale = 1 - jloop - nbpv; + } + else + { + gprintf(__func__, "Problem calculating binary scale value for encode code %d!", code); + gprintf(__func__, "< range %g rangec %g fmin %g fmax %g", range, rangec, fmin, fmax); + return (707); + } + } + + const uint64_t max_nbpv_pow2 = (uint64_t) ((1ULL << nbpv) - 1); + + if ( binscale != 0 ) + { + while ( (uint64_t)(ldexp(range, -binscale)+0.5) > max_nbpv_pow2 ) binscale++; + + factor = (T)intpow2(-binscale); + } + + ref2ibm(&zref, BitsPerInt); + + Put3Byte(blockLength); // 0-2 Length of Block 4 + Put1Byte(Flag); // 3 Flag & Unused bits + if ( binscale < 0 ) binscale = 32768 - binscale; + Put2Byte(binscale); // 4-5 Scale factor + Put1Real(zref); // 6-9 Reference value + Put1Byte(nbpv); // 10 Packing size + + if ( lspherc ) + { + if ( lcomplex ) + { + const int jup = isubset; + int ioff = (int)z + bds_ext; + if ( ioff > 0xFFFF ) ioff = 0; + Put2Byte(ioff); + Put2Int(isec4[16]); + Put1Byte(jup); + Put1Byte(jup); + Put1Byte(jup); + for (long i = 0; i < ((jup+1)*(jup+2)); ++i) Put1Real((double)(data[i])); + } + else + { + Put1Real((double)(data[0])); + } + } + + *datsize = ((datasize-PackStart)*nbpv + 7)/8; + +#if defined (_ARCH_PWR6) + TEMPLATE(encode_array_unrolled,T)(nbpv, (size_t)PackStart, (size_t)datasize, lGrib, data, (T)zref, factor, &z); +#else + TEMPLATE(encode_array,T)(nbpv, (size_t)PackStart, (size_t)datasize, lGrib, data, (T)zref, factor, &z); +#endif + + if ( unused_bits >= 8 ) Put1Byte(0); // Fillbyte + + *gribLen = (long)z; + + return 0; +} + + +void TEMPLATE(grib_encode,T)(int *isec0, int *isec1, int *isec2, T *fsec2, int *isec3, + T *fsec3, int *isec4, T *fsec4, int klenp, int *kgrib, + int kleng, int *kword, int efunc, int *kret) +{ + long gribLen = 0; // Counter of GRIB length for output + long fsec4size = 0; + long datstart, datsize; + + UNUSED(isec3); + UNUSED(efunc); + + grsdef(); + + unsigned char *CGrib = (unsigned char *) kgrib; + + const bool gdsIncluded = ISEC1_Sec2Or3Flag & 128; + const bool bmsIncluded = ISEC1_Sec2Or3Flag & 64; + + // set max header len + size_t len = 16384; + + // add data len + const size_t numBytes = (size_t)((ISEC4_NumBits+7)>>3); + + len += numBytes*(size_t)klenp; + + // add bitmap len + if ( bmsIncluded ) len += (size_t)((klenp+7)>>3); + +#ifdef VECTORCODE + GRIBPACK *lGrib = (GRIBPACK*) Malloc(len*sizeof(GRIBPACK)); + if ( lGrib == NULL ) SysError("No Memory!"); +#else + GRIBPACK *lGrib = CGrib; +#endif + + const long isLen = 8; + encodeIS(lGrib, &gribLen); + GRIBPACK *lpds = &lGrib[isLen]; + const long pdsLen = getPdsLen(isec1); + + encodePDS(lpds, pdsLen, isec1); + gribLen += pdsLen; + /* + if ( ( isec4[3] == 64 ) && ( isec2[5] == 2 ) ) + { + static bool lwarn_cplx = true; + + if ( lwarn_cplx ) + Message("Complex packing of spectral data unsupported, using simple packing!"); + + isec2[5] = 1; + isec4[3] = 0; + + lwarn_cplx = false; + } + */ + if ( gdsIncluded ) TEMPLATE(encodeGDS,T)(lGrib, &gribLen, isec2, fsec2); + /* + ---------------------------------------------------------------- + BMS Bit-Map Section Section (Section 3) + ---------------------------------------------------------------- + */ + if ( bmsIncluded ) + { + TEMPLATE(encodeBMS,T)(lGrib, &gribLen, fsec3, isec4, fsec4, &fsec4size); + } + else + { + fsec4size = ISEC4_NumValues; + } + + const long bdsstart = gribLen; + int status = TEMPLATE(encodeBDS,T)(lGrib, &gribLen, ISEC1_DecScaleFactor, isec2, + isec4, fsec4size, fsec4, &datstart, &datsize, ISEC1_Parameter); + if ( status ) + { + *kret = status; + return; + } + + encodeES(lGrib, &gribLen, bdsstart); + + if ( (size_t) gribLen > (size_t)kleng*sizeof(int) ) + Error("kgrib buffer too small! kleng = %d gribLen = %d", kleng, gribLen); + +#ifdef VECTORCODE + if ( (size_t) gribLen > len ) + Error("lGrib buffer too small! len = %d gribLen = %d", len, gribLen); + + (void) PACK_GRIB(lGrib, (unsigned char *)CGrib, gribLen, -1L); + + Free(lGrib); +#endif + + ISEC0_GRIB_Len = (int)gribLen; + ISEC0_GRIB_Version = 1; + + *kword = (int)((gribLen + (long)sizeof(int) - 1) / (long)sizeof(int)); + + *kret = status; +} + +#endif /* T */ + +/* + * Local Variables: + * mode: c + * End: + */ + +void encode_dummy(void); +void encode_dummy(void) +{ + (void) encode_array_unrolled_double(0, 0, 0, NULL, NULL, 0, 0, NULL); + (void) encode_array_unrolled_float(0, 0, 0, NULL, NULL, 0, 0, NULL); +} +static const char grb_libvers[] = "2.1.0"; +const char * +cgribexLibraryVersion(void) +{ + return (grb_libvers); +} + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5) +#pragma GCC diagnostic pop +#endif + +// clang-format on +#ifdef HAVE_CONFIG_H +#endif + +#include <inttypes.h> +#include <stdlib.h> +#include <sys/types.h> +#ifdef WORDS_BIGENDIAN +#include <limits.h> +#endif + + +static const uint32_t crctab[] + = { 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, + 0x2f8ad6d6, 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, + 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, + 0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, + 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, + 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, + 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, + 0x2e003dc5, 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, + 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, + 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, + 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, + 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, + 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, + 0x608edb80, 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, + 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, + 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, + 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, + 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, + 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, + 0x81b02d74, 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, + 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, + 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, + 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, + 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, + 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, + 0xa6322bdf, 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 }; + +uint32_t +memcrc(const unsigned char *b, size_t n) +{ + /* Input arguments: + * const char* b == byte sequence to checksum + * size_t n == length of sequence + */ + + uint32_t s = 0; + + memcrc_r(&s, b, n); + + /* Extend with the length of the string. */ + while (n != 0) + { + register uint32_t c = n & 0377; + n >>= 8; + s = (s << 8) ^ crctab[(s >> 24) ^ c]; + } + + return ~s; +} + +void +memcrc_r(uint32_t *state, const unsigned char *block, size_t block_len) +{ + /* Input arguments: + * const char* b == byte sequence to checksum + * size_t n == length of sequence + */ + + register uint32_t c, s = *state; + register size_t n = block_len; + register const unsigned char *b = block; + + for (; n > 0; --n) + { + c = (uint32_t) (*b++); + s = (s << 8) ^ crctab[(s >> 24) ^ c]; + } + + *state = s; +} + +#ifdef WORDS_BIGENDIAN +#define SWAP_CSUM(BITWIDTH, BYTEWIDTH, NACC) \ + do \ + { \ + register const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *) elems; \ + for (size_t i = 0; i < num_elems; ++i) \ + { \ + for (size_t aofs = NACC; aofs > 0; --aofs) \ + { \ + uint##BITWIDTH##_t accum = b[i + aofs - 1]; \ + for (size_t j = 0; j < BYTEWIDTH; ++j) \ + { \ + uint32_t c = (uint32_t) (accum & UCHAR_MAX); \ + s = (s << 8) ^ crctab[(s >> 24) ^ c]; \ + accum >>= 8; \ + } \ + } \ + } \ + } \ + while (0) +#endif + +/** + * Does endian-swapping prior to checksumming in case platform is big-endian + * + * @param elems points to first first element with alignment elem_size + * @param num_elems number of elements to process + * @param elem_size size of each element in bytes + */ +void +memcrc_r_eswap(uint32_t *state, const unsigned char *elems, size_t num_elems, size_t elem_size) +{ +#ifdef WORDS_BIGENDIAN + register uint32_t s = *state; + + switch (elem_size) + { + case 1: memcrc_r(state, elems, num_elems * elem_size); return; + case 2: SWAP_CSUM(16, 2, 1); break; + case 4: SWAP_CSUM(32, 4, 1); break; + case 8: SWAP_CSUM(64, 8, 1); break; + case 16: SWAP_CSUM(64, 8, 2); break; + } + *state = s; +#else + memcrc_r(state, elems, num_elems * elem_size); +#endif +} + +uint32_t +memcrc_finish(uint32_t *state, off_t total_size) +{ + register uint32_t c, s = *state; + register uint64_t n = (uint64_t) total_size; + + /* Extend with the length of the string. */ + while (n != 0) + { + c = n & 0377; + n >>= 8; + s = (s << 8) ^ crctab[(s >> 24) ^ c]; + } + + return ~s; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <ctype.h> +#include <stdarg.h> +#include <errno.h> + +#if !defined(HAVE_CONFIG_H) && !defined(HAVE_MALLOC_H) && defined(SX) +#define HAVE_MALLOC_H +#endif + +#if defined(HAVE_MALLOC_H) +#include <malloc.h> +#endif + + +enum +{ + MALLOC_FUNC = 0, + CALLOC_FUNC, + REALLOC_FUNC, + FREE_FUNC +}; +static const char *const memfunc[] = { "Malloc", "Calloc", "Realloc", "Free" }; + +#undef MEM_UNDEFID +#define MEM_UNDEFID -1 + +#define MEM_MAXNAME 32 /* Min = 8, for "unknown" ! */ + +static int dmemory_ExitOnError = 1; + +typedef struct +{ + void *ptr; + size_t size; + size_t nobj; + int item; + int mtype; + int line; + char filename[MEM_MAXNAME]; + char functionname[MEM_MAXNAME]; +} MemTable_t; + +static MemTable_t *memTable; +static size_t memTableSize = 0; +static long memAccess = 0; + +static size_t MemObjs = 0; +static size_t MaxMemObjs = 0; +static size_t MemUsed = 0; +static size_t MaxMemUsed = 0; + +static int MEM_Debug = 0; /* If set to 1, debugging */ +static int MEM_Info = 0; /* If set to 1, print mem table at exit */ + +static const char * +get_filename(const char *file) +{ + const char *fnptr = strrchr(file, '/'); + if (fnptr) + fnptr++; + else + fnptr = (char *) file; + + return fnptr; +} + +void +memDebug(int debug) +{ + MEM_Debug = debug; +} + +// If we're not using GNU C, elide __attribute__ +#if !defined __GNUC__ && !defined __attribute__ +#define __attribute__(x) /*NOTHING*/ +#endif + +static void memInternalProblem(const char *caller, const char *fmt, ...) __attribute__((noreturn)); + +static void memError(const char *caller, const char *file, int line, size_t size) __attribute__((noreturn)); + +static void +memInternalProblem(const char *caller, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + + printf("\n"); + fprintf(stderr, "Internal problem (%s) : ", caller); + vfprintf(stderr, fmt, args); + fprintf(stderr, "\n"); + + va_end(args); + + exit(EXIT_FAILURE); +} + +static void +memError(const char *caller, const char *file, int line, size_t size) +{ + fputs("\n", stdout); + fprintf(stderr, "Error (%s) : Allocation of %zu bytes failed. [ line %d file %s ]\n", caller, size, line, get_filename(file)); + + if (errno) perror("System error message "); + + exit(EXIT_FAILURE); +} + +static void +memListPrintEntry(int mtype, int item, size_t size, void *ptr, const char *caller, const char *file, int line) +{ + fprintf(stderr, "[%-7s ", memfunc[mtype]); + + fprintf(stderr, "memory item %3d ", item); + fprintf(stderr, "(%6zu byte) ", size); + fprintf(stderr, "at %p", ptr); + if (file != NULL) + { + fprintf(stderr, " line %4d", line); + fprintf(stderr, " file %s", get_filename(file)); + } + if (caller != NULL) fprintf(stderr, " (%s)", caller); + fprintf(stderr, "]\n"); +} + +static void +memListPrintTable(void) +{ + if (MemObjs) fprintf(stderr, "\nMemory table:\n"); + + for (size_t memID = 0; memID < memTableSize; memID++) + { + if (memTable[memID].item != MEM_UNDEFID) + memListPrintEntry(memTable[memID].mtype, memTable[memID].item, memTable[memID].size * memTable[memID].nobj, + memTable[memID].ptr, memTable[memID].functionname, memTable[memID].filename, memTable[memID].line); + } + + if (MemObjs) + { + fprintf(stderr, " Memory access : %6u\n", (unsigned) memAccess); + fprintf(stderr, " Maximum objects : %6zu\n", memTableSize); + fprintf(stderr, " Objects used : %6u\n", (unsigned) MaxMemObjs); + fprintf(stderr, " Objects in use : %6u\n", (unsigned) MemObjs); + fprintf(stderr, " Memory allocated : "); + if (MemUsed > 1024 * 1024 * 1024) + fprintf(stderr, " %5d GB\n", (int) (MemUsed / (1024 * 1024 * 1024))); + else if (MemUsed > 1024 * 1024) + fprintf(stderr, " %5d MB\n", (int) (MemUsed / (1024 * 1024))); + else if (MemUsed > 1024) + fprintf(stderr, " %5d KB\n", (int) (MemUsed / (1024))); + else + fprintf(stderr, " %5d Byte\n", (int) MemUsed); + } + + if (MaxMemUsed) + { + fprintf(stderr, " Maximum memory allocated : "); + if (MaxMemUsed > 1024 * 1024 * 1024) + fprintf(stderr, " %5d GB\n", (int) (MaxMemUsed / (1024 * 1024 * 1024))); + else if (MaxMemUsed > 1024 * 1024) + fprintf(stderr, " %5d MB\n", (int) (MaxMemUsed / (1024 * 1024))); + else if (MaxMemUsed > 1024) + fprintf(stderr, " %5d KB\n", (int) (MaxMemUsed / (1024))); + else + fprintf(stderr, " %5d Byte\n", (int) MaxMemUsed); + } +} + +static void +memGetDebugLevel(void) +{ + const char *envstr = getenv("MEMORY_INFO"); + if (envstr && isdigit((int) envstr[0])) MEM_Info = atoi(envstr); + + envstr = getenv("MEMORY_DEBUG"); + if (envstr && isdigit((int) envstr[0])) MEM_Debug = atoi(envstr); + + if (MEM_Debug && !MEM_Info) MEM_Info = 1; + + if (MEM_Info) atexit(memListPrintTable); +} + +static void +memInit(void) +{ + static int initDebugLevel = 0; + + if (!initDebugLevel) + { + memGetDebugLevel(); + initDebugLevel = 1; + } +} + +static int +memListDeleteEntry(void *ptr, size_t *size) +{ + int item = MEM_UNDEFID; + size_t memID = 0; + + for (memID = 0; memID < memTableSize; memID++) + { + if (memTable[memID].item == MEM_UNDEFID) continue; + if (memTable[memID].ptr == ptr) break; + } + + if (memID != memTableSize) + { + MemObjs--; + MemUsed -= memTable[memID].size * memTable[memID].nobj; + *size = memTable[memID].size * memTable[memID].nobj; + item = memTable[memID].item; + memTable[memID].item = MEM_UNDEFID; + } + + return item; +} + +static void +memTableInitEntry(size_t memID) +{ + if (memID >= memTableSize) memInternalProblem(__func__, "memID %d undefined!", memID); + + memTable[memID].ptr = NULL; + memTable[memID].item = MEM_UNDEFID; + memTable[memID].size = 0; + memTable[memID].nobj = 0; + memTable[memID].mtype = MEM_UNDEFID; + memTable[memID].line = MEM_UNDEFID; +} + +static void +set_filename(const char *file, char *memEntyFilename) +{ + if (file) + { + const char *filename = get_filename(file); + size_t len = strlen(filename); + if (len > MEM_MAXNAME - 1) len = MEM_MAXNAME - 1; + + (void) memcpy(memEntyFilename, filename, len); + memEntyFilename[len] = '\0'; + } + else + { + (void) strcpy(memEntyFilename, "unknown"); + } +} + +static void +set_functionname(const char *functionname, char *memEntyFunctionname) +{ + if (functionname) + { + size_t len = strlen(functionname); + if (len > MEM_MAXNAME - 1) len = MEM_MAXNAME - 1; + + (void) memcpy(memEntyFunctionname, functionname, len); + memEntyFunctionname[len] = '\0'; + } + else + { + (void) strcpy(memEntyFunctionname, "unknown"); + } +} + +static int +memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj, const char *functionname, const char *file, int line) +{ + static int item = 0; + size_t memID = 0; + + // Look for a free slot in memTable (Create the table the first time through). + if (memTableSize == 0) + { + memTableSize = 8; + size_t memSize = memTableSize * sizeof(MemTable_t); + memTable = (MemTable_t *) malloc(memSize); + if (memTable == NULL) memError(__func__, __FILE__, __LINE__, memSize); + + for (size_t i = 0; i < memTableSize; i++) memTableInitEntry(i); + } + else + { + while (memID < memTableSize) + { + if (memTable[memID].item == MEM_UNDEFID) break; + memID++; + } + } + + // If the table overflows, double its size. + if (memID == memTableSize) + { + memTableSize = 2 * memTableSize; + size_t memSize = memTableSize * sizeof(MemTable_t); + memTable = (MemTable_t *) realloc(memTable, memSize); + if (memTable == NULL) memError(__func__, __FILE__, __LINE__, memSize); + + for (size_t i = memID; i < memTableSize; i++) memTableInitEntry(i); + } + + memTable[memID].item = item; + memTable[memID].ptr = ptr; + memTable[memID].size = size; + memTable[memID].nobj = nobj; + memTable[memID].mtype = mtype; + memTable[memID].line = line; + + set_filename(file, memTable[memID].filename); + set_functionname(functionname, memTable[memID].functionname); + + MaxMemObjs++; + MemObjs++; + MemUsed += size * nobj; + if (MemUsed > MaxMemUsed) MaxMemUsed = MemUsed; + + return item++; +} + +static int +memListChangeEntry(void *ptrold, void *ptr, size_t size, const char *functionname, const char *file, int line) +{ + int item = MEM_UNDEFID; + size_t memID = 0; + + while (memID < memTableSize) + { + if (memTable[memID].item != MEM_UNDEFID && memTable[memID].ptr == ptrold) break; + memID++; + } + + if (memID == memTableSize) + { + if (ptrold != NULL) memInternalProblem(__func__, "Item at %p not found.", ptrold); + } + else + { + item = memTable[memID].item; + + const size_t sizeold = memTable[memID].size * memTable[memID].nobj; + + memTable[memID].ptr = ptr; + memTable[memID].size = size; + memTable[memID].nobj = 1; + memTable[memID].mtype = REALLOC_FUNC; + memTable[memID].line = line; + + set_filename(file, memTable[memID].filename); + set_functionname(functionname, memTable[memID].functionname); + + MemUsed -= sizeold; + MemUsed += size; + if (MemUsed > MaxMemUsed) MaxMemUsed = MemUsed; + } + + return item; +} + +void * +memCalloc(size_t nobjs, size_t size, const char *file, const char *functionname, int line) +{ + void *ptr = NULL; + + memInit(); + + if (nobjs * size > 0) + { + ptr = calloc(nobjs, size); + + if (MEM_Info) + { + memAccess++; + + int item = MEM_UNDEFID; + if (ptr) item = memListNewEntry(CALLOC_FUNC, ptr, size, nobjs, functionname, file, line); + + if (MEM_Debug) memListPrintEntry(CALLOC_FUNC, item, size * nobjs, ptr, functionname, file, line); + } + + if (ptr == NULL && dmemory_ExitOnError) memError(functionname, file, line, size * nobjs); + } + else + fprintf(stderr, "Warning (%s) : Allocation of 0 bytes! [ line %d file %s ]\n", functionname, line, file); + + return ptr; +} + +void * +memMalloc(size_t size, const char *file, const char *functionname, int line) +{ + void *ptr = NULL; + + memInit(); + + if (size > 0) + { + ptr = malloc(size); + + if (MEM_Info) + { + memAccess++; + + int item = MEM_UNDEFID; + if (ptr) item = memListNewEntry(MALLOC_FUNC, ptr, size, 1, functionname, file, line); + + if (MEM_Debug) memListPrintEntry(MALLOC_FUNC, item, size, ptr, functionname, file, line); + } + + if (ptr == NULL && dmemory_ExitOnError) memError(functionname, file, line, size); + } + else + fprintf(stderr, "Warning (%s) : Allocation of 0 bytes! [ line %d file %s ]\n", functionname, line, file); + + return ptr; +} + +void * +memRealloc(void *ptrold, size_t size, const char *file, const char *functionname, int line) +{ + void *ptr = NULL; + + memInit(); + + if (size > 0) + { + ptr = realloc(ptrold, size); + + if (MEM_Info) + { + memAccess++; + + int item = MEM_UNDEFID; + if (ptr) + { + item = memListChangeEntry(ptrold, ptr, size, functionname, file, line); + if (item == MEM_UNDEFID) item = memListNewEntry(REALLOC_FUNC, ptr, size, 1, functionname, file, line); + } + + if (MEM_Debug) memListPrintEntry(REALLOC_FUNC, item, size, ptr, functionname, file, line); + } + + if (ptr == NULL && dmemory_ExitOnError) memError(functionname, file, line, size); + } + else + fprintf(stderr, "Warning (%s) : Allocation of 0 bytes! [ line %d file %s ]\n", functionname, line, get_filename(file)); + + return ptr; +} + +void +memFree(void *ptr, const char *file, const char *functionname, int line) +{ + memInit(); + + if (MEM_Info) + { + size_t size = 0; + const int item = memListDeleteEntry(ptr, &size); + if (item >= 0) + { + if (MEM_Debug) memListPrintEntry(FREE_FUNC, item, size, ptr, functionname, file, line); + } + else + { + if (ptr && MEM_Debug) + fprintf(stderr, "%s info: memory entry at %p not found. [line %4d file %s (%s)]\n", __func__, ptr, line, + get_filename(file), functionname); + } + } + + free(ptr); +} + +size_t +memTotal(void) +{ + size_t memtotal = 0; +#ifdef HAVE_MALLINFO + struct mallinfo meminfo = mallinfo(); + if (MEM_Debug) + { + fprintf(stderr, "arena %8zu (non-mmapped space allocated from system)\n", (size_t) meminfo.arena); + fprintf(stderr, "ordblks %8zu (number of free chunks)\n", (size_t) meminfo.ordblks); + fprintf(stderr, "smblks %8zu (number of fastbin blocks)\n", (size_t) meminfo.smblks); + fprintf(stderr, "hblks %8zu (number of mmapped regions)\n", (size_t) meminfo.hblks); + fprintf(stderr, "hblkhd %8zu (space in mmapped regions)\n", (size_t) meminfo.hblkhd); + fprintf(stderr, "usmblks %8zu (maximum total allocated space)\n", (size_t) meminfo.usmblks); + fprintf(stderr, "fsmblks %8zu (maximum total allocated space)\n", (size_t) meminfo.fsmblks); + fprintf(stderr, "uordblks %8zu (total allocated space)\n", (size_t) meminfo.uordblks); + fprintf(stderr, "fordblks %8zu (total free space)\n", (size_t) meminfo.fordblks); + fprintf(stderr, "Memory in use: %8zu bytes\n", (size_t) meminfo.usmblks + (size_t) meminfo.uordblks); + fprintf(stderr, "Total heap size: %8zu bytes\n", (size_t) meminfo.arena); + + // malloc_stats(); + } + memtotal = (size_t) meminfo.arena; +#endif + + return memtotal; +} + +void +memExitOnError(void) +{ + dmemory_ExitOnError = 1; +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <errno.h> + +#if !defined(NAMESPACE_H) +#endif + +int _ExitOnError = 1; // If set to 1, exit on error +int _Verbose = 1; // If set to 1, errors are reported +int _Debug = 0; // If set to 1, debugging + +/* If we're not using GNU C, elide __attribute__ */ +#if !defined __GNUC__ && !defined __attribute__ +#define __attribute__(x) /*NOTHING*/ +#endif + +void SysError_(const char *caller, const char *fmt, ...) __attribute__((noreturn)); + +void +SysError_(const char *caller, const char *fmt, ...) +{ + va_list args; + int saved_errno = errno; + + va_start(args, fmt); + + printf("\n"); + fprintf(stderr, "%s error (%s): ", PACKAGE_NAME, caller); + vfprintf(stderr, fmt, args); + fprintf(stderr, "\n"); + + va_end(args); + + if (saved_errno) + { + errno = saved_errno; + perror("System error message"); + } + + exit(EXIT_FAILURE); +} + +void +Error_(const char *caller, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + + printf("\n"); + fprintf(stderr, "%s error (%s): ", PACKAGE_NAME, caller); + vfprintf(stderr, fmt, args); + fprintf(stderr, "\n"); + + va_end(args); + + if (_ExitOnError) exit(EXIT_FAILURE); +} + +typedef void (*cdiAbortCFunc)(const char *caller, const char *filename, const char *functionname, int line, const char *errorString, + va_list ap) +#ifdef __GNUC__ + __attribute__((noreturn)) +#endif + ; + +void +cdiAbortC(const char *caller, const char *filename, const char *functionname, int line, const char *errorString, ...) +{ + va_list ap; + va_start(ap, errorString); + cdiAbortCFunc cdiAbortC_p = (cdiAbortCFunc) namespaceSwitchGet(NSSWITCH_ABORT).func; + cdiAbortC_p(caller, filename, functionname, line, errorString, ap); + va_end(ap); +} + +void +cdiAbortC_serial(const char *caller, const char *filename, const char *functionname, int line, const char *errorString, va_list ap) +{ + fprintf(stderr, "%s error, %s, %s, line %d%s%s\nerrorString: \"", PACKAGE_NAME, functionname, filename, line, + caller ? ", called from " : "", caller ? caller : ""); + vfprintf(stderr, errorString, ap); + fputs("\"\n", stderr); + exit(EXIT_FAILURE); +} + +typedef void (*cdiWarningFunc)(const char *caller, const char *fmt, va_list ap); + +void +Warning_(const char *caller, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + + if (_Verbose) + { + cdiWarningFunc cdiWarning_p = (cdiWarningFunc) namespaceSwitchGet(NSSWITCH_WARNING).func; + cdiWarning_p(caller, fmt, args); + } + + va_end(args); +} + +void +cdiWarning(const char *caller, const char *fmt, va_list ap) +{ + fprintf(stderr, "%s warning (%s): ", PACKAGE_NAME, caller); + vfprintf(stderr, fmt, ap); + fputc('\n', stderr); +} + +void +Message_(const char *caller, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + + fprintf(stdout, "%s %-18s: ", PACKAGE_NAME, caller); + vfprintf(stdout, fmt, args); + fprintf(stdout, "\n"); + + va_end(args); +} + +bool +cdiObsoleteInfo(const char *oldFunction, const char *newFunction) +{ + fprintf(stdout, "cdi info: Function %s() is deprecated and might be removed in the future versions of CDI.\n", oldFunction); + fprintf(stdout, "cdi info: Consider switching to the new function %s() as soon as possible.\n", newFunction); + return false; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef EXSE_H +#define EXSE_H + +enum +{ + EXSE_SINGLE_PRECISION = 4, + EXSE_DOUBLE_PRECISION = 8, +}; + +#endif +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> + + +enum +{ + EXT_HEADER_LEN = 4, +}; + +union EXT_HEADER +{ + INT32 i32[EXT_HEADER_LEN]; + INT64 i64[EXT_HEADER_LEN]; +}; + +static int initExtLib = 0; +static int extDefaultPrec = 0; +static int extDefaultNumber = EXT_REAL; + +// A version string. +#undef LIBVERSION +#define LIBVERSION 1.5.0 +#define XSTRING(x) #x +#define STRING(x) XSTRING(x) +static const char ext_libvers[] = STRING(LIBVERSION); + +const char * +extLibraryVersion(void) +{ + return ext_libvers; +} + +static int EXT_Debug = 0; // If set to 1, debugging + +void +extDebug(int debug) +{ + if (debug) Message("debug level %d", debug); + EXT_Debug = debug; +} + +static void +extLibInit() +{ + const char *envName = "EXT_PRECISION"; + + char *envString = getenv(envName); + if (envString) + { + if (strlen(envString) == 2) + { + switch (tolower((int) envString[0])) + { + case 'r': + { + extDefaultNumber = EXT_REAL; + switch ((int) envString[1]) + { + case '4': extDefaultPrec = EXSE_SINGLE_PRECISION; break; + case '8': extDefaultPrec = EXSE_DOUBLE_PRECISION; break; + default: Warning("Invalid digit in %s: %s", envName, envString); + } + break; + } + case 'c': + { + extDefaultNumber = EXT_COMP; + switch ((int) envString[1]) + { + case '4': extDefaultPrec = EXSE_SINGLE_PRECISION; break; + case '8': extDefaultPrec = EXSE_DOUBLE_PRECISION; break; + default: Warning("Invalid digit in %s: %s", envName, envString); + } + break; + } + default: + { + Warning("Invalid character in %s: %s", envName, envString); + break; + } + } + } + } + + initExtLib = 1; +} + +static void +extInit(extrec_t *extp) +{ + extp->checked = 0; + extp->byteswap = 0; + extp->prec = 0; + extp->number = extDefaultNumber; + extp->datasize = 0; + extp->buffersize = 0; + extp->buffer = NULL; +} + +void * +extNew(void) +{ + if (!initExtLib) extLibInit(); + + extrec_t *extp = (extrec_t *) Malloc(sizeof(extrec_t)); + + extInit(extp); + + return (void *) extp; +} + +void +extDelete(void *ext) +{ + extrec_t *extp = (extrec_t *) ext; + + if (extp) + { + if (extp->buffer) Free(extp->buffer); + Free(extp); + } +} + +int +extCheckFiletype(int fileID, int *swap) +{ + size_t fact = 0; + size_t data = 0; + size_t dimxy = 0; + unsigned char buffer[40], *pbuf; + + if (fileRead(fileID, buffer, 4) != 4) return 0; + + size_t blocklen = (size_t) get_UINT32(buffer); + size_t sblocklen = (size_t) get_SUINT32(buffer); + + if (EXT_Debug) Message("blocklen = %d sblocklen = %d", blocklen, sblocklen); + + // clang-format off + if (blocklen == 16) + { + *swap = 0; + fact = blocklen/4; + if (fileRead(fileID, buffer, blocklen+8) != blocklen+8) return 0; + pbuf = buffer+3*fact; dimxy = (size_t) get_UINT32(pbuf); + pbuf = buffer+blocklen+4; data = (size_t) get_UINT32(pbuf); + } + else if (blocklen == 32) + { + *swap = 0; + fact = blocklen/4; + if (fileRead(fileID, buffer, blocklen+8) != blocklen+8) return 0; + pbuf = buffer+3*fact; dimxy = (size_t) get_UINT64(pbuf); + pbuf = buffer+blocklen+4; data = (size_t) get_UINT32(pbuf); + } + else if (sblocklen == 16) + { + *swap = 1; + fact = sblocklen/4; + if (fileRead(fileID, buffer, sblocklen+8) != sblocklen+8) return 0; + pbuf = buffer+3*fact; dimxy = (size_t) get_SUINT32(pbuf); + pbuf = buffer+sblocklen+4; data = (size_t) get_SUINT32(pbuf); + } + else if (sblocklen == 32) + { + *swap = 1; + fact = sblocklen/4; + if (fileRead(fileID, buffer, sblocklen+8) != sblocklen+8) return 0; + pbuf = buffer+3*fact; dimxy = (size_t) get_SUINT64(pbuf); + pbuf = buffer+sblocklen+4; data = (size_t) get_SUINT32(pbuf); + } + // clang-format on + + fileRewind(fileID); + + if (EXT_Debug) Message("swap = %d fact = %d", *swap, fact); + if (EXT_Debug) Message("dimxy = %lu data = %lu", dimxy, data); + + int found = data && (dimxy * fact == data || dimxy * fact * 2 == data); + return found; +} + +int +extInqHeader(void *ext, int *header) +{ + extrec_t *extp = (extrec_t *) ext; + + for (int i = 0; i < EXT_HEADER_LEN; i++) header[i] = extp->header[i]; + + if (EXT_Debug) Message("datasize = %zu", extp->datasize); + + return 0; +} + +int +extDefHeader(void *ext, const int *header) +{ + extrec_t *extp = (extrec_t *) ext; + + for (int i = 0; i < EXT_HEADER_LEN; i++) extp->header[i] = header[i]; + + extp->datasize = (size_t) header[3]; + if (extp->number == EXT_COMP) extp->datasize *= 2; + + if (EXT_Debug) Message("datasize = %zu", extp->datasize); + + return 0; +} + +static int +extInqData(extrec_t *extp, int prec, void *data) +{ + int ierr = 0; + int byteswap = extp->byteswap; + size_t datasize = extp->datasize; + void *buffer = extp->buffer; + int rprec = extp->prec; + + switch (rprec) + { + case EXSE_SINGLE_PRECISION: + { + if (sizeof(FLT32) == 4) + { + if (byteswap) swap4byte(buffer, datasize); + + if (rprec == prec) + memcpy(data, buffer, datasize * sizeof(FLT32)); + else + for (size_t i = 0; i < datasize; ++i) ((double *) data)[i] = (double) ((float *) buffer)[i]; + } + else + { + Error("not implemented for %d byte float", sizeof(FLT32)); + } + break; + } + case EXSE_DOUBLE_PRECISION: + if (sizeof(FLT64) == 8) + { + if (byteswap) swap8byte(buffer, datasize); + + if (rprec == prec) + memcpy(data, buffer, datasize * sizeof(FLT64)); + else + for (size_t i = 0; i < datasize; ++i) ((float *) data)[i] = (float) ((double *) buffer)[i]; + } + else + { + Error("not implemented for %d byte float", sizeof(FLT64)); + } + break; + default: + { + Error("unexpected data precision %d", rprec); + break; + } + } + + return ierr; +} + +int +extInqDataSP(void *ext, float *data) +{ + return extInqData((extrec_t *) ext, EXSE_SINGLE_PRECISION, (void *) data); +} + +int +extInqDataDP(void *ext, double *data) +{ + return extInqData((extrec_t *) ext, EXSE_DOUBLE_PRECISION, (void *) data); +} + +static int +extDefData(void *ext, int prec, const void *data) +{ + extrec_t *extp = (extrec_t *) ext; + + int rprec = extDefaultPrec ? extDefaultPrec : extp->prec; + extp->prec = rprec ? rprec : prec; + + int *header = extp->header; + + size_t datasize = (size_t) header[3]; + if (extp->number == EXT_COMP) datasize *= 2; + size_t blocklen = datasize * (size_t) rprec; + + extp->datasize = datasize; + + if (extp->buffersize != blocklen) + { + extp->buffersize = blocklen; + extp->buffer = Realloc(extp->buffer, extp->buffersize); + } + + switch (rprec) + { + case EXSE_SINGLE_PRECISION: + { + if (rprec == prec) + memcpy(extp->buffer, data, datasize * sizeof(FLT32)); + else + for (size_t i = 0; i < datasize; i++) ((float *) extp->buffer)[i] = (float) ((double *) data)[i]; + + break; + } + case EXSE_DOUBLE_PRECISION: + { + if (rprec == prec) + memcpy(extp->buffer, data, datasize * sizeof(FLT64)); + else + for (size_t i = 0; i < datasize; i++) ((double *) extp->buffer)[i] = (double) ((float *) data)[i]; + + break; + } + default: + { + Error("unexpected data precision %d", rprec); + break; + } + } + + return 0; +} + +int +extDefDataSP(void *ext, const float *data) +{ + return extDefData(ext, EXSE_SINGLE_PRECISION, (void *) data); +} + +int +extDefDataDP(void *ext, const double *data) +{ + return extDefData(ext, EXSE_DOUBLE_PRECISION, (void *) data); +} + +int +extRead(int fileID, void *ext) +{ + extrec_t *extp = (extrec_t *) ext; + + if (!extp->checked) + { + int status = extCheckFiletype(fileID, &extp->byteswap); + if (status == 0) Error("Not a EXTRA file!"); + extp->checked = 1; + } + + int byteswap = extp->byteswap; + + // read header record + size_t blocklen = binReadF77Block(fileID, byteswap); + + if (fileEOF(fileID)) return -1; + + if (EXT_Debug) Message("blocklen = %lu", blocklen); + + size_t hprec = blocklen / EXT_HEADER_LEN; + + extp->prec = (int) hprec; + + union EXT_HEADER tempheader; + switch (hprec) + { + case EXSE_SINGLE_PRECISION: + { + binReadInt32(fileID, byteswap, EXT_HEADER_LEN, tempheader.i32); + for (int i = 0; i < EXT_HEADER_LEN; i++) extp->header[i] = (int) tempheader.i32[i]; + break; + } + case EXSE_DOUBLE_PRECISION: + { + binReadInt64(fileID, byteswap, EXT_HEADER_LEN, tempheader.i64); + for (int i = 0; i < EXT_HEADER_LEN; i++) extp->header[i] = (int) tempheader.i64[i]; + break; + } + default: + { + Error("Unexpected header precision %d", hprec); + break; + } + } + + size_t blocklen2 = binReadF77Block(fileID, byteswap); + + if (blocklen2 != blocklen) + { + Warning("Header blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2); + if (blocklen2 != 0) return -1; + } + + extp->datasize = (size_t) extp->header[3]; + + if (EXT_Debug) Message("datasize = %zu", extp->datasize); + + blocklen = binReadF77Block(fileID, byteswap); + + if (extp->buffersize < blocklen) + { + extp->buffersize = blocklen; + extp->buffer = Realloc(extp->buffer, extp->buffersize); + } + + size_t dprec = blocklen / extp->datasize; + + if (dprec == hprec) + { + extp->number = EXT_REAL; + } + else if (dprec == 2 * hprec) + { + dprec /= 2; + extp->datasize *= 2; + extp->number = EXT_COMP; + } + + if (dprec != EXSE_SINGLE_PRECISION && dprec != EXSE_DOUBLE_PRECISION) + { + Warning("Unexpected data precision %d", dprec); + return -1; + } + + fileRead(fileID, extp->buffer, blocklen); + + blocklen2 = binReadF77Block(fileID, byteswap); + + if (blocklen2 != blocklen) + { + Warning("Data blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2); + if (blocklen2 != 0) return -1; + } + + return 0; +} + +int +extWrite(int fileID, void *ext) +{ + extrec_t *extp = (extrec_t *) ext; + union EXT_HEADER tempheader; + int byteswap = extp->byteswap; + int rprec = extp->prec; + int number = extp->number; + int *header = extp->header; + + // write header record + size_t blocklen = EXT_HEADER_LEN * (size_t) rprec; + + binWriteF77Block(fileID, byteswap, blocklen); + + switch (rprec) + { + case EXSE_SINGLE_PRECISION: + { + for (int i = 0; i < EXT_HEADER_LEN; i++) tempheader.i32[i] = (INT32) header[i]; + binWriteInt32(fileID, byteswap, EXT_HEADER_LEN, tempheader.i32); + break; + } + case EXSE_DOUBLE_PRECISION: + { + for (int i = 0; i < EXT_HEADER_LEN; i++) tempheader.i64[i] = (INT64) header[i]; + binWriteInt64(fileID, byteswap, EXT_HEADER_LEN, tempheader.i64); + break; + } + default: + { + Error("unexpected header precision %d", rprec); + break; + } + } + + binWriteF77Block(fileID, byteswap, blocklen); + + extp->datasize = (size_t) header[3]; + if (number == EXT_COMP) extp->datasize *= 2; + blocklen = extp->datasize * (size_t) rprec; + + binWriteF77Block(fileID, byteswap, blocklen); + + switch (rprec) + { + case EXSE_SINGLE_PRECISION: + { + binWriteFlt32(fileID, byteswap, extp->datasize, (FLT32 *) extp->buffer); + break; + } + case EXSE_DOUBLE_PRECISION: + { + binWriteFlt64(fileID, byteswap, extp->datasize, (FLT64 *) extp->buffer); + break; + } + default: + { + Error("unexpected data precision %d", rprec); + break; + } + } + + binWriteF77Block(fileID, byteswap, blocklen); + + return 0; +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <assert.h> +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <limits.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> + +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> // gettimeofday() +#endif + + +#ifdef CDI +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifndef strdup +char *strdup(const char *s); +#endif + +#ifdef HAVE_MMAP +#include <sys/mman.h> // mmap() is defined in this header +#endif + +#define MAX_FILES 8192 +static int _file_max = MAX_FILES; + +static void file_initialize(void); + +static bool _file_init = false; + +#ifdef HAVE_LIBPTHREAD +#include <pthread.h> + +static pthread_once_t _file_init_thread = PTHREAD_ONCE_INIT; +static pthread_mutex_t _file_mutex; + +#define FILE_LOCK() pthread_mutex_lock(&_file_mutex) +#define FILE_UNLOCK() pthread_mutex_unlock(&_file_mutex) +#define FILE_INIT() \ + if (_file_init == false) pthread_once(&_file_init_thread, file_initialize) + +#else + +#define FILE_LOCK() +#define FILE_UNLOCK() +#define FILE_INIT() \ + if (_file_init == false) file_initialize() +#endif + +typedef struct +{ + int self; + int flag; // access and error flag + int eof; // end of file flag + int fd; // file descriptor used for read + FILE *fp; // FILE pointer used for write + char *name; // file name + off_t size; // file size + off_t position; // file position + long access; // file access + off_t byteTrans; // + size_t blockSize; // file block size + int mode; // file access mode + int type; // file type [1:open 2:fopen] + int bufferType; // buffer type [1:std 2:mmap] + size_t bufferSize; // file buffer size + size_t mappedSize; // mmap buffer size + char *buffer; // file buffer + long bufferNumFill; // number of buffer fill + char *bufferPtr; // file buffer pointer + off_t bufferPos; + off_t bufferStart; + off_t bufferEnd; + size_t bufferCnt; + double time_in_sec; +} bfile_t; + +enum FILE_Flags +{ + FILE_EOF = 010, + FILE_ERROR = 020 +}; + +#ifndef MIN_BUF_SIZE +#define MIN_BUF_SIZE 131072L +#endif + +static const char *fbtname[] = { "unknown", "standard", "mmap" }; +static const char *ftname[] = { "unknown", "open", "fopen" }; + +static size_t FileBufferSizeMin = MIN_BUF_SIZE; +static long FileBufferSizeEnv = -1; +static int FileBufferTypeEnv = 0; + +static int FileTypeRead = FILE_TYPE_OPEN; +static int FileTypeWrite = FILE_TYPE_FOPEN; +static int FileFlagWrite = 0; + +static int FileDebug = 0; // If set to 1, debugging +static bool FileInfo = false; + +static void file_table_print(void); + +// A version string. +#undef LIBVERSION +#define LIBVERSION 1.9.1 +#define XSTRING(x) #x +#define STRING(x) XSTRING(x) +static const char file_libvers[] = STRING(LIBVERSION); + +/* + 21/05/2004 1.3.2 set min I/O Buffersize to 128k + 31/05/2005 1.4.0 replace fileTable by _fileList + 26/08/2005 1.4.1 fileClose with return value + checks for all fileptr + 01/09/2005 1.5.0 thread safe version + 06/11/2005 1.5.1 add filePtrEOF, filePtr, filePtrGetc + 03/02/2006 1.5.2 ansi C: define getpagesize and strdupx + 27/12/2007 1.6.0 add FILE_TYPE_FOPEN + 24/03/2008 1.6.1 add O_BINARY if available + remove default HAVE_MMAP + use HAVE_STRUCT_STAT_ST_BLKSIZE + 22/08/2010 1.7.0 refactor + 11/11/2010 1.7.1 update for changed interface of error.h + 02/02/2012 1.8.0 cleanup + 16/11/2012 1.8.1 added support for unbuffered write + 27/06/2013 1.8.2 added env. var. FILE_TYPE_WRITE (1:open; 2:fopen) + 29/04/2020 1.9.0 fileSetPos(): refactored + 30/04/2020 1.9.1 fileSetPos(): not initialized correctly (bug fix) + */ + +typedef struct _filePtrToIdx +{ + int idx; + bfile_t *ptr; + struct _filePtrToIdx *next; +} filePtrToIdx; + +static filePtrToIdx *_fileList = NULL; +static filePtrToIdx *_fileAvail = NULL; + +static void +file_list_new(void) +{ + assert(_fileList == NULL); + + _fileList = (filePtrToIdx *) malloc((size_t) _file_max * sizeof(filePtrToIdx)); +} + +static void +file_list_delete(void) +{ + if (_fileList) + { + free(_fileList); + _fileList = NULL; + } +} + +static void +file_init_pointer(void) +{ + for (int i = 0; i < _file_max; i++) + { + _fileList[i].next = _fileList + i + 1; + _fileList[i].idx = i; + _fileList[i].ptr = 0; + } + + _fileList[_file_max - 1].next = 0; + + _fileAvail = _fileList; +} + +static bfile_t * +file_to_pointer(int idx) +{ + bfile_t *fileptr = NULL; + + FILE_INIT(); + + if (idx >= 0 && idx < _file_max) + { + FILE_LOCK(); + fileptr = _fileList[idx].ptr; + FILE_UNLOCK(); + } + else + Error("file index %d undefined!", idx); + + return fileptr; +} + +// Create an index from a pointer +static int +file_from_pointer(bfile_t *ptr) +{ + int idx = -1; + + if (ptr) + { + FILE_LOCK(); + + if (_fileAvail) + { + filePtrToIdx *newptr = _fileAvail; + _fileAvail = _fileAvail->next; + newptr->next = 0; + idx = newptr->idx; + newptr->ptr = ptr; + + if (FileDebug) Message("Pointer %p has idx %d from file list", ptr, idx); + } + else + { + Warning("Too many open files (limit is %d)!", _file_max); + idx = -2; + } + + FILE_UNLOCK(); + } + else + Error("Internal problem (pointer %p undefined)", ptr); + + return idx; +} + +static void +file_init_entry(bfile_t *fileptr) +{ + fileptr->self = file_from_pointer(fileptr); + + fileptr->flag = 0; + fileptr->fd = -1; + fileptr->fp = NULL; + fileptr->mode = 0; + fileptr->size = 0; + fileptr->name = NULL; + fileptr->access = 0; + fileptr->position = 0; + fileptr->byteTrans = 0; + fileptr->type = 0; + fileptr->bufferType = 0; + fileptr->bufferSize = 0; + fileptr->mappedSize = 0; + fileptr->buffer = NULL; + fileptr->bufferNumFill = 0; + fileptr->bufferStart = 0; + fileptr->bufferEnd = -1; + fileptr->bufferPos = 0; + fileptr->bufferCnt = 0; + fileptr->bufferPtr = NULL; + fileptr->time_in_sec = 0.0; +} + +static bfile_t * +file_new_entry(void) +{ + bfile_t *fileptr = (bfile_t *) malloc(sizeof(bfile_t)); + if (fileptr) file_init_entry(fileptr); + return fileptr; +} + +static void +file_delete_entry(bfile_t *fileptr) +{ + int idx = fileptr->self; + + FILE_LOCK(); + + free(fileptr); + + _fileList[idx].next = _fileAvail; + _fileList[idx].ptr = 0; + _fileAvail = &_fileList[idx]; + + FILE_UNLOCK(); + + if (FileDebug) Message("Removed idx %d from file list", idx); +} + +const char * +fileLibraryVersion(void) +{ + return file_libvers; +} + +static int +file_pagesize(void) +{ +#ifdef _SC_PAGESIZE + return (int) sysconf(_SC_PAGESIZE); +#else +#ifndef POSIXIO_DEFAULT_PAGESIZE +#define POSIXIO_DEFAULT_PAGESIZE 4096 +#endif + return (int) POSIXIO_DEFAULT_PAGESIZE; +#endif +} + +static double +file_time() +{ +#ifdef HAVE_SYS_TIME_H + struct timeval mytime; + gettimeofday(&mytime, NULL); + return (double) mytime.tv_sec + (double) mytime.tv_usec * 1.0e-6; +#else + return 0; +#endif +} + +void +fileDebug(int debug) +{ + FileDebug = debug; + if (FileDebug) Message("Debug level %d", debug); +} + +void * +filePtr(int fileID) +{ + return (void *) file_to_pointer(fileID); +} + +static void +file_pointer_info(const char *caller, int fileID) +{ + if (FileDebug) + { + fprintf(stdout, "%-18s : ", caller); + fprintf(stdout, "The fileID %d underlying pointer is not valid!", fileID); + fprintf(stdout, "\n"); + } +} + +int +fileSetBufferType(int fileID, int type) +{ + int ret = 0; + + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr) + { + switch (type) + { + case FILE_BUFTYPE_STD: + case FILE_BUFTYPE_MMAP: fileptr->bufferType = type; break; + default: Error("File type %d not implemented!", type); + } + } + +#ifndef HAVE_MMAP + if (type == FILE_BUFTYPE_MMAP) ret = 1; +#endif + + return ret; +} + +int +fileFlush(int fileID) +{ + int retval = 0; + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr) + { + FILE *fp = fileptr->fp; + retval = fflush(fp); + if (retval == 0) retval = fsync(fileno(fp)); + if (retval != 0) retval = errno; + } + + return retval; +} + +void +fileClearerr(int fileID) +{ + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr) + { + if (fileptr->mode != 'r') clearerr(fileptr->fp); + } +} + +int +filePtrEOF(void *vfileptr) +{ + bfile_t *fileptr = (bfile_t *) vfileptr; + return fileptr ? (fileptr->flag & FILE_EOF) != 0 : 0; +} + +int +fileEOF(int fileID) +{ + bfile_t *fileptr = file_to_pointer(fileID); + return fileptr ? (fileptr->flag & FILE_EOF) != 0 : 0; +} + +void +fileRewind(int fileID) +{ + fileSetPos(fileID, (off_t) 0, SEEK_SET); + fileClearerr(fileID); +} + +off_t +fileGetPos(int fileID) +{ + off_t filepos = 0; + + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr) + { + if (fileptr->mode == 'r' && fileptr->type == FILE_TYPE_OPEN) + filepos = fileptr->position; + else + filepos = ftell(fileptr->fp); + } + + if (FileDebug) Message("Position %ld", filepos); + + return filepos; +} + +static int +file_set_buffer_pos(bfile_t *fileptr) +{ + off_t position = fileptr->position; + if (position < fileptr->bufferStart || position > fileptr->bufferEnd) + { + if (fileptr->bufferType == FILE_BUFTYPE_STD) + fileptr->bufferPos = position; + else + fileptr->bufferPos = position - position % file_pagesize(); + + fileptr->bufferCnt = 0; + fileptr->bufferPtr = NULL; + + return 1; + } + + return 0; +} + +static void +file_check_buffer_pos(bfile_t *fileptr) +{ + if (fileptr->bufferPos != fileptr->bufferEnd + 1) + { + if (FileDebug) Message("Reset buffer pos from %ld to %ld", fileptr->bufferPos, fileptr->bufferEnd + 1); + + fileptr->bufferPos = fileptr->bufferEnd + 1; + } +} + +static void +file_seek_buffer(bfile_t *fileptr, off_t offset, int whence) +{ + if (whence == SEEK_SET) + { + fileptr->position = offset; + if (!file_set_buffer_pos(fileptr)) + { + file_check_buffer_pos(fileptr); + fileptr->bufferCnt = (size_t) (fileptr->bufferEnd - fileptr->position) + 1; + fileptr->bufferPtr = fileptr->buffer + fileptr->position - fileptr->bufferStart; + } + } + else if (whence == SEEK_CUR) + { + fileptr->position += offset; + if (!file_set_buffer_pos(fileptr)) + { + file_check_buffer_pos(fileptr); + fileptr->bufferCnt -= (size_t) offset; + fileptr->bufferPtr += offset; + } + } +} + +int +fileSetPos(int fileID, off_t offset, int whence) +{ + int status = 0; + + if (FileDebug) Message("Offset %8ld Whence %3d", (long) offset, whence); + + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr == 0) + { + file_pointer_info(__func__, fileID); + return 1; + } + + if (whence != SEEK_SET && whence != SEEK_CUR) Error("Whence = %d not implemented", whence); + + if (fileptr->mode == 'r' && fileptr->type == FILE_TYPE_OPEN) + file_seek_buffer(fileptr, offset, whence); + else + status = fseek(fileptr->fp, offset, whence); + + if (fileptr->position < fileptr->size) + if ((fileptr->flag & FILE_EOF) != 0) fileptr->flag -= FILE_EOF; + + return status; +} + +static void +file_table_print(void) +{ + int lprintHeader = 1; + + for (int fileID = 0; fileID < _file_max; fileID++) + { + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr) + { + if (lprintHeader) + { + fprintf(stderr, "\nFile table:\n"); + fprintf(stderr, "+-----+---------+"); + fprintf(stderr, "----------------------------------------------------+\n"); + fprintf(stderr, "| ID | Mode |"); + fprintf(stderr, " Name |\n"); + fprintf(stderr, "+-----+---------+"); + fprintf(stderr, "----------------------------------------------------+\n"); + lprintHeader = 0; + } + + fprintf(stderr, "| %3d | ", fileID); + + switch (fileptr->mode) + { + case 'r': fprintf(stderr, "read "); break; + case 'w': fprintf(stderr, "write "); break; + case 'a': fprintf(stderr, "append "); break; + default: fprintf(stderr, "unknown"); + } + + fprintf(stderr, " | %-51s|\n", fileptr->name); + } + } + + if (lprintHeader == 0) + { + fprintf(stderr, "+-----+---------+"); + fprintf(stderr, "----------------------------------------------------+\n"); + } +} + +char * +fileInqName(int fileID) +{ + bfile_t *fileptr = file_to_pointer(fileID); + return fileptr ? fileptr->name : NULL; +} + +int +fileInqMode(int fileID) +{ + bfile_t *fileptr = file_to_pointer(fileID); + return fileptr ? fileptr->mode : 0; +} + +static long +file_getenv(const char *envName) +{ + long envValue = -1; + char *envString = getenv(envName); + if (envString) + { + long fact = 1; + for (int i = 0; i < (int) strlen(envString); i++) + { + if (!isdigit((int) envString[i])) + { + switch (tolower((int) envString[i])) + { + case 'k': fact = 1024; break; + case 'm': fact = 1048576; break; + case 'g': fact = 1073741824; break; + default: + fact = 0; + Warning("Invalid number string in %s: %s", envName, envString); + Warning("%s must comprise only digits [0-9].", envName); + } + break; + } + } + + if (fact) envValue = fact * atol(envString); + + if (FileDebug) Message("Set %s to %ld", envName, envValue); + } + + return envValue; +} + +static void +file_initialize(void) +{ +#ifdef HAVE_LIBPTHREAD + // initialize global API mutex lock + pthread_mutex_init(&_file_mutex, NULL); +#endif + + long value; + + FileInfo = file_getenv("FILE_INFO") > 0; + + value = file_getenv("FILE_DEBUG"); + if (value >= 0) FileDebug = (int) value; + + value = file_getenv("FILE_MAX"); + if (value >= 0) _file_max = (int) value; + + if (FileInfo) fprintf(stderr, "FILE_MAX = %d\n", _file_max); + + value = file_getenv("FILE_BUFSIZE"); + if (value >= 0) + FileBufferSizeEnv = value; + else + { + value = file_getenv("GRIB_API_IO_BUFFER_SIZE"); + if (value >= 0) FileBufferSizeEnv = value; + } + + if (FileInfo) fprintf(stderr, "FILE_BUFSIZE = %ld\n", FileBufferSizeEnv); + + value = file_getenv("FILE_TYPE_READ"); + if (value > 0) + { + switch (value) + { + case FILE_TYPE_OPEN: + case FILE_TYPE_FOPEN: FileTypeRead = (int) value; break; + default: Warning("File type %ld not implemented!", value); + } + } + + if (FileInfo) + fprintf(stderr, "FILE_TYPE_READ = %d [%d:%s %d:%s]\n", FileTypeRead, FILE_TYPE_OPEN, ftname[FILE_TYPE_OPEN], FILE_TYPE_FOPEN, + ftname[FILE_TYPE_FOPEN]); + + value = file_getenv("FILE_TYPE_WRITE"); + if (value > 0) + { + switch (value) + { + case FILE_TYPE_OPEN: + case FILE_TYPE_FOPEN: FileTypeWrite = (int) value; break; + default: Warning("File type %ld not implemented!", value); + } + } + + if (FileInfo) + fprintf(stderr, "FILE_TYPE_WRITE = %d [%d:%s %d:%s]\n", FileTypeWrite, FILE_TYPE_OPEN, ftname[FILE_TYPE_OPEN], FILE_TYPE_FOPEN, + ftname[FILE_TYPE_FOPEN]); + +#ifdef O_NONBLOCK + FileFlagWrite = O_NONBLOCK; +#endif + char *envString = getenv("FILE_FLAG_WRITE"); + if (envString) + { +#ifdef O_NONBLOCK + if (strcmp(envString, "NONBLOCK") == 0) FileFlagWrite = O_NONBLOCK; +#endif + } + + value = file_getenv("FILE_BUFTYPE"); +#ifndef HAVE_MMAP + if (value == FILE_BUFTYPE_MMAP) + { + Warning("MMAP not available!"); + value = 0; + } +#endif + if (value > 0) + { + switch (value) + { + case FILE_BUFTYPE_STD: + case FILE_BUFTYPE_MMAP: FileBufferTypeEnv = (int) value; break; + default: Warning("File buffer type %ld not implemented!", value); + } + } + + if (FileInfo) + fprintf(stderr, "FILE_BUFTYPE = %d [%d:%s %d:%s]\n", FileBufferTypeEnv, FILE_BUFTYPE_STD, fbtname[FILE_BUFTYPE_STD], + FILE_BUFTYPE_MMAP, fbtname[FILE_BUFTYPE_MMAP]); + + file_list_new(); + atexit(file_list_delete); + + FILE_LOCK(); + file_init_pointer(); + FILE_UNLOCK(); + + if (FileDebug) atexit(file_table_print); + + _file_init = true; +} + +static size_t +file_get_buffersize(bfile_t *fileptr) +{ + size_t buffersize = 0; + + if (FileBufferSizeEnv >= 0) + buffersize = (size_t) FileBufferSizeEnv; + else if (fileptr->bufferSize > 0) + buffersize = fileptr->bufferSize; + else + { + buffersize = fileptr->blockSize * 4; + if (buffersize < FileBufferSizeMin) buffersize = FileBufferSizeMin; + } + + return buffersize; +} + +static void +file_set_buffer(bfile_t *fileptr) +{ + size_t buffersize = 0; + + if (fileptr->mode == 'r') + { + if (FileBufferTypeEnv) + fileptr->bufferType = FileBufferTypeEnv; + else if (fileptr->bufferType == 0) + fileptr->bufferType = FILE_BUFTYPE_STD; + + buffersize = file_get_buffersize(fileptr); + + if ((size_t) fileptr->size < buffersize) buffersize = (size_t) fileptr->size; + + if (fileptr->bufferType == FILE_BUFTYPE_MMAP) + { + size_t blocksize = (size_t) file_pagesize(); + size_t minblocksize = 4 * blocksize; + buffersize = buffersize - buffersize % minblocksize; + + if (buffersize < (size_t) fileptr->size && buffersize < minblocksize) buffersize = minblocksize; + } + + if (buffersize == 0) buffersize = 1; + } + else + { + fileptr->bufferType = FILE_BUFTYPE_STD; + buffersize = file_get_buffersize(fileptr); + } + + if (fileptr->bufferType == FILE_BUFTYPE_STD || fileptr->type == FILE_TYPE_FOPEN) + { + if (buffersize > 0) + { + fileptr->buffer = (char *) malloc(buffersize); + if (fileptr->buffer == NULL) SysError("Allocation of file buffer failed!"); + } + } + + if (fileptr->type == FILE_TYPE_FOPEN) + if (setvbuf(fileptr->fp, fileptr->buffer, fileptr->buffer ? _IOFBF : _IONBF, buffersize)) SysError("setvbuf failed!"); + + fileptr->bufferSize = buffersize; +} + +static int +file_fill_buffer(bfile_t *fileptr) +{ + ssize_t nread; + long offset = 0; + + if (FileDebug) Message("file ptr = %p Cnt = %ld", fileptr, fileptr->bufferCnt); + + if ((fileptr->flag & FILE_EOF) != 0) return EOF; + + if (fileptr->buffer == NULL) file_set_buffer(fileptr); + + if (fileptr->bufferSize == 0) return EOF; + + int fd = fileptr->fd; + +#ifdef HAVE_MMAP + if (fileptr->bufferType == FILE_BUFTYPE_MMAP) + { + if (fileptr->bufferPos >= fileptr->size) + { + nread = 0; + } + else + { +#ifdef CDI + xassert(fileptr->bufferSize <= SSIZE_MAX); +#endif + nread = (ssize_t) fileptr->bufferSize; + if ((nread + fileptr->bufferPos) > fileptr->size) nread = fileptr->size - fileptr->bufferPos; + + if (fileptr->buffer) + { + int ret = munmap(fileptr->buffer, fileptr->mappedSize); + if (ret == -1) SysError("munmap error for read %s", fileptr->name); + fileptr->buffer = NULL; + } + + fileptr->mappedSize = (size_t) nread; + + fileptr->buffer = (char *) mmap(NULL, (size_t) nread, PROT_READ, MAP_PRIVATE, fd, fileptr->bufferPos); + + if (fileptr->buffer == MAP_FAILED) SysError("mmap error for read %s", fileptr->name); + + offset = fileptr->position - fileptr->bufferPos; + } + } + else +#endif + { + off_t retseek = lseek(fileptr->fd, fileptr->bufferPos, SEEK_SET); + if (retseek == (off_t) -1) SysError("lseek error at pos %ld file %s", (long) fileptr->bufferPos, fileptr->name); + + nread = read(fd, fileptr->buffer, fileptr->bufferSize); + if (nread > 0) offset = fileptr->position - fileptr->bufferPos; + } + + if (nread <= 0) + { + fileptr->flag |= (nread == 0) ? FILE_EOF : FILE_ERROR; + fileptr->bufferCnt = 0; + return EOF; + } + + fileptr->bufferPtr = fileptr->buffer; + fileptr->bufferCnt = (size_t) nread; + + fileptr->bufferStart = fileptr->bufferPos; + fileptr->bufferPos += nread; + fileptr->bufferEnd = fileptr->bufferPos - 1; + + if (FileDebug) + { + Message("fileID = %d Val = %d", fileptr->self, (int) fileptr->buffer[0]); + Message("fileID = %d Start = %ld", fileptr->self, fileptr->bufferStart); + Message("fileID = %d End = %ld", fileptr->self, fileptr->bufferEnd); + Message("fileID = %d nread = %ld", fileptr->self, nread); + Message("fileID = %d offset = %ld", fileptr->self, offset); + Message("fileID = %d Pos = %ld", fileptr->self, fileptr->bufferPos); + Message("fileID = %d postion = %ld", fileptr->self, fileptr->position); + } + + if (offset > 0) + { + if (offset > nread) Error("Internal problem with buffer handling. nread = %d offset = %d", nread, offset); + + fileptr->bufferPtr += offset; + fileptr->bufferCnt -= (size_t) offset; + } + + fileptr->bufferNumFill++; + + return (unsigned char) *fileptr->bufferPtr; +} + +static void +file_copy_from_buffer(bfile_t *fileptr, void *ptr, size_t size) +{ + if (FileDebug) Message("size = %ld Cnt = %ld", size, fileptr->bufferCnt); + + if (fileptr->bufferCnt < size) Error("Buffer too small. bufferCnt = %d", fileptr->bufferCnt); + + if (size == 1) + { + ((char *) ptr)[0] = fileptr->bufferPtr[0]; + + fileptr->bufferPtr++; + fileptr->bufferCnt--; + } + else + { + memcpy(ptr, fileptr->bufferPtr, size); + + fileptr->bufferPtr += size; + fileptr->bufferCnt -= size; + } +} + +static size_t +file_read_from_buffer(bfile_t *fileptr, void *ptr, size_t size) +{ + size_t nread; + size_t offset = 0; + + if (FileDebug) Message("size = %ld Cnt = %ld", size, (long) fileptr->bufferCnt); + + if (((long) fileptr->bufferCnt) < 0L) Error("Internal problem. bufferCnt = %ld", (long) fileptr->bufferCnt); + + size_t rsize = size; + + while (fileptr->bufferCnt < rsize) + { + nread = fileptr->bufferCnt; + // fprintf(stderr, "rsize = %d nread = %d\n", (int) rsize, (int) nread); + if (nread > (size_t) 0) file_copy_from_buffer(fileptr, (char *) ptr + offset, nread); + offset += nread; + rsize = (nread < rsize) ? rsize - nread : 0; + + if (file_fill_buffer(fileptr) == EOF) break; + } + + nread = size - offset; + + if (fileptr->bufferCnt < nread) nread = fileptr->bufferCnt; + + if (nread > (unsigned) 0) file_copy_from_buffer(fileptr, (char *) ptr + offset, nread); + + return (nread + offset); +} + +void +fileSetBufferSize(int fileID, long buffersize) +{ +#ifdef CDI + xassert(buffersize >= 0); +#endif + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr) fileptr->bufferSize = (size_t) buffersize; +} + +/* + * Open a file. Returns file ID, or -1 on error + */ +int +fileOpen(const char *filename, const char *mode) +#ifdef CDI +{ + int (*myFileOpen)(const char *filename, const char *mode) + = (int (*)(const char *, const char *)) namespaceSwitchGet(NSSWITCH_FILE_OPEN).func; + return myFileOpen(filename, mode); +} + +int +fileOpen_serial(const char *filename, const char *mode) +#endif +{ + FILE *fp = NULL; // file pointer (used for write) + int fd = -1; // file descriptor (used for read) + int fileID = FILE_UNDEFID; + struct stat filestat; + bfile_t *fileptr = NULL; + + FILE_INIT(); + + int fmode = tolower((int) mode[0]); + + switch (fmode) + { + case 'r': + if (FileTypeRead == FILE_TYPE_FOPEN) + fp = fopen(filename, "rb"); + else + fd = open(filename, O_RDONLY | O_BINARY); + break; + case 'x': fp = fopen(filename, "rb"); break; + case 'w': + if (FileTypeWrite == FILE_TYPE_FOPEN) + fp = fopen(filename, "wb"); + else + fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY | O_BINARY | FileFlagWrite, 0666); + break; + case 'a': fp = fopen(filename, "ab"); break; + default: Error("Mode %c unexpected!", fmode); + } + + if (FileDebug && fp == NULL && fd == -1) Message("Open failed on %s mode %c errno %d", filename, fmode, errno); + + if (fp) + { + if (stat(filename, &filestat) != 0) return fileID; + + fileptr = file_new_entry(); + if (fileptr) + { + fileID = fileptr->self; + fileptr->fp = fp; + } + } + else if (fd >= 0) + { + if (fstat(fd, &filestat) != 0) return fileID; + + fileptr = file_new_entry(); + if (fileptr) + { + fileID = fileptr->self; + fileptr->fd = fd; + } + } + + if (fileID >= 0) + { + fileptr->mode = fmode; + fileptr->name = strdup(filename); + +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + fileptr->blockSize = (size_t) filestat.st_blksize; +#else + fileptr->blockSize = (size_t) 4096; +#endif + + // clang-format off + if (fmode == 'r') fileptr->type = FileTypeRead; + else if (fmode == 'w') fileptr->type = FileTypeWrite; + else fileptr->type = FILE_TYPE_FOPEN; + // clang-format on + + if (fmode == 'r') fileptr->size = filestat.st_size; + + // if (fileptr->type == FILE_TYPE_FOPEN) file_set_buffer(fileptr); + file_set_buffer(fileptr); + + if (FileDebug) Message("File %s opened with ID %d", filename, fileID); + } + + return fileID; +} + +/* + * Close a file. + */ +int +fileClose(int fileID) +#ifdef CDI +{ + int (*myFileClose)(int fileID) = (int (*)(int)) namespaceSwitchGet(NSSWITCH_FILE_CLOSE).func; + return myFileClose(fileID); +} + +int +fileClose_serial(int fileID) +#endif +{ + int ret; + double rout = 0; + + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr == NULL) + { + file_pointer_info(__func__, fileID); + return 1; + } + + const char *name = fileptr->name; + + if (FileDebug) Message("fileID = %d filename = %s", fileID, name); + + if (FileInfo) + { + fprintf(stderr, "____________________________________________\n"); + fprintf(stderr, " file ID : %d\n", fileID); + fprintf(stderr, " file name : %s\n", fileptr->name); + fprintf(stderr, " file type : %d (%s)\n", fileptr->type, ftname[fileptr->type]); + + if (fileptr->type == FILE_TYPE_FOPEN) + fprintf(stderr, " file pointer : %p\n", (void *) fileptr->fp); + else + { + fprintf(stderr, " file descriptor : %d\n", fileptr->fd); + fprintf(stderr, " file flag : %d\n", FileFlagWrite); + } + fprintf(stderr, " file mode : %c\n", fileptr->mode); + + if (sizeof(off_t) > sizeof(long)) + { +#ifdef _WIN32 + fprintf(stderr, " file size : %I64d\n", (long long) fileptr->size); + if (fileptr->type == FILE_TYPE_OPEN) fprintf(stderr, " file position : %I64d\n", (long long) fileptr->position); + fprintf(stderr, " bytes transfered : %I64d\n", (long long) fileptr->byteTrans); +#else + fprintf(stderr, " file size : %lld\n", (long long) fileptr->size); + if (fileptr->type == FILE_TYPE_OPEN) fprintf(stderr, " file position : %lld\n", (long long) fileptr->position); + fprintf(stderr, " bytes transfered : %lld\n", (long long) fileptr->byteTrans); +#endif + } + else + { + fprintf(stderr, " file size : %ld\n", (long) fileptr->size); + if (fileptr->type == FILE_TYPE_OPEN) fprintf(stderr, " file position : %ld\n", (long) fileptr->position); + fprintf(stderr, " bytes transfered : %ld\n", (long) fileptr->byteTrans); + } + + if (fileptr->time_in_sec > 0) rout = (double) fileptr->byteTrans / (1024. * 1024. * fileptr->time_in_sec); + + fprintf(stderr, " wall time [s] : %.2f\n", fileptr->time_in_sec); + fprintf(stderr, " data rate [MB/s] : %.1f\n", rout); + + fprintf(stderr, " file access : %ld\n", fileptr->access); + if (fileptr->mode == 'r' && fileptr->type == FILE_TYPE_OPEN) + { + fprintf(stderr, " buffer type : %d (%s)\n", fileptr->bufferType, fbtname[fileptr->bufferType]); + fprintf(stderr, " num buffer fill : %ld\n", fileptr->bufferNumFill); + } + fprintf(stderr, " buffer size : %lu\n", (unsigned long) fileptr->bufferSize); + fprintf(stderr, " block size : %lu\n", (unsigned long) fileptr->blockSize); + fprintf(stderr, " page size : %d\n", file_pagesize()); + fprintf(stderr, "--------------------------------------------\n"); + } + + if (fileptr->type == FILE_TYPE_FOPEN) + { + ret = fclose(fileptr->fp); + if (ret == EOF) SysError("EOF returned for close of %s!", name); + } + else + { +#ifdef HAVE_MMAP + if (fileptr->buffer && fileptr->mappedSize) + { + ret = munmap(fileptr->buffer, fileptr->mappedSize); + if (ret == -1) SysError("munmap error for close %s", fileptr->name); + fileptr->buffer = NULL; + } +#endif + ret = close(fileptr->fd); + if (ret == -1) SysError("EOF returned for close of %s!", name); + } + + if (fileptr->name) free((void *) fileptr->name); + if (fileptr->buffer) free((void *) fileptr->buffer); + + file_delete_entry(fileptr); + + return 0; +} + +int +filePtrGetc(void *vfileptr) +{ + int ivalue = EOF; + + bfile_t *fileptr = (bfile_t *) vfileptr; + if (fileptr) + { + if (fileptr->mode == 'r' && fileptr->type == FILE_TYPE_OPEN) + { + int fillret = (fileptr->bufferCnt == 0) ? file_fill_buffer(fileptr) : 0; + if (fillret >= 0) + { + ivalue = (unsigned char) *fileptr->bufferPtr++; + fileptr->bufferCnt--; + fileptr->position++; + + fileptr->byteTrans++; + fileptr->access++; + } + } + else + { + ivalue = fgetc(fileptr->fp); + if (ivalue >= 0) + { + fileptr->byteTrans++; + fileptr->access++; + } + else + fileptr->flag |= FILE_EOF; + } + } + + return ivalue; +} + +int +fileGetc(int fileID) +{ + bfile_t *fileptr = file_to_pointer(fileID); + return filePtrGetc((void *) fileptr); +} + +size_t +filePtrRead(void *vfileptr, void *restrict ptr, size_t size) +{ + size_t nread = 0; + + bfile_t *fileptr = (bfile_t *) vfileptr; + if (fileptr) + { + if (fileptr->mode == 'r' && fileptr->type == FILE_TYPE_OPEN) + { + nread = file_read_from_buffer(fileptr, ptr, size); + } + else + { + nread = fread(ptr, 1, size, fileptr->fp); + if (nread != size) fileptr->flag |= (nread == 0) ? FILE_EOF : FILE_ERROR; + } + + fileptr->position += (off_t) nread; + fileptr->byteTrans += (off_t) nread; + fileptr->access++; + } + + if (FileDebug) Message("size %ld nread %ld", size, nread); + + return nread; +} + +size_t +fileRead(int fileID, void *restrict ptr, size_t size) +{ + size_t nread = 0; + + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr) + { + double t_begin = 0.0; + + if (FileInfo) t_begin = file_time(); + + if (fileptr->type == FILE_TYPE_OPEN) + { + nread = file_read_from_buffer(fileptr, ptr, size); + } + else + { + nread = fread(ptr, 1, size, fileptr->fp); + if (nread != size) fileptr->flag |= (nread == 0) ? FILE_EOF : FILE_ERROR; + } + + if (FileInfo) fileptr->time_in_sec += file_time() - t_begin; + + fileptr->position += (off_t) nread; + fileptr->byteTrans += (off_t) nread; + fileptr->access++; + } + + if (FileDebug) Message("size %ld nread %ld", size, nread); + + return nread; +} + +size_t +fileWrite(int fileID, const void *restrict ptr, size_t size) +{ + size_t nwrite = 0; + + bfile_t *fileptr = file_to_pointer(fileID); + if (fileptr) + { + double t_begin = 0.0; + + if (FileInfo) t_begin = file_time(); + + if (fileptr->type == FILE_TYPE_FOPEN) + { + nwrite = fwrite(ptr, 1, size, fileptr->fp); + } + else + { + ssize_t temp = write(fileptr->fd, ptr, size); + if (temp == -1) perror("error writing to file"); + nwrite = (temp == -1) ? 0 : (size_t) temp; + } + + if (FileInfo) fileptr->time_in_sec += file_time() - t_begin; + + fileptr->position += (off_t) nwrite; + fileptr->byteTrans += (off_t) nwrite; + fileptr->access++; + } + + return nwrite; +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <float.h> +#include <math.h> + +#ifndef M_SQRT2 +#define M_SQRT2 1.41421356237309504880168872420969808 +#endif + +static void +cpledn(size_t kn, size_t kodd, double *pfn, double pdx, int kflag, double *pw, double *pdxn, double *pxmod) +{ + // 1.0 Newton iteration step + + double zdlx = pdx; + double zdlldn = 0.0; + + size_t ik = 1; + + if (kflag == 0) + { + double zdlk = 0.5 * pfn[0]; + for (size_t jn = 2 - kodd; jn <= kn; jn += 2) + { + // normalised ordinary Legendre polynomial == \overbar{p_n}^0 + zdlk = zdlk + pfn[ik] * cos((double) (jn) *zdlx); + // normalised derivative == d/d\theta(\overbar{p_n}^0) + zdlldn = zdlldn - pfn[ik] * (double) (jn) *sin((double) (jn) *zdlx); + ik++; + } + // Newton method + double zdlmod = -(zdlk / zdlldn); + double zdlxn = zdlx + zdlmod; + *pdxn = zdlxn; + *pxmod = zdlmod; + } + + // 2.0 Compute weights + + if (kflag == 1) + { + for (size_t jn = 2 - kodd; jn <= kn; jn += 2) + { + // normalised derivative + zdlldn = zdlldn - pfn[ik] * (double) (jn) *sin((double) (jn) *zdlx); + ik++; + } + *pw = (double) (2 * kn + 1) / (zdlldn * zdlldn); + } + + return; +} + +static void +gawl(double *pfn, double *pl, double *pw, size_t kn) +{ + double pmod = 0.0; + double zw = 0.0; + double zdlxn = 0.0; + + // 1.0 Initizialization + + int iflag = 0; + int itemax = 20; + + size_t iodd = (kn % 2); + + double zdlx = *pl; + + // 2.0 Newton iteration + + for (int jter = 1; jter <= itemax + 1; ++jter) + { + cpledn(kn, iodd, pfn, zdlx, iflag, &zw, &zdlxn, &pmod); + zdlx = zdlxn; + if (iflag == 1) break; + if (fabs(pmod) <= DBL_EPSILON * 1000.0) iflag = 1; + } + + *pl = zdlxn; + *pw = zw; + + return; +} + +static void +gauaw(size_t kn, double *restrict pl, double *restrict pw) +{ + /* + * 1.0 Initialize Fourier coefficients for ordinary Legendre polynomials + * + * Belousov, Swarztrauber, and ECHAM use zfn(0,0) = sqrt(2) + * IFS normalisation chosen to be 0.5*Integral(Pnm**2) = 1 (zfn(0,0) = 2.0) + */ + double *zfn = (double *) malloc((kn + 1) * (kn + 1) * sizeof(double)); + double *zfnlat = (double *) malloc((kn / 2 + 1 + 1) * sizeof(double)); + + zfn[0] = M_SQRT2; + for (size_t jn = 1; jn <= kn; ++jn) + { + double zfnn = zfn[0]; + for (size_t jgl = 1; jgl <= jn; ++jgl) + { + zfnn *= sqrt(1.0 - 0.25 / ((double) (jgl * jgl))); + } + + zfn[jn * (kn + 1) + jn] = zfnn; + + size_t iodd = jn % 2; + for (size_t jgl = 2; jgl <= jn - iodd; jgl += 2) + { + zfn[jn * (kn + 1) + jn - jgl] = zfn[jn * (kn + 1) + jn - jgl + 2] * ((double) ((jgl - 1) * (2 * jn - jgl + 2))) + / ((double) (jgl * (2 * jn - jgl + 1))); + } + } + + // 2.0 Gaussian latitudes and weights + + size_t iodd = kn % 2; + size_t ik = iodd; + for (size_t jgl = iodd; jgl <= kn; jgl += 2) + { + zfnlat[ik] = zfn[kn * (kn + 1) + jgl]; + ik++; + } + + // 2.1 Find first approximation of the roots of the Legendre polynomial of degree kn + + size_t ins2 = kn / 2 + (kn % 2); + + for (size_t jgl = 1; jgl <= ins2; ++jgl) + { + double z = ((double) (4 * jgl - 1)) * M_PI / ((double) (4 * kn + 2)); + pl[jgl - 1] = z + 1.0 / (tan(z) * ((double) (8 * kn * kn))); + } + + // 2.2 Computes roots and weights for transformed theta + + for (size_t jgl = ins2; jgl >= 1; --jgl) + { + size_t jglm1 = jgl - 1; + gawl(zfnlat, &(pl[jglm1]), &(pw[jglm1]), kn); + } + + // convert to physical latitude + + for (size_t jgl = 0; jgl < ins2; ++jgl) pl[jgl] = cos(pl[jgl]); + + for (size_t jgl = 1; jgl <= kn / 2; ++jgl) + { + size_t jglm1 = jgl - 1; + size_t isym = kn - jgl; + pl[isym] = -pl[jglm1]; + pw[isym] = pw[jglm1]; + } + + free(zfnlat); + free(zfn); + + return; +} + +void +gaussianLatitudes(size_t nlats, double *latitudes, double *weights) +{ + gauaw(nlats, latitudes, weights); +} + +bool +isGaussianLatitudes(size_t nlats, const double *latitudes) +{ + bool is_gauss_lats = false; + + if (nlats > 2) // check if gaussian + { + size_t i; + double *yv = (double *) malloc(nlats * sizeof(double)); + double *yw = (double *) malloc(nlats * sizeof(double)); + gaussianLatitudes(nlats, yv, yw); + free(yw); + + for (i = 0; i < nlats; i++) yv[i] = asin(yv[i]) / M_PI * 180.0; + + for (i = 0; i < nlats; i++) + if (fabs(yv[i] - latitudes[i]) > ((yv[0] - yv[1]) / 500.0)) break; + + if (i == nlats) is_gauss_lats = true; + + // check S->N + if (is_gauss_lats == false) + { + for (i = 0; i < nlats; i++) + if (fabs(yv[i] - latitudes[nlats - i - 1]) > ((yv[0] - yv[1]) / 500.0)) break; + + if (i == nlats) is_gauss_lats = true; + } + + free(yv); + } + + return is_gauss_lats; +} +#ifndef GET_NUM_MISSVALS_H +#define GET_NUM_MISSVALS_H + +#include <stddef.h> + +size_t get_num_missvalsSP(size_t size, float *data, float missval); +size_t get_num_missvalsDP(size_t size, double *data, double missval); +size_t get_cplx_num_missvalsSP(size_t size, float *data, float missval); +size_t get_cplx_num_missvalsDP(size_t size, double *data, double missval); + +#endif + +size_t +get_num_missvalsSP(size_t size, float *data, float missval) +{ + size_t nmiss = 0; + + if (DBL_IS_NAN(missval)) + { + for (size_t i = 0; i < size; i++) + if (DBL_IS_EQUAL(data[i], missval)) + { + data[i] = missval; + nmiss++; + } + } + else + { + for (size_t i = 0; i < size; i++) + if (IS_EQUAL(data[i], missval)) + { + data[i] = missval; + nmiss++; + } + } + + return nmiss; +} + +size_t +get_num_missvalsDP(size_t size, double *data, double missval) +{ + size_t nmiss = 0; + + if (DBL_IS_NAN(missval)) + { + for (size_t i = 0; i < size; i++) + if (DBL_IS_EQUAL(data[i], missval) || DBL_IS_EQUAL(data[i], (float) missval)) + { + data[i] = missval; + nmiss++; + } + } + else + { + for (size_t i = 0; i < size; i++) + if (IS_EQUAL(data[i], missval) || IS_EQUAL(data[i], (float) missval)) + { + data[i] = missval; + nmiss++; + } + } + + return nmiss; +} + +size_t +get_cplx_num_missvalsSP(size_t size, float *data, float missval) +{ + size_t nmiss = 0; + + if (DBL_IS_NAN(missval)) + { + for (size_t i = 0; i < 2 * size; i += 2) + if (DBL_IS_EQUAL(data[i], missval)) + { + data[i] = missval; + nmiss++; + } + } + else + { + for (size_t i = 0; i < 2 * size; i += 2) + if (IS_EQUAL(data[i], missval)) + { + data[i] = missval; + nmiss++; + } + } + + return nmiss; +} + +size_t +get_cplx_num_missvalsDP(size_t size, double *data, double missval) +{ + size_t nmiss = 0; + + if (DBL_IS_NAN(missval)) + { + for (size_t i = 0; i < 2 * size; i += 2) + if (DBL_IS_EQUAL(data[i], missval) || DBL_IS_EQUAL(data[i], (float) missval)) + { + data[i] = missval; + nmiss++; + } + } + else + { + for (size_t i = 0; i < 2 * size; i += 2) + if (IS_EQUAL(data[i], missval) || IS_EQUAL(data[i], (float) missval)) + { + data[i] = missval; + nmiss++; + } + } + + return nmiss; +} +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBGRIB_API +#include <grib_api.h> +#endif + +#include <stdio.h> + + +static char gribapi_libvers[64] = ""; +#ifdef HAVE_LIBGRIB_API +static bool gribapi_libvers_init; +#endif + +void +gribapiLibraryVersion(int *major_version, int *minor_version, int *revision_version) +{ +#ifdef HAVE_LIBGRIB_API + long version = grib_get_api_version(); + (*major_version) = (int) (version / 10000); + (*minor_version) = (int) ((version - (*major_version) * 10000) / 100); + (*revision_version) = (int) (version - (*major_version) * 10000 - (*minor_version) * 100); +#else + (*major_version) = 0; + (*minor_version) = 0; + (*revision_version) = 0; +#endif +} + +const char * +gribapiLibraryVersionString(void) +{ +#ifdef HAVE_LIBGRIB_API + if (!gribapi_libvers_init) + { + int major_version, minor_version, revision_version; + gribapiLibraryVersion(&major_version, &minor_version, &revision_version); + + snprintf(gribapi_libvers, sizeof(gribapi_libvers), "%d.%d.%d", major_version, minor_version, revision_version); + gribapi_libvers_init = true; + } +#endif + + return gribapi_libvers; +} + +void * +gribHandleNew(int editionNumber) +{ +#ifdef HAVE_LIBGRIB_API + grib_handle *gh = NULL; + const char *fname = (editionNumber == 1) ? CDI_GRIB1_Template : CDI_GRIB2_Template; + if (fname) + { + FILE *fp = fopen(fname, "r"); + if (fp) + { + int error; + gh = grib_handle_new_from_file(NULL, fp, &error); + fclose(fp); + if (gh == NULL) Error("grib_handle_new_from_file failed!"); + } + else + { + Error("Open failed on >%s<!", fname); + } + } + + if (gh == NULL) + { + gh = grib_handle_new_from_samples(NULL, (editionNumber == 1) ? "GRIB1" : "GRIB2"); + if (gh == NULL) Error("grib_handle_new_from_samples failed!"); + + if (editionNumber == 1) GRIB_CHECK(my_grib_set_long(gh, "deleteLocalDefinition", 1L), 0); + if (editionNumber == 2) GRIB_CHECK(my_grib_set_long(gh, "grib2LocalSectionPresent", 0L), 0); + if (editionNumber == 2) GRIB_CHECK(my_grib_set_long(gh, "numberOfValues", 0L), 0); + } + + return gh; +#else + return NULL; +#endif +} + +void +gribHandleDelete(void *gh) +{ +#ifdef HAVE_LIBGRIB_API + grib_handle_delete((struct grib_handle *) gh); +#endif +} + +void +gribContainersNew(stream_t *streamptr) +{ + const int editionNumber = (streamptr->filetype == CDI_FILETYPE_GRB) ? 1 : 2; + +#ifdef HAVE_LIBCGRIBEX + if (editionNumber == 1 && !CDI_gribapi_grib1) + { + } + else +#endif + { + const int nvars = streamptr->nvars; + +#ifdef GRIBCONTAINER2D + gribContainer_t **gribContainers; + gribContainers = (gribContainer_t **) Malloc(nvars * sizeof(gribContainer_t *)); + + for (int varID = 0; varID < nvars; ++varID) + { + const int nlevs = streamptr->vars[varID].nlevs; + gribContainers[varID] = (gribContainer_t *) Malloc(nlevs * sizeof(gribContainer_t)); + + for (int levelID = 0; levelID < nlevs; ++levelID) + { + gribContainers[varID][levelID].gribHandle = gribHandleNew(editionNumber); + gribContainers[varID][levelID].init = false; + } + } + + streamptr->gribContainers = (void *) gribContainers; +#else + gribContainer_t *gribContainers = (gribContainer_t *) Malloc((size_t) nvars * sizeof(gribContainer_t)); + + for (int varID = 0; varID < nvars; ++varID) + { + gribContainers[varID].gribHandle = gribHandleNew(editionNumber); + gribContainers[varID].init = false; + } + + streamptr->gribContainers = (void *) gribContainers; +#endif + } +} + +void +gribContainersDelete(stream_t *streamptr) +{ + if (streamptr->gribContainers) + { + const int nvars = streamptr->nvars; + +#ifdef GRIBCONTAINER2D + gribContainer_t **gribContainers = (gribContainer_t **) streamptr->gribContainers; + + for (int varID = 0; varID < nvars; ++varID) + { + const int nlevs = streamptr->vars[varID].nlevs; + for (int levelID = 0; levelID < nlevs; ++levelID) + { + gribHandleDelete(gribContainers[varID][levelID].gribHandle); + } + Free(gribContainers[varID]); + } +#else + gribContainer_t *gribContainers = (gribContainer_t *) streamptr->gribContainers; + + for (int varID = 0; varID < nvars; ++varID) + { + gribHandleDelete(gribContainers[varID].gribHandle); + } +#endif + + Free(gribContainers); + + streamptr->gribContainers = NULL; + } +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef INCLUDE_GUARD_CDI_GRIBAPI_UTILITIES_H +#define INCLUDE_GUARD_CDI_GRIBAPI_UTILITIES_H + +#ifdef HAVE_LIBGRIB_API + + +#include <grib_api.h> + +#include <stdbool.h> + +char *gribCopyString(grib_handle *gribHandle, const char *key); +bool gribCheckString(grib_handle *gribHandle, const char *key, const char *expectedValue); + +bool gribCheckLong(grib_handle *gribHandle, const char *key, long expectedValue); +long gribGetLong(grib_handle *gh, const char *key); +long gribGetLongDefault(grib_handle *gribHandle, const char *key, long defaultValue); + +double gribGetDouble(grib_handle *gh, const char *key); +double gribGetDoubleDefault(grib_handle *gribHandle, const char *key, double defaultValue); + +size_t gribGetArraySize(grib_handle *gribHandle, const char *key); +void gribGetDoubleArray(grib_handle *gribHandle, const char *key, + double *array); // The caller is responsible to ensure a sufficiently large buffer. +void gribGetLongArray(grib_handle *gribHandle, const char *key, + long *array); // The caller is responsible to ensure a sufficiently large buffer. + +long gribEditionNumber(grib_handle *gh); +char *gribMakeTimeString(grib_handle *gh, CdiTimeType timeType); // Returns NULL if timeType is kCdiTimeType_endTime and the field + // does not have an integration period (statistical data). +int gribapiTimeIsFC(grib_handle *gh); +int gribapiGetTsteptype(grib_handle *gh); +int gribGetDatatype(grib_handle *gribHandle); +int gribapiGetParam(grib_handle *gh); +int gribapiGetGridType(grib_handle *gh); +bool gribapiGetGrid(grib_handle *gh, grid_t *grid); +size_t gribapiGetGridsize(grib_handle *gh); + +#ifdef HIRLAM_EXTENSIONS +void gribapiSetDataTimeRangeIndicator(grib_handle *gh, int timeRangeIndicator); +void gribapiGetDataTimeRangeIndicator(grib_handle *gh, int *timeRangeIndicator); +#endif // #ifdef HIRLAM_EXTENSIONS + +extern struct cdiGribAPI_ts_str_map_elem +{ + long productionTemplate; + const char sname[8]; +} cdiGribAPI_ts_str_map[]; + +#endif + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBGRIB_API + + + +#include <assert.h> +#include <time.h> + +#define FAIL_ON_GRIB_ERROR(function, gribHandle, key, ...) \ + do \ + { \ + const int errorCode = (int) function(gribHandle, key, __VA_ARGS__); \ + if (errorCode) \ + { \ + fprintf(stderr, "%s:%d: Error in function `%s`: `%s` returned error code %d for key \"%s\"", __FILE__, __LINE__, \ + __func__, #function, errorCode, key); \ + exit(errorCode); \ + } \ + } \ + while (0) + +// A simple wrapper for grib_get_string() that returns a newly allocated string. +char * +gribCopyString(grib_handle *gribHandle, const char *key) +{ + size_t length; +#ifdef HAVE_GRIB_GET_LENGTH + if (!grib_get_length(gribHandle, key, &length)) + { + char *result = (char *) Malloc(length); + if (!grib_get_string(gribHandle, key, result, &length)) + result = (char *) Realloc(result, length); + else + { + Free(result); + result = NULL; + } + return result; + } + else + return NULL; +#else + length = 1024; /* there's an implementation limit + * that makes strings longer than + * this unlikely in grib_api versions + * not providing grib_get_length */ + int rc; + char *result = (char *) Malloc(length); + while ((rc = grib_get_string(gribHandle, key, result, &length)) == GRIB_BUFFER_TOO_SMALL || rc == GRIB_ARRAY_TOO_SMALL) + { + if (length <= 1024UL * 1024UL) + { + length *= 2; + result = Realloc(result, length); + } + else + break; + } + if (!rc) + result = Realloc(result, length); + else + { + Free(result); + result = NULL; + } + return result; +#endif +} + +// A simple wrapper for grib_get_string() for the usecase that the result is only compared to a given constant string. +// Returns true if the key exists and the value is equal to the given string. +bool +gribCheckString(grib_handle *gribHandle, const char *key, const char *expectedValue) +{ + size_t expectedLength = strlen(expectedValue) + 1; +#ifdef HAVE_GRIB_GET_LENGTH + size_t length; + if (grib_get_length(gribHandle, key, &length)) return false; + if (length != expectedLength) return false; + char *value = (char *) Malloc(length); + if (grib_get_string(gribHandle, key, value, &length)) return false; + int rc = str_is_equal(value, expectedValue); + Free(value); +#else + char *value = gribCopyString(gribHandle, key); + int rc = value ? (strlen(value) + 1 == expectedLength ? str_is_equal(value, expectedValue) : false) : false; + Free(value); +#endif + return rc; +} + +// A simple wrapper for grib_get_long() for the usecase that the result is only compared to a given constant value. +// Returns true if the key exists and the value is equal to the given one. +bool +gribCheckLong(grib_handle *gribHandle, const char *key, long expectedValue) +{ + long value; + if (grib_get_long(gribHandle, key, &value)) return false; + return value == expectedValue; +} + +// A simple wrapper for grib_get_long() for the usecase that failure to fetch the value is fatal. +long +gribGetLong(grib_handle *gh, const char *key) +{ + long result; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, key, &result); + return result; +} + +// A simple wrapper for grib_get_long() for the usecase that a default value is used in the case that the operation fails. +long +gribGetLongDefault(grib_handle *gribHandle, const char *key, long defaultValue) +{ + long result; + if (grib_get_long(gribHandle, key, &result) || result == GRIB_MISSING_LONG) result = defaultValue; + return result; +} + +// A simple wrapper for grib_get_double() for the usecase that failure to fetch the value is fatal. +double +gribGetDouble(grib_handle *gh, const char *key) +{ + double result; + FAIL_ON_GRIB_ERROR(grib_get_double, gh, key, &result); + return result; +} + +// A sample wrapper for grib_get_double() for the usecase that a default value is used in the case that the operation fails. +double +gribGetDoubleDefault(grib_handle *gribHandle, const char *key, double defaultValue) +{ + double result; + if (grib_get_double(gribHandle, key, &result) || IS_EQUAL(result, GRIB_MISSING_DOUBLE)) result = defaultValue; + return result; +} + +// A simple wrapper for grib_get_size() for the usecase that failure to fetch the value is fatal. +size_t +gribGetArraySize(grib_handle *gribHandle, const char *key) +{ + size_t result; + FAIL_ON_GRIB_ERROR(grib_get_size, gribHandle, key, &result); + return result; +} + +// A simple wrapper for grib_get_double_array() for the usecase that failure to fetch the data is fatal. +void +gribGetDoubleArray(grib_handle *gribHandle, const char *key, double *array) +{ + size_t valueCount = gribGetArraySize(gribHandle, key); + FAIL_ON_GRIB_ERROR(grib_get_double_array, gribHandle, key, array, &valueCount); +} + +// A simple wrapper for grib_get_long_array() for the usecase that failure to fetch the data is fatal. +void +gribGetLongArray(grib_handle *gribHandle, const char *key, long *array) +{ + size_t valueCount = gribGetArraySize(gribHandle, key); + FAIL_ON_GRIB_ERROR(grib_get_long_array, gribHandle, key, array, &valueCount); +} + +// We need the edition number so frequently, that it's convenient to give it its own function. +long +gribEditionNumber(grib_handle *gh) +{ + return gribGetLong(gh, "editionNumber"); +} + +// This return value of this should be passed to a call to resetTz(), it is a malloc'ed string with the content of the TZ +// environment variable before the call (or NULL if that was not set). +static char * +setUtc() +{ + char *temp = getenv("TZ"), *result = NULL; + if (temp) result = strdup(temp); + setenv("TZ", "UTC", 1); + return result; +} + +// Undoes the effect of setUtc(), pass to it the return value of the corresponding setUtc() call, it will free the string. +static void +resetTz(char *savedTz) +{ + if (savedTz) + { + setenv("TZ", savedTz, 1); + Free(savedTz); + } + else + { + unsetenv("TZ"); + } +} + +// This function uses the system functions to normalize the date representation according to the gregorian calendar. +// Returns zero on success. +static int +normalizeDays(struct tm *me) +{ + char *savedTz = setUtc(); // Ensure that mktime() does not interprete the date according to our local time zone. + + int result = (mktime(me) == (time_t) -1); // This does all the heavy lifting. + + resetTz(savedTz); + return result; +} + +// Returns zero on success. +static int +addSecondsToDate(struct tm *me, long long amount) +{ + // It is irrelevant here whether days are zero or one based, the correction would have be undone again so that it is effectless. + long long seconds = ((me->tm_mday * 24ll + me->tm_hour) * 60 + me->tm_min) * 60 + + me->tm_sec; // The portion of the date that uses fixed increments. + seconds += amount; + me->tm_mday = (int) (seconds / 24 / 60 / 60); + seconds -= (long long) me->tm_mday * 24 * 60 * 60; + me->tm_hour = (int) (seconds / 60 / 60); + seconds -= (long long) me->tm_hour * 60 * 60; + me->tm_min = (int) (seconds / 60); + seconds -= (long long) (me->tm_min * 60); + me->tm_sec = (int) seconds; + return normalizeDays(me); +} + +static void +addMonthsToDate(struct tm *me, long long amount) +{ + long long months = me->tm_year * 12ll + me->tm_mon; + months += amount; + me->tm_year = (int) (months / 12); + months -= (long long) me->tm_year * 12; + me->tm_mon = (int) months; +} + +// unit is a value according to code table 4.4 of the GRIB2 specification, returns non-zero on error +static int +addToDate(struct tm *me, long long amount, long unit) +{ + switch (unit) + { + case 0: return addSecondsToDate(me, 60 * amount); // minute + case 1: return addSecondsToDate(me, 60 * 60 * amount); // hour + case 2: return addSecondsToDate(me, 24 * 60 * 60 * amount); // day + + case 3: addMonthsToDate(me, amount); return 0; // month + case 4: addMonthsToDate(me, 12 * amount); return 0; // year + case 5: addMonthsToDate(me, 10 * 12 * amount); return 0; // decade + case 6: addMonthsToDate(me, 30 * 12 * amount); return 0; // normal + case 7: addMonthsToDate(me, 100 * 12 * amount); return 0; // century + + case 10: return addSecondsToDate(me, 3 * 60 * 60 * amount); // eighth of a day + case 11: return addSecondsToDate(me, 6 * 60 * 60 * amount); // quarter day + case 12: return addSecondsToDate(me, 12 * 60 * 60 * amount); // half day + case 13: return addSecondsToDate(me, amount); // second + + default: return 1; // reserved, unknown, or missing + } +} + +static char * +makeDateString(struct tm *me) +{ + const size_t length = 4 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 4 + 1; + char *result = (char *) Malloc(length); + snprintf(result, length, "%04d-%02d-%02dT%02d:%02d:%02d.000", me->tm_year + 1900, me->tm_mon + 1, me->tm_mday, me->tm_hour, + me->tm_min, me->tm_sec); + return result; +} + +// FIXME: This ignores any calendar definition that might be present. +// XXX: Identification templates are not implemented in grib_api-1.12.3, so even if I implemented the other calendars now, it +// wouldn't be possible to use them. +static int +getAvailabilityOfRelativeTimes(grib_handle *gh, bool *outHaveForecastTime, bool *outHaveTimeRange) +{ + switch (gribGetLong(gh, "productDefinitionTemplateNumber")) + { + case 20: + case 30: + case 31: + case 254: + case 311: + case 2000: *outHaveForecastTime = false, *outHaveTimeRange = false; return 0; + + // case 55 and case 40455 are the same: 55 is the proposed standard value, 40455 is the value in the local use range that is + // used by the dwd until the standard is updated. + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 15: + case 32: + case 33: + case 40: + case 41: + case 44: + case 45: + case 48: + case 51: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 60: + case 1000: + case 1002: + case 1100: + case 40033: + case 40455: + case 40456: *outHaveForecastTime = true, *outHaveTimeRange = false; return 0; + + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 34: + case 42: + case 43: + case 46: + case 47: + case 61: + case 67: + case 68: + case 91: + case 1001: + case 1101: + case 40034: *outHaveForecastTime = true, *outHaveTimeRange = true; return 0; + + default: return 1; + } +} + +char * +gribMakeTimeString(grib_handle *gh, CdiTimeType timeType) +{ + // Get the parts of the reference date. + struct tm date; + date.tm_mon = (int) gribGetLong(gh, "month") - 1; // months are zero based in struct tm and one based in GRIB + date.tm_mday = (int) gribGetLong(gh, "day"); + date.tm_hour = (int) gribGetLong(gh, "hour"); + date.tm_min = (int) gribGetLong(gh, "minute"); + date.tm_isdst = 0; + + if (gribEditionNumber(gh) == 1) + { + date.tm_year = (int) gribGetLong(gh, "yearOfCentury"); // years are -1900 based both in struct tm and GRIB1 + } + else + { + date.tm_year = (int) gribGetLong(gh, "year") - 1900; // years are -1900 based in struct tm and zero based in GRIB2 + date.tm_sec = (int) gribGetLong(gh, "second"); + + // If the start or end time are requested, we need to take the relative times into account. + if (timeType != kCdiTimeType_referenceTime) + { + // Determine whether we have a forecast time and a time range. + bool haveForecastTime, haveTimeRange; + if (getAvailabilityOfRelativeTimes(gh, &haveForecastTime, &haveTimeRange)) return NULL; + if (timeType == kCdiTimeType_endTime && !haveTimeRange) + return NULL; // tell the caller that the requested time does not exist + + // If we have relative times, apply the relative times to the date + if (haveForecastTime) + { + long offset = gribGetLongDefault(gh, "forecastTime", 0); + // if (stepUnits == indicatorOfUnitOfTimeRange) assert(startStep == forecastTime) + long offsetUnit = gribGetLongDefault(gh, "indicatorOfUnitOfTimeRange", 255); + if (addToDate(&date, offset, offsetUnit)) return NULL; + if (timeType == kCdiTimeType_endTime) + { + assert(haveTimeRange); + long range = gribGetLongDefault(gh, "lengthOfTimeRange", 0); + // if (stepUnits == indicatorOfUnitForTimeRange) assert(endStep == startStep + lengthOfTimeRange) + long rangeUnit = gribGetLongDefault(gh, "indicatorOfUnitForTimeRange", 255); + if (addToDate(&date, range, rangeUnit)) return NULL; + } + } + } + } + + // Bake the date into a string. + return makeDateString(&date); +} + +int +gribapiTimeIsFC(grib_handle *gh) +{ + if (gribEditionNumber(gh) <= 1) return true; + + long sigofrtime; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "significanceOfReferenceTime", &sigofrtime); + return sigofrtime != 3; +} + +struct cdiGribAPI_ts_str_map_elem cdiGribAPI_ts_str_map[] = { + // clang-format off + [TSTEP_INSTANT] = { 0, "instant" }, + [TSTEP_AVG] = { 8, "avg" }, + [TSTEP_ACCUM] = { 8, "accum" }, + [TSTEP_MAX] = { 8, "max" }, + [TSTEP_MIN] = { 8, "min" }, + [TSTEP_DIFF] = { 8, "diff" }, + [TSTEP_RMS] = { 8, "rms" }, + [TSTEP_SD] = { 8, "sd" }, + [TSTEP_COV] = { 8, "cov" }, + [TSTEP_RATIO] = { 8, "ratio" }, + [TSTEP_SUM] = { 8, "sum" }, + { 0, "" } + // clang-format on +}; + +// Fetches the value of the "stepType" key and converts it into a constant in the TSTEP_* range. +int +gribapiGetTsteptype(grib_handle *gh) +{ + size_t len = 256; + char stepType[256]; + int tsteptype = TSTEP_INSTANT; + static bool lprint = true; + + if (gribapiTimeIsFC(gh)) + { + int status = grib_get_string(gh, "stepType", stepType, &len); + if (status == 0 && len > 1 && len < 256) + { + for (int i = TSTEP_INSTANT; cdiGribAPI_ts_str_map[i].sname[0]; ++i) + if (strncmp(cdiGribAPI_ts_str_map[i].sname, stepType, len) == 0) + { + tsteptype = i; + goto tsteptypeFound; + } + + if (lprint) + { + Message("Time stepType %s unsupported, set to instant!", stepType); + lprint = false; + } + // printf("stepType: %s %ld %d\n", stepType, len, tsteptype); + } + + long typeOfStat; + status = grib_get_long(gh, "typeOfStatisticalProcessing", &typeOfStat); + if (status == 0) + { + switch (typeOfStat) + { + case 0: return TSTEP_AVG; + case 1: return TSTEP_ACCUM; + case 2: return TSTEP_MAX; + case 3: return TSTEP_MIN; + case 4: return TSTEP_DIFF; + case 5: return TSTEP_RMS; + case 6: return TSTEP_SD; + case 7: return TSTEP_COV; + case 9: return TSTEP_RATIO; + case 11: return TSTEP_SUM; + } + } + +#ifdef HIRLAM_EXTENSIONS + { + // Normaly cdo looks in grib for attribute called "stepType", see above. + // BUT NWP models such as Hirlam and Harmonie 37h1.2, use "timeRangeIndicator" instead! + // Where for example: 0: for instanteneous fields; 4: for accumulated fields + // 0: Forecast product valid at reference time + P1 + // 2: Product with a valid time ranging between reference time + P1 and reference time + P2 + // 4: Accumulation (reference time + P1 to reference time + P2) + // 5: Difference(reference time + P2 minus reference time + P1) product considered valid at reference time + P2 + // More details on WMO standards: + // http://www.wmo.int/pages/prog/www/WDM/Guides/Guide-binary-2.html + // tsteptype = TSTEP_INSTANT; // default value for any case + long timeRangeIND = 0; // typically 0: for instanteneous fields; 4: for accumulated fields + int rc = grib_get_long(gh, "timeRangeIndicator", &timeRangeIND); + if (rc != 0) + { + // if ( lprint ) + Warning("Could not get 'stepType' either 'timeRangeIndicator'. Using default!"); + return tsteptype; + } + extern int cdiGribUseTimeRangeIndicator; + cdiGribUseTimeRangeIndicator = 1; + switch (timeRangeIND) + { + case 0: tsteptype = TSTEP_INSTANT; break; + case 2: + tsteptype = TSTEP_INSTANT2; + strcpy(stepType, "instant2"); + break; // was incorrectly set before into accum + case 4: tsteptype = TSTEP_ACCUM; break; + case 5: tsteptype = TSTEP_DIFF; break; + default: + if (lprint) + { + if (CDI_Debug) + Warning("timeRangeIND = %d; stepType= %s; tsteptype=%d unsupported timeRangeIND at the moment, set to instant!", + timeRangeIND, stepType, tsteptype); + lprint = false; + } + break; + } + if (CDI_Debug) Warning("timeRangeIND = %d; stepType= %s; tsteptype=%d", timeRangeIND, stepType, tsteptype); + } +#endif // HIRLAM_EXTENSIONS + } + +tsteptypeFound: + return tsteptype; +} + +int +gribGetDatatype(grib_handle *gribHandle) +{ + int datatype; + if (gribEditionNumber(gribHandle) > 1 && gribCheckString(gribHandle, "packingType", "grid_ieee")) + { + datatype = gribCheckLong(gribHandle, "precision", 1) ? CDI_DATATYPE_FLT32 : CDI_DATATYPE_FLT64; + } + else + { + long bitsPerValue; + datatype = (!grib_get_long(gribHandle, "bitsPerValue", &bitsPerValue) && bitsPerValue > 0 && bitsPerValue <= 32) + ? (int) bitsPerValue + : CDI_DATATYPE_PACK; + } + return datatype; +} + +int +gribapiGetParam(grib_handle *gh) +{ + long pdis, pcat, pnum; + if (gribEditionNumber(gh) <= 1) + { + pdis = 255; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "table2Version", &pcat); + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "indicatorOfParameter", &pnum); + } + else + { + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "discipline", &pdis); + if (grib_get_long(gh, "parameterCategory", &pcat)) pcat = 0; + if (grib_get_long(gh, "parameterNumber", &pnum)) pnum = 0; + } + return cdiEncodeParam((int) pnum, (int) pcat, (int) pdis); +} + +static bool +has_ni(grib_handle *gh) +{ + return (gribGetLong(gh, "Ni") != (long) GRIB_MISSING_LONG); +} + +int +gribapiGetGridType(grib_handle *gh) +{ + const long gridDefinitionTemplateNumber = gribGetLongDefault(gh, "gridDefinitionTemplateNumber", -1); + switch (gridDefinitionTemplateNumber) + { + case GRIB2_GTYPE_LATLON: return has_ni(gh) ? GRID_LONLAT : GRID_GENERIC; + case GRIB2_GTYPE_GAUSSIAN: return has_ni(gh) ? GRID_GAUSSIAN : GRID_GAUSSIAN_REDUCED; + case GRIB2_GTYPE_LATLON_ROT: return GRID_PROJECTION; + case GRIB2_GTYPE_LCC: return CDI_PROJ_LCC; + case GRIB2_GTYPE_STERE: return CDI_PROJ_STERE; + case GRIB2_GTYPE_SPECTRAL: return GRID_SPECTRAL; + case GRIB2_GTYPE_GME: return GRID_GME; + case GRIB2_GTYPE_UNSTRUCTURED: return GRID_UNSTRUCTURED; + default: + { + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + char mesg[256]; + size_t len = sizeof(mesg); + if (grib_get_string(gh, "gridType", mesg, &len) != 0) mesg[0] = 0; + Warning("gridDefinitionTemplateNumber %d unsupported (gridType=%s)!", gridDefinitionTemplateNumber, mesg); + } + } + } + + return GRID_GENERIC; +} + +static int +gribapiGetIsRotated(grib_handle *gh) +{ + return gribGetLongDefault(gh, "gridDefinitionTemplateNumber", -1) == GRIB2_GTYPE_LATLON_ROT; +} + +size_t +gribapiGetGridsize(grib_handle *gh) +{ + size_t gridsize; + FAIL_ON_GRIB_ERROR(grib_get_size, gh, "values", &gridsize); + return gridsize; +} + +static void +gribapiGetGridGaussianReduced(grib_handle *gh, grid_t *grid, int editionNumber, size_t numberOfPoints) +{ + long lpar; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "numberOfParallelsBetweenAPoleAndTheEquator", &lpar); + grid->np = (int) lpar; + + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "Nj", &lpar); + size_t nlat = (size_t) lpar; + + grid->size = numberOfPoints; + + grid->reducedPointsSize = (int) nlat; + grid->reducedPoints = (int *) Malloc(nlat * sizeof(int)); + long *pl = (long *) Malloc(nlat * sizeof(long)); + size_t dummy = nlat; + FAIL_ON_GRIB_ERROR(grib_get_long_array, gh, "pl", pl, &dummy); + for (size_t i = 0; i < nlat; ++i) grid->reducedPoints[i] = (int) pl[i]; + Free(pl); + + grid->y.size = nlat; + grid->x.inc = 0; + grid->y.inc = 0; + grid->x.flag = 0; + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "longitudeOfFirstGridPointInDegrees", &grid->x.first); + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "longitudeOfLastGridPointInDegrees", &grid->x.last); + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "latitudeOfFirstGridPointInDegrees", &grid->y.first); + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "latitudeOfLastGridPointInDegrees", &grid->y.last); + + // FAIL_ON_GRIB_ERROR(grib_get_double, gh, "iDirectionIncrementInDegrees", &grid->x.inc); + // if ( IS_EQUAL(grid->x.inc, GRIB_MISSING_DOUBLE) ) grid->x.inc = 0; + + if (grid->x.last < grid->x.first) + { + if (grid->x.first >= 180.0) + grid->x.first -= 360.0; + else + grid->x.last += 360.0; + } + + grid->x.flag = 2; + + grid->y.flag = 0; + // if (IS_NOT_EQUAL(grid->y.first, 0) || IS_NOT_EQUAL(grid->y.last, 0)) + { + if (grid->y.size > 1) + { + if (editionNumber <= 1) + { + } + } + grid->y.flag = 2; + } +} + +static void +gribapiGetGridRegular(grib_handle *gh, grid_t *grid, int editionNumber, int gridtype, size_t numberOfPoints) +{ + long lpar; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "Ni", &lpar); + const size_t nlon = (size_t) lpar; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "Nj", &lpar); + const size_t nlat = (size_t) lpar; + + if (gridtype == GRID_GAUSSIAN) + { + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "numberOfParallelsBetweenAPoleAndTheEquator", &lpar); + grid->np = (int) lpar; + } + + if (numberOfPoints != nlon * nlat) Error("numberOfPoints (%zu) and gridSize (%zu) differ!", numberOfPoints, nlon * nlat); + + grid->size = numberOfPoints; + grid->x.size = nlon; + grid->y.size = nlat; + grid->x.inc = 0; + grid->y.inc = 0; + grid->x.flag = 0; + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "longitudeOfFirstGridPointInDegrees", &grid->x.first); + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "longitudeOfLastGridPointInDegrees", &grid->x.last); + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "latitudeOfFirstGridPointInDegrees", &grid->y.first); + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "latitudeOfLastGridPointInDegrees", &grid->y.last); + if (nlon > 1) FAIL_ON_GRIB_ERROR(grib_get_double, gh, "iDirectionIncrementInDegrees", &grid->x.inc); + if (gridtype == GRID_LONLAT && nlat > 1) FAIL_ON_GRIB_ERROR(grib_get_double, gh, "jDirectionIncrementInDegrees", &grid->y.inc); + + long iscan = 0, jscan = 0; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "iScansNegatively", &iscan); + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "jScansPositively", &jscan); + if (iscan) grid->x.inc = -grid->x.inc; + if (!jscan) grid->y.inc = -grid->y.inc; + + if (grid->x.inc < -999 || grid->x.inc > 999) grid->x.inc = 0; + if (grid->y.inc < -999 || grid->y.inc > 999) grid->y.inc = 0; + + // if ( IS_NOT_EQUAL(grid->x.first, 0) || IS_NOT_EQUAL(grid->x.last, 0) ) + { + if (grid->x.size > 1) + { + // if ( editionNumber <= 1 ) + { + if (grid->x.last < grid->x.first) + { + if (grid->x.first >= 180) + grid->x.first -= 360; + else + grid->x.last += 360; + } + + // correct xinc if necessary + if (IS_EQUAL(grid->x.first, 0) && grid->x.last > 354 && grid->x.last < 360) + { + double xinc = 360. / grid->x.size; + if (fabs(grid->x.inc - xinc) > 0.0) + { + grid->x.inc = xinc; + if (CDI_Debug) Message("set xinc to %g", grid->x.inc); + } + } + } + } + grid->x.flag = 2; + } + + grid->y.flag = 0; + // if ( IS_NOT_EQUAL(grid->y.first, 0) || IS_NOT_EQUAL(grid->y.last, 0) ) + { + if (grid->y.size > 1) + { + if (editionNumber <= 1) + { + } + } + grid->y.flag = 2; + } +} + +static void +gribapiGetGridProj(grib_handle *gh, grid_t *grid, size_t numberOfPoints) +{ + long lpar; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "Nx", &lpar); + const size_t nlon = (size_t) lpar; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "Ny", &lpar); + const size_t nlat = (size_t) lpar; + + if (numberOfPoints != nlon * nlat) Error("numberOfPoints (%zu) and gridSize (%zu) differ!", numberOfPoints, nlon * nlat); + + grid->size = numberOfPoints; + grid->x.size = nlon; + grid->y.size = nlat; + + double xinc, yinc; + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "DxInMetres", &xinc); + FAIL_ON_GRIB_ERROR(grib_get_double, gh, "DyInMetres", &yinc); + + grid->x.first = 0; + grid->x.last = 0; + grid->x.inc = xinc; + grid->y.first = 0; + grid->y.last = 0; + grid->y.inc = yinc; + grid->x.flag = 2; + grid->y.flag = 2; +} + +static void +gribapiGetGridSpectral(grib_handle *gh, grid_t *grid, size_t datasize) +{ + size_t len = 256; + char typeOfPacking[256]; + FAIL_ON_GRIB_ERROR(grib_get_string, gh, "packingType", typeOfPacking, &len); + grid->lcomplex = 0; + if (strncmp(typeOfPacking, "spectral_complex", len) == 0) grid->lcomplex = 1; + + grid->size = datasize; + + long lpar; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "J", &lpar); + grid->trunc = (int) lpar; +} + +static void +gribapiGetGridGME(grib_handle *gh, grid_t *grid, size_t numberOfPoints) +{ + grid->size = numberOfPoints; + + long lpar; + if (grib_get_long(gh, "nd", &lpar) == 0) grid->gme.nd = (int) lpar; + if (grib_get_long(gh, "Ni", &lpar) == 0) grid->gme.ni = (int) lpar; + if (grib_get_long(gh, "n2", &lpar) == 0) grid->gme.ni2 = (int) lpar; + if (grib_get_long(gh, "n3", &lpar) == 0) grid->gme.ni3 = (int) lpar; +} + +static void +gribapiGetGridUnstructured(grib_handle *gh, grid_t *grid, size_t numberOfPoints) +{ + unsigned char uuid[CDI_UUID_SIZE]; + /* + char reference_link[8192]; + size_t len = sizeof(reference_link); + reference_link[0] = 0; + */ + grid->size = numberOfPoints; + + long lpar; + if (grib_get_long(gh, "numberOfGridUsed", &lpar) == 0) + { + cdiDefVarKeyInt(&grid->keys, CDI_KEY_NUMBEROFGRIDUSED, (int) lpar); + if (grib_get_long(gh, "numberOfGridInReference", &lpar) == 0) + cdiDefVarKeyInt(&grid->keys, CDI_KEY_NUMBEROFGRIDINREFERENCE, (int) lpar); + /* + if ( grib_get_string(gh, "gridDescriptionFile", reference_link, &len) == 0 ) + { + if ( strncmp(reference_link, "file://", 7) == 0 ) + grid->reference = strdupx(reference_link); + } + */ + size_t len = (size_t) CDI_UUID_SIZE; + if (grib_get_bytes(gh, "uuidOfHGrid", uuid, &len) == 0) cdiDefVarKeyBytes(&grid->keys, CDI_KEY_UUID, uuid, CDI_UUID_SIZE); + } +} + +static void +gribapiGetGridGeneric(grib_handle *gh, grid_t *grid, size_t numberOfPoints) +{ + long lpar; + const size_t nlon = (grib_get_long(gh, "Ni", &lpar) == 0) ? (size_t) lpar : 0; + const size_t nlat = (grib_get_long(gh, "Nj", &lpar) == 0) ? (size_t) lpar : 0; + + grid->size = numberOfPoints; + + const bool lgeneric = (nlon > 0 && nlat > 0 && nlon * nlat == numberOfPoints); + grid->x.size = lgeneric ? nlon : 0; + grid->y.size = lgeneric ? nlat : 0; +} + +// TODO: Simplify by use of the convenience functions (gribGetLong(), gribGetLongDefault(), etc.). +bool +gribapiGetGrid(grib_handle *gh, grid_t *grid) +{ + bool uvRelativeToGrid = false; + const long editionNumber = gribEditionNumber(gh); + int gridtype = gribapiGetGridType(gh); + int projtype = (gridtype == GRID_PROJECTION && gribapiGetIsRotated(gh)) ? CDI_PROJ_RLL : CDI_UNDEFID; + if (gridtype == CDI_PROJ_LCC || gridtype == CDI_PROJ_STERE) + { + projtype = gridtype; + gridtype = GRID_PROJECTION; + } + /* + if ( streamptr->unreduced && gridtype == GRID_GAUSSIAN_REDUCED ) + { + gridtype = GRID_GAUSSIAN; + ISEC2_NumLon = 2*ISEC2_NumLat; + ISEC4_NumValues = ISEC2_NumLon*ISEC2_NumLat; + } + */ + grid_init(grid); + cdiGridTypeInit(grid, gridtype, 0); + + size_t datasize; + FAIL_ON_GRIB_ERROR(grib_get_size, gh, "values", &datasize); + long lpar; + FAIL_ON_GRIB_ERROR(grib_get_long, gh, "numberOfPoints", &lpar); + size_t numberOfPoints = (size_t) lpar; + + if (gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN || projtype == CDI_PROJ_RLL) + { + gribapiGetGridRegular(gh, grid, editionNumber, gridtype, numberOfPoints); + } + else if (gridtype == GRID_GAUSSIAN_REDUCED) + { + gribapiGetGridGaussianReduced(gh, grid, editionNumber, numberOfPoints); + } + else if (projtype == CDI_PROJ_LCC) + { + gribapiGetGridProj(gh, grid, numberOfPoints); + } + else if (projtype == CDI_PROJ_STERE) + { + gribapiGetGridProj(gh, grid, numberOfPoints); + } + else if (gridtype == GRID_SPECTRAL) + { + gribapiGetGridSpectral(gh, grid, datasize); + } + else if (gridtype == GRID_GME) + { + gribapiGetGridGME(gh, grid, numberOfPoints); + } + else if (gridtype == GRID_UNSTRUCTURED) + { + gribapiGetGridUnstructured(gh, grid, numberOfPoints); + } + else if (gridtype == GRID_GENERIC) + { + gribapiGetGridGeneric(gh, grid, numberOfPoints); + } + else + { + Error("Unsupported grid type: %s", gridNamePtr(gridtype)); + } + + if (gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || projtype == CDI_PROJ_RLL || projtype == CDI_PROJ_LCC) + { + long temp; + GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &temp), 0); + assert(temp == 0 || temp == 1); + uvRelativeToGrid = (bool) temp; + } + + if (gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION) + { + long iScansNegatively, jScansPositively, jPointsAreConsecutive; + GRIB_CHECK(grib_get_long(gh, "iScansNegatively", &iScansNegatively), 0); + GRIB_CHECK(grib_get_long(gh, "jScansPositively", &jScansPositively), 0); + GRIB_CHECK(grib_get_long(gh, "jPointsAreConsecutive", &jPointsAreConsecutive), 0); + + int scanningMode = 128 * iScansNegatively + 64 * jScansPositively + 32 * jPointsAreConsecutive; + cdiDefVarKeyInt(&grid->keys, CDI_KEY_SCANNINGMODE, scanningMode); + /* scanningMode = 128 * iScansNegatively + 64 * jScansPositively + 32 * jPointsAreConsecutive; + 64 = 128 * 0 + 64 * 1 + 32 * 0 + 00 = 128 * 0 + 64 * 0 + 32 * 0 + 96 = 128 * 0 + 64 * 1 + 32 * 1 + Default / implicit scanning mode is 64: + i and j scan positively, i points are consecutive (row-major) */ +#ifdef HIRLAM_EXTENSIONS + if (cdiDebugExt >= 30 && gribEditionNumber(gh) <= 1) + { + // indicatorOfParameter=33,indicatorOfTypeOfLevel=105,level + long paramId, levelTypeId, levelId; + GRIB_CHECK(grib_get_long(gh, "indicatorOfParameter", ¶mId), 0); + GRIB_CHECK(grib_get_long(gh, "indicatorOfTypeOfLevel", &levelTypeId), 0); + GRIB_CHECK(grib_get_long(gh, "level", &levelId), 0); + Message("(param,ltype,level) = (%3d,%3d,%4d); Scanning mode = %02d -> bits:(%1d.%1d.%1d)*32; uvRelativeToGrid = %02d", + (int) paramId, (int) levelTypeId, (int) levelId, scanningMode, jPointsAreConsecutive, jScansPositively, + iScansNegatively, uvRelativeToGrid); + } +#endif // HIRLAM_EXTENSIONS + } + + grid->type = gridtype; + grid->projtype = projtype; + + return uvRelativeToGrid; +} +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef CDI_UUID_H +#define CDI_UUID_H + +#ifdef HAVE_CONFIG_H +#endif + + +// clang-format off +#ifdef __cplusplus +extern "C" { +#endif + +enum { + uuidNumHexChars = 36, +}; + +static inline +int cdiUUIDIsNull(const unsigned char uuid[]) +{ + int isNull = 1; + for (size_t i = 0; i < CDI_UUID_SIZE; ++i) isNull &= (uuid[i] == 0); + return isNull; +} + +void cdiCreateUUID(unsigned char uuid[CDI_UUID_SIZE]); + +int cdiUUID2Str(const unsigned char uuid[], char uuidstr[]); +int cdiStr2UUID(const char *uuidstr, unsigned char uuid[]); + +#ifdef __cplusplus +} +#endif +// clang-format on + +#endif +#ifndef RESOURCE_UNPACK_H +#define RESOURCE_UNPACK_H + +#ifdef HAVE_CONFIG_H +#endif + +enum +{ + GRID = 1, + ZAXIS = 2, + TAXIS = 3, + INSTITUTE = 4, + MODEL = 5, + STREAM = 6, + VLIST = 7, + DIST_GRID = 8, + RESH_DELETE, + START = 55555555, + END = 99999999 +}; + +typedef void (*cdiPostResUpdateHook)(int resH, int resType); + +int reshUnpackResources(char *unpackBuffer, int unpackBufferSize, void *context, cdiPostResUpdateHook postHook); + +extern int (*reshDistGridUnpack)(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, + int force_id); +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef VLIST_H +#define VLIST_H + +#ifdef HAVE_CONFIG_H +#endif + +#ifndef ERROR_H +#endif + +#include <stdbool.h> +#include <stddef.h> /* size_t */ + +#ifndef CDI_LIMITS_H +#endif + +#define VALIDMISS 1.e+303 + + +typedef struct +{ + bool flag; + int index; + int mlevelID; + int flevelID; +} levinfo_t; + +#define DEFAULT_LEVINFO(levID) \ + (levinfo_t) { 0, -1, levID, levID } +/* +#define DEFAULT_LEVINFO(levID) \ + (levinfo_t){ .flag = 0, .index = -1, .flevelID = levID, .mlevelID = levID} +*/ +typedef struct +{ + int ens_index; + int ens_count; + int forecast_init_type; +} ensinfo_t; + +typedef struct +{ + bool isUsed; + bool flag; + bool lvalidrange; + signed char xyz; /* order of spatial dimensions, + * a permutation of 123 */ + bool missvalused; // true if missval is defined + int mvarID; + int fvarID; + int param; + int gridID; + int zaxisID; + int timetype; // TIME_* + int tsteptype; // TSTEP_* + int datatype; // CDI_DATATYPE_PACKX for GRIB data, else CDI_DATATYPE_FLT32 or CDI_DATATYPE_FLT64 + int instID; + int modelID; + int tableID; + int timave; + int nsb; // Number of significant bits + double missval; + double validrange[2]; + levinfo_t *levinfo; + int comptype; // compression type + int complevel; // compression level + cdi_keys_t keys; + cdi_atts_t atts; + int subtypeID; // subtype ID for tile-related meta-data, currently for GRIB-API only. + + int opt_grib_nentries; // current no. key-value pairs + int opt_grib_kvpair_size; // current allocated size + opt_key_val_pair_t *opt_grib_kvpair; // (optional) list of keyword/value pairs +} var_t; + +typedef struct +{ + // set when a vlist is passed to streamDefVlist() to safeguard against modifications of the wrong vlist object + bool immutable; + // set if this vlist has been created by CDI itself, and must not be destroyed by the user, consequently + bool internal; + int self; + int nvars; // number of variables + int ngrids; + int nzaxis; + int nsubtypes; // no. of variable subtypes (e.g. sets of tiles) + long ntsteps; + int taxisID; + int tableID; + int instID; + int modelID; + int varsAllocated; + int gridIDs[MAX_GRIDS_PS]; + int zaxisIDs[MAX_ZAXES_PS]; + int subtypeIDs[MAX_SUBTYPES_PS]; + var_t *vars; + cdi_keys_t keys; + cdi_atts_t atts; +} vlist_t; + +vlist_t *vlist_to_pointer(int vlistID); +void cdiVlistMakeInternal(int vlistID); +void cdiVlistMakeImmutable(int vlistID); +void cdiVlistDestroy_(int vlistID, bool assertInternal); +int vlistInqVarMissvalUsed(int vlistID, int varID); +int vlistHasTime(int vlistID); + +int vlistUnpack(char *buffer, int bufferSize, int *pos, int originNamespace, void *context, int force_id); + +/* vlistDefVarValidrange: Define the valid range of a Variable */ +void vlistDefVarValidrange(int vlistID, int varID, const double *validrange); + +/* vlistInqVarValidrange: Get the valid range of a Variable */ +int vlistInqVarValidrange(int vlistID, int varID, double *validrange); + +void vlistInqVarDimorder(int vlistID, int varID, int outDimorder[3]); + +void resize_opt_grib_entries(var_t *var, int nentries); + +static inline void +vlistAdd2GridIDs(vlist_t *vlistptr, int gridID) +{ + int index, ngrids = vlistptr->ngrids; + for (index = 0; index < ngrids; index++) + { + if (vlistptr->gridIDs[index] == gridID) break; + // if ( gridIsEqual(vlistptr->gridIDs[index], gridID) ) break; + } + + if (index == ngrids) + { + if (ngrids >= MAX_GRIDS_PS) Error("Internal limit exceeded: more than %d grids.", MAX_GRIDS_PS); + vlistptr->gridIDs[ngrids] = gridID; + ++(vlistptr->ngrids); + } +} + +static inline void +vlistAdd2ZaxisIDs(vlist_t *vlistptr, int zaxisID) +{ + int index, nzaxis = vlistptr->nzaxis; + for (index = 0; index < nzaxis; index++) + if (zaxisID == vlistptr->zaxisIDs[index]) break; + + if (index == nzaxis) + { + if (nzaxis >= MAX_ZAXES_PS) Error("Internal limit exceeded: more than %d zaxis.", MAX_ZAXES_PS); + vlistptr->zaxisIDs[nzaxis] = zaxisID; + ++(vlistptr->nzaxis); + } +} + +static inline void +vlistAdd2SubtypeIDs(vlist_t *vlistptr, int subtypeID) +{ + if (subtypeID == CDI_UNDEFID) return; + + int index, nsubs = vlistptr->nsubtypes; + for (index = 0; index < nsubs; index++) + if (vlistptr->subtypeIDs[index] == subtypeID) break; + + if (index == nsubs) + { + if (nsubs >= MAX_SUBTYPES_PS) Error("Internal limit exceeded: more than %d subs.", MAX_SUBTYPES_PS); + vlistptr->subtypeIDs[nsubs] = subtypeID; + ++(vlistptr->nsubtypes); + } +} + +#ifdef HAVE_LIBGRIB_API +extern int cdiNAdditionalGRIBKeys; +extern char *cdiAdditionalGRIBKeys[]; +#endif + +extern +#ifndef __cplusplus + const +#endif + resOps vlistOps; + +#endif /* VLIST_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <assert.h> +#include <string.h> + + +int (*proj_lonlat_to_lcc_func)(struct CDI_GridProjParams gpp, size_t, double *, double *) = NULL; +int (*proj_lcc_to_lonlat_func)(struct CDI_GridProjParams gpp, double, double, size_t, double *, double *) = NULL; +int (*proj_lonlat_to_stere_func)(struct CDI_GridProjParams gpp, size_t, double *, double *) = NULL; +int (*proj_stere_to_lonlat_func)(struct CDI_GridProjParams gpp, double, double, size_t, double *, double *) = NULL; + +// the value in the second pair of brackets must match the length of the longest string (including terminating NUL) +static const char Grids[][17] = { + /* 0 */ "undefined", + /* 1 */ "generic", + /* 2 */ "gaussian", + /* 3 */ "gaussian_reduced", + /* 4 */ "lonlat", + /* 5 */ "spectral", + /* 6 */ "fourier", + /* 7 */ "gme", + /* 8 */ "trajectory", + /* 9 */ "unstructured", + /* 10 */ "curvilinear", + /* 11 */ "lcc", + /* 12 */ "projection", + /* 13 */ "characterXY", +}; + +// must match table below +enum xystdname_idx +{ + grid_xystdname_grid_latlon, + grid_xystdname_latlon, + grid_xystdname_projection, + grid_xystdname_char, +}; +static const char xystdname_tab[][2][24] = { + [grid_xystdname_grid_latlon] = { "grid_longitude", "grid_latitude" }, + [grid_xystdname_latlon] = { "longitude", "latitude" }, + [grid_xystdname_projection] = { "projection_x_coordinate", "projection_y_coordinate" }, + [grid_xystdname_char] = { "region", "region" }, +}; + +static int gridCompareP(void *gridptr1, void *gridptr2); +static void gridDestroyP(void *gridptr); +static void gridPrintP(void *gridptr, FILE *fp); +static int gridGetPackSize(void *gridptr, void *context); +static void gridPack(void *gridptr, void *buff, int size, int *position, void *context); +static int gridTxCode(void *gridptr); + +static const resOps gridOps = { gridCompareP, gridDestroyP, gridPrintP, gridGetPackSize, gridPack, gridTxCode }; + +grid_t * +grid_to_pointer(int gridID) +{ + return (grid_t *) reshGetVal(gridID, &gridOps); +} + +#define gridMark4Update(gridID) reshSetStatus(gridID, &gridOps, RESH_DESYNC_IN_USE) + +static inline bool +grid_is_irregular(int gridType) +{ + return (gridType == GRID_UNSTRUCTURED || gridType == GRID_CURVILINEAR); +} + +static bool +cdiInqAttConvertedToFloat(int gridID, int atttype, const char *attname, int attlen, double *attflt) +{ + bool status = true; + + if (atttype == CDI_DATATYPE_INT32) + { + int attint; + int *pattint = attlen > 1 ? (int *) malloc(attlen * sizeof(int)) : &attint; + cdiInqAttInt(gridID, CDI_GLOBAL, attname, attlen, pattint); + for (int i = 0; i < attlen; ++i) attflt[i] = (double) pattint[i]; + if (attlen > 1) free(pattint); + } + else if (atttype == CDI_DATATYPE_FLT32 || atttype == CDI_DATATYPE_FLT64) + { + cdiInqAttFlt(gridID, CDI_GLOBAL, attname, attlen, attflt); + } + else + { + status = false; + } + + return status; +} + +static void +grid_axis_init(struct gridaxis_t *axisptr) +{ + axisptr->size = 0; + axisptr->vals = NULL; + axisptr->bounds = NULL; + axisptr->flag = 0; + axisptr->first = 0.0; + axisptr->last = 0.0; + axisptr->inc = 0.0; +#ifndef USE_MPI + axisptr->clength = 0; + axisptr->cvals = NULL; +#endif + cdiInitKeys(&axisptr->keys); +} + +enum cdiApplyRet +cdiGridApply(enum cdiApplyRet (*func)(int id, void *res, void *data), void *data) +{ + return cdiResHFilterApply(&gridOps, func, data); +} + +void +grid_init(grid_t *gridptr) +{ + gridptr->self = CDI_UNDEFID; + gridptr->type = CDI_UNDEFID; + gridptr->datatype = CDI_UNDEFID; + gridptr->proj = CDI_UNDEFID; + gridptr->projtype = CDI_UNDEFID; + gridptr->mask = NULL; + gridptr->mask_gme = NULL; + gridptr->size = 0; + + grid_axis_init(&gridptr->x); + grid_axis_init(&gridptr->y); + + gridptr->area = NULL; + gridptr->reducedPoints = NULL; + gridptr->reducedPointsSize = 0; + + gridptr->gme.nd = 0; + gridptr->gme.ni = 0; + gridptr->gme.ni2 = 0; + gridptr->gme.ni3 = 0; + + gridptr->trunc = 0; + gridptr->nvertex = 0; + gridptr->np = 0; + gridptr->isCyclic = CDI_UNDEFID; + + gridptr->lcomplex = false; + gridptr->hasdims = true; + gridptr->name = NULL; + gridptr->vtable = &cdiGridVtable; + + cdiInitKeys(&gridptr->keys); + gridptr->atts.nalloc = MAX_ATTRIBUTES; + gridptr->atts.nelems = 0; + + cdiDefVarKeyInt(&gridptr->keys, CDI_KEY_DATATYPE, CDI_DATATYPE_FLT64); + + gridptr->extraData = NULL; +} + +static void +grid_free_components(grid_t *gridptr) +{ + void *p2free[] = { gridptr->mask, gridptr->mask_gme, gridptr->x.vals, gridptr->y.vals, +#ifndef USE_MPI + gridptr->x.cvals, gridptr->y.cvals, +#endif + gridptr->x.bounds, gridptr->y.bounds, gridptr->reducedPoints, gridptr->area, gridptr->name }; + + for (size_t i = 0; i < sizeof(p2free) / sizeof(p2free[0]); ++i) + if (p2free[i]) Free(p2free[i]); + + cdiDeleteVarKeys(&(gridptr->x.keys)); + cdiDeleteVarKeys(&(gridptr->y.keys)); + cdiDeleteVarKeys(&(gridptr->keys)); + /* + int gridID = gridptr->self; + if (gridID != CDI_UNDEFID) cdiDeleteAtts(gridID, CDI_GLOBAL); + */ +} + +void +grid_free(grid_t *gridptr) +{ + if (gridptr) + { + grid_free_components(gridptr); + grid_init(gridptr); + } +} + +static grid_t * +gridNewEntry(cdiResH resH) +{ + grid_t *gridptr = (grid_t *) Malloc(sizeof(grid_t)); + grid_init(gridptr); + + if (resH == CDI_UNDEFID) + gridptr->self = reshPut(gridptr, &gridOps); + else + { + gridptr->self = resH; + reshReplace(resH, gridptr, &gridOps); + } + + return gridptr; +} + +static void +gridInit(void) +{ + static bool gridInitialized = false; + if (gridInitialized) return; + gridInitialized = true; +} + +static void +grid_copy_base_scalar_fields(grid_t *gridptrOrig, grid_t *gridptrDup) +{ + memcpy(gridptrDup, gridptrOrig, sizeof(grid_t)); + gridptrDup->self = CDI_UNDEFID; + cdiInitKeys(&gridptrDup->keys); + cdiCopyVarKeys(&gridptrOrig->keys, &gridptrDup->keys); + cdiInitKeys(&gridptrDup->x.keys); + cdiCopyVarKeys(&gridptrOrig->x.keys, &gridptrDup->x.keys); + cdiInitKeys(&gridptrDup->y.keys); + cdiCopyVarKeys(&gridptrOrig->y.keys, &gridptrDup->y.keys); +} + +static grid_t * +grid_copy_base(grid_t *gridptrOrig) +{ + grid_t *gridptrDup = (grid_t *) Malloc(sizeof(*gridptrDup)); + gridptrOrig->vtable->copyScalarFields(gridptrOrig, gridptrDup); + gridptrOrig->vtable->copyArrayFields(gridptrOrig, gridptrDup); + return gridptrDup; +} + +unsigned +cdiGridCount(void) +{ + return reshCountType(&gridOps); +} + +static inline void +gridaxisSetKey(struct gridaxis_t *axisptr, int key, const char *name) +{ + if (find_key(&axisptr->keys, key) == NULL) + cdiDefVarKeyBytes(&axisptr->keys, key, (const unsigned char *) name, (int) strlen(name) + 1); +} + +void +cdiGridTypeInit(grid_t *gridptr, int gridtype, size_t size) +{ + gridptr->type = gridtype; + gridptr->size = size; + + // clang-format off + if (gridtype == GRID_LONLAT) gridptr->nvertex = 2; + else if (gridtype == GRID_GAUSSIAN) gridptr->nvertex = 2; + else if (gridtype == GRID_GAUSSIAN_REDUCED) gridptr->nvertex = 2; + else if (gridtype == GRID_CURVILINEAR) gridptr->nvertex = 4; + else if (gridtype == GRID_UNSTRUCTURED) gridptr->x.size = size; + // clang-format on + + switch (gridtype) + { + case GRID_LONLAT: + case GRID_GAUSSIAN: + case GRID_GAUSSIAN_REDUCED: + case GRID_TRAJECTORY: + case GRID_CURVILINEAR: + case GRID_UNSTRUCTURED: + case GRID_GME: + { + if (gridtype == GRID_TRAJECTORY) + { + gridaxisSetKey(&gridptr->x, CDI_KEY_NAME, "tlon"); + gridaxisSetKey(&gridptr->y, CDI_KEY_NAME, "tlat"); + } + else + { + gridaxisSetKey(&gridptr->x, CDI_KEY_NAME, "lon"); + gridaxisSetKey(&gridptr->y, CDI_KEY_NAME, "lat"); + } + + gridaxisSetKey(&gridptr->x, CDI_KEY_LONGNAME, "longitude"); + gridaxisSetKey(&gridptr->y, CDI_KEY_LONGNAME, "latitude"); + + gridaxisSetKey(&gridptr->x, CDI_KEY_UNITS, "degrees_east"); + gridaxisSetKey(&gridptr->y, CDI_KEY_UNITS, "degrees_north"); + + gridaxisSetKey(&gridptr->x, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_latlon][0]); + gridaxisSetKey(&gridptr->y, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_latlon][1]); + + break; + } +#ifndef USE_MPI + case GRID_CHARXY: + { + if (gridptr->x.cvals) gridaxisSetKey(&gridptr->x, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_char][0]); + if (gridptr->y.cvals) gridaxisSetKey(&gridptr->y, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_char][1]); + + break; + } +#endif + case GRID_GENERIC: + case GRID_PROJECTION: + { + gridaxisSetKey(&gridptr->x, CDI_KEY_NAME, "x"); + gridaxisSetKey(&gridptr->y, CDI_KEY_NAME, "y"); + if (gridtype == GRID_PROJECTION) + { + gridaxisSetKey(&gridptr->x, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_projection][0]); + gridaxisSetKey(&gridptr->y, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_projection][1]); + gridaxisSetKey(&gridptr->x, CDI_KEY_UNITS, "m"); + gridaxisSetKey(&gridptr->y, CDI_KEY_UNITS, "m"); + } + break; + } + } +} + +// used also in CDO +void +gridGenXvals(int xsize, double xfirst, double xlast, double xinc, double *restrict xvals) +{ + if (fabs(xinc) <= 0 && xsize > 1) + { + if (xfirst >= xlast) + { + while (xfirst >= xlast) xlast += 360; + xinc = (xlast - xfirst) / (xsize); + } + else + { + xinc = (xlast - xfirst) / (xsize - 1); + } + } + + for (int i = 0; i < xsize; ++i) xvals[i] = xfirst + i * xinc; +} + +static void +calc_gaussgrid(double *restrict yvals, int ysize, double yfirst, double ylast) +{ + double *restrict yw = (double *) malloc((size_t) ysize * sizeof(double)); + gaussianLatitudes((size_t) ysize, yvals, yw); + free(yw); + for (int i = 0; i < ysize; i++) yvals[i] = asin(yvals[i]) / M_PI * 180.0; + + if (yfirst < ylast && yfirst > -90.0 && ylast < 90.0) + { + int yhsize = ysize / 2; + for (int i = 0; i < yhsize; i++) + { + const double ytmp = yvals[i]; + yvals[i] = yvals[ysize - i - 1]; + yvals[ysize - i - 1] = ytmp; + } + } +} + +static void +gridGenYvalsGaussian(int ysize, double yfirst, double ylast, double *restrict yvals) +{ + const double deleps = 0.002; + + calc_gaussgrid(yvals, ysize, yfirst, ylast); + + if (!(IS_EQUAL(yfirst, 0) && IS_EQUAL(ylast, 0))) + if (fabs(yvals[0] - yfirst) > deleps || fabs(yvals[ysize - 1] - ylast) > deleps) + { + bool lfound = false; + int ny = (int) (180. / (fabs(ylast - yfirst) / (ysize - 1)) + 0.5); + ny -= ny % 2; + if (ny > ysize && ny < 4096) + { + double *ytmp = (double *) Malloc((size_t) ny * sizeof(double)); + calc_gaussgrid(ytmp, ny, yfirst, ylast); + + int i; + for (i = 0; i < (ny - ysize); i++) + if (fabs(ytmp[i] - yfirst) < deleps) break; + int nstart = i; + + lfound = (nstart + ysize - 1) < ny && fabs(ytmp[nstart + ysize - 1] - ylast) < deleps; + if (lfound) + { + for (i = 0; i < ysize; i++) yvals[i] = ytmp[i + nstart]; + } + + if (ytmp) Free(ytmp); + } + + if (!lfound) + { + Warning("Cannot calculate gaussian latitudes for lat1 = %g latn = %g!", yfirst, ylast); + for (int i = 0; i < ysize; i++) yvals[i] = 0; + yvals[0] = yfirst; + yvals[ysize - 1] = ylast; + } + } +} + +static void +gridGenYvalsRegular(int ysize, double yfirst, double ylast, double yinc, double *restrict yvals) +{ + if (fabs(yinc) <= 0 && ysize > 1) + { + if (IS_EQUAL(yfirst, ylast) && IS_NOT_EQUAL(yfirst, 0)) ylast *= -1; + + if (yfirst > ylast) + yinc = (yfirst - ylast) / (ysize - 1); + else if (yfirst < ylast) + yinc = (ylast - yfirst) / (ysize - 1); + else + { + if (ysize % 2 != 0) + { + yinc = 180.0 / (ysize - 1); + yfirst = -90; + } + else + { + yinc = 180.0 / ysize; + yfirst = -90 + yinc / 2; + } + } + } + + if (yfirst > ylast && yinc > 0) yinc = -yinc; + + for (int i = 0; i < ysize; i++) yvals[i] = yfirst + i * yinc; +} + +// used also in CDO +void +gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double yinc, double *restrict yvals) +{ + if (gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED) + { + if (ysize > 2) + { + gridGenYvalsGaussian(ysize, yfirst, ylast, yvals); + } + else + { + yvals[0] = yfirst; + yvals[ysize - 1] = ylast; + } + } + // else if (gridtype == GRID_LONLAT || gridtype == GRID_GENERIC) + else + { + gridGenYvalsRegular(ysize, yfirst, ylast, yinc, yvals); + } + /* + else + Error("unable to calculate values for %s grid!", gridNamePtr(gridtype)); + */ +} + +/* +@Function gridCreate +@Title Create a horizontal Grid + +@Prototype int gridCreate(int gridtype, SizeType size) +@Parameter + @Item gridtype The type of the grid, one of the set of predefined CDI grid types. + The valid CDI grid types are @func{GRID_GENERIC}, @func{GRID_LONLAT}, + @func{GRID_GAUSSIAN}, @func{GRID_PROJECTION}, @func{GRID_SPECTRAL}, + @func{GRID_GME}, @func{GRID_CURVILINEAR} and @func{GRID_UNSTRUCTURED}. + @Item size Number of gridpoints. + +@Description +The function @func{gridCreate} creates a horizontal Grid. + +@Result +@func{gridCreate} returns an identifier to the Grid. + +@Example +Here is an example using @func{gridCreate} to create a regular lon/lat Grid: + +@Source + ... +#define nlon 12 +#define nlat 6 + ... +double lons[nlon] = {0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330}; +double lats[nlat] = {-75, -45, -15, 15, 45, 75}; +int gridID; + ... +gridID = gridCreate(GRID_LONLAT, nlon*nlat); +gridDefXsize(gridID, nlon); +gridDefYsize(gridID, nlat); +gridDefXvals(gridID, lons); +gridDefYvals(gridID, lats); + ... +@EndSource +@EndFunction +*/ +int +gridCreate(int gridtype, SizeType size) +{ + if (CDI_Debug) Message("gridtype=%s size=%zu", gridNamePtr(gridtype), size); + + xassert(size); + gridInit(); + + grid_t *gridptr = gridNewEntry(CDI_UNDEFID); + if (!gridptr) Error("No memory"); + + int gridID = gridptr->self; + + if (CDI_Debug) Message("gridID: %d", gridID); + + cdiGridTypeInit(gridptr, gridtype, (size_t) size); + + return gridID; +} + +static void +gridDestroyKernel(grid_t *gridptr) +{ + xassert(gridptr); + + grid_free_components(gridptr); + Free(gridptr); +} + +/* +@Function gridDestroy +@Title Destroy a horizontal Grid + +@Prototype void gridDestroy(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + +@EndFunction +*/ +void +gridDestroy(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->destroy(gridptr); + reshRemove(gridID, &gridOps); +} + +static void +gridDestroyP(void *gridptr) +{ + ((grid_t *) gridptr)->vtable->destroy((grid_t *) gridptr); +} + +const char * +gridNamePtr(int gridtype) +{ + int size = (int) (sizeof(Grids) / sizeof(Grids[0])); + + const char *name = (gridtype >= 0 && gridtype < size) ? Grids[gridtype] : Grids[GRID_GENERIC]; + + return name; +} + +void +gridName(int gridtype, char *gridname) +{ + strcpy(gridname, gridNamePtr(gridtype)); +} + +/* +@Function gridDefXname +@Title Define the name of a X-axis + +@Prototype void gridDefXname(int gridID, const char *name) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item name Name of the X-axis. + +@Description +The function @func{gridDefXname} defines the name of a X-axis. + +@EndFunction +*/ +void +gridDefXname(int gridID, const char *name) +{ + (void) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, name); +} + +/* +@Function gridDefXlongname +@Title Define the longname of a X-axis + +@Prototype void gridDefXlongname(int gridID, const char *longname) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item longname Longname of the X-axis. + +@Description +The function @func{gridDefXlongname} defines the longname of a X-axis. + +@EndFunction +*/ +void +gridDefXlongname(int gridID, const char *longname) +{ + (void) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, longname); +} + +/* +@Function gridDefXunits +@Title Define the units of a X-axis + +@Prototype void gridDefXunits(int gridID, const char *units) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item units Units of the X-axis. + +@Description +The function @func{gridDefXunits} defines the units of a X-axis. + +@EndFunction +*/ +void +gridDefXunits(int gridID, const char *units) +{ + (void) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, units); +} + +/* +@Function gridDefYname +@Title Define the name of a Y-axis + +@Prototype void gridDefYname(int gridID, const char *name) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item name Name of the Y-axis. + +@Description +The function @func{gridDefYname} defines the name of a Y-axis. + +@EndFunction +*/ +void +gridDefYname(int gridID, const char *name) +{ + (void) cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, name); +} + +/* +@Function gridDefYlongname +@Title Define the longname of a Y-axis + +@Prototype void gridDefYlongname(int gridID, const char *longname) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item longname Longname of the Y-axis. + +@Description +The function @func{gridDefYlongname} defines the longname of a Y-axis. + +@EndFunction +*/ +void +gridDefYlongname(int gridID, const char *longname) +{ + (void) cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, longname); +} + +/* +@Function gridDefYunits +@Title Define the units of a Y-axis + +@Prototype void gridDefYunits(int gridID, const char *units) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item units Units of the Y-axis. + +@Description +The function @func{gridDefYunits} defines the units of a Y-axis. + +@EndFunction +*/ +void +gridDefYunits(int gridID, const char *units) +{ + (void) cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, units); +} + +/* +@Function gridInqXname +@Title Get the name of a X-axis + +@Prototype void gridInqXname(int gridID, char *name) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item name Name of the X-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{gridInqXname} returns the name of a X-axis. + +@Result +@func{gridInqXname} returns the name of the X-axis to the parameter name. + +@EndFunction +*/ +void +gridInqXname(int gridID, char *name) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, name, &length); +} + +/* +@Function gridInqXlongname +@Title Get the longname of a X-axis + +@Prototype void gridInqXlongname(int gridID, char *longname) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item longname Longname of the X-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{gridInqXlongname} returns the longname of a X-axis. + +@Result +@func{gridInqXlongname} returns the longname of the X-axis to the parameter longname. + +@EndFunction +*/ +void +gridInqXlongname(int gridID, char *longname) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, longname, &length); +} + +/* +@Function gridInqXunits +@Title Get the units of a X-axis + +@Prototype void gridInqXunits(int gridID, char *units) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item units Units of the X-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{gridInqXunits} returns the units of a X-axis. + +@Result +@func{gridInqXunits} returns the units of the X-axis to the parameter units. + +@EndFunction +*/ +void +gridInqXunits(int gridID, char *units) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, units, &length); +} + +/* +@Function gridInqYname +@Title Get the name of a Y-axis + +@Prototype void gridInqYname(int gridID, char *name) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item name Name of the Y-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{gridInqYname} returns the name of a Y-axis. + +@Result +@func{gridInqYname} returns the name of the Y-axis to the parameter name. + +@EndFunction +*/ +void +gridInqYname(int gridID, char *name) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, name, &length); +} + +/* +@Function gridInqYlongname +@Title Get the longname of a Y-axis + +@Prototype void gridInqYlongname(int gridID, char *longname) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item longname Longname of the Y-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{gridInqYlongname} returns the longname of a Y-axis. + +@Result +@func{gridInqYlongname} returns the longname of the Y-axis to the parameter longname. + +@EndFunction +*/ +void +gridInqYlongname(int gridID, char *longname) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, longname, &length); +} + +/* +@Function gridInqYunits +@Title Get the units of a Y-axis + +@Prototype void gridInqYunits(int gridID, char *units) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item units Units of the Y-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{gridInqYunits} returns the units of a Y-axis. + +@Result +@func{gridInqYunits} returns the units of the Y-axis to the parameter units. + +@EndFunction +*/ +void +gridInqYunits(int gridID, char *units) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, units, &length); +} + +void +gridDefProj(int gridID, int projID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->proj = projID; + + if (gridptr->type == GRID_CURVILINEAR) + { + grid_t *projptr = grid_to_pointer(projID); + const char *xdimname = cdiInqVarKeyStringPtr(&gridptr->x.keys, CDI_KEY_DIMNAME); + const char *ydimname = cdiInqVarKeyStringPtr(&gridptr->y.keys, CDI_KEY_DIMNAME); + if (xdimname && find_key(&projptr->x.keys, CDI_KEY_NAME)) cdiDefKeyString(projID, CDI_XAXIS, CDI_KEY_NAME, xdimname); + if (ydimname && find_key(&projptr->y.keys, CDI_KEY_NAME)) cdiDefKeyString(projID, CDI_YAXIS, CDI_KEY_NAME, ydimname); + } +} + +int +gridInqProj(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->proj; +} + +int +gridInqProjType(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + int projtype = gridptr->projtype; + if (projtype == -1) + { + char gmapname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_NAME, gmapname, &length); + if (gmapname[0]) + { + // clang-format off + if (str_is_equal(gmapname, "rotated_latitude_longitude")) projtype = CDI_PROJ_RLL; + else if (str_is_equal(gmapname, "lambert_azimuthal_equal_area")) projtype = CDI_PROJ_LAEA; + else if (str_is_equal(gmapname, "lambert_conformal_conic")) projtype = CDI_PROJ_LCC; + else if (str_is_equal(gmapname, "sinusoidal")) projtype = CDI_PROJ_SINU; + else if (str_is_equal(gmapname, "polar_stereographic")) projtype = CDI_PROJ_STERE; + else if (str_is_equal(gmapname, "healpix")) projtype = CDI_PROJ_HEALPIX; + // clang-format on + gridptr->projtype = projtype; + } + } + + return projtype; +} + +void +gridVerifyProj(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + int projtype = gridInqProjType(gridID); + if (projtype == CDI_PROJ_RLL) + { + gridaxisSetKey(&gridptr->x, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_grid_latlon][0]); + gridaxisSetKey(&gridptr->y, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_grid_latlon][1]); + gridaxisSetKey(&gridptr->x, CDI_KEY_UNITS, "degrees"); + gridaxisSetKey(&gridptr->y, CDI_KEY_UNITS, "degrees"); + } + else if (projtype == CDI_PROJ_LCC) + { + gridaxisSetKey(&gridptr->x, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_projection][0]); + gridaxisSetKey(&gridptr->y, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_projection][1]); + gridaxisSetKey(&gridptr->x, CDI_KEY_UNITS, "m"); + gridaxisSetKey(&gridptr->y, CDI_KEY_UNITS, "m"); + } +} + +/* +@Function gridInqType +@Title Get the type of a Grid + +@Prototype int gridInqType(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqType} returns the type of a Grid. + +@Result +@func{gridInqType} returns the type of the grid, +one of the set of predefined CDI grid types. +The valid CDI grid types are @func{GRID_GENERIC}, @func{GRID_LONLAT}, +@func{GRID_GAUSSIAN}, @func{GRID_PROJECTION}, @func{GRID_SPECTRAL}, @func{GRID_GME}, +@func{GRID_CURVILINEAR} and @func{GRID_UNSTRUCTURED}. + +@EndFunction +*/ +int +gridInqType(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->type; +} + +/* +@Function gridInqSize +@Title Get the size of a Grid + +@Prototype SizeType gridInqSize(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqSize} returns the size of a Grid. + +@Result +@func{gridInqSize} returns the number of grid points of a Grid. + +@EndFunction +*/ +SizeType +gridInqSize(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + size_t size = gridptr->size; + if (size == 0) + { + size_t xsize = gridptr->x.size; + size_t ysize = gridptr->y.size; + + size = ysize ? xsize * ysize : xsize; + + gridptr->size = size; + } + + return (SizeType) size; +} + +static int +nsp2trunc(int nsp) +{ + /* nsp = (trunc+1)*(trunc+1) */ + /* => trunc^2 + 3*trunc - (x-2) = 0 */ + /* */ + /* with: y^2 + p*y + q = 0 */ + /* y = -p/2 +- sqrt((p/2)^2 - q) */ + /* p = 3 and q = - (x-2) */ + int trunc = (int) (sqrt(nsp * 4 + 1.) - 3) / 2; + return trunc; +} + +int +gridInqTrunc(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (gridptr->trunc == 0) + { + if (gridptr->type == GRID_SPECTRAL) gridptr->trunc = nsp2trunc(gridptr->size); + /* + else if ( gridptr->type == GRID_GAUSSIAN ) + gridptr->trunc = nlat2trunc(gridptr->y.size); + */ + } + + return gridptr->trunc; +} + +void +gridDefTrunc(int gridID, int trunc) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (gridptr->trunc != trunc) + { + gridMark4Update(gridID); + gridptr->trunc = trunc; + } +} + +/* +@Function gridDefXsize +@Title Define the number of values of a X-axis + +@Prototype void gridDefXsize(int gridID, SizeType xsize) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item xsize Number of values of a X-axis. + +@Description +The function @func{gridDefXsize} defines the number of values of a X-axis. + +@EndFunction +*/ +void +gridDefXsize(int gridID, SizeType xsize) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + size_t gridSize = gridInqSize(gridID); + if ((size_t) xsize > gridSize) Error("xsize %zu is greater then gridsize %zu", (size_t) xsize, gridSize); + + int gridType = gridInqType(gridID); + if (gridType == GRID_UNSTRUCTURED && (size_t) xsize != gridSize) + Error("xsize %zu must be equal to gridsize %zu for gridtype: %s", (size_t) xsize, gridSize, gridNamePtr(gridType)); + if (gridType == GRID_GAUSSIAN_REDUCED && xsize != 2 && (size_t) xsize != gridSize) + Error("xsize %zu must be equal to gridsize %zu for gridtype: %s", (size_t) xsize, gridSize, gridNamePtr(gridType)); + + if (gridptr->x.size != (size_t) xsize) + { + gridMark4Update(gridID); + gridptr->x.size = (size_t) xsize; + } + + if (gridType != GRID_UNSTRUCTURED && gridType != GRID_GAUSSIAN_REDUCED && gridType != GRID_PROJECTION) + { + size_t axisproduct = gridptr->x.size * gridptr->y.size; + if (axisproduct > 0 && axisproduct != gridSize) + Error("Inconsistent grid declaration! (xsize=%zu ysize=%zu gridsize=%zu)", gridptr->x.size, gridptr->y.size, gridSize); + } +} + +void +gridDefDatatype(int gridID, int datatype) +{ + cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, datatype); +} + +int +gridInqDatatype(int gridID) +{ + int datatype = CDI_UNDEFID; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); + return datatype; +} + +/* +@Function gridInqXsize +@Title Get the number of values of a X-axis + +@Prototype SizeType gridInqXsize(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqXsize} returns the number of values of a X-axis. + +@Result +@func{gridInqXsize} returns the number of values of a X-axis. + +@EndFunction +*/ +SizeType +gridInqXsize(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return (SizeType) gridptr->x.size; +} + +/* +@Function gridDefYsize +@Title Define the number of values of a Y-axis + +@Prototype void gridDefYsize(int gridID, SizeType ysize) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item ysize Number of values of a Y-axis. + +@Description +The function @func{gridDefYsize} defines the number of values of a Y-axis. + +@EndFunction +*/ +void +gridDefYsize(int gridID, SizeType ysize) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + size_t gridSize = gridInqSize(gridID); + + if ((size_t) ysize > gridSize) Error("ysize %zu is greater then gridsize %zu", (size_t) ysize, gridSize); + + int gridType = gridInqType(gridID); + if (gridType == GRID_UNSTRUCTURED && (size_t) ysize != gridSize) + Error("ysize %zu must be equal gridsize %zu for gridtype: %s", gridNamePtr(gridType), (size_t) ysize, gridSize); + + if (gridptr->y.size != (size_t) ysize) + { + gridMark4Update(gridID); + gridptr->y.size = (size_t) ysize; + } + + if (gridType != GRID_UNSTRUCTURED && gridType != GRID_GAUSSIAN_REDUCED && gridType != GRID_PROJECTION) + { + size_t axisproduct = gridptr->x.size * gridptr->y.size; + if (axisproduct > 0 && axisproduct != gridSize) + Error("Inconsistent grid declaration! (xsize=%zu ysize=%zu gridsize=%zu)", gridptr->x.size, gridptr->y.size, gridSize); + } +} + +/* +@Function gridInqYsize +@Title Get the number of values of a Y-axis + +@Prototype SizeType gridInqYsize(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqYsize} returns the number of values of a Y-axis. + +@Result +@func{gridInqYsize} returns the number of values of a Y-axis. + +@EndFunction +*/ +SizeType +gridInqYsize(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return (SizeType) gridptr->y.size; +} + +/* +@Function gridDefNP +@Title Define the number of parallels between a pole and the equator + +@Prototype void gridDefNP(int gridID, int np) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item np Number of parallels between a pole and the equator. + +@Description +The function @func{gridDefNP} defines the number of parallels between a pole and the equator +of a Gaussian grid. + +@EndFunction +*/ +void +gridDefNP(int gridID, int np) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (gridptr->np != np) + { + gridMark4Update(gridID); + gridptr->np = np; + } +} + +/* +@Function gridInqNP +@Title Get the number of parallels between a pole and the equator + +@Prototype int gridInqNP(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqNP} returns the number of parallels between a pole and the equator +of a Gaussian grid. + +@Result +@func{gridInqNP} returns the number of parallels between a pole and the equator. + +@EndFunction +*/ +int +gridInqNP(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->np; +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +void +gridDefReducedPoints(int gridID, int reducedPointsSize, const int reducedPoints[]) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + gridptr->reducedPoints = (int *) Malloc((size_t) reducedPointsSize * sizeof(int)); + gridptr->reducedPointsSize = reducedPointsSize; + memcpy(gridptr->reducedPoints, reducedPoints, (size_t) reducedPointsSize * sizeof(int)); + gridMark4Update(gridID); +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +void +gridInqReducedPoints(int gridID, int *reducedPoints) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (gridptr->reducedPoints == 0) Error("undefined pointer!"); + + memcpy(reducedPoints, gridptr->reducedPoints, (size_t) gridptr->reducedPointsSize * sizeof(int)); +} + +static size_t +gridInqMaskSerialGeneric(grid_t *gridptr, mask_t **internalMask, int *restrict mask) +{ + size_t size = gridptr->size; + + if (CDI_Debug && size == 0) Warning("Size undefined for gridID = %d", gridptr->self); + + const mask_t *restrict mask_src = *internalMask; + if (mask_src) + { + if (mask && size > 0) + for (size_t i = 0; i < size; ++i) mask[i] = (int) mask_src[i]; + } + else + size = 0; + + return size; +} + +static SizeType +gridInqMaskSerial(grid_t *gridptr, int *mask) +{ + return (SizeType) gridInqMaskSerialGeneric(gridptr, &gridptr->mask, mask); +} + +int +gridInqMask(int gridID, int *mask) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqMask(gridptr, mask); +} + +static void +gridDefMaskSerial(grid_t *gridptr, const int *mask) +{ + size_t size = gridptr->size; + if (size == 0) Error("Size undefined for gridID = %d", gridptr->self); + + if (mask == NULL) + { + if (gridptr->mask) + { + Free(gridptr->mask); + gridptr->mask = NULL; + } + } + else + { + if (gridptr->mask == NULL) + gridptr->mask = (mask_t *) Malloc(size * sizeof(mask_t)); + else if (CDI_Debug) + Warning("grid mask already defined!"); + + for (size_t i = 0; i < size; ++i) gridptr->mask[i] = (mask_t) (mask[i] != 0); + } +} + +void +gridDefMask(int gridID, const int *mask) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->defMask(gridptr, mask); + gridMark4Update(gridID); +} + +static int +gridInqMaskGMESerial(grid_t *gridptr, int *mask_gme) +{ + return gridInqMaskSerialGeneric(gridptr, &gridptr->mask_gme, mask_gme); +} + +int +gridInqMaskGME(int gridID, int *mask) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqMaskGME(gridptr, mask); +} + +static void +gridDefMaskGMESerial(grid_t *gridptr, const int *mask) +{ + size_t size = gridptr->size; + if (size == 0) Error("Size undefined for gridID = %d", gridptr->self); + + if (gridptr->mask_gme == NULL) + gridptr->mask_gme = (mask_t *) Malloc(size * sizeof(mask_t)); + else if (CDI_Debug) + Warning("mask already defined!"); + + for (size_t i = 0; i < size; ++i) gridptr->mask_gme[i] = (mask_t) (mask[i] != 0); +} + +void +gridDefMaskGME(int gridID, const int *mask) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->defMaskGME(gridptr, mask); + gridMark4Update(gridID); +} + +static void +copy_darray(size_t n, const double *restrict in, double *restrict out) +{ +#ifdef _OPENMP +#pragma omp parallel for if (n > 99999) default(shared) schedule(static) +#endif + for (size_t i = 0; i < n; ++i) out[i] = in[i]; +} + +static SizeType +gridInqXValsSerial(grid_t *gridptr, double *xvals) +{ + int gridtype = gridptr->type; + size_t size = grid_is_irregular(gridtype) ? gridptr->size : gridptr->x.size; + + if (CDI_Debug && size == 0) Warning("size undefined for gridID = %d", gridptr->self); + + if (gridptr->x.vals) + { + if (size && xvals) + { + const double *gridptr_xvals = gridptr->vtable->inqXValsPtr(gridptr); + copy_darray(size, gridptr_xvals, xvals); + } + } + else + size = 0; + + return (SizeType) size; +} + +static SizeType +gridInqXValsPartSerial(grid_t *gridptr, int start, SizeType length, double *xvals) +{ + int gridtype = gridptr->type; + size_t size = grid_is_irregular(gridtype) ? gridptr->size : gridptr->x.size; + + if (CDI_Debug && size == 0) Warning("size undefined for gridID = %d", gridptr->self); + + if (gridptr->x.vals) + { + if (size && xvals && (size_t) length <= size) + { + const double *gridptr_xvals = gridptr->vtable->inqXValsPtr(gridptr); + memcpy(xvals, gridptr_xvals + start, (size_t) length * sizeof(double)); + } + } + else + size = 0; + + return (SizeType) size; +} + +#ifndef USE_MPI +static SizeType +gridInqXCvalsSerial(grid_t *gridptr, char **xcvals) +{ + if (gridptr->type != GRID_CHARXY) Error("Function only valid for grid type 'GRID_CHARXY'."); + + size_t size = gridptr->x.size; + size_t maxclength = 0; + + const char **gridptr_xcvals = gridptr->vtable->inqXCvalsPtr(gridptr); + if (gridptr_xcvals && size && xcvals) + { + maxclength = gridptr->x.clength; + for (size_t i = 0; i < size; i++) memcpy(xcvals[i], gridptr_xcvals[i], maxclength * sizeof(char)); + } + + return (SizeType) maxclength; +} + +static int +gridInqXIscSerial(grid_t *gridptr) +{ + /* + if ( gridptr->type != GRID_CHARXY ) + Error("Axis type is 'char' but grid is not type 'GRID_CHARXY'."); + */ + return gridptr->x.clength; +} +#endif + +/* +@Function gridInqXvals +@Title Get all values of a X-axis + +@Prototype SizeType gridInqXvals(int gridID, double *xvals) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item xvals Pointer to the location into which the X-values are read. + The caller must allocate space for the returned values. + +@Description +The function @func{gridInqXvals} returns all values of the X-axis. + +@Result +Upon successful completion @func{gridInqXvals} returns the number of values and +the values are stored in @func{xvals}. +Otherwise, 0 is returned and @func{xvals} is empty. + +@EndFunction +*/ +SizeType +gridInqXvals(int gridID, double *xvals) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqXVals(gridptr, xvals); +} + +SizeType +gridInqXvalsPart(int gridID, int start, SizeType length, double *xvals) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqXValsPart(gridptr, start, length, xvals); +} + +SizeType +gridInqXCvals(int gridID, char **xcvals) +{ + grid_t *gridptr = grid_to_pointer(gridID); +#ifndef USE_MPI + return gridptr->vtable->inqXCvals(gridptr, xcvals); +#else + return 0; +#endif +} + +int +gridInqXIsc(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); +#ifndef USE_MPI + return gridptr->vtable->inqXIsc(gridptr); +#else + return 0; +#endif +} + +static void +gridDefXValsSerial(grid_t *gridptr, const double *xvals) +{ + int gridtype = gridptr->type; + size_t size = grid_is_irregular(gridtype) ? gridptr->size : gridptr->x.size; + + if (size == 0) Error("Size undefined for gridID = %d", gridptr->self); + + if (gridptr->x.vals && CDI_Debug) Warning("values already defined!"); + gridptr->x.vals = (double *) Realloc(gridptr->x.vals, size * sizeof(double)); + copy_darray(size, xvals, gridptr->x.vals); +} + +#ifndef USE_MPI +static SizeType +gridInqYCvalsSerial(grid_t *gridptr, char **ycvals) +{ + if (gridptr->type != GRID_CHARXY) Error("Function only valid for grid type 'GRID_CHARXY'."); + + size_t size = gridptr->y.size; + size_t maxclength = 0; + + const char **gridptr_ycvals = gridptr->vtable->inqYCvalsPtr(gridptr); + if (gridptr_ycvals && size && ycvals) + { + maxclength = gridptr->y.clength; + for (size_t i = 0; i < size; i++) memcpy(ycvals[i], gridptr_ycvals[i], maxclength * sizeof(char)); + } + + return (SizeType) maxclength; +} + +static int +gridInqYIscSerial(grid_t *gridptr) +{ + // if ( gridptr->type != GRID_CHARXY ) Error("Axis type is 'char' but grid is not type 'GRID_CHARXY'."); + return gridptr->y.clength; +} +#endif + +/* +@Function gridDefXvals +@Title Define the values of a X-axis + +@Prototype void gridDefXvals(int gridID, const double *xvals) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item xvals X-values of the grid. + +@Description +The function @func{gridDefXvals} defines all values of the X-axis. + +@EndFunction +*/ +void +gridDefXvals(int gridID, const double *xvals) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->defXVals(gridptr, xvals); + gridMark4Update(gridID); +} + +static SizeType +gridInqYValsSerial(grid_t *gridptr, double *yvals) +{ + int gridtype = gridptr->type; + size_t size = grid_is_irregular(gridtype) ? gridptr->size : gridptr->y.size; + + if (CDI_Debug && size == 0) Warning("size undefined for gridID = %d!", gridptr->self); + + if (gridptr->y.vals) + { + if (size && yvals) + { + const double *gridptr_yvals = gridptr->vtable->inqYValsPtr(gridptr); + copy_darray(size, gridptr_yvals, yvals); + } + } + else + size = 0; + + return (SizeType) size; +} + +static SizeType +gridInqYValsPartSerial(grid_t *gridptr, int start, SizeType length, double *yvals) +{ + int gridtype = gridptr->type; + size_t size = grid_is_irregular(gridtype) ? gridptr->size : gridptr->y.size; + + if (CDI_Debug && size == 0) Warning("size undefined for gridID = %d!", gridptr->self); + + if (gridptr->y.vals) + { + if (size && yvals && (size_t) length <= size) + { + const double *gridptr_yvals = gridptr->vtable->inqYValsPtr(gridptr); + memcpy(yvals, gridptr_yvals + start, (size_t) length * sizeof(double)); + } + } + else + size = 0; + + return (SizeType) size; +} + +/* +@Function gridInqYvals +@Title Get all values of a Y-axis + +@Prototype SizeType gridInqYvals(int gridID, double *yvals) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item yvals Pointer to the location into which the Y-values are read. + The caller must allocate space for the returned values. + +@Description +The function @func{gridInqYvals} returns all values of the Y-axis. + +@Result +Upon successful completion @func{gridInqYvals} returns the number of values and +the values are stored in @func{yvals}. +Otherwise, 0 is returned and @func{yvals} is empty. + +@EndFunction +*/ +SizeType +gridInqYvals(int gridID, double *yvals) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqYVals(gridptr, yvals); +} + +SizeType +gridInqYvalsPart(int gridID, int start, SizeType size, double *yvals) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqYValsPart(gridptr, start, size, yvals); +} + +SizeType +gridInqYCvals(int gridID, char **ycvals) +{ + grid_t *gridptr = grid_to_pointer(gridID); +#ifndef USE_MPI + return gridptr->vtable->inqYCvals(gridptr, ycvals); +#else + return 0; +#endif +} + +int +gridInqYIsc(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); +#ifndef USE_MPI + return gridptr->vtable->inqYIsc(gridptr); +#else + return 0; +#endif +} + +static void +gridDefYValsSerial(grid_t *gridptr, const double *yvals) +{ + int gridtype = gridptr->type; + size_t size = grid_is_irregular(gridtype) ? gridptr->size : gridptr->y.size; + + if (size == 0) Error("Size undefined for gridID = %d!", gridptr->self); + + if (gridptr->y.vals && CDI_Debug) Warning("Values already defined!"); + + gridptr->y.vals = (double *) Realloc(gridptr->y.vals, size * sizeof(double)); + copy_darray(size, yvals, gridptr->y.vals); +} + +/* +@Function gridDefYvals +@Title Define the values of a Y-axis + +@Prototype void gridDefYvals(int gridID, const double *yvals) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item yvals Y-values of the grid. + +@Description +The function @func{gridDefYvals} defines all values of the Y-axis. + +@EndFunction +*/ +void +gridDefYvals(int gridID, const double *yvals) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->defYVals(gridptr, yvals); + gridMark4Update(gridID); +} + +static double +gridInqXValSerial(grid_t *gridptr, SizeType index) +{ + const double xval = gridptr->x.vals ? gridptr->x.vals[index] : 0; + return xval; +} + +double +gridInqXval(int gridID, SizeType index) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqXVal(gridptr, index); +} + +static double +gridInqYValSerial(grid_t *gridptr, SizeType index) +{ + const double yval = gridptr->y.vals ? gridptr->y.vals[index] : 0; + return yval; +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +double +gridInqYval(int gridID, SizeType index) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqYVal(gridptr, index); +} + +static double +grid_calc_increment(size_t size, const double *vals) +{ + if (size > 1) + { + double inc = (vals[size - 1] - vals[0]) / (size - 1); + const double abs_inc = fabs(inc); + for (size_t i = 1; i < size; ++i) + if (fabs(fabs(vals[i - 1] - vals[i]) - abs_inc) > 0.01 * abs_inc) + { + inc = 0.0; + break; + } + + return inc; + } + + return 0.0; +} + +static double +grid_calc_increment_in_meter(SizeType size, const double *vals) +{ + if (size > 1) + { + const double inc = (vals[size - 1] - vals[0]) / (size - 1); + return round(fabs(inc)); + } + + return 0.0; +} + +static double +gridInqXIncBase(grid_t *gridptr) +{ + if (fabs(gridptr->x.inc) <= 0 && gridptr->x.vals) + { + size_t xsize = gridptr->x.size; + if (xsize > 1) + { + const double *xvals = gridptr->vtable->inqXValsPtr(gridptr); + gridptr->x.inc = grid_calc_increment(xsize, xvals); + } + } + + return gridptr->x.inc; +} + +double +gridInqXincInMeter(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + const double *xvals = gridptr->vtable->inqXValsPtr(gridptr); + + if (fabs(gridptr->x.inc) <= 0 && xvals) + { + size_t xsize = gridptr->x.size; + if (xsize > 1) gridptr->x.inc = grid_calc_increment_in_meter(xsize, xvals); + } + + return gridptr->x.inc; +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +double +gridInqXinc(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqXInc(gridptr); +} + +static double +gridInqYIncBase(grid_t *gridptr) +{ + if (fabs(gridptr->y.inc) <= 0 && gridptr->y.vals) + { + size_t ysize = gridptr->y.size; + if (ysize > 1) + { + const double *yvals = gridptr->vtable->inqYValsPtr(gridptr); + gridptr->y.inc = grid_calc_increment(ysize, yvals); + } + } + + return gridptr->y.inc; +} + +double +gridInqYincInMeter(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + const double *yvals = gridptr->vtable->inqYValsPtr(gridptr); + + if (fabs(gridptr->y.inc) <= 0 && yvals) + { + size_t ysize = gridptr->y.size; + if (ysize > 1) gridptr->y.inc = grid_calc_increment_in_meter(ysize, yvals); + } + + return gridptr->y.inc; +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +double +gridInqYinc(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqYInc(gridptr); +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +void +gridInqParamRLL(int gridID, double *xpole, double *ypole, double *angle) +{ + *xpole = 0; + *ypole = 0; + *angle = 0; + + static const char projection[] = "rotated_latitude_longitude"; + char name[CDI_MAX_NAME + 1]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_NAME, name, &length); + if (name[0] && str_is_equal(name, projection)) + { + int atttype, attlen; + + int natts, nfound = 0; + cdiInqNatts(gridID, CDI_GLOBAL, &natts); + + for (int iatt = 0; iatt < natts; ++iatt) + { + cdiInqAtt(gridID, CDI_GLOBAL, iatt, name, &atttype, &attlen); + if (attlen == 1) + { + double *attflt; + // clang-format off + if (str_is_equal(name, "grid_north_pole_longitude")) attflt = xpole; + else if (str_is_equal(name, "grid_north_pole_latitude") ) attflt = ypole; + else if (str_is_equal(name, "north_pole_grid_longitude")) attflt = angle; + else continue; + // clang-format on + bool valid = cdiInqAttConvertedToFloat(gridID, atttype, name, attlen, attflt); + if ((nfound += valid) == 3) return; + } + } + } + else + Warning("%s mapping parameter missing!", projection); +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +void +gridDefParamRLL(int gridID, double xpole, double ypole, double angle) +{ + cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "degrees"); + cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "degrees"); + + cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARNAME, "rotated_pole"); + + const char *gmapname = "rotated_latitude_longitude"; + cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_NAME, gmapname); + cdiDefAttTxt(gridID, CDI_GLOBAL, "grid_mapping_name", (int) (strlen(gmapname)), gmapname); + cdiDefAttFlt(gridID, CDI_GLOBAL, "grid_north_pole_longitude", CDI_DATATYPE_FLT64, 1, &xpole); + cdiDefAttFlt(gridID, CDI_GLOBAL, "grid_north_pole_latitude", CDI_DATATYPE_FLT64, 1, &ypole); + if (IS_NOT_EQUAL(angle, 0)) cdiDefAttFlt(gridID, CDI_GLOBAL, "north_pole_grid_longitude", CDI_DATATYPE_FLT64, 1, &angle); + + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->projtype = CDI_PROJ_RLL; + + gridVerifyProj(gridID); +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +void +gridInqParamGME(int gridID, int *nd, int *ni, int *ni2, int *ni3) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + *nd = gridptr->gme.nd; + *ni = gridptr->gme.ni; + *ni2 = gridptr->gme.ni2; + *ni3 = gridptr->gme.ni3; +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +void +gridDefParamGME(int gridID, int nd, int ni, int ni2, int ni3) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (gridptr->gme.nd != nd) + { + gridptr->gme.nd = nd; + gridptr->gme.ni = ni; + gridptr->gme.ni2 = ni2; + gridptr->gme.ni3 = ni3; + gridMark4Update(gridID); + } +} + +/* +@Function +@Title + +@Prototype +@Parameter + @Item Grid identifier + +@EndFunction +*/ +void +gridChangeType(int gridID, int gridtype) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (CDI_Debug) Message("Changed grid type from %s to %s", gridNamePtr(gridptr->type), gridNamePtr(gridtype)); + + if (gridptr->type != gridtype) + { + gridptr->type = gridtype; + gridMark4Update(gridID); + } +} + +static void +grid_check_cyclic(grid_t *gridptr) +{ + gridptr->isCyclic = 0; + enum + { + numVertices = 4 + }; + size_t xsize = gridptr->x.size, ysize = gridptr->y.size; + const double *xvals = gridptr->vtable->inqXValsPtr(gridptr), *yvals = gridptr->vtable->inqYValsPtr(gridptr), + (*xbounds)[numVertices] = (const double(*)[numVertices]) gridptr->vtable->inqXBoundsPtr(gridptr); + + if (gridptr->type == GRID_GAUSSIAN || gridptr->type == GRID_LONLAT) + { + if (xvals && xsize > 1) + { + double xval1 = xvals[0]; + double xval2 = xvals[1]; + double xvaln = xvals[xsize - 1]; + if (xval2 < xval1) xval2 += 360; + if (xvaln < xval1) xvaln += 360; + + if (IS_NOT_EQUAL(xval1, xvaln)) + { + double xinc = xval2 - xval1; + if (IS_EQUAL(xinc, 0)) xinc = (xvaln - xval1) / (xsize - 1); + + const double x0 = xvaln + xinc - 360; + + if (fabs(x0 - xval1) < 0.01 * xinc) gridptr->isCyclic = 1; + } + } + } + else if (gridptr->type == GRID_CURVILINEAR) + { + bool lcheck = true; + if (yvals && xvals) + { + if ((fabs(yvals[0] - yvals[xsize - 1]) > fabs(yvals[0] - yvals[xsize * ysize - xsize])) + && (fabs(yvals[xsize * ysize - xsize] - yvals[xsize * ysize - 1]) + > fabs(yvals[xsize - 1] - yvals[xsize * ysize - 1]))) + lcheck = false; + } + else + lcheck = false; + + if (lcheck && xvals && xsize > 1) + { + size_t nc = 0; + for (size_t j = 0; j < ysize; ++j) + { + size_t i1 = j * xsize, i2 = j * xsize + 1, in = j * xsize + (xsize - 1); + double val1 = xvals[i1], val2 = xvals[i2], valn = xvals[in]; + double xinc = fabs(val2 - val1); + + if (val1 < 1 && valn > 300) val1 += 360; + if (valn < 1 && val1 > 300) valn += 360; + if (val1 < -179 && valn > 120) val1 += 360; + if (valn < -179 && val1 > 120) valn += 360; + if (fabs(valn - val1) > 180) val1 += 360; + + double x0 = valn + copysign(xinc, val1 - valn); + + nc += fabs(x0 - val1) < 0.5 * xinc; + } + gridptr->isCyclic = nc > ysize / 2; + } + + if (lcheck && xbounds && xsize > 1) + { + bool isCyclic = true; + for (size_t j = 0; j < ysize; ++j) + { + size_t i1 = j * xsize, i2 = j * xsize + (xsize - 1); + for (size_t k1 = 0; k1 < numVertices; ++k1) + { + double val1 = xbounds[i1][k1]; + for (size_t k2 = 0; k2 < numVertices; ++k2) + { + double val2 = xbounds[i2][k2]; + + if (val1 < 1 && val2 > 300) val1 += 360; + if (val2 < 1 && val1 > 300) val2 += 360; + if (val1 < -179 && val2 > 120) val1 += 360; + if (val2 < -179 && val1 > 120) val2 += 360; + if (fabs(val2 - val1) > 180) val1 += 360; + + if (fabs(val1 - val2) < 0.001) goto foundCloseVertices; + } + } + // all vertices more than 0.001 degrees apart + isCyclic = false; + break; + foundCloseVertices:; + } + gridptr->isCyclic = isCyclic; + } + } +} + +int +gridIsCircular(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (gridptr->isCyclic == CDI_UNDEFID) grid_check_cyclic(gridptr); + + return gridptr->isCyclic; +} + +static bool +compareXYvals(grid_t *gridRef, grid_t *gridTest) +{ + bool differ = false; + int gridtype = gridTest->type; + + size_t xsizeTest = grid_is_irregular(gridtype) ? gridTest->size : gridTest->x.size; + size_t xsizeRef = (size_t) gridRef->vtable->inqXVals(gridRef, NULL); + if (xsizeTest != xsizeRef) return true; + + if (xsizeTest > 0) + { + const double *xvalsRef = gridRef->vtable->inqXValsPtr(gridRef); + const double *xvalsTest = gridTest->vtable->inqXValsPtr(gridTest); + if (!xvalsTest) return true; + + for (size_t i = 0; i < xsizeTest; ++i) + if (fabs(xvalsTest[i] - xvalsRef[i]) > 1.e-10) return true; + } + + size_t ysizeTest = grid_is_irregular(gridtype) ? gridTest->size : gridTest->y.size; + size_t ysizeRef = (size_t) gridRef->vtable->inqYVals(gridRef, NULL); + if (ysizeTest != ysizeRef) return true; + + if (ysizeTest > 0) + { + const double *yvalsRef = gridRef->vtable->inqYValsPtr(gridRef); + const double *yvalsTest = gridTest->vtable->inqYValsPtr(gridTest); + if (!yvalsTest) return true; + + for (size_t i = 0; i < ysizeTest; ++i) + if (fabs(yvalsTest[i] - yvalsRef[i]) > 1.e-10) return true; + } + + return differ; +} + +static bool +compareXYvals2(grid_t *gridRef, grid_t *gridTest) +{ + size_t gridsize = gridTest->size; + bool differ = ((gridTest->x.vals == NULL) ^ (gridRef->x.vals == NULL)) || ((gridTest->y.vals == NULL) ^ (gridRef->y.vals == NULL)) + || ((gridTest->x.bounds == NULL) ^ (gridRef->x.bounds == NULL)) + || ((gridTest->y.bounds == NULL) ^ (gridRef->y.bounds == NULL)); + + typedef double (*inqVal)(grid_t * grid, SizeType index); + inqVal inqXValRef = gridRef->vtable->inqXVal, inqYValRef = gridRef->vtable->inqYVal, inqXValTest = gridTest->vtable->inqXVal, + inqYValTest = gridTest->vtable->inqYVal; + + if (!differ && gridTest->x.vals) + differ = fabs(inqXValTest(gridTest, 0) - inqXValRef(gridRef, 0)) > 1.e-9 + || fabs(inqXValTest(gridTest, gridsize - 1) - inqXValRef(gridRef, gridsize - 1)) > 1.e-9; + + if (!differ && gridTest->y.vals) + differ = fabs(inqYValTest(gridTest, 0) - inqYValRef(gridRef, 0)) > 1.e-9 + || fabs(inqYValTest(gridTest, gridsize - 1) - inqYValRef(gridRef, gridsize - 1)) > 1.e-9; + + return differ; +} + +static bool +compare_bounds(const grid_t *grid, const grid_t *gridRef) +{ + bool differ = false; + + if ((grid->x.bounds && !gridRef->x.bounds) || (!grid->x.bounds && gridRef->x.bounds) || (grid->y.bounds && !gridRef->y.bounds) + || (!grid->y.bounds && gridRef->y.bounds)) + differ = true; + + return differ; +} + +static bool +compare_lonlat(int gridID, const grid_t *grid, const grid_t *gridRef) +{ + bool differ = false; + /* + printf("gridID %d\n", gridID); + printf("grid.xdef %d\n", grid->x.flag); + printf("grid.ydef %d\n", grid->y.flag); + printf("grid.xsize %zu\n", grid->x.size); + printf("grid.ysize %zu\n", grid->y.size); + printf("grid.xfirst %f\n", grid->x.first); + printf("grid.yfirst %f\n", grid->y.first); + printf("grid.xfirst %f\n", gridInqXval(gridID, 0)); + printf("grid.yfirst %f\n", gridInqYval(gridID, 0)); + printf("grid.xinc %f\n", grid->x.inc); + printf("grid.yinc %f\n", grid->y.inc); + printf("grid.xinc %f\n", gridInqXinc(gridID)); + printf("grid.yinc %f\n", gridInqYinc(gridID)); + */ + if (grid->x.size == gridRef->x.size && grid->y.size == gridRef->y.size) + { + if (grid->x.flag == 2 && grid->y.flag == 2) + { + if (!(IS_EQUAL(grid->x.first, 0) && IS_EQUAL(grid->x.last, 0) && IS_EQUAL(grid->x.inc, 0)) + && !(IS_EQUAL(grid->y.first, 0) && IS_EQUAL(grid->y.last, 0) && IS_EQUAL(grid->y.inc, 0)) + && IS_NOT_EQUAL(grid->x.first, grid->x.last) && IS_NOT_EQUAL(grid->y.first, grid->y.last)) + { + if (IS_NOT_EQUAL(grid->x.first, gridInqXval(gridID, 0)) || IS_NOT_EQUAL(grid->y.first, gridInqYval(gridID, 0))) + { + differ = true; + } + if (!differ && fabs(grid->x.inc) > 0 && fabs(fabs(grid->x.inc) - fabs(gridRef->x.inc)) > fabs(grid->x.inc / 1000)) + { + differ = true; + } + if (!differ && fabs(grid->y.inc) > 0 && fabs(fabs(grid->y.inc) - fabs(gridRef->y.inc)) > fabs(grid->y.inc / 1000)) + { + differ = true; + } + } + } + else if (grid->x.vals && grid->y.vals) + differ = gridRef->vtable->compareXYFull((grid_t *) gridRef, (grid_t *) grid); + + if (!differ) differ = compare_bounds(grid, gridRef); + } + else + differ = true; + + return differ; +} + +static bool +compare_projection(int gridID, const grid_t *grid, const grid_t *gridRef) +{ + bool differ = compare_lonlat(gridID, grid, gridRef); + + if (!differ) + { + // printf(">%s< >%s<\n", cdiInqVarKeyString(&grid->keys, CDI_KEY_GRIDMAP_VARNAME), cdiInqVarKeyString(&gridRef->keys, + // CDI_KEY_GRIDMAP_VARNAME)); printf(">%s< >%s<\n", cdiInqVarKeyString(&grid->keys, CDI_KEY_GRIDMAP_NAME), + // cdiInqVarKeyString(&gridRef->keys, CDI_KEY_GRIDMAP_NAME)); + // if (!str_is_equal(cdiInqVarKeyString(&grid->keys, CDI_KEY_GRIDMAP_VARNAME), cdiInqVarKeyString(&gridRef->keys, + // CDI_KEY_GRIDMAP_VARNAME))) return true; if (!str_is_equal(cdiInqVarKeyString(&grid->keys, CDI_KEY_GRIDMAP_NAME), + // cdiInqVarKeyString(&gridRef->keys, CDI_KEY_GRIDMAP_NAME))) return true; + } + + return differ; +} + +static bool +compare_generic(const grid_t *grid, const grid_t *gridRef) +{ + bool differ = false; + + if (grid->x.size == gridRef->x.size && grid->y.size == gridRef->y.size) + { + if (grid->x.flag == 1 && grid->y.flag == 1 && grid->x.vals && grid->y.vals) + differ = gridRef->vtable->compareXYFull((grid_t *) gridRef, (grid_t *) grid); + } + else if ((grid->y.size == 0 || grid->y.size == 1) && grid->x.size == gridRef->x.size * gridRef->y.size) + { + } + else + differ = true; + + return differ; +} + +static bool +compare_gaussian(int gridID, const grid_t *grid, const grid_t *gridRef) +{ + const double cmp_eps = 0.0015; + bool differ = false; + + if (grid->x.size == gridRef->x.size && grid->y.size == gridRef->y.size) + { + if (grid->x.flag == 2 && grid->y.flag == 2) + { + if (!(IS_EQUAL(grid->x.first, 0) && IS_EQUAL(grid->x.last, 0) && IS_EQUAL(grid->x.inc, 0)) + && !(IS_EQUAL(grid->y.first, 0) && IS_EQUAL(grid->y.last, 0))) + if (fabs(grid->x.first - gridInqXval(gridID, 0)) > cmp_eps || fabs(grid->y.first - gridInqYval(gridID, 0)) > cmp_eps + || (fabs(grid->x.inc) > 0 && fabs(fabs(grid->x.inc) - fabs(gridRef->x.inc)) > fabs(grid->x.inc / 1000))) + { + differ = true; + } + } + else if (grid->x.vals && grid->y.vals) + differ = gridRef->vtable->compareXYFull((grid_t *) gridRef, (grid_t *) grid); + + if (!differ) differ = compare_bounds(grid, gridRef); + } + else + differ = true; + + return differ; +} + +static bool +compare_curvilinear(const grid_t *grid, const grid_t *gridRef) +{ + bool differ = false; + + /* + printf("gridID %d\n", gridID); + printf("grid.xsize %d\n", grid->x.size); + printf("grid.ysize %d\n", grid->y.size); + printf("grid.xfirst %f\n", grid->x.vals[0]); + printf("grid.yfirst %f\n", grid->y.vals[0]); + printf("grid xfirst %f\n", gridInqXval(gridID, 0)); + printf("grid yfirst %f\n", gridInqYval(gridID, 0)); + printf("grid.xlast %f\n", grid->x.vals[grid->size-1]); + printf("grid.ylast %f\n", grid->y.vals[grid->size-1]); + printf("grid xlast %f\n", gridInqXval(gridID, grid->size-1)); + printf("grid ylast %f\n", gridInqYval(gridID, grid->size-1)); + printf("grid.nv %d\n", grid->nvertex); + printf("grid nv %d\n", gridInqNvertex(gridID)); + */ + if (grid->x.size == gridRef->x.size && grid->y.size == gridRef->y.size) + differ = gridRef->vtable->compareXYAO((grid_t *) gridRef, (grid_t *) grid); + + return differ; +} + +static bool +compare_unstructured(const grid_t *grid, const grid_t *gridRef, bool compareCoord) +{ + bool differ = false; + + unsigned char uuid1[CDI_UUID_SIZE] = { 0 }; + unsigned char uuid2[CDI_UUID_SIZE] = { 0 }; + int length = CDI_UUID_SIZE; + cdiInqVarKeyBytes(&gridRef->keys, CDI_KEY_UUID, uuid1, &length); + length = CDI_UUID_SIZE; + cdiInqVarKeyBytes(&grid->keys, CDI_KEY_UUID, uuid2, &length); + differ = ((!cdiUUIDIsNull(uuid1) || !cdiUUIDIsNull(uuid2)) && memcmp(uuid1, uuid2, CDI_UUID_SIZE)); + if (!differ) + { + int numberA = cdiInqVarKeyInt(&grid->keys, CDI_KEY_NUMBEROFGRIDUSED); + int numberB = cdiInqVarKeyInt(&gridRef->keys, CDI_KEY_NUMBEROFGRIDUSED); + int positionA = cdiInqVarKeyInt(&grid->keys, CDI_KEY_NUMBEROFGRIDINREFERENCE); + int positionB = cdiInqVarKeyInt(&gridRef->keys, CDI_KEY_NUMBEROFGRIDINREFERENCE); + if (compareCoord) + { + differ = (grid->nvertex != gridRef->nvertex || (numberA > 0 && positionA != positionB) + || gridRef->vtable->compareXYFull((grid_t *) gridRef, (grid_t *) grid)); + } + else + { + if (((grid->x.vals == NULL) ^ (gridRef->x.vals == NULL)) && ((grid->y.vals == NULL) ^ (gridRef->y.vals == NULL))) + { + int nvertexA = grid->nvertex, nvertexB = gridRef->nvertex; + differ = (nvertexA && nvertexB && (nvertexA != nvertexB)) + || ((numberA && numberB && (numberA != numberB)) || (numberA && numberB && positionA != positionB)); + } + else + { + differ = (grid->nvertex != gridRef->nvertex || numberA != numberB || (numberA > 0 && positionA != positionB) + || gridRef->vtable->compareXYAO((grid_t *) gridRef, (grid_t *) grid)); + } + } + } + + return differ; +} + +static bool +gridCompare(int gridID, const grid_t *grid, bool compareCoord) +{ + bool differ = true; + const grid_t *gridRef = grid_to_pointer(gridID); + + if (grid->type == gridRef->type || grid->type == GRID_GENERIC) + { + if (grid->size == gridRef->size) + { + differ = false; + if (grid->type == GRID_LONLAT) + { + differ = compare_lonlat(gridID, grid, gridRef); + } + else if (grid->type == GRID_PROJECTION) + { + differ = compare_projection(gridID, grid, gridRef); + } + else if (grid->type == GRID_GENERIC) + { + differ = compare_generic(grid, gridRef); + } + else if (grid->type == GRID_GAUSSIAN) + { + differ = compare_gaussian(gridID, grid, gridRef); + } + else if (grid->type == GRID_CURVILINEAR) + { + differ = compare_curvilinear(grid, gridRef); + } + else if (grid->type == GRID_UNSTRUCTURED) + { + differ = compare_unstructured(grid, gridRef, compareCoord); + } + } + } + + int scanningModeA = cdiInqVarKeyInt(&grid->keys, CDI_KEY_SCANNINGMODE); + int scanningModeB = cdiInqVarKeyInt(&gridRef->keys, CDI_KEY_SCANNINGMODE); + if (scanningModeA != scanningModeB) + { + // often grid definition may differ in UV-relativeToGrid + differ = true; +#ifdef HIRLAM_EXTENSIONS + if (cdiDebugExt >= 200) + printf("gridCompare(gridID=%d): Differs: scanningModeA [%d] != scanningModeB(gridID) [%d]\n", gridID, scanningModeA, + scanningModeB); +#endif // HIRLAM_EXTENSIONS + } + + return differ; +} + +int +cmp_key_int(const cdi_keys_t *keysp1, const cdi_keys_t *keysp2, int key) +{ + int v1 = cdiInqVarKeyInt(keysp1, key); + int v2 = cdiInqVarKeyInt(keysp2, key); + return (v1 != v2); +} + +int +gridCompareP(void *gridptr1, void *gridptr2) +{ + grid_t *g1 = (grid_t *) gridptr1; + grid_t *g2 = (grid_t *) gridptr2; + enum + { + equal = 0, + differ = -1 + }; + + xassert(g1); + xassert(g2); + + if (cdiInqVarKeyInt(&g1->keys, CDI_KEY_DATATYPE) != cdiInqVarKeyInt(&g2->keys, CDI_KEY_DATATYPE)) return differ; + if (g1->type != g2->type) return differ; + if (g1->isCyclic != g2->isCyclic) return differ; + if (g1->x.flag != g2->x.flag) return differ; + if (g1->y.flag != g2->y.flag) return differ; + if (g1->gme.nd != g2->gme.nd) return differ; + if (g1->gme.ni != g2->gme.ni) return differ; + if (g1->gme.ni2 != g2->gme.ni2) return differ; + if (g1->gme.ni3 != g2->gme.ni3) return differ; + if (cmp_key_int(&g1->keys, &g2->keys, CDI_KEY_NUMBEROFGRIDUSED)) return differ; + if (cmp_key_int(&g1->keys, &g2->keys, CDI_KEY_NUMBEROFGRIDINREFERENCE)) return differ; + if (g1->trunc != g2->trunc) return differ; + if (g1->nvertex != g2->nvertex) return differ; + if (g1->reducedPointsSize != g2->reducedPointsSize) return differ; + if (g1->size != g2->size) return differ; + if (g1->x.size != g2->x.size) return differ; + if (g1->y.size != g2->y.size) return differ; + if (g1->lcomplex != g2->lcomplex) return differ; + + if (IS_NOT_EQUAL(g1->x.first, g2->x.first)) return differ; + if (IS_NOT_EQUAL(g1->y.first, g2->y.first)) return differ; + if (IS_NOT_EQUAL(g1->x.last, g2->x.last)) return differ; + if (IS_NOT_EQUAL(g1->y.last, g2->y.last)) return differ; + if (IS_NOT_EQUAL(g1->x.inc, g2->x.inc)) return differ; + if (IS_NOT_EQUAL(g1->y.inc, g2->y.inc)) return differ; + if (cmp_key_int(&g1->keys, &g2->keys, CDI_KEY_SCANNINGMODE)) return differ; + + bool isIrregular = grid_is_irregular(g1->type); + { + const double *restrict g1_xvals = g1->vtable->inqXValsPtr(g1), *restrict g2_xvals = g2->vtable->inqXValsPtr(g2); + if ((g1_xvals != NULL) ^ (g2_xvals != NULL)) return differ; + if (g1_xvals) + { + size_t size = isIrregular ? g1->size : g1->x.size; + xassert(size); + for (size_t i = 0; i < size; i++) + if (IS_NOT_EQUAL(g1_xvals[i], g2_xvals[i])) return differ; + } + } + + { + const double *restrict g1_yvals = g1->vtable->inqYValsPtr(g1), *restrict g2_yvals = g2->vtable->inqYValsPtr(g2); + if ((g1_yvals != NULL) ^ (g2_yvals != NULL)) return differ; + if (g1_yvals) + { + size_t size = isIrregular ? g1->size : g1->y.size; + xassert(size); + for (size_t i = 0; i < size; i++) + if (IS_NOT_EQUAL(g1_yvals[i], g2_yvals[i])) return differ; + } + } + + { + const double *restrict g1_area = g1->vtable->inqAreaPtr(g1), *restrict g2_area = g2->vtable->inqAreaPtr(g2); + if ((g1_area != NULL) ^ (g2_area != NULL)) return differ; + if (g1_area) + { + size_t size = g1->size; + xassert(size); + + for (size_t i = 0; i < size; i++) + if (IS_NOT_EQUAL(g1_area[i], g2_area[i])) return differ; + } + } + + { + const double *restrict g1_xbounds = g1->vtable->inqXBoundsPtr(g1), *restrict g2_xbounds = g2->vtable->inqXBoundsPtr(g2); + if ((g1_xbounds != NULL) ^ (g2_xbounds != NULL)) return differ; + if (g1_xbounds) + { + xassert(g1->nvertex); + size_t size = g1->nvertex * (isIrregular ? g1->size : g1->x.size); + xassert(size); + + for (size_t i = 0; i < size; i++) + if (IS_NOT_EQUAL(g1_xbounds[i], g2_xbounds[i])) return differ; + } + } + + { + const double *restrict g1_ybounds = g1->vtable->inqYBoundsPtr(g1), *restrict g2_ybounds = g2->vtable->inqYBoundsPtr(g2); + if ((g1_ybounds != NULL) ^ (g2_ybounds != NULL)) return differ; + if (g1_ybounds) + { + xassert(g1->nvertex); + size_t size = g1->nvertex * (isIrregular ? g1->size : g1->y.size); + xassert(size); + + for (size_t i = 0; i < size; i++) + if (IS_NOT_EQUAL(g1_ybounds[i], g2_ybounds[i])) return differ; + } + } + + if (!str_is_equal(cdiInqVarKeyString(&g1->x.keys, CDI_KEY_NAME), cdiInqVarKeyString(&g2->x.keys, CDI_KEY_NAME))) return differ; + if (!str_is_equal(cdiInqVarKeyString(&g1->y.keys, CDI_KEY_NAME), cdiInqVarKeyString(&g2->y.keys, CDI_KEY_NAME))) return differ; + if (!str_is_equal(cdiInqVarKeyString(&g1->x.keys, CDI_KEY_LONGNAME), cdiInqVarKeyString(&g2->x.keys, CDI_KEY_LONGNAME))) + return differ; + if (!str_is_equal(cdiInqVarKeyString(&g1->y.keys, CDI_KEY_LONGNAME), cdiInqVarKeyString(&g2->y.keys, CDI_KEY_LONGNAME))) + return differ; + if (!str_is_equal(cdiInqVarKeyString(&g1->x.keys, CDI_KEY_UNITS), cdiInqVarKeyString(&g2->x.keys, CDI_KEY_UNITS))) return differ; + if (!str_is_equal(cdiInqVarKeyString(&g1->y.keys, CDI_KEY_UNITS), cdiInqVarKeyString(&g2->y.keys, CDI_KEY_UNITS))) return differ; + if (!str_is_equal(cdiInqVarKeyString(&g1->x.keys, CDI_KEY_STDNAME), cdiInqVarKeyString(&g2->x.keys, CDI_KEY_STDNAME))) + return differ; + if (!str_is_equal(cdiInqVarKeyString(&g1->y.keys, CDI_KEY_STDNAME), cdiInqVarKeyString(&g2->y.keys, CDI_KEY_STDNAME))) + return differ; + + if (!str_is_equal(cdiInqVarKeyString(&g1->y.keys, CDI_KEY_REFERENCEURI), cdiInqVarKeyString(&g2->y.keys, CDI_KEY_REFERENCEURI))) + return differ; + + if (g1->mask) + { + xassert(g1->size); + if (!g2->mask) return differ; + if (memcmp(g1->mask, g2->mask, g1->size * sizeof(mask_t))) return differ; + } + else if (g2->mask) + return differ; + + if (g1->mask_gme) + { + xassert(g1->size); + if (!g2->mask_gme) return differ; + if (memcmp(g1->mask_gme, g2->mask_gme, g1->size * sizeof(mask_t))) return differ; + } + else if (g2->mask_gme) + return differ; + + unsigned char uuid1[CDI_UUID_SIZE] = { 0 }; + unsigned char uuid2[CDI_UUID_SIZE] = { 0 }; + int length = CDI_UUID_SIZE; + cdiInqVarKeyBytes(&g1->keys, CDI_KEY_UUID, uuid1, &length); + length = CDI_UUID_SIZE; + cdiInqVarKeyBytes(&g2->keys, CDI_KEY_UUID, uuid2, &length); + if (memcmp(uuid1, uuid2, CDI_UUID_SIZE)) return differ; + + return equal; +} + +static void +grid_complete(grid_t *grid) +{ + int gridID = grid->self; + + if (grid->datatype != CDI_UNDEFID) cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, grid->datatype); + + int gridtype = grid->type; + switch (gridtype) + { + case GRID_LONLAT: + case GRID_GAUSSIAN: + case GRID_UNSTRUCTURED: + case GRID_CURVILINEAR: + case GRID_GENERIC: + case GRID_PROJECTION: + case GRID_CHARXY: + { + if (grid->x.size > 0) gridDefXsize(gridID, grid->x.size); + if (grid->y.size > 0) gridDefYsize(gridID, grid->y.size); + + if (gridtype == GRID_GAUSSIAN) gridDefNP(gridID, grid->np); + + if (grid->nvertex > 0) gridDefNvertex(gridID, grid->nvertex); + + if (grid->x.flag == 2) + { + assert(gridtype != GRID_UNSTRUCTURED && gridtype != GRID_CURVILINEAR); + double *xvals = (double *) Malloc(grid->x.size * sizeof(double)); + gridGenXvals(grid->x.size, grid->x.first, grid->x.last, grid->x.inc, xvals); + grid->x.vals = xvals; + // gridDefXinc(gridID, grid->x.inc); + } + + if (grid->y.flag == 2) + { + assert(gridtype != GRID_UNSTRUCTURED && gridtype != GRID_CURVILINEAR); + double *yvals = (double *) Malloc(grid->y.size * sizeof(double)); + gridGenYvals(gridtype, grid->y.size, grid->y.first, grid->y.last, grid->y.inc, yvals); + grid->y.vals = yvals; + // gridDefYinc(gridID, grid->y.inc); + } + + if (grid->projtype == CDI_PROJ_RLL) + { + const char *name = cdiInqVarKeyString(&grid->x.keys, CDI_KEY_NAME); + if (name[0] == 0 || name[0] == 'x') cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, "rlon"); + name = cdiInqVarKeyString(&grid->y.keys, CDI_KEY_NAME); + if (name[0] == 0 || name[0] == 'y') cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, "rlat"); + name = cdiInqVarKeyString(&grid->x.keys, CDI_KEY_LONGNAME); + if (name[0] == 0) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, "longitude in rotated pole grid"); + name = cdiInqVarKeyString(&grid->y.keys, CDI_KEY_LONGNAME); + if (name[0] == 0) cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, "latitude in rotated pole grid"); + name = cdiInqVarKeyString(&grid->x.keys, CDI_KEY_UNITS); + if (name[0] == 0) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "degrees"); + name = cdiInqVarKeyString(&grid->y.keys, CDI_KEY_UNITS); + if (name[0] == 0) cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "degrees"); + cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_grid_latlon][0]); + cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_STDNAME, xystdname_tab[grid_xystdname_grid_latlon][1]); + } + + if (gridtype == GRID_UNSTRUCTURED) + { + int number = cdiInqVarKeyInt(&grid->keys, CDI_KEY_NUMBEROFGRIDUSED); + if (number > 0) + { + cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, number); + int position = cdiInqVarKeyInt(&grid->keys, CDI_KEY_NUMBEROFGRIDINREFERENCE); + if (position > 0) cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, position); + } + } + + break; + } + case GRID_GAUSSIAN_REDUCED: + { + gridDefNP(gridID, grid->np); + gridDefYsize(gridID, grid->y.size); + if (grid->x.flag == 2) + { + double xvals[2] = { grid->x.first, grid->x.last }; + gridDefXsize(gridID, 2); + gridDefXvals(gridID, xvals); + } + + if (grid->y.flag == 2) + { + double *yvals = (double *) Malloc(grid->y.size * sizeof(double)); + gridGenYvals(gridtype, grid->y.size, grid->y.first, grid->y.last, grid->y.inc, yvals); + grid->y.vals = yvals; + // gridDefYinc(gridID, grid->y.inc); + } + break; + } + case GRID_SPECTRAL: + { + gridDefTrunc(gridID, grid->trunc); + if (grid->lcomplex) gridDefComplexPacking(gridID, 1); + break; + } + case GRID_FOURIER: + { + gridDefTrunc(gridID, grid->trunc); + break; + } + case GRID_GME: + { + gridDefParamGME(gridID, grid->gme.nd, grid->gme.ni, grid->gme.ni2, grid->gme.ni3); + break; + } + /* + case GRID_GENERIC: + { + if ( grid->x.size > 0 && grid->y.size > 0 ) + { + gridDefXsize(gridID, grid->x.size); + gridDefYsize(gridID, grid->y.size); + if ( grid->x.vals ) gridDefXvals(gridID, grid->x.vals); + if ( grid->y.vals ) gridDefYvals(gridID, grid->y.vals); + } + break; + } + */ + case GRID_TRAJECTORY: + { + gridDefXsize(gridID, 1); + gridDefYsize(gridID, 1); + break; + } + default: + { + Error("Gridtype %s unsupported!", gridNamePtr(gridtype)); + break; + } + } +} + +// Used only in iterator_grib.c +int +gridGenerate(const grid_t *grid) +{ + int gridtype = grid->type; + int gridID = gridCreate(gridtype, grid->size); + grid_t *restrict gridptr = grid_to_pointer(gridID); + cdiCopyVarKey(&grid->keys, CDI_KEY_DATATYPE, &gridptr->keys); + gridptr->x.size = grid->x.size; + gridptr->y.size = grid->y.size; + gridptr->np = grid->np; + gridptr->nvertex = grid->nvertex; + gridptr->x.flag = grid->x.flag; + int valdef_group1 = 0; + static const int valdef_group1_tab[] + = { GRID_LONLAT, GRID_GAUSSIAN, GRID_UNSTRUCTURED, GRID_CURVILINEAR, GRID_GENERIC, GRID_PROJECTION }; + for (size_t i = 0; i < sizeof(valdef_group1_tab) / sizeof(valdef_group1_tab[0]); ++i) + valdef_group1 |= (gridtype == valdef_group1_tab[i]); + if (valdef_group1 && grid->x.flag == 1) + { + gridDefXvals(gridID, grid->x.vals); + if (grid->x.bounds) gridDefXbounds(gridID, grid->x.bounds); + } + gridptr->x.first = grid->x.first; + gridptr->x.last = grid->x.last; + gridptr->x.inc = grid->x.inc; + gridptr->y.flag = grid->y.flag; + if ((valdef_group1 || gridtype == GRID_GAUSSIAN_REDUCED) && grid->y.flag == 1) + { + gridDefYvals(gridID, grid->y.vals); + if (grid->y.bounds) gridDefYbounds(gridID, grid->y.bounds); + } + gridptr->y.first = grid->y.first; + gridptr->y.last = grid->y.last; + gridptr->y.inc = grid->y.inc; + if (valdef_group1 && grid->area) gridDefArea(gridID, grid->area); + + cdiCopyVarKey(&grid->keys, CDI_KEY_NUMBEROFGRIDUSED, &gridptr->keys); + cdiCopyVarKey(&grid->keys, CDI_KEY_NUMBEROFGRIDINREFERENCE, &gridptr->keys); + cdiCopyVarKey(&grid->keys, CDI_KEY_REFERENCEURI, &gridptr->keys); + + cdiCopyVarKey(&grid->keys, CDI_KEY_SCANNINGMODE, &gridptr->keys); + + if (gridtype == GRID_PROJECTION) gridptr->name = strdup(grid->name); + if (gridtype == GRID_GAUSSIAN_REDUCED) gridDefReducedPoints(gridID, grid->y.size, grid->reducedPoints); + gridptr->trunc = grid->trunc; + gridptr->lcomplex = grid->lcomplex; + gridptr->gme.nd = grid->gme.nd; + gridptr->gme.ni = grid->gme.ni; + gridptr->gme.ni2 = grid->gme.ni2; + gridptr->gme.ni3 = grid->gme.ni3; + + grid_complete(gridptr); + + cdiCopyVarKey(&grid->keys, CDI_KEY_UUID, &gridptr->keys); + + return gridID; +} + +static void +grid_copy_base_array_fields(grid_t *gridptrOrig, grid_t *gridptrDup) +{ + size_t reducedPointsSize = (SizeType) gridptrOrig->reducedPointsSize; + size_t gridsize = gridptrOrig->size; + int gridtype = gridptrOrig->type; + bool isIrregular = grid_is_irregular(gridtype); + if (reducedPointsSize) + { + gridptrDup->reducedPoints = (int *) Malloc(reducedPointsSize * sizeof(int)); + memcpy(gridptrDup->reducedPoints, gridptrOrig->reducedPoints, reducedPointsSize * sizeof(int)); + } + + if (gridptrOrig->x.vals != NULL) + { + size_t size = isIrregular ? gridsize : gridptrOrig->x.size; + gridptrDup->x.vals = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->x.vals, gridptrOrig->x.vals, size * sizeof(double)); + } + + if (gridptrOrig->y.vals != NULL) + { + size_t size = isIrregular ? gridsize : gridptrOrig->y.size; + gridptrDup->y.vals = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->y.vals, gridptrOrig->y.vals, size * sizeof(double)); + } + + if (gridptrOrig->x.bounds != NULL) + { + size_t size = (isIrregular ? gridsize : gridptrOrig->x.size) * gridptrOrig->nvertex; + gridptrDup->x.bounds = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->x.bounds, gridptrOrig->x.bounds, size * sizeof(double)); + } + + if (gridptrOrig->y.bounds != NULL) + { + size_t size = (isIrregular ? gridsize : gridptrOrig->y.size) * gridptrOrig->nvertex; + gridptrDup->y.bounds = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->y.bounds, gridptrOrig->y.bounds, size * sizeof(double)); + } + + { + const double *gridptrOrig_area = gridptrOrig->vtable->inqAreaPtr(gridptrOrig); + if (gridptrOrig_area != NULL) + { + size_t size = gridsize; + gridptrDup->area = (double *) Malloc(size * sizeof(double)); + memcpy(gridptrDup->area, gridptrOrig_area, size * sizeof(double)); + } + } + + if (gridptrOrig->mask != NULL) + { + size_t size = gridsize; + gridptrDup->mask = (mask_t *) Malloc(size * sizeof(mask_t)); + memcpy(gridptrDup->mask, gridptrOrig->mask, size * sizeof(mask_t)); + } + + if (gridptrOrig->mask_gme != NULL) + { + size_t size = gridsize; + gridptrDup->mask_gme = (mask_t *) Malloc(size * sizeof(mask_t)); + memcpy(gridptrDup->mask_gme, gridptrOrig->mask_gme, size * sizeof(mask_t)); + } +} + +/* +@Function gridDuplicate +@Title Duplicate a horizontal Grid + +@Prototype int gridDuplicate(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridDuplicate} duplicates a horizontal Grid. + +@Result +@func{gridDuplicate} returns an identifier to the duplicated Grid. + +@EndFunction +*/ +int +gridDuplicate(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + grid_t *gridptrnew = gridptr->vtable->copy(gridptr); + int gridIDnew = reshPut(gridptrnew, &gridOps); + gridptrnew->self = gridIDnew; + return gridIDnew; +} + +void +gridCompress(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + int gridtype = gridInqType(gridID); + if (gridtype == GRID_UNSTRUCTURED) + { + if (gridptr->mask_gme != NULL) + { + size_t gridsize = gridInqSize(gridID); + size_t nv = (size_t) gridptr->nvertex; + double *restrict area = (double *) gridptr->vtable->inqAreaPtr(gridptr), + *restrict xvals = (double *) gridptr->vtable->inqXValsPtr(gridptr), + *restrict yvals = (double *) gridptr->vtable->inqYValsPtr(gridptr), + *restrict xbounds = (double *) gridptr->vtable->inqXBoundsPtr(gridptr), + *restrict ybounds = (double *) gridptr->vtable->inqYBoundsPtr(gridptr); + mask_t *restrict mask_gme = gridptr->mask_gme; + size_t *restrict selection = (size_t *) Malloc(gridsize * sizeof(selection[0])); + size_t nselect; + { + size_t j = 0; + for (size_t i = 0; i < gridsize; i++) selection[j] = i, j += (mask_gme[i] != 0); + nselect = j; + } + selection = (size_t *) Realloc(selection, nselect * sizeof(selection[0])); + if (xvals) + for (size_t i = 0; i < nselect; i++) xvals[i] = xvals[selection[i]]; + if (yvals) + for (size_t i = 0; i < nselect; i++) yvals[i] = yvals[selection[i]]; + if (area) + for (size_t i = 0; i < nselect; i++) area[i] = area[selection[i]]; + if (xbounds) + for (size_t i = 0; i < nselect; i++) + for (size_t iv = 0; iv < nv; iv++) xbounds[i * nv + iv] = xbounds[selection[i] * nv + iv]; + if (ybounds) + for (size_t i = 0; i < nselect; i++) + for (size_t iv = 0; iv < nv; iv++) ybounds[i * nv + iv] = ybounds[selection[i] * nv + iv]; + Free(selection); + + /* fprintf(stderr, "grid compress %d %d %d\n", i, j, gridsize); */ + gridsize = nselect; + gridptr->size = (int) gridsize; + gridptr->x.size = (int) gridsize; + gridptr->y.size = (int) gridsize; + + double **resizeP[] = { &gridptr->x.vals, &gridptr->y.vals, &gridptr->area, &gridptr->x.bounds, &gridptr->y.bounds }; + size_t newSize[] = { gridsize, gridsize, gridsize, nv * gridsize, nv * gridsize }; + for (size_t i = 0; i < sizeof(resizeP) / sizeof(resizeP[0]); ++i) + if (*(resizeP[i])) *(resizeP[i]) = (double *) Realloc(*(resizeP[i]), newSize[i] * sizeof(double)); + + Free(gridptr->mask_gme); + gridptr->mask_gme = NULL; + gridMark4Update(gridID); + } + } + else + Warning("Unsupported grid type: %s", gridNamePtr(gridtype)); +} + +static void +gridDefAreaSerial(grid_t *gridptr, const double *area) +{ + size_t size = gridptr->size; + + if (size == 0) Error("size undefined for gridID = %d", gridptr->self); + + if (gridptr->area == NULL) + gridptr->area = (double *) Malloc(size * sizeof(double)); + else if (CDI_Debug) + Warning("values already defined!"); + + memcpy(gridptr->area, area, size * sizeof(double)); +} + +void +gridDefArea(int gridID, const double *area) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->defArea(gridptr, area); + gridMark4Update(gridID); +} + +static void +gridInqAreaSerial(grid_t *gridptr, double *area) +{ + if (gridptr->area) memcpy(area, gridptr->area, gridptr->size * sizeof(double)); +} + +void +gridInqArea(int gridID, double *area) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->inqArea(gridptr, area); +} + +static int +gridInqPropPresenceBase(grid_t *gridptr, enum gridPropInq inq) +{ + bool present = false; + switch (inq) + { + case GRID_PROP_MASK: present = gridptr->mask != NULL; break; + case GRID_PROP_MASK_GME: present = gridptr->mask != NULL; break; + case GRID_PROP_AREA: present = gridptr->area != NULL; break; + case GRID_PROP_XVALS: present = gridptr->x.vals != NULL; break; + case GRID_PROP_YVALS: present = gridptr->y.vals != NULL; break; + case GRID_PROP_XBOUNDS: present = gridptr->x.bounds != NULL; break; + case GRID_PROP_YBOUNDS: present = gridptr->y.bounds != NULL; break; + } + return present; +} + +int +gridInqPropPresence(int gridID, enum gridPropInq inq) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqPropPresence(gridptr, inq); +} + +int +gridHasArea(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqPropPresence(gridptr, GRID_PROP_AREA); +} + +static const double * +gridInqAreaPtrBase(grid_t *gridptr) +{ + return gridptr->area; +} + +const double * +gridInqAreaPtr(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqAreaPtr(gridptr); +} + +void +gridDefNvertex(int gridID, int nvertex) +{ + grid_t *gridptr = grid_to_pointer(gridID); + if (gridptr->nvertex != nvertex) + { + gridptr->nvertex = nvertex; + gridMark4Update(gridID); + } +} + +int +gridInqNvertex(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->nvertex; +} + +static void +gridDefBoundsGeneric(grid_t *gridptr, const double *bounds, size_t regularSize, double **field) +{ + bool isIrregular = grid_is_irregular(gridptr->type); + size_t nvertex = (size_t) gridptr->nvertex; + if (nvertex == 0) + { + Warning("nvertex undefined for gridID = %d. Cannot define bounds!", gridptr->self); + return; + } + + size_t size = nvertex * (isIrregular ? gridptr->size : regularSize); + if (size == 0) Error("size undefined for gridID = %d", gridptr->self); + + if (*field == NULL && size) + *field = (double *) Malloc(size * sizeof(double)); + else if (CDI_Debug) + Warning("values already defined!"); + + copy_darray(size, bounds, *field); +} + +static void +gridDefXBoundsSerial(grid_t *gridptr, const double *xbounds) +{ + gridDefBoundsGeneric(gridptr, xbounds, gridptr->x.size, &gridptr->x.bounds); +} + +/* +@Function gridDefXbounds +@Title Define the bounds of a X-axis + +@Prototype void gridDefXbounds(int gridID, const double *xbounds) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item xbounds X-bounds of the grid. + +@Description +The function @func{gridDefXbounds} defines all bounds of the X-axis. + +@EndFunction +*/ +void +gridDefXbounds(int gridID, const double *xbounds) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->defXBounds(gridptr, xbounds); + gridMark4Update(gridID); +} + +static SizeType +gridInqXBoundsSerial(grid_t *gridptr, double *xbounds) +{ + size_t nvertex = (size_t) gridptr->nvertex; + + bool isIrregular = grid_is_irregular(gridptr->type); + size_t size = nvertex * (isIrregular ? gridptr->size : gridptr->x.size); + + if (gridptr->x.bounds) + { + if (size && xbounds) + { + const double *gridptr_xbounds = gridptr->vtable->inqXBoundsPtr(gridptr); + copy_darray(size, gridptr_xbounds, xbounds); + } + } + else + size = 0; + + return (SizeType) size; +} + +/* +@Function gridInqXbounds +@Title Get the bounds of a X-axis + +@Prototype SizeType gridInqXbounds(int gridID, double *xbounds) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item xbounds Pointer to the location into which the X-bounds are read. + The caller must allocate space for the returned values. + +@Description +The function @func{gridInqXbounds} returns the bounds of the X-axis. + +@Result +Upon successful completion @func{gridInqXbounds} returns the number of bounds and +the bounds are stored in @func{xbounds}. +Otherwise, 0 is returned and @func{xbounds} is empty. + +@EndFunction +*/ +SizeType +gridInqXbounds(int gridID, double *xbounds) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqXBounds(gridptr, xbounds); +} + +static const double * +gridInqXBoundsPtrSerial(grid_t *gridptr) +{ + return gridptr->x.bounds; +} + +const double * +gridInqXboundsPtr(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqXBoundsPtr(gridptr); +} + +static void +gridDefYBoundsSerial(grid_t *gridptr, const double *ybounds) +{ + gridDefBoundsGeneric(gridptr, ybounds, gridptr->y.size, &gridptr->y.bounds); +} + +//---------------------------------------------------------------------------- +// Parallel Version +//---------------------------------------------------------------------------- + +SizeType +gridInqXboundsPart(int gridID, int start, SizeType size, double *xbounds) +{ + grid_t *gridptr = grid_to_pointer(gridID); + const double *gridptr_xbounds = gridptr->vtable->inqXBoundsPtr(gridptr); + if (gridptr_xbounds && size && xbounds) memcpy(xbounds, gridptr_xbounds + start, size * sizeof(double)); + + return size; +} + +SizeType +gridInqYboundsPart(int gridID, int start, SizeType size, double *ybounds) +{ + grid_t *gridptr = grid_to_pointer(gridID); + const double *gridptr_ybounds = gridptr->vtable->inqYBoundsPtr(gridptr); + if (gridptr_ybounds && size && ybounds) memcpy(ybounds, gridptr_ybounds + start, size * sizeof(double)); + + return size; +} + +/* +@Function gridDefYbounds +@Title Define the bounds of a Y-axis + +@Prototype void gridDefYbounds(int gridID, const double *ybounds) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item ybounds Y-bounds of the grid. + +@Description +The function @func{gridDefYbounds} defines all bounds of the Y-axis. + +@EndFunction +*/ +void +gridDefYbounds(int gridID, const double *ybounds) +{ + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->vtable->defYBounds(gridptr, ybounds); + gridMark4Update(gridID); +} + +static SizeType +gridInqYBoundsSerial(grid_t *gridptr, double *ybounds) +{ + size_t nvertex = (size_t) gridptr->nvertex; + + bool isIrregular = grid_is_irregular(gridptr->type); + size_t size = nvertex * (isIrregular ? gridptr->size : gridptr->y.size); + + if (gridptr->y.bounds) + { + if (size && ybounds) + { + const double *gridptr_ybounds = gridptr->vtable->inqYBoundsPtr(gridptr); + copy_darray(size, gridptr_ybounds, ybounds); + } + } + else + size = 0; + + return (SizeType) size; +} + +/* +@Function gridInqYbounds +@Title Get the bounds of a Y-axis + +@Prototype SizeType gridInqYbounds(int gridID, double *ybounds) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item ybounds Pointer to the location into which the Y-bounds are read. + The caller must allocate space for the returned values. + +@Description +The function @func{gridInqYbounds} returns the bounds of the Y-axis. + +@Result +Upon successful completion @func{gridInqYbounds} returns the number of bounds and +the bounds are stored in @func{ybounds}. +Otherwise, 0 is returned and @func{ybounds} is empty. + +@EndFunction +*/ +SizeType +gridInqYbounds(int gridID, double *ybounds) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqYBounds(gridptr, ybounds); +} + +static const double * +gridInqYBoundsPtrSerial(grid_t *gridptr) +{ + return gridptr->y.bounds; +} + +const double * +gridInqYboundsPtr(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqYBoundsPtr(gridptr); +} + +static void +printDblsPrefixAutoBrk(FILE *fp, int dig, const char prefix[], size_t nbyte0, size_t n, const double vals[]) +{ + fputs(prefix, fp); + size_t nbyte = nbyte0; + for (size_t i = 0; i < n; i++) + { + if (nbyte > 80) + { + fprintf(fp, "\n%*s", (int) nbyte0, ""); + nbyte = nbyte0; + } + nbyte += (size_t) fprintf(fp, "%.*g ", dig, vals[i]); + } + fputs("\n", fp); +} + +static inline void * +resizeBuffer(void **buf, size_t *bufSize, size_t reqSize) +{ + if (reqSize > *bufSize) + { + *buf = Realloc(*buf, reqSize); + *bufSize = reqSize; + } + return *buf; +} + +static void +gridPrintAttributes(FILE *fp, int gridID) +{ + int cdiID = gridID; + int varID = CDI_GLOBAL; + int atttype, attlen; + char attname[CDI_MAX_NAME + 1]; + void *attBuf = NULL; + size_t attBufSize = 0; + + int natts; + cdiInqNatts(cdiID, varID, &natts); + + for (int iatt = 0; iatt < natts; ++iatt) + { + cdiInqAtt(cdiID, varID, iatt, attname, &atttype, &attlen); + + if (attlen == 0) continue; + + if (atttype == CDI_DATATYPE_TXT) + { + size_t attSize = (size_t) (attlen + 1) * sizeof(char); + char *atttxt = (char *) resizeBuffer(&attBuf, &attBufSize, attSize); + cdiInqAttTxt(cdiID, varID, attname, attlen, atttxt); + atttxt[attlen] = 0; + fprintf(fp, "ATTR_TXT: %s = \"%s\"\n", attname, atttxt); + } + else if (atttype == CDI_DATATYPE_INT8 || atttype == CDI_DATATYPE_UINT8 || atttype == CDI_DATATYPE_INT16 + || atttype == CDI_DATATYPE_UINT16 || atttype == CDI_DATATYPE_INT32 || atttype == CDI_DATATYPE_UINT32) + { + size_t attSize = (size_t) attlen * sizeof(int); + int *attint = (int *) resizeBuffer(&attBuf, &attBufSize, attSize); + cdiInqAttInt(cdiID, varID, attname, attlen, &attint[0]); + if (attlen == 1) + fprintf(fp, "ATTR_INT: %s =", attname); + else + fprintf(fp, "ATTR_INT_%d: %s =", attlen, attname); + for (int i = 0; i < attlen; ++i) fprintf(fp, " %d", attint[i]); + fprintf(fp, "\n"); + } + else if (atttype == CDI_DATATYPE_FLT32 || atttype == CDI_DATATYPE_FLT64) + { + size_t attSize = (size_t) attlen * sizeof(double); + double *attflt = (double *) resizeBuffer(&attBuf, &attBufSize, attSize); + int dig = (atttype == CDI_DATATYPE_FLT64) ? 15 : 7; + cdiInqAttFlt(cdiID, varID, attname, attlen, attflt); + if (attlen == 1) + fprintf(fp, "ATTR_FLT: %s =", attname); + else + fprintf(fp, "ATTR_FLT_%d: %s =", attlen, attname); + for (int i = 0; i < attlen; ++i) fprintf(fp, " %.*g", dig, attflt[i]); + fprintf(fp, "\n"); + } + } + + Free(attBuf); +} + +static void +gridPrintKernel(int gridID, int opt, FILE *fp) +{ + char attstr[CDI_MAX_NAME]; + char attstr2[CDI_MAX_NAME]; + size_t nxvals = gridInqXvals(gridID, NULL); + size_t nyvals = gridInqYvals(gridID, NULL); + + int type = gridInqType(gridID); + size_t gridsize = gridInqSize(gridID); + size_t xsize = gridInqXsize(gridID); + size_t ysize = gridInqYsize(gridID); + int nvertex = gridInqNvertex(gridID); + int datatype; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); + + int dig = (datatype == CDI_DATATYPE_FLT64) ? 15 : 7; + + fprintf(fp, + "gridtype = %s\n" + "gridsize = %zu\n", + gridNamePtr(type), gridsize); + + if (type != GRID_GME) + { + if (type != GRID_UNSTRUCTURED && type != GRID_SPECTRAL && type != GRID_FOURIER) + { + if (xsize > 0) fprintf(fp, "xsize = %zu\n", xsize); + if (ysize > 0) fprintf(fp, "ysize = %zu\n", ysize); + } + + if (nxvals > 0) + { + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, attstr, &length); + if (attstr[0]) fprintf(fp, "xname = %s\n", attstr); + length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_DIMNAME, attstr2, &length); + if (attstr2[0] && !str_is_equal(attstr, attstr2)) fprintf(fp, "xdimname = %s\n", attstr2); + length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, attstr, &length); + if (attstr[0]) fprintf(fp, "xlongname = %s\n", attstr); + length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, attstr, &length); + if (attstr[0]) fprintf(fp, "xunits = %s\n", attstr); + } + + if (nyvals > 0) + { + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, attstr, &length); + if (attstr[0]) fprintf(fp, "yname = %s\n", attstr); + length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_DIMNAME, attstr2, &length); + if (attstr2[0] && !str_is_equal(attstr, attstr2)) fprintf(fp, "ydimname = %s\n", attstr2); + length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, attstr, &length); + if (attstr[0]) fprintf(fp, "ylongname = %s\n", attstr); + length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, attstr, &length); + if (attstr[0]) fprintf(fp, "yunits = %s\n", attstr); + } + + if (type == GRID_UNSTRUCTURED && nvertex > 0) fprintf(fp, "nvertex = %d\n", nvertex); + } + + switch (type) + { + case GRID_LONLAT: + case GRID_GAUSSIAN: + case GRID_GAUSSIAN_REDUCED: + case GRID_GENERIC: + case GRID_PROJECTION: + case GRID_CURVILINEAR: + case GRID_UNSTRUCTURED: + case GRID_CHARXY: + { + if (type == GRID_GAUSSIAN || type == GRID_GAUSSIAN_REDUCED) fprintf(fp, "np = %d\n", gridInqNP(gridID)); + + if (type == GRID_UNSTRUCTURED) + { + int number = 0; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, &number); + if (number > 0) + { + fprintf(fp, "number = %d\n", number); + int position = 0; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, &position); + if (position >= 0) fprintf(fp, "position = %d\n", position); + } + + int length; + if (CDI_NOERR == cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length)) + { + char reference_link[8192]; + length = sizeof(reference_link); + cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, reference_link, &length); + fprintf(fp, "uri = %s\n", reference_link); + } + } + + if (nxvals > 0) + { + double xfirst = 0.0, xinc = 0.0; + + if (type == GRID_LONLAT || type == GRID_GAUSSIAN || type == GRID_PROJECTION || type == GRID_GENERIC) + { + xfirst = gridInqXval(gridID, 0); + xinc = gridInqXinc(gridID); + } + + if (IS_NOT_EQUAL(xinc, 0) && opt) + { + fprintf(fp, + "xfirst = %.*g\n" + "xinc = %.*g\n", + dig, xfirst, dig, xinc); + } + else + { + double *xvals = (double *) Malloc(nxvals * sizeof(double)); + gridInqXvals(gridID, xvals); + static const char prefix[] = "xvals = "; + printDblsPrefixAutoBrk(fp, dig, prefix, sizeof(prefix) - 1, nxvals, xvals); + Free(xvals); + } + } + + if (nyvals > 0) + { + double yfirst = 0.0, yinc = 0.0; + + if (type == GRID_LONLAT || type == GRID_GENERIC || type == GRID_PROJECTION || type == GRID_GENERIC) + { + yfirst = gridInqYval(gridID, 0); + yinc = gridInqYinc(gridID); + } + + if (IS_NOT_EQUAL(yinc, 0) && opt) + { + fprintf(fp, + "yfirst = %.*g\n" + "yinc = %.*g\n", + dig, yfirst, dig, yinc); + } + else + { + double *yvals = (double *) Malloc(nyvals * sizeof(double)); + gridInqYvals(gridID, yvals); + static const char prefix[] = "yvals = "; + printDblsPrefixAutoBrk(fp, dig, prefix, sizeof(prefix) - 1, nyvals, yvals); + Free(yvals); + } + } + + if (type == GRID_PROJECTION) gridPrintAttributes(fp, gridID); + + break; + } + case GRID_SPECTRAL: + { + fprintf(fp, + "truncation = %d\n" + "complexpacking = %d\n", + gridInqTrunc(gridID), gridInqComplexPacking(gridID)); + break; + } + case GRID_FOURIER: + { + fprintf(fp, "truncation = %d\n", gridInqTrunc(gridID)); + break; + } + case GRID_GME: + { + int nd, ni, ni2, ni3; + gridInqParamGME(gridID, &nd, &ni, &ni2, &ni3); + fprintf(fp, "ni = %d\n", ni); + break; + } + default: + { + fprintf(stderr, "Unsupported grid type: %s\n", gridNamePtr(type)); + break; + } + } +} + +void +gridPrintP(void *voidptr, FILE *fp) +{ + grid_t *gridptr = (grid_t *) voidptr; + int gridID = gridptr->self; + + xassert(gridptr); + + gridPrintKernel(gridID, 0, fp); + + int datatype = CDI_UNDEFID; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); + + fprintf(fp, + "datatype = %d\n" + "nd = %d\n" + "ni = %d\n" + "ni2 = %d\n" + "ni3 = %d\n" + "trunc = %d\n" + "lcomplex = %d\n" + "reducedPointsSize = %d\n", + datatype, gridptr->gme.nd, gridptr->gme.ni, gridptr->gme.ni2, gridptr->gme.ni3, gridptr->trunc, gridptr->lcomplex, + gridptr->reducedPointsSize); +} + +static const double * +gridInqXValsPtrSerial(grid_t *gridptr) +{ + return gridptr->x.vals; +} + +#ifndef USE_MPI +static const char ** +gridInqXCvalsPtrSerial(grid_t *gridptr) +{ + return (const char **) gridptr->x.cvals; +} +#endif + +const double * +gridInqXvalsPtr(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqXValsPtr(gridptr); +} + +#ifndef USE_MPI +const char ** +gridInqXCvalsPtr(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqXCvalsPtr(gridptr); +} +#endif + +static const double * +gridInqYValsPtrSerial(grid_t *gridptr) +{ + return gridptr->y.vals; +} + +#ifndef USE_MPI +static const char ** +gridInqYCvalsPtrSerial(grid_t *gridptr) +{ + return (const char **) gridptr->y.cvals; +} +#endif + +const double * +gridInqYvalsPtr(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqYValsPtr(gridptr); +} + +#ifndef USE_MPI +const char ** +gridInqYCvalsPtr(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + return gridptr->vtable->inqYCvalsPtr(gridptr); +} +#endif + +void +gridProjParamsInit(struct CDI_GridProjParams *gpp) +{ + // clang-format off + gpp->mv = CDI_Grid_Missval; // Missing value + gpp->lon_0 = CDI_Grid_Missval; // The East longitude of the meridian which is parallel to the Y-axis + gpp->lat_0 = CDI_Grid_Missval; // Latitude of the projection origin + gpp->lat_1 = CDI_Grid_Missval; // First latitude from the pole at which the secant cone cuts the sphere + gpp->lat_2 = CDI_Grid_Missval; // Second latitude at which the secant cone cuts the sphere + gpp->a = CDI_Grid_Missval; // Semi-major axis or earth radius in metres (optional) + gpp->b = CDI_Grid_Missval; // Semi-minor axis in metres (optional) + gpp->rf = CDI_Grid_Missval; // Inverse flattening (1/f) (optional) + gpp->xval_0 = CDI_Grid_Missval; // Longitude of the first grid point in degree (optional) + gpp->yval_0 = CDI_Grid_Missval; // Latitude of the first grid point in degree (optional) + gpp->x_0 = CDI_Grid_Missval; // False easting (optional) + gpp->y_0 = CDI_Grid_Missval; // False northing (optional) + // clang-format on +} + +static void +gridDefParamsCommon(int gridID, struct CDI_GridProjParams gpp) +{ + if (IS_NOT_EQUAL(gpp.a, gpp.mv)) + { + if (IS_NOT_EQUAL(gpp.b, gpp.mv)) + { + cdiDefAttFlt(gridID, CDI_GLOBAL, "semi_major_axis", CDI_DATATYPE_FLT64, 1, &gpp.a); + cdiDefAttFlt(gridID, CDI_GLOBAL, "semi_minor_axis", CDI_DATATYPE_FLT64, 1, &gpp.b); + } + else + { + cdiDefAttFlt(gridID, CDI_GLOBAL, "earth_radius", CDI_DATATYPE_FLT64, 1, &gpp.a); + } + } + if (IS_NOT_EQUAL(gpp.rf, gpp.mv)) cdiDefAttFlt(gridID, CDI_GLOBAL, "inverse_flattening", CDI_DATATYPE_FLT64, 1, &gpp.rf); + if (IS_NOT_EQUAL(gpp.x_0, gpp.mv)) cdiDefAttFlt(gridID, CDI_GLOBAL, "false_easting", CDI_DATATYPE_FLT64, 1, &gpp.x_0); + if (IS_NOT_EQUAL(gpp.y_0, gpp.mv)) cdiDefAttFlt(gridID, CDI_GLOBAL, "false_northing", CDI_DATATYPE_FLT64, 1, &gpp.y_0); + if (IS_NOT_EQUAL(gpp.xval_0, gpp.mv)) + cdiDefAttFlt(gridID, CDI_GLOBAL, "longitudeOfFirstGridPointInDegrees", CDI_DATATYPE_FLT64, 1, &gpp.xval_0); + if (IS_NOT_EQUAL(gpp.yval_0, gpp.mv)) + cdiDefAttFlt(gridID, CDI_GLOBAL, "latitudeOfFirstGridPointInDegrees", CDI_DATATYPE_FLT64, 1, &gpp.yval_0); +} + +/* +@Function gridDefParamsLCC +@Title Define the parameters of a Lambert Conformal Conic grid + +@Prototype void gridDefParamsLCC(int gridID, struct CDI_GridProjParams gridProjParams) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item gridProjParams Grid projection parameters. + +@Description +The function @func{gridDefParamsLCC} defines the parameters of a Lambert Conformal Conic grid. + +@EndFunction +*/ +void +gridDefParamsLCC(int gridID, struct CDI_GridProjParams gpp) +{ + cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARNAME, "Lambert_Conformal"); + + const char *gmapname = "lambert_conformal_conic"; + cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_NAME, gmapname); + cdiDefAttTxt(gridID, CDI_GLOBAL, "grid_mapping_name", (int) (strlen(gmapname)), gmapname); + int nlats = 0; + double lats[2]; + lats[nlats++] = gpp.lat_1; + if (IS_NOT_EQUAL(gpp.lat_1, gpp.lat_2)) lats[nlats++] = gpp.lat_2; + cdiDefAttFlt(gridID, CDI_GLOBAL, "standard_parallel", CDI_DATATYPE_FLT64, nlats, lats); + cdiDefAttFlt(gridID, CDI_GLOBAL, "longitude_of_central_meridian", CDI_DATATYPE_FLT64, 1, &gpp.lon_0); + cdiDefAttFlt(gridID, CDI_GLOBAL, "latitude_of_projection_origin", CDI_DATATYPE_FLT64, 1, &gpp.lat_0); + + gridDefParamsCommon(gridID, gpp); + + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->projtype = CDI_PROJ_LCC; + + if (gridptr->type != GRID_PROJECTION) gridptr->type = GRID_PROJECTION; + + gridVerifyProj(gridID); +} + +/* +@Function gridInqParamsLCC +@Title Get the parameter of a Lambert Conformal Conic grid + +@Prototype void gridInqParamsLCC(int gridID, struct CDI_GridProjParams *gpp) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item gridProjParams Grid projection parameters. + +@Description +The function @func{gridInqParamsLCC} returns the parameter of a Lambert Conformal Conic grid. + +@EndFunction +*/ +int +gridInqParamsLCC(int gridID, struct CDI_GridProjParams *gpp) +{ + int status = -1; + if (gridInqType(gridID) != GRID_PROJECTION) return status; + + gridProjParamsInit(gpp); + + status = -2; + const char *projection = "lambert_conformal_conic"; + char gmapname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_NAME, gmapname, &length); + if (gmapname[0] && str_is_equal(gmapname, projection)) + { + char attname[CDI_MAX_NAME + 1]; + + int natts; + cdiInqNatts(gridID, CDI_GLOBAL, &natts); + + if (natts) status = 0; + + for (int iatt = 0; iatt < natts; ++iatt) + { + int atttype, attlen; + cdiInqAtt(gridID, CDI_GLOBAL, iatt, attname, &atttype, &attlen); + if (attlen > 2) continue; + + double attflt[2]; + if (cdiInqAttConvertedToFloat(gridID, atttype, attname, attlen, attflt)) + { + // clang-format off + if (str_is_equal(attname, "earth_radius")) gpp->a = attflt[0]; + else if (str_is_equal(attname, "semi_major_axis")) gpp->a = attflt[0]; + else if (str_is_equal(attname, "semi_minor_axis")) gpp->b = attflt[0]; + else if (str_is_equal(attname, "inverse_flattening")) gpp->rf = attflt[0]; + else if (str_is_equal(attname, "longitude_of_central_meridian")) gpp->lon_0 = attflt[0]; + else if (str_is_equal(attname, "latitude_of_projection_origin")) gpp->lat_0 = attflt[0]; + else if (str_is_equal(attname, "false_easting")) gpp->x_0 = attflt[0]; + else if (str_is_equal(attname, "false_northing")) gpp->y_0 = attflt[0]; + else if (str_is_equal(attname, "longitudeOfFirstGridPointInDegrees")) gpp->xval_0 = attflt[0]; + else if (str_is_equal(attname, "latitudeOfFirstGridPointInDegrees")) gpp->yval_0 = attflt[0]; + else if (str_is_equal(attname, "standard_parallel")) + { + gpp->lat_1 = attflt[0]; + gpp->lat_2 = (attlen == 2) ? attflt[1] : attflt[0]; + } + // clang-format on + } + } + } + + return status; +} + +int +gridVerifyProjParamsLCC(struct CDI_GridProjParams *gpp) +{ + static bool lwarn = true; + + if (lwarn) + { + // lwarn = false; + const char *projection = "lambert_conformal_conic"; + if (IS_EQUAL(gpp->lon_0, gpp->mv)) Warning("%s mapping parameter %s missing!", projection, "longitude_of_central_meridian"); + if (IS_EQUAL(gpp->lat_0, gpp->mv)) Warning("%s mapping parameter %s missing!", projection, "latitude_of_central_meridian"); + if (IS_EQUAL(gpp->lat_1, gpp->mv)) Warning("%s mapping parameter %s missing!", projection, "standard_parallel"); + if (IS_NOT_EQUAL(gpp->x_0, gpp->mv) && IS_NOT_EQUAL(gpp->y_0, gpp->mv) + && (IS_EQUAL(gpp->xval_0, gpp->mv) || IS_EQUAL(gpp->yval_0, gpp->mv))) + { + if (proj_lcc_to_lonlat_func) + { + gpp->xval_0 = -gpp->x_0; + gpp->yval_0 = -gpp->y_0; + proj_lcc_to_lonlat_func(*gpp, 0.0, 0.0, (SizeType) 1, &gpp->xval_0, &gpp->yval_0); + } + if (IS_EQUAL(gpp->xval_0, gpp->mv) || IS_EQUAL(gpp->yval_0, gpp->mv)) + Warning("%s mapping parameter %s missing!", projection, + "longitudeOfFirstGridPointInDegrees and latitudeOfFirstGridPointInDegrees"); + } + } + + return 0; +} + +int +gridVerifyProjParamsSTERE(struct CDI_GridProjParams *gpp) +{ + static bool lwarn = true; + + if (lwarn) + { + // lwarn = false; + const char *projection = "lambert_conformal_conic"; + if (IS_EQUAL(gpp->lon_0, gpp->mv)) + Warning("%s mapping parameter %s missing!", projection, "straight_vertical_longitude_from_pole"); + if (IS_EQUAL(gpp->lat_0, gpp->mv)) Warning("%s mapping parameter %s missing!", projection, "latitude_of_projection_origin"); + if (IS_EQUAL(gpp->lat_1, gpp->mv)) Warning("%s mapping parameter %s missing!", projection, "standard_parallel"); + if (IS_NOT_EQUAL(gpp->x_0, gpp->mv) && IS_NOT_EQUAL(gpp->y_0, gpp->mv) + && (IS_EQUAL(gpp->xval_0, gpp->mv) || IS_EQUAL(gpp->yval_0, gpp->mv))) + { + if (proj_stere_to_lonlat_func) + { + gpp->xval_0 = -gpp->x_0; + gpp->xval_0 = -gpp->y_0; + proj_stere_to_lonlat_func(*gpp, 0.0, 0.0, (SizeType) 1, &gpp->xval_0, &gpp->yval_0); + } + if (IS_EQUAL(gpp->xval_0, gpp->mv) || IS_EQUAL(gpp->yval_0, gpp->mv)) + Warning("%s mapping parameter %s missing!", projection, + "longitudeOfFirstGridPointInDegrees and latitudeOfFirstGridPointInDegrees"); + } + } + + return 0; +} + +/* +@Function gridDefParamsSTERE +@Title Define the parameter of a Polar stereographic grid + +@Prototype void gridDefParamsSTERE(int gridID, struct CDI_GridProjParams gridProjParams) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item gridProjParams Grid projection parameters. + +@Description +The function @func{gridDefParamsSTERE} defines the parameter of a Polar stereographic grid. + +@EndFunction +*/ +void +gridDefParamsSTERE(int gridID, struct CDI_GridProjParams gpp) +{ + cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARNAME, "Polar_Stereographic"); + + const char *gmapname = "polar_stereographic"; + cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_NAME, gmapname); + cdiDefAttTxt(gridID, CDI_GLOBAL, "grid_mapping_name", (int) (strlen(gmapname)), gmapname); + cdiDefAttFlt(gridID, CDI_GLOBAL, "standard_parallel", CDI_DATATYPE_FLT64, 1, &gpp.lat_1); + cdiDefAttFlt(gridID, CDI_GLOBAL, "straight_vertical_longitude_from_pole", CDI_DATATYPE_FLT64, 1, &gpp.lon_0); + cdiDefAttFlt(gridID, CDI_GLOBAL, "latitude_of_projection_origin", CDI_DATATYPE_FLT64, 1, &gpp.lat_0); + + gridDefParamsCommon(gridID, gpp); + + grid_t *gridptr = grid_to_pointer(gridID); + gridptr->projtype = CDI_PROJ_STERE; + + gridVerifyProj(gridID); +} + +/* +@Function gridInqParamsSTERE +@Title Get the parameter of a Polar stereographic grid + +@Prototype void gridInqParamsSTERE(int gridID, struct CDI_GridProjParams *gpp) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + @Item gridProjParams Grid projection parameters. + +@Description +The function @func{gridInqParamsSTERE} returns the parameter of a Polar stereographic grid. + +@EndFunction +*/ +int +gridInqParamsSTERE(int gridID, struct CDI_GridProjParams *gpp) +{ + int status = -1; + if (gridInqType(gridID) != GRID_PROJECTION) return status; + + gridProjParamsInit(gpp); + + status = -2; + const char *projection = "polar_stereographic"; + char gmapname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_NAME, gmapname, &length); + if (gmapname[0] && str_is_equal(gmapname, projection)) + { + int atttype, attlen; + char attname[CDI_MAX_NAME + 1]; + + int natts; + cdiInqNatts(gridID, CDI_GLOBAL, &natts); + + if (natts) status = 0; + + for (int iatt = 0; iatt < natts; ++iatt) + { + cdiInqAtt(gridID, CDI_GLOBAL, iatt, attname, &atttype, &attlen); + if (attlen > 2) continue; + + double attflt[2]; + if (cdiInqAttConvertedToFloat(gridID, atttype, attname, attlen, attflt)) + { + // clang-format off + if (str_is_equal(attname, "earth_radius")) gpp->a = attflt[0]; + else if (str_is_equal(attname, "semi_major_axis")) gpp->a = attflt[0]; + else if (str_is_equal(attname, "semi_minor_axis")) gpp->b = attflt[0]; + else if (str_is_equal(attname, "inverse_flattening")) gpp->rf = attflt[0]; + else if (str_is_equal(attname, "standard_parallel")) gpp->lat_1 = attflt[0]; + else if (str_is_equal(attname, "straight_vertical_longitude_from_pole")) gpp->lon_0 = attflt[0]; + else if (str_is_equal(attname, "latitude_of_projection_origin")) gpp->lat_0 = attflt[0]; + else if (str_is_equal(attname, "false_easting")) gpp->x_0 = attflt[0]; + else if (str_is_equal(attname, "false_northing")) gpp->y_0 = attflt[0]; + else if (str_is_equal(attname, "longitudeOfFirstGridPointInDegrees")) gpp->xval_0 = attflt[0]; + else if (str_is_equal(attname, "latitudeOfFirstGridPointInDegrees")) gpp->yval_0 = attflt[0]; + // clang-format on + } + } + } + + return status; +} + +void +gridDefComplexPacking(int gridID, int lcomplex) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (gridptr->lcomplex != lcomplex) + { + gridptr->lcomplex = lcomplex != 0; + gridMark4Update(gridID); + } +} + +int +gridInqComplexPacking(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + return (int) gridptr->lcomplex; +} + +void +gridDefHasDims(int gridID, int hasdims) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + if (gridptr->hasdims != (hasdims != 0)) + { + gridptr->hasdims = hasdims != 0; + gridMark4Update(gridID); + } +} + +int +gridInqHasDims(int gridID) +{ + grid_t *gridptr = grid_to_pointer(gridID); + + return (int) gridptr->hasdims; +} + +/* +@Function gridDefNumber +@Title Define the reference number for an unstructured grid + +@Prototype void gridDefNumber(int gridID, int number) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item number Reference number for an unstructured grid. + +@Description +The function @func{gridDefNumber} defines the reference number for an unstructured grid. + +@EndFunction +*/ +void +gridDefNumber(int gridID, int number) +{ + cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, number); +} + +/* +@Function gridInqNumber +@Title Get the reference number to an unstructured grid + +@Prototype int gridInqNumber(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqNumber} returns the reference number to an unstructured grid. + +@Result +@func{gridInqNumber} returns the reference number to an unstructured grid. +@EndFunction +*/ +int +gridInqNumber(int gridID) +{ + int number = 0; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, &number); + return number; +} + +/* +@Function gridDefPosition +@Title Define the position of grid in the reference file + +@Prototype void gridDefPosition(int gridID, int position) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item position Position of grid in the reference file. + +@Description +The function @func{gridDefPosition} defines the position of grid in the reference file. + +@EndFunction +*/ +void +gridDefPosition(int gridID, int position) +{ + cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, position); +} + +/* +@Function gridInqPosition +@Title Get the position of grid in the reference file + +@Prototype int gridInqPosition(int gridID) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqPosition} returns the position of grid in the reference file. + +@Result +@func{gridInqPosition} returns the position of grid in the reference file. +@EndFunction +*/ +int +gridInqPosition(int gridID) +{ + int position = 0; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, &position); + return position; +} + +/* +@Function gridDefReference +@Title Define the reference URI for an unstructured grid + +@Prototype void gridDefReference(int gridID, const char *reference) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item reference Reference URI for an unstructured grid. + +@Description +The function @func{gridDefReference} defines the reference URI for an unstructured grid. + +@EndFunction +*/ +void +gridDefReference(int gridID, const char *reference) +{ + if (reference) + { + cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, reference); + gridMark4Update(gridID); + } +} + +/* +@Function gridInqReference +@Title Get the reference URI to an unstructured grid + +@Prototype char *gridInqReference(int gridID, char *reference) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqReference} returns the reference URI to an unstructured grid. + +@Result +@func{gridInqReference} returns the reference URI to an unstructured grid. +@EndFunction +*/ +int +gridInqReference(int gridID, char *reference) +{ + int length = 0; + if (CDI_NOERR == cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length)) + { + if (reference) cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, reference, &length); + } + + return length; +} + +/* +@Function gridDefUUID +@Title Define the UUID for an unstructured grid + +@Prototype void gridDefUUID(int gridID, const char *uuid) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item uuid UUID for an unstructured grid. + +@Description +The function @func{gridDefUUID} defines the UUID for an unstructured grid. + +@EndFunction +*/ +void +gridDefUUID(int gridID, const unsigned char uuid[CDI_UUID_SIZE]) +{ + cdiDefKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuid, CDI_UUID_SIZE); + + gridMark4Update(gridID); +} + +/* +@Function gridInqUUID +@Title Get the UUID to an unstructured grid + +@Prototype void gridInqUUID(int gridID, char *uuid) +@Parameter + @Item gridID Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}. + +@Description +The function @func{gridInqUUID} returns the UUID to an unstructured grid. + +@Result +@func{gridInqUUID} returns the UUID to an unstructured grid to the parameter uuid. +@EndFunction +*/ +void +gridInqUUID(int gridID, unsigned char uuid[CDI_UUID_SIZE]) +{ + memset(uuid, 0, CDI_UUID_SIZE); + int length = CDI_UUID_SIZE; + cdiInqKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuid, &length); +} + +void +cdiGridGetIndexList(unsigned ngrids, int *gridIndexList) +{ + reshGetResHListOfType(ngrids, gridIndexList, &gridOps); +} + +static int +gridTxCode(void *voidP) +{ + grid_t *gridptr = (grid_t *) voidP; + return gridptr->vtable->txCode; +} + +enum +{ + GRID_PACK_INT_IDX_SELF, + GRID_PACK_INT_IDX_TYPE, + GRID_PACK_INT_IDX_IS_CYCLIC, + GRID_PACK_INT_IDX_X_FLAG, + GRID_PACK_INT_IDX_Y_FLAG, + GRID_PACK_INT_IDX_GME_ND, + GRID_PACK_INT_IDX_GME_NI, + GRID_PACK_INT_IDX_GME_NI2, + GRID_PACK_INT_IDX_GME_NI3, + GRID_PACK_INT_IDX_TRUNC, + GRID_PACK_INT_IDX_NVERTEX, + GRID_PACK_INT_IDX_REDUCED_POINTS_SIZE, + GRID_PACK_INT_IDX_SIZE, + GRID_PACK_INT_IDX_X_SIZE, + GRID_PACK_INT_IDX_Y_SIZE, + GRID_PACK_INT_IDX_LCOMPLEX, + GRID_PACK_INT_IDX_MEMBERMASK, + /* + GRID_PACK_INT_IDX_XTSTDNNAME, + GRID_PACK_INT_IDX_YTSTDNNAME, + GRID_PACK_INT_IDX_ISCANSNEGATIVELY, + GRID_PACK_INT_IDX_JSCANSPOSITIVELY, + GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE, + */ + gridNint +}; + +enum +{ + GRID_PACK_DBL_IDX_X_FIRST, + GRID_PACK_DBL_IDX_Y_FIRST, + GRID_PACK_DBL_IDX_X_LAST, + GRID_PACK_DBL_IDX_Y_LAST, + GRID_PACK_DBL_IDX_X_INC, + GRID_PACK_DBL_IDX_Y_INC, + gridNdouble +}; + +enum +{ + gridHasMaskFlag = 1 << 0, + gridHasGMEMaskFlag = 1 << 1, + gridHasXValsFlag = 1 << 2, + gridHasYValsFlag = 1 << 3, + gridHasAreaFlag = 1 << 4, + gridHasXBoundsFlag = 1 << 5, + gridHasYBoundsFlag = 1 << 6, + gridHasReducedPointsFlag = 1 << 7, +}; + +static int +gridGetComponentFlags(const grid_t *gridP) +{ + int flags = 0; + for (int prop = 0; prop < GRID_PROP_YBOUNDS + 1; ++prop) + flags |= (gridP->vtable->inqPropPresence((grid_t *) gridP, (enum gridPropInq) prop) << prop); + flags |= (gridHasReducedPointsFlag & (int) ((unsigned) (gridP->reducedPoints == NULL) - 1U)); + return flags; +} + +static int +gridGetPackSize(void *voidP, void *context) +{ + grid_t *gridP = (grid_t *) voidP; + return gridP->vtable->getPackSize(gridP, context); +} + +static int gridGetPackSizeScalars(grid_t *gridP, void *context); + +static int gridGetPackSizeArrays(grid_t *gridP, void *context); + +static int +gridGetPackSizeBase(grid_t *gridP, void *context) +{ + return gridP->vtable->getPackSizeScalars(gridP, context) + gridP->vtable->getPackSizeArrays(gridP, context); +} + +static int +gridGetPackSizeScalars(grid_t *gridP, void *context) +{ + int packBuffSize = 0, ui32PackSize = serializeGetSize(1, CDI_DATATYPE_UINT32, context); + + packBuffSize += serializeGetSize(gridNint, CDI_DATATYPE_INT, context) + ui32PackSize; + + packBuffSize += serializeGetSize(gridNdouble, CDI_DATATYPE_FLT64, context) + ui32PackSize; + + packBuffSize += serializeKeysGetPackSize(&gridP->keys, context); + packBuffSize += serializeKeysGetPackSize(&gridP->x.keys, context); + packBuffSize += serializeKeysGetPackSize(&gridP->y.keys, context); + + return packBuffSize; +} + +static int +gridGetPackSizeArrays(grid_t *gridP, void *context) +{ + int packBuffSize = 0, count, ui32PackSize = serializeGetSize(1, CDI_DATATYPE_UINT32, context); + + if (gridP->reducedPoints) + { + xassert(gridP->reducedPointsSize); + packBuffSize += serializeGetSize(gridP->reducedPointsSize, CDI_DATATYPE_INT, context) + ui32PackSize; + } + + if (gridP->vtable->inqXValsPtr(gridP)) + { + if (gridP->type == GRID_UNSTRUCTURED || gridP->type == GRID_CURVILINEAR) + count = gridP->size; + else + count = gridP->x.size; + xassert(count); + packBuffSize += serializeGetSize(count, CDI_DATATYPE_FLT64, context) + ui32PackSize; + } + + if (gridP->vtable->inqYValsPtr(gridP)) + { + if (gridP->type == GRID_UNSTRUCTURED || gridP->type == GRID_CURVILINEAR) + count = gridP->size; + else + count = gridP->y.size; + xassert(count); + packBuffSize += serializeGetSize(count, CDI_DATATYPE_FLT64, context) + ui32PackSize; + } + + if (gridP->vtable->inqAreaPtr(gridP)) + { + xassert(gridP->size); + packBuffSize += serializeGetSize(gridP->size, CDI_DATATYPE_FLT64, context) + ui32PackSize; + } + + if (gridP->x.bounds) + { + xassert(gridP->nvertex); + count = grid_is_irregular(gridP->type) ? gridP->size : gridP->x.size; + xassert(count); + packBuffSize += (serializeGetSize(gridP->nvertex * count, CDI_DATATYPE_FLT64, context) + ui32PackSize); + } + + if (gridP->y.bounds) + { + xassert(gridP->nvertex); + count = grid_is_irregular(gridP->type) ? gridP->size : gridP->y.size; + xassert(count); + packBuffSize += (serializeGetSize(gridP->nvertex * count, CDI_DATATYPE_FLT64, context) + ui32PackSize); + } + + if (gridP->mask) + { + xassert(gridP->size); + packBuffSize += serializeGetSize(gridP->size, CDI_DATATYPE_UCHAR, context) + ui32PackSize; + } + + if (gridP->mask_gme) + { + xassert(gridP->size); + packBuffSize += serializeGetSize(gridP->size, CDI_DATATYPE_UCHAR, context) + ui32PackSize; + } + + return packBuffSize; +} + +static grid_t *gridUnpackScalars(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, + int force_id, int *memberMaskP); + +static void gridUnpackArrays(grid_t *gridP, int memberMask, char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, + int originNamespace, void *context); + +int +gridUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, int force_id) +{ + gridInit(); + int memberMask; + grid_t *gridP + = gridUnpackScalars(unpackBuffer, unpackBufferSize, unpackBufferPos, originNamespace, context, force_id, &memberMask); + gridP->vtable->unpackArrays(gridP, memberMask, unpackBuffer, unpackBufferSize, unpackBufferPos, originNamespace, context); + reshSetStatus(gridP->self, &gridOps, reshGetStatus(gridP->self, &gridOps) & ~RESH_SYNC_BIT); + return gridP->self; +} + +static grid_t * +gridUnpackScalars(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, int force_id, + int *memberMaskP) +{ + grid_t *gridP; + uint32_t d; + int memberMask; + { + int intBuffer[gridNint]; + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, intBuffer, gridNint, CDI_DATATYPE_INT, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + + xassert(cdiCheckSum(CDI_DATATYPE_INT, gridNint, intBuffer) == d); + int targetID = namespaceAdaptKey(intBuffer[0], originNamespace); + gridP = gridNewEntry(force_id ? targetID : CDI_UNDEFID); + + xassert(!force_id || targetID == gridP->self); + + gridP->type = intBuffer[GRID_PACK_INT_IDX_TYPE]; + gridP->isCyclic = (signed char) intBuffer[GRID_PACK_INT_IDX_IS_CYCLIC]; + gridP->x.flag = (short) intBuffer[GRID_PACK_INT_IDX_X_FLAG]; + gridP->y.flag = (short) intBuffer[GRID_PACK_INT_IDX_Y_FLAG]; + gridP->gme.nd = intBuffer[GRID_PACK_INT_IDX_GME_ND]; + gridP->gme.ni = intBuffer[GRID_PACK_INT_IDX_GME_NI]; + gridP->gme.ni2 = intBuffer[GRID_PACK_INT_IDX_GME_NI2]; + gridP->gme.ni3 = intBuffer[GRID_PACK_INT_IDX_GME_NI3]; + gridP->trunc = intBuffer[GRID_PACK_INT_IDX_TRUNC]; + gridP->nvertex = intBuffer[GRID_PACK_INT_IDX_NVERTEX]; + gridP->reducedPointsSize = intBuffer[GRID_PACK_INT_IDX_REDUCED_POINTS_SIZE]; + gridP->size = intBuffer[GRID_PACK_INT_IDX_SIZE]; + gridP->x.size = intBuffer[GRID_PACK_INT_IDX_X_SIZE]; + gridP->y.size = intBuffer[GRID_PACK_INT_IDX_Y_SIZE]; + gridP->lcomplex = (bool) intBuffer[GRID_PACK_INT_IDX_LCOMPLEX]; + memberMask = intBuffer[GRID_PACK_INT_IDX_MEMBERMASK]; + } + + { + double doubleBuffer[gridNdouble]; + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, doubleBuffer, gridNdouble, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(d == cdiCheckSum(CDI_DATATYPE_FLT, gridNdouble, doubleBuffer)); + + gridP->x.first = doubleBuffer[GRID_PACK_DBL_IDX_X_FIRST]; + gridP->y.first = doubleBuffer[GRID_PACK_DBL_IDX_Y_FIRST]; + gridP->x.last = doubleBuffer[GRID_PACK_DBL_IDX_X_LAST]; + gridP->y.last = doubleBuffer[GRID_PACK_DBL_IDX_Y_LAST]; + gridP->x.inc = doubleBuffer[GRID_PACK_DBL_IDX_X_INC]; + gridP->y.inc = doubleBuffer[GRID_PACK_DBL_IDX_Y_INC]; + } + + serializeKeysUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &gridP->keys, context); + serializeKeysUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &gridP->x.keys, context); + serializeKeysUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &gridP->y.keys, context); + + *memberMaskP = memberMask; + return gridP; +} + +static void +gridUnpackArrays(grid_t *gridP, int memberMask, char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, + void *context) +{ + UNUSED(originNamespace); + uint32_t d; + + if (memberMask & gridHasReducedPointsFlag) + { + xassert(gridP->reducedPointsSize); + gridP->reducedPoints = (int *) Malloc((size_t) gridP->reducedPointsSize * sizeof(int)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, gridP->reducedPoints, gridP->reducedPointsSize, + CDI_DATATYPE_INT, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_INT, gridP->reducedPointsSize, gridP->reducedPoints) == d); + } + + bool isIrregular = grid_is_irregular(gridP->type); + if (memberMask & gridHasXValsFlag) + { + int size = isIrregular ? gridP->size : gridP->x.size; + + gridP->x.vals = (double *) Malloc(size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, gridP->x.vals, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, gridP->x.vals) == d); + } + + if (memberMask & gridHasYValsFlag) + { + int size = isIrregular ? gridP->size : gridP->y.size; + + gridP->y.vals = (double *) Malloc(size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, gridP->y.vals, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, gridP->y.vals) == d); + } + + if (memberMask & gridHasAreaFlag) + { + int size = gridP->size; + xassert(size); + gridP->area = (double *) Malloc(size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, gridP->area, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, gridP->area) == d); + } + + if (memberMask & gridHasXBoundsFlag) + { + int size = gridP->nvertex * (isIrregular ? gridP->size : gridP->x.size); + xassert(size); + + gridP->x.bounds = (double *) Malloc(size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, gridP->x.bounds, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, gridP->x.bounds) == d); + } + + if (memberMask & gridHasYBoundsFlag) + { + int size = gridP->nvertex * (isIrregular ? gridP->size : gridP->y.size); + xassert(size); + + gridP->y.bounds = (double *) Malloc(size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, gridP->y.bounds, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, gridP->y.bounds) == d); + } + + if (memberMask & gridHasMaskFlag) + { + int size = gridP->size; + xassert(size); + gridP->mask = (mask_t *) Malloc(size * sizeof(mask_t)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, gridP->mask, gridP->size, CDI_DATATYPE_UCHAR, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_UCHAR, gridP->size, gridP->mask) == d); + } + + if (memberMask & gridHasGMEMaskFlag) + { + int size = gridP->size; + xassert(size); + gridP->mask_gme = (mask_t *) Malloc(size * sizeof(mask_t)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, gridP->mask_gme, gridP->size, CDI_DATATYPE_UCHAR, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_UCHAR, gridP->size, gridP->mask_gme) == d); + } +} + +void +gridPack(void *voidP, void *packBuffer, int packBufferSize, int *packBufferPos, void *context) +{ + grid_t *gridP = (grid_t *) voidP; + gridP->vtable->pack(gridP, packBuffer, packBufferSize, packBufferPos, context); +} + +static void +gridPackBase(grid_t *gridP, void *packBuffer, int packBufferSize, int *packBufferPos, void *context) +{ + int memberMask = gridP->vtable->packScalars(gridP, packBuffer, packBufferSize, packBufferPos, context); + gridP->vtable->packArrays(gridP, memberMask, packBuffer, packBufferSize, packBufferPos, context); +} + +static int +gridPackScalars(grid_t *gridP, void *packBuffer, int packBufferSize, int *packBufferPos, void *context) +{ + uint32_t d; + int memberMask; + + { + int intBuffer[gridNint]; + + intBuffer[GRID_PACK_INT_IDX_SELF] = gridP->self; + intBuffer[GRID_PACK_INT_IDX_TYPE] = gridP->type; + intBuffer[GRID_PACK_INT_IDX_IS_CYCLIC] = gridP->isCyclic; + intBuffer[GRID_PACK_INT_IDX_X_FLAG] = gridP->x.flag; + intBuffer[GRID_PACK_INT_IDX_Y_FLAG] = gridP->y.flag; + intBuffer[GRID_PACK_INT_IDX_GME_ND] = gridP->gme.nd; + intBuffer[GRID_PACK_INT_IDX_GME_NI] = gridP->gme.ni; + intBuffer[GRID_PACK_INT_IDX_GME_NI2] = gridP->gme.ni2; + intBuffer[GRID_PACK_INT_IDX_GME_NI3] = gridP->gme.ni3; + intBuffer[GRID_PACK_INT_IDX_TRUNC] = gridP->trunc; + intBuffer[GRID_PACK_INT_IDX_NVERTEX] = gridP->nvertex; + intBuffer[GRID_PACK_INT_IDX_REDUCED_POINTS_SIZE] = gridP->reducedPointsSize; + intBuffer[GRID_PACK_INT_IDX_SIZE] = gridP->size; + intBuffer[GRID_PACK_INT_IDX_X_SIZE] = gridP->x.size; + intBuffer[GRID_PACK_INT_IDX_Y_SIZE] = gridP->y.size; + intBuffer[GRID_PACK_INT_IDX_LCOMPLEX] = gridP->lcomplex; + intBuffer[GRID_PACK_INT_IDX_MEMBERMASK] = memberMask = gridGetComponentFlags(gridP); + + serializePack(intBuffer, gridNint, CDI_DATATYPE_INT, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_INT, gridNint, intBuffer); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + { + double doubleBuffer[gridNdouble]; + + doubleBuffer[GRID_PACK_DBL_IDX_X_FIRST] = gridP->x.first; + doubleBuffer[GRID_PACK_DBL_IDX_Y_FIRST] = gridP->y.first; + doubleBuffer[GRID_PACK_DBL_IDX_X_LAST] = gridP->x.last; + doubleBuffer[GRID_PACK_DBL_IDX_Y_LAST] = gridP->y.last; + doubleBuffer[GRID_PACK_DBL_IDX_X_INC] = gridP->x.inc; + doubleBuffer[GRID_PACK_DBL_IDX_Y_INC] = gridP->y.inc; + + serializePack(doubleBuffer, gridNdouble, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, gridNdouble, doubleBuffer); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + serializeKeysPack(&gridP->keys, packBuffer, packBufferSize, packBufferPos, context); + serializeKeysPack(&gridP->x.keys, packBuffer, packBufferSize, packBufferPos, context); + serializeKeysPack(&gridP->y.keys, packBuffer, packBufferSize, packBufferPos, context); + + return memberMask; +} + +static void +gridPackArrays(grid_t *gridP, int memberMask, void *packBuffer, int packBufferSize, int *packBufferPos, void *context) +{ + uint32_t d; + bool isIrregular = grid_is_irregular(gridP->type); + + if (memberMask & gridHasReducedPointsFlag) + { + int size = gridP->reducedPointsSize; + xassert(size > 0); + serializePack(gridP->reducedPoints, size, CDI_DATATYPE_INT, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_INT, size, gridP->reducedPoints); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & gridHasXValsFlag) + { + int size = isIrregular ? gridP->size : gridP->x.size; + xassert(size); + + const double *gridP_xvals = gridP->vtable->inqXValsPtr(gridP); + serializePack(gridP_xvals, size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, size, gridP_xvals); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & gridHasYValsFlag) + { + int size = isIrregular ? gridP->size : gridP->y.size; + xassert(size); + const double *gridP_yvals = gridP->vtable->inqYValsPtr(gridP); + serializePack(gridP_yvals, size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, size, gridP_yvals); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & gridHasAreaFlag) + { + int size = gridP->size; + xassert(size); + + serializePack(gridP->area, size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, size, gridP->area); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & gridHasXBoundsFlag) + { + xassert(gridP->nvertex); + int size = isIrregular ? gridP->nvertex * gridP->size : gridP->nvertex * gridP->x.size; + xassert(size); + + serializePack(gridP->x.bounds, size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, size, gridP->x.bounds); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & gridHasYBoundsFlag) + { + xassert(gridP->nvertex); + int size = isIrregular ? gridP->nvertex * gridP->size : gridP->nvertex * gridP->y.size; + xassert(size); + + serializePack(gridP->y.bounds, size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, size, gridP->y.bounds); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & gridHasMaskFlag) + { + int size = gridP->size; + xassert(size); + serializePack(gridP->mask, size, CDI_DATATYPE_UCHAR, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_UCHAR, size, gridP->mask); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & gridHasGMEMaskFlag) + { + int size = gridP->size; + xassert(size); + + serializePack(gridP->mask_gme, size, CDI_DATATYPE_UCHAR, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_UCHAR, size, gridP->mask_gme); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } +} + +struct gridCompareSearchState +{ + int resIDValue; + const grid_t *queryKey; +}; + +static enum cdiApplyRet +gridCompareSearch(int id, void *res, void *data) +{ + struct gridCompareSearchState *state = (struct gridCompareSearchState *) data; + (void) res; + if (gridCompare(id, state->queryKey, true) == false) + { + state->resIDValue = id; + return CDI_APPLY_STOP; + } + else + return CDI_APPLY_GO_ON; +} + +// Add grid (which must be Malloc'ed to vlist if not already found) +struct addIfNewRes +cdiVlistAddGridIfNew(int vlistID, grid_t *grid, int mode) +{ + /* + mode: 0 search in vlist and grid table + 1 search in grid table only + 2 search in grid table only and don't store the grid in vlist + */ + bool gridIsDefinedGlobal = false; + bool gridIsDefined = false; + int gridID = CDI_UNDEFID; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int ngrids = vlistptr->ngrids; + + if (mode == 0) + for (int index = 0; index < ngrids; index++) + { + if ((gridID = vlistptr->gridIDs[index]) != CDI_UNDEFID) + { + if (gridCompare(gridID, grid, false) == false) + { + gridIsDefined = true; + break; + } + } + else + Error("Internal problem: undefined gridID in vlist %d, position %u!", vlistID, index); + } + + if (!gridIsDefined) + { + struct gridCompareSearchState query; + query.queryKey = grid; // = { .queryKey = grid }; + if ((gridIsDefinedGlobal = (cdiGridApply(gridCompareSearch, &query) == CDI_APPLY_STOP))) gridID = query.resIDValue; + + if (mode == 1 && gridIsDefinedGlobal) + for (int index = 0; index < ngrids; index++) + if (vlistptr->gridIDs[index] == gridID) + { + gridIsDefinedGlobal = false; + break; + } + } + + if (!gridIsDefined) + { + if (!gridIsDefinedGlobal) + { + grid->self = gridID = reshPut(grid, &gridOps); + grid_complete(grid); + } + if (mode < 2) + { + if (ngrids >= MAX_GRIDS_PS) Error("Internal limit exceeded, MAX_GRIDS_PS=%d needs to be increased!", MAX_GRIDS_PS); + vlistptr->gridIDs[ngrids] = gridID; + vlistptr->ngrids++; + } + } + + return (struct addIfNewRes){ .Id = gridID, .isNew = (!gridIsDefined && !gridIsDefinedGlobal) }; +} + +const struct gridVirtTable cdiGridVtable = { + .destroy = gridDestroyKernel, + .copy = grid_copy_base, + .copyScalarFields = grid_copy_base_scalar_fields, + .copyArrayFields = grid_copy_base_array_fields, + .defXVals = gridDefXValsSerial, + .defYVals = gridDefYValsSerial, + .defMask = gridDefMaskSerial, + .defMaskGME = gridDefMaskGMESerial, + .defXBounds = gridDefXBoundsSerial, + .defYBounds = gridDefYBoundsSerial, + .defArea = gridDefAreaSerial, + .inqXVal = gridInqXValSerial, + .inqYVal = gridInqYValSerial, + .inqXVals = gridInqXValsSerial, + .inqXValsPart = gridInqXValsPartSerial, + .inqYVals = gridInqYValsSerial, + .inqYValsPart = gridInqYValsPartSerial, + .inqXValsPtr = gridInqXValsPtrSerial, + .inqYValsPtr = gridInqYValsPtrSerial, +#ifndef USE_MPI + .inqXIsc = gridInqXIscSerial, + .inqYIsc = gridInqYIscSerial, + .inqXCvals = gridInqXCvalsSerial, + .inqYCvals = gridInqYCvalsSerial, + .inqXCvalsPtr = gridInqXCvalsPtrSerial, + .inqYCvalsPtr = gridInqYCvalsPtrSerial, +#endif + .inqXInc = gridInqXIncBase, + .inqYInc = gridInqYIncBase, + .compareXYFull = compareXYvals, + .compareXYAO = compareXYvals2, + .inqArea = gridInqAreaSerial, + .inqAreaPtr = gridInqAreaPtrBase, + .inqPropPresence = gridInqPropPresenceBase, + .inqMask = gridInqMaskSerial, + .inqMaskGME = gridInqMaskGMESerial, + .inqXBounds = gridInqXBoundsSerial, + .inqYBounds = gridInqYBoundsSerial, + .inqXBoundsPtr = gridInqXBoundsPtrSerial, + .inqYBoundsPtr = gridInqYBoundsPtrSerial, + .txCode = GRID, + .getPackSize = gridGetPackSizeBase, + .getPackSizeScalars = gridGetPackSizeScalars, + .getPackSizeArrays = gridGetPackSizeArrays, + .unpackScalars = gridUnpackScalars, + .unpackArrays = gridUnpackArrays, + .pack = gridPackBase, + .packScalars = gridPackScalars, + .packArrays = gridPackArrays, +}; + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> + + +static int initIegLib = 0; +static int iegDefaultDprec = 0; + +// A version string. +#undef LIBVERSION +#define LIBVERSION 1.5.0 +#define XSTRING(x) #x +#define STRING(x) XSTRING(x) +static const char ieg_libvers[] = STRING(LIBVERSION); + +const char * +iegLibraryVersion(void) +{ + return ieg_libvers; +} + +static int IEG_Debug = 0; // If set to 1, debugging + +static void +iegLibInit(void) +{ + const char *envName = "IEG_PRECISION"; + + char *envString = getenv(envName); + if (envString) + { + int nrun = (strlen(envString) == 2) ? 1 : 2; + int pos = 0; + while (nrun--) + { + switch (tolower((int) envString[pos])) + { + case 'r': + { + switch ((int) envString[pos + 1]) + { + case '4': iegDefaultDprec = EXSE_SINGLE_PRECISION; break; + case '8': iegDefaultDprec = EXSE_DOUBLE_PRECISION; break; + default: Warning("Invalid digit in %s: %s", envName, envString); + } + break; + } + default: + { + Warning("Invalid character in %s: %s", envName, envString); + break; + } + } + pos += 2; + } + } + + initIegLib = 1; +} + +void +iegDebug(int debug) +{ + if (debug) Message("debug level %d", debug); + IEG_Debug = debug; +} + +static void +iegInit(iegrec_t *iegp) +{ + iegp->checked = 0; + iegp->byteswap = 0; + iegp->dprec = 0; + iegp->refval = 0; + iegp->datasize = 0; + iegp->buffersize = 0; + iegp->buffer = NULL; +} + +void +iegInitMem(void *ieg) +{ + iegrec_t *iegp = (iegrec_t *) ieg; + memset(iegp->ipdb, 0, sizeof(iegp->ipdb)); + memset(iegp->igdb, 0, sizeof(iegp->igdb)); + memset(iegp->vct, 0, sizeof(iegp->vct)); +} + +void * +iegNew(void) +{ + if (!initIegLib) iegLibInit(); + + iegrec_t *iegp = (iegrec_t *) Malloc(sizeof(iegrec_t)); + iegInit(iegp); + iegInitMem(iegp); + + return (void *) iegp; +} + +void +iegDelete(void *ieg) +{ + iegrec_t *iegp = (iegrec_t *) ieg; + + if (iegp) + { + if (iegp->buffer) Free(iegp->buffer); + Free(iegp); + } +} + +int +iegCheckFiletype(int fileID, int *swap) +{ + size_t data = 0; + size_t dimx = 0, dimy = 0; + size_t fact = 0; + unsigned char buffer[1048], *pbuf; + + if (fileRead(fileID, buffer, 4) != 4) return 0; + + size_t blocklen = get_UINT32(buffer); + size_t sblocklen = get_SUINT32(buffer); + + if (IEG_Debug) Message("blocklen = %d sblocklen = %d", blocklen, sblocklen); + + // clang-format off + if (blocklen == 636 || blocklen == 640) + { + *swap = 0; + fact = 4; + if (fileRead(fileID, buffer, blocklen+8) != blocklen+8) return 0; + pbuf = buffer+(37+4)*4; dimx = (size_t) get_UINT32(pbuf); + pbuf = buffer+(37+5)*4; dimy = (size_t) get_UINT32(pbuf); + pbuf = buffer+blocklen+4; data = (size_t) get_UINT32(pbuf); + } + else if (blocklen == 1040 || blocklen == 1036) + { + *swap = 0; + fact = 8; + if (fileRead(fileID, buffer, blocklen+8) != blocklen+8) return 0; + pbuf = buffer+(37+4)*4; dimx = (size_t) get_UINT32(pbuf); + pbuf = buffer+(37+5)*4; dimy = (size_t) get_UINT32(pbuf); + pbuf = buffer+blocklen+4; data = (size_t) get_UINT32(pbuf); + } + else if (sblocklen == 636 || sblocklen == 640) + { + *swap = 1; + fact = 4; + if (fileRead(fileID, buffer, sblocklen+8) != sblocklen+8) return 0; + pbuf = buffer+(37+4)*4; dimx = (size_t) get_SUINT32(pbuf); + pbuf = buffer+(37+5)*4; dimy = (size_t) get_SUINT32(pbuf); + pbuf = buffer+sblocklen+4; data = (size_t) get_SUINT32(pbuf); + } + else if (sblocklen == 1040 || sblocklen == 1036) + { + *swap = 1; + fact = 8; + if (fileRead(fileID, buffer, sblocklen+8) != sblocklen+8) return 0; + pbuf = buffer+(37+4)*4; dimx = (size_t) get_SUINT32(pbuf); + pbuf = buffer+(37+5)*4; dimy = (size_t) get_SUINT32(pbuf); + pbuf = buffer+sblocklen+4; data = (size_t) get_SUINT32(pbuf); + } + // clang-format on + + fileRewind(fileID); + + if (IEG_Debug) Message("swap = %d fact = %d", *swap, fact); + if (IEG_Debug) Message("dimx = %lu dimy = %lu data = %lu", dimx, dimy, data); + + int found = data && (dimx * dimy * fact == data || dimx * dimy * 8 == data); + return found; +} + +void +iegCopyMeta(void *dieg, void *sieg) +{ + iegrec_t *diegp = (iegrec_t *) dieg; + iegrec_t *siegp = (iegrec_t *) sieg; + + // diegp->byteswap = siegp->byteswap; + diegp->dprec = siegp->dprec; + diegp->refval = siegp->refval; + + memcpy(diegp->ipdb, siegp->ipdb, sizeof(siegp->ipdb)); + memcpy(diegp->igdb, siegp->igdb, sizeof(siegp->igdb)); + memcpy(diegp->vct, siegp->vct, sizeof(siegp->vct)); +} + +static int +iegInqData(void *ieg, int prec, void *data) +{ + iegrec_t *iegp = (iegrec_t *) ieg; + int ierr = 0; + int byteswap = iegp->byteswap; + size_t datasize = iegp->datasize; + void *buffer = iegp->buffer; + int dprec = iegp->dprec; + + switch (dprec) + { + case EXSE_SINGLE_PRECISION: + { + if (sizeof(FLT32) == 4) + { + if (byteswap) swap4byte(buffer, datasize); + + if (dprec == prec) + memcpy(data, buffer, datasize * sizeof(FLT32)); + else + { + const float *restrict p = (float *) buffer; + double *restrict q = (double *) data; + for (size_t i = 0; i < datasize; i++) q[i] = p[i]; + } + } + else + { + Error("not implemented for %d byte float", sizeof(FLT32)); + } + break; + } + case EXSE_DOUBLE_PRECISION: + { + if (sizeof(FLT64) == 8) + { + if (byteswap) swap8byte(buffer, datasize); + + if (dprec == prec) + memcpy(data, buffer, datasize * sizeof(FLT64)); + else + { + const double *restrict p = (double *) buffer; + float *restrict q = (float *) data; + for (size_t i = 0; i < datasize; i++) q[i] = (float) p[i]; + } + } + else + { + Error("not implemented for %d byte float", sizeof(FLT64)); + } + break; + } + default: + { + Error("unexpected data precision %d", dprec); + break; + } + } + + return ierr; +} + +int +iegInqDataSP(void *ieg, float *data) +{ + return iegInqData(ieg, EXSE_SINGLE_PRECISION, (void *) data); +} + +int +iegInqDataDP(void *ieg, double *data) +{ + return iegInqData(ieg, EXSE_DOUBLE_PRECISION, (void *) data); +} + +static int +iegDefData(iegrec_t *iegp, int prec, const void *data) +{ + int dprec = iegDefaultDprec ? iegDefaultDprec : iegp->dprec; + iegp->dprec = dprec ? dprec : prec; + + size_t datasize = (size_t) IEG_G_NumLon(iegp->igdb) * (size_t) IEG_G_NumLat(iegp->igdb); + size_t blocklen = datasize * (size_t) dprec; + + iegp->datasize = datasize; + + if (iegp->buffersize != blocklen) + { + iegp->buffersize = blocklen; + iegp->buffer = Realloc(iegp->buffer, iegp->buffersize); + } + + switch (dprec) + { + case EXSE_SINGLE_PRECISION: + { + if (dprec == prec) + memcpy(iegp->buffer, data, datasize * sizeof(FLT32)); + else + { + const double *restrict p = (const double *) data; + float *restrict q = (float *) iegp->buffer; + for (size_t i = 0; i < datasize; i++) q[i] = (float) p[i]; + } + break; + } + case EXSE_DOUBLE_PRECISION: + { + if (dprec == prec) + memcpy(iegp->buffer, data, datasize * sizeof(FLT64)); + else + { + const float *restrict p = (const float *) data; + double *restrict q = (double *) iegp->buffer; + for (size_t i = 0; i < datasize; i++) q[i] = p[i]; + } + break; + } + default: + { + Error("unexpected data precision %d", dprec); + break; + } + } + + return 0; +} + +int +iegDefDataSP(void *ieg, const float *data) +{ + return iegDefData((iegrec_t *) ieg, EXSE_SINGLE_PRECISION, (void *) data); +} + +int +iegDefDataDP(void *ieg, const double *data) +{ + return iegDefData((iegrec_t *) ieg, EXSE_DOUBLE_PRECISION, (void *) data); +} + +int +iegRead(int fileID, void *ieg) +{ + iegrec_t *iegp = (iegrec_t *) ieg; + union + { + double d[200]; + float f[200]; + int32_t i32[200]; + } buf; + + if (!iegp->checked) + { + int status = iegCheckFiletype(fileID, &iegp->byteswap); + if (status == 0) Error("Not a IEG file!"); + iegp->checked = 1; + } + + int byteswap = iegp->byteswap; + + // read header record + size_t blocklen = binReadF77Block(fileID, byteswap); + + if (fileEOF(fileID)) return -1; + + if (IEG_Debug) Message("blocklen = %lu", blocklen); + + int dprec = 0; + if (blocklen == 636 || blocklen == 640) + dprec = 4; + else if (blocklen == 1040 || blocklen == 1036) + dprec = 8; + else + { + Warning("unexpecteted header size %d!", (int) blocklen); + return -1; + } + + iegp->dprec = dprec; + + binReadInt32(fileID, byteswap, 37, buf.i32); + for (int i = 0; i < 37; i++) iegp->ipdb[i] = (int) buf.i32[i]; + + binReadInt32(fileID, byteswap, 18, buf.i32); + for (int i = 0; i < 18; i++) iegp->igdb[i] = (int) buf.i32[i]; + + if (blocklen == 636 || blocklen == 1036) + { + fileRead(fileID, buf.f, 4); + if (byteswap) swap4byte(buf.f, 1); + iegp->refval = (double) buf.f[0]; + } + else + { + fileRead(fileID, buf.d, 8); + if (byteswap) swap8byte(buf.d, 1); + iegp->refval = (double) buf.d[0]; + } + + binReadInt32(fileID, byteswap, 3, buf.i32); + for (int i = 0; i < 3; i++) iegp->igdb[18 + i] = (int) buf.i32[i]; + + if (dprec == EXSE_SINGLE_PRECISION) + { + fileRead(fileID, buf.f, 400); + if (byteswap) swap4byte(buf.f, 100); + for (int i = 0; i < 100; i++) iegp->vct[i] = (double) buf.f[i]; + } + else + { + fileRead(fileID, buf.d, 800); + if (byteswap) swap8byte(buf.d, 100); + for (int i = 0; i < 100; i++) iegp->vct[i] = buf.d[i]; + } + + size_t blocklen2 = binReadF77Block(fileID, byteswap); + + if (blocklen2 != blocklen) + { + Warning("header blocklen differ!"); + return -1; + } + + iegp->datasize = (size_t) IEG_G_NumLon(iegp->igdb) * (size_t) IEG_G_NumLat(iegp->igdb); + + if (IEG_Debug) Message("datasize = %zu", iegp->datasize); + + blocklen = binReadF77Block(fileID, byteswap); + + if (iegp->buffersize < blocklen) + { + iegp->buffer = Realloc(iegp->buffer, blocklen); + iegp->buffersize = blocklen; + } + + if (dprec != (int) (blocklen / iegp->datasize)) + { + Warning("data precision differ! (h = %d; d = %d)", (int) dprec, (int) (blocklen / iegp->datasize)); + return -1; + } + + fileRead(fileID, iegp->buffer, blocklen); + + blocklen2 = binReadF77Block(fileID, byteswap); + + if (blocklen2 != blocklen) + { + Warning("data blocklen differ!"); + return -1; + } + + return 0; +} + +int +iegWrite(int fileID, void *ieg) +{ + iegrec_t *iegp = (iegrec_t *) ieg; + union + { + INT32 i32[200]; + float fvct[100]; + } buf; + int dprec = iegp->dprec; + int byteswap = iegp->byteswap; + + // write header record + size_t blocklen = (dprec == EXSE_SINGLE_PRECISION) ? 636 : 1040; + + binWriteF77Block(fileID, byteswap, blocklen); + + for (int i = 0; i < 37; i++) buf.i32[i] = (INT32) iegp->ipdb[i]; + binWriteInt32(fileID, byteswap, 37, buf.i32); + + for (int i = 0; i < 18; i++) buf.i32[i] = (INT32) iegp->igdb[i]; + binWriteInt32(fileID, byteswap, 18, buf.i32); + + FLT64 refval = (FLT64) iegp->refval; + FLT32 refvalf = (FLT32) iegp->refval; + if (dprec == EXSE_SINGLE_PRECISION) + binWriteFlt32(fileID, byteswap, 1, &refvalf); + else + binWriteFlt64(fileID, byteswap, 1, &refval); + + for (int i = 0; i < 3; i++) buf.i32[i] = (INT32) iegp->igdb[18 + i]; + binWriteInt32(fileID, byteswap, 3, buf.i32); + + if (dprec == EXSE_SINGLE_PRECISION) + { + for (int i = 0; i < 100; i++) buf.fvct[i] = (float) iegp->vct[i]; + binWriteFlt32(fileID, byteswap, 100, buf.fvct); + } + else + { + binWriteFlt64(fileID, byteswap, 100, iegp->vct); + } + + binWriteF77Block(fileID, byteswap, blocklen); + + iegp->datasize = (size_t) iegp->igdb[4] * (size_t) iegp->igdb[5]; + blocklen = iegp->datasize * (size_t) dprec; + + binWriteF77Block(fileID, byteswap, blocklen); + + switch (dprec) + { + case EXSE_SINGLE_PRECISION: + { + binWriteFlt32(fileID, byteswap, iegp->datasize, (FLT32 *) iegp->buffer); + break; + } + case EXSE_DOUBLE_PRECISION: + { + binWriteFlt64(fileID, byteswap, iegp->datasize, (FLT64 *) iegp->buffer); + break; + } + default: + { + Error("unexpected data precision %d", dprec); + break; + } + } + + binWriteF77Block(fileID, byteswap, blocklen); + + return 0; +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef INCLUDE_GUARD_CDI_REFERENCE_COUNTING +#define INCLUDE_GUARD_CDI_REFERENCE_COUNTING + + +#include <sys/types.h> +#include <stdlib.h> + +/* +This is a base class for all objects that need reference counting. +A CdiReferencedObject has a reference count of one when it is constructed, refObjectRetain() increments the reference count, +refObject Release() decrements it. When the reference count reaches zero, the destructor function is called before the memory of the +object is deallocated with Free(). + +>>> Warning <<< +This code is currently not thread-safe. + +We are currently using the C99 standard, which does not have atomic types. +Also, there are still tons of systems out there that have a gcc without wrong C11 atomics support +(__STDC_NO_ATOMICS__ not defined even though stdatomics.h is not even present). +Consequently, it is impossible to write preprocessor code to even check for the presence of atomic types. +So, we have two options: provide multithreading support by means of locks, or wait a year or two before doing this right. +I, for one, prefer doing things right. +*/ +typedef struct CdiReferencedObject CdiReferencedObject; +struct CdiReferencedObject +{ + // protected: + void (*destructor)(CdiReferencedObject *me); // Subclass constructors should set this to their own destructor. + + // private: //Subclasses may read it to determine whether there is only one reference, though. + size_t refCount; +}; + +void cdiRefObject_construct(CdiReferencedObject *me); +void cdiRefObject_retain(CdiReferencedObject *me); +void cdiRefObject_release(CdiReferencedObject *me); +void cdiRefObject_destruct(CdiReferencedObject *me); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef INCLUDE_GUARD_CDI_GRIB_FILE_H +#define INCLUDE_GUARD_CDI_GRIB_FILE_H + + +/* +CdiInputFile is a file abstraction that allows accessing an input file through any number of channels: +It is reference counted, so that it is closed at the right place, +and it is stateless, so that accesses from different callers cannot interfere with each other. +Once the reference counting code is threadsafe, CdiInputFile will also be threadsafe. +*/ +typedef struct CdiInputFile +{ + // public: + CdiReferencedObject super; + + // private: + char *path; + int fileDescriptor; +} CdiInputFile; + +// Final class, the constructor is private and not defined here. +CdiInputFile * +cdiInputFile_make(const char *path); // The caller is responsible to call cdiRefObject_release() on the returned object. +int cdiInputFile_read(const CdiInputFile *me, off_t readPosition, size_t readSize, size_t *outActualReadSize, + void *buffer); // Returns one of CDI_EINVAL, CDI_ESYSTEM, CDI_EEOF, OR CDI_NOERR. +/* Returns path string, don't use after destruction of CdiInputFile + * object */ +const char *cdiInputFile_getPath(const CdiInputFile *me); +// Destructor is private as well. + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#define _XOPEN_SOURCE 600 + + +#include <errno.h> +#include <fcntl.h> +#include <pthread.h> +#include <string.h> +#include <unistd.h> + +static void cdiInputFile_destruct(CdiInputFile *me); + +// For an explanation of the condestruct() pattern, see the comment in iterator_grib.c +// path != NULL -> construction +// path = NULL -> destruction +static CdiInputFile * +cdiInputFile_condestruct(CdiInputFile *me, const char *path) +{ +#define super() (&me->super) + if (!path) goto destruct; + cdiRefObject_construct(super()); + me->path = strdup(path); + if (!me->path) goto destructSuper; + do + { + me->fileDescriptor = open(me->path, O_RDONLY); + } + while (me->fileDescriptor == -1 && (errno == EINTR || errno == EAGAIN)); + if (me->fileDescriptor == -1) goto freePath; + // construction successfull, now we can set our own destructor + super()->destructor = (void (*)(CdiReferencedObject *)) cdiInputFile_destruct; + goto success; + + // ^ constructor code ^ + // | | + // v destructor/error-cleanup code v + +destruct: + close(me->fileDescriptor); +freePath: + Free(me->path); +destructSuper: + cdiRefObject_destruct(super()); + me = NULL; + +success: + return me; +#undef super +} + +static CdiInputFile **openFileList = NULL; +static size_t openFileCount = 0, openFileListSize = 0; +static pthread_mutex_t openFileListLock = PTHREAD_MUTEX_INITIALIZER; + +// This either returns a new object, or retains and returns a preexisting open file. +CdiInputFile * +cdiInputFile_make(const char *path) +{ + CdiInputFile *result = NULL; + xassert(path); + int error = pthread_mutex_lock(&openFileListLock); + xassert(!error); + { + // Check the list of open files for the given path. + for (size_t i = openFileCount; i-- && !result;) + { + if (!strcmp(path, openFileList[i]->path)) result = openFileList[i]; + } + // If no open file was found, we open one, otherwise we just retain the existing one one more time. + if (result) + { + cdiRefObject_retain(&result->super); + } + else + { + result = (CdiInputFile *) Malloc(sizeof(*result)); + if (!cdiInputFile_condestruct(result, path)) + { + // An error occured during construction, avoid a memory leak. + Free(result); + result = NULL; + } + else + { + // Add the new file to the list of open files. + if (openFileCount == openFileListSize) + { + openFileListSize *= 2; + if (openFileListSize < 16) openFileListSize = 16; + openFileList = (CdiInputFile **) Realloc(openFileList, openFileListSize); + } + xassert(openFileCount < openFileListSize); + openFileList[openFileCount++] = result; + } + } + } + error = pthread_mutex_unlock(&openFileListLock); + xassert(!error); + return result; +} + +int +cdiInputFile_read(const CdiInputFile *me, off_t readPosition, size_t readSize, size_t *outActualReadSize, void *buffer) +{ + char *byteBuffer = (char *) buffer; + size_t trash; + if (!outActualReadSize) outActualReadSize = &trash; + *outActualReadSize = 0; + while (readSize) + { + ssize_t bytesRead = pread(me->fileDescriptor, byteBuffer, readSize, readPosition); + if (bytesRead == -1) return (errno == EINVAL) ? CDI_EINVAL : CDI_ESYSTEM; + if (bytesRead == 0) return CDI_EEOF; + byteBuffer += bytesRead; + readPosition += bytesRead; + readSize -= (size_t) bytesRead; + *outActualReadSize += (size_t) bytesRead; + } + return CDI_NOERR; +} + +const char * +cdiInputFile_getPath(const CdiInputFile *me) +{ + return me->path; +} + +void +cdiInputFile_destruct(CdiInputFile *me) +{ + int error = pthread_mutex_lock(&openFileListLock); + xassert(!error); + { + // Find the position of me in the list of open files. + ssize_t position = (ssize_t) openFileCount; + while (position > 0 && openFileList[--position] != me) + ; + // Remove me from the list + openFileList[position] = openFileList[--openFileCount]; + } + error = pthread_mutex_unlock(&openFileListLock); + xassert(!error); + cdiInputFile_condestruct(me, NULL); +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef INSTITUTION_H +#define INSTITUTION_H + +int instituteUnpack(void *buf, int size, int *position, int originNamespace, void *context, int force_id); + +void instituteDefaultEntries(void); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <assert.h> +#include <limits.h> + + +typedef struct +{ + int self; + int center; + int subcenter; + char *name; + char *longname; +} institute_t; + +static int instituteCompareKernel(institute_t *ip1, institute_t *ip2); +static void instituteDestroyP(institute_t *instituteptr); +static void institutePrintP(institute_t *instituteptr, FILE *fp); +static int instituteGetPackSize(institute_t *instituteptr, void *context); +static void institutePackP(void *instituteptr, void *buf, int size, int *position, void *context); +static int instituteTxCode(void *instituteptr); + +static const resOps instituteOps = { (int (*)(void *, void *)) instituteCompareKernel, + (void (*)(void *)) instituteDestroyP, + (void (*)(void *, FILE *)) institutePrintP, + (int (*)(void *, void *)) instituteGetPackSize, + institutePackP, + instituteTxCode }; + +static void +instituteDefaultValue(institute_t *instituteptr) +{ + instituteptr->self = CDI_UNDEFID; + instituteptr->center = CDI_UNDEFID; + instituteptr->subcenter = CDI_UNDEFID; + instituteptr->name = NULL; + instituteptr->longname = NULL; +} + +void +instituteDefaultEntries(void) +{ + // clang-format off + cdiResH resH[] + = { institutDef( 98, 0, "ECMWF", "European Centre for Medium-Range Weather Forecasts"), + institutDef(252, 1, "MPIMET", "Max Planck Institute for Meteorology"), + institutDef( 98, 232, "MPIMET", "Max Planck Institute for Meteorology"), + institutDef( 98, 255, "MPIMET", "Max-Planck-Institute for Meteorology"), + institutDef( 78, 255, "DWD", "Deutscher Wetterdienst"), + institutDef( 78, 0, "DWD", "Deutscher Wetterdienst"), + institutDef(215, 255, "MCH", "MeteoSwiss"), + institutDef( 7, 0, "NCEP", "National Centers for Environmental Prediction"), + institutDef( 7, 1, "NCEP", "National Centers for Environmental Prediction"), + institutDef( 60, 0, "NCAR", "National Center for Atmospheric Research"), + institutDef( 74, 0, "METOFFICE", "U.K. Met Office"), + institutDef( 97, 0, "ESA", "European Space Agency"), + institutDef( 99, 0, "KNMI", "Royal Netherlands Meteorological Institute"), + institutDef( 80, 0, "CNMC", "Reparto per la Meteorologia, Rome (REMET)"), + // institutDef( 0, 0, "IPSL", "IPSL (Institut Pierre Simon Laplace, Paris, France)"); + }; + // clang-format on + + const size_t n = sizeof(resH) / sizeof(*resH); + for (size_t i = 0; i < n; i++) reshSetStatus(resH[i], &instituteOps, RESH_IN_USE); +} + +static int +instituteCompareKernel(institute_t *ip1, institute_t *ip2) +{ + int differ = 0; + + if (ip1->name) + { + if (ip1->center > 0 && ip2->center != ip1->center) differ = 1; + if (ip1->subcenter > 0 && ip2->subcenter != ip1->subcenter) differ = 1; + + if (!differ) + { + if (ip2->name) + { + const size_t len1 = strlen(ip1->name); + const size_t len2 = strlen(ip2->name); + if ((len1 != len2) || memcmp(ip2->name, ip1->name, len2)) differ = 1; + } + } + } + else if (ip1->longname) + { + if (ip2->longname) + { + const size_t len1 = strlen(ip1->longname); + const size_t len2 = strlen(ip2->longname); + if ((len1 != len2) || memcmp(ip2->longname, ip1->longname, len2)) differ = 1; + } + } + else + { + if (!(ip2->center == ip1->center && ip2->subcenter == ip1->subcenter)) differ = 1; + if (ip1->subcenter > 0 && ip1->subcenter != 255 && ip2->subcenter != ip1->subcenter) differ = 1; + } + + return differ; +} + +struct instLoc +{ + institute_t *ip; + int id; +}; + +static enum cdiApplyRet +findInstitute(int id, void *res, void *data) +{ + institute_t *ip1 = ((struct instLoc *) data)->ip; + institute_t *ip2 = (institute_t *) res; + if (!instituteCompareKernel(ip1, ip2)) + { + ((struct instLoc *) data)->id = id; + return CDI_APPLY_STOP; + } + else + return CDI_APPLY_GO_ON; +} + +int +institutInq(int center, int subcenter, const char *name, const char *longname) +{ + institute_t ip_ref; + ip_ref.self = CDI_UNDEFID; + ip_ref.center = center; + ip_ref.subcenter = subcenter; + ip_ref.name = (name && name[0]) ? (char *) name : NULL; + ip_ref.longname = (longname && longname[0]) ? (char *) longname : NULL; + + struct instLoc state = { .ip = &ip_ref, .id = CDI_UNDEFID }; + cdiResHFilterApply(&instituteOps, findInstitute, &state); + + return state.id; +} + +static institute_t * +instituteNewEntry(cdiResH resH, int center, int subcenter, const char *name, const char *longname) +{ + institute_t *instituteptr = (institute_t *) Malloc(sizeof(institute_t)); + instituteDefaultValue(instituteptr); + if (resH == CDI_UNDEFID) + instituteptr->self = reshPut(instituteptr, &instituteOps); + else + { + instituteptr->self = resH; + reshReplace(resH, instituteptr, &instituteOps); + } + instituteptr->center = center; + instituteptr->subcenter = subcenter; + if (name && *name) instituteptr->name = strdupx(name); + if (longname && *longname) instituteptr->longname = strdupx(longname); + return instituteptr; +} + +int +institutDef(int center, int subcenter, const char *name, const char *longname) +{ + institute_t *instituteptr = instituteNewEntry(CDI_UNDEFID, center, subcenter, name, longname); + return instituteptr->self; +} + +int +institutInqCenter(int instID) +{ + return instID != CDI_UNDEFID ? ((institute_t *) (reshGetVal(instID, &instituteOps)))->center : CDI_UNDEFID; +} + +int +institutInqSubcenter(int instID) +{ + return instID != CDI_UNDEFID ? ((institute_t *) (reshGetVal(instID, &instituteOps)))->subcenter : CDI_UNDEFID; +} + +const char * +institutInqNamePtr(int instID) +{ + return instID != CDI_UNDEFID ? ((institute_t *) (reshGetVal(instID, &instituteOps)))->name : NULL; +} + +const char * +institutInqLongnamePtr(int instID) +{ + return instID != CDI_UNDEFID ? ((institute_t *) (reshGetVal(instID, &instituteOps)))->longname : NULL; +} + +int +institutInqNumber(void) +{ + int instNum = (int) (reshCountType(&instituteOps)); + return instNum; +} + +static void +instituteDestroyP(institute_t *instituteptr) +{ + xassert(instituteptr); + Free(instituteptr->name); + Free(instituteptr->longname); + Free(instituteptr); +} + +static void +institutePrintP(institute_t *ip, FILE *fp) +{ + if (ip) + fprintf(fp, + "#\n" + "# instituteID %d\n" + "#\n" + "self = %d\n" + "center = %d\n" + "subcenter = %d\n" + "name = %s\n" + "longname = %s\n", + ip->self, ip->self, ip->center, ip->subcenter, ip->name ? ip->name : "NN", ip->longname ? ip->longname : "NN"); +} + +static int +instituteTxCode(void *instituteptr) +{ + (void) instituteptr; + return INSTITUTE; +} + +enum +{ + INSTITUTE_PACK_INT_SELF, + INSTITUTE_PACK_INT_CENTER, + INSTITUTE_PACK_INT_SUBCENTER, + INSTITUTE_PACK_INT_NAMELEN, + INSTITUTE_PACK_INT_LNAMELEN, + institute_nints, +}; + +static int +instituteGetPackSize(institute_t *ip, void *context) +{ + size_t namelen = strlen(ip->name), longnamelen = strlen(ip->longname); + xassert(namelen < INT_MAX && longnamelen < INT_MAX); + size_t txsize = (size_t) serializeGetSize(institute_nints, CDI_DATATYPE_INT, context) + + (size_t) serializeGetSize((int) namelen + 1, CDI_DATATYPE_TXT, context) + + (size_t) serializeGetSize((int) longnamelen + 1, CDI_DATATYPE_TXT, context); + xassert(txsize <= INT_MAX); + return (int) txsize; +} + +static void +institutePackP(void *instituteptr, void *buf, int size, int *position, void *context) +{ + institute_t *p = (institute_t *) instituteptr; + int tempbuf[institute_nints]; + tempbuf[INSTITUTE_PACK_INT_SELF] = p->self; + tempbuf[INSTITUTE_PACK_INT_CENTER] = p->center; + tempbuf[INSTITUTE_PACK_INT_SUBCENTER] = p->subcenter; + tempbuf[INSTITUTE_PACK_INT_NAMELEN] = (int) strlen(p->name) + 1; + tempbuf[INSTITUTE_PACK_INT_LNAMELEN] = (int) strlen(p->longname) + 1; + serializePack(tempbuf, institute_nints, CDI_DATATYPE_INT, buf, size, position, context); + serializePack(p->name, tempbuf[INSTITUTE_PACK_INT_NAMELEN], CDI_DATATYPE_TXT, buf, size, position, context); + serializePack(p->longname, tempbuf[INSTITUTE_PACK_INT_LNAMELEN], CDI_DATATYPE_TXT, buf, size, position, context); +} + +int +instituteUnpack(void *buf, int size, int *position, int originNamespace, void *context, int force_id) +{ +#define adaptKey(key) (namespaceAdaptKey((key), originNamespace)) + int tempbuf[institute_nints]; + int instituteID; + serializeUnpack(buf, size, position, tempbuf, institute_nints, CDI_DATATYPE_INT, context); + char *name = (char *) Malloc((size_t) tempbuf[INSTITUTE_PACK_INT_NAMELEN] + (size_t) tempbuf[INSTITUTE_PACK_INT_LNAMELEN]), + *longname = name + tempbuf[INSTITUTE_PACK_INT_NAMELEN]; + serializeUnpack(buf, size, position, name, tempbuf[INSTITUTE_PACK_INT_NAMELEN], CDI_DATATYPE_TXT, context); + serializeUnpack(buf, size, position, longname, tempbuf[INSTITUTE_PACK_INT_LNAMELEN], CDI_DATATYPE_TXT, context); + int targetID = force_id ? adaptKey(tempbuf[INSTITUTE_PACK_INT_SELF]) : CDI_UNDEFID; + institute_t *ip + = instituteNewEntry(targetID, tempbuf[INSTITUTE_PACK_INT_CENTER], tempbuf[INSTITUTE_PACK_INT_SUBCENTER], name, longname); + instituteID = ip->self; + xassert(!force_id || instituteID == targetID); + Free(name); + reshSetStatus(instituteID, &instituteOps, reshGetStatus(instituteID, &instituteOps) & ~RESH_SYNC_BIT); +#undef adaptKey + return instituteID; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +/* + * This file is for the use of iterator.c and the CdiIterator subclasses only. + */ + +#ifndef INCLUDE_GUARD_CDI_ITERATOR_INT_H +#define INCLUDE_GUARD_CDI_ITERATOR_INT_H + + +#include <stdbool.h> + +/* +class CdiIterator + +An iterator is an object that identifies the position of one record in a file, where a record is defined as the data belonging to +one level, timestep, and variable. Using iterators to read a file can be significantly faster than using streams, because they can +avoid building an index of the file. For file formats like grib that do not provide an index within the file, this makes the +difference between reading the file once or reading the file twice. + +CdiIterator is an abstract base class. Which derived class is used depends on the type of the file. The class hierarchy currently +looks like this: + + CdiIterator <|--+-- CdiFallbackIterator + | + +-- CdiGribIterator + +The fallback implementation currently uses the stream interface of CDI under the hood to provide full functionality for all +filetypes for which no iterator implementation exists yet. +*/ +// TODO[NH]: Debug messages, print function. + +struct CdiIterator +{ + int filetype; // This is used to dispatch calls to the correct subclass. + bool isAdvanced; // Used to catch inquiries before the first call to CdiIteratorNextField(). //XXX: Advanced is probably not a + // good word (initialized?) + + // The metadata that can be accessed by the inquiry calls. + // While theoretically redundant, these fields allow the handling of most inquiry calls within the base class. + // Only the name is excempted because it needs an allocation. + // These fields are set by the subclasses in the xxxIterNextField() method. + int datatype, timesteptype; + int gridId; + CdiParam param; + + // The status information for reading/advancing is added in the subclasses. +}; + +void baseIterConstruct(CdiIterator *me, int filetype); +const char *baseIter_constructFromString( + CdiIterator *me, const char *description); // Returns a pointer past the end of the parsed portion of the description string. +void baseIterDestruct(CdiIterator *me); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +/* + * A fallback implementation of the iterator interface that opens a stream under the hood. + * + * This implementation is mainly available to provide iterator access to file formats that don't support iterator access natively, + * nevertheless, it allows the file to dictate the order in which data is read, possibly providing performance benefits. + */ + +#ifndef INCLUDE_GUARD_CDI_ITERATOR_FALLBACK_H +#define INCLUDE_GUARD_CDI_ITERATOR_FALLBACK_H + +#ifdef HAVE_CONFIG_H +#endif + +#include <stdlib.h> + + +typedef struct CdiFallbackIterator CdiFallbackIterator; + +CdiIterator *cdiFallbackIterator_new(const char *path, int filetype); +CdiFallbackIterator *cdiFallbackIterator_clone(CdiIterator *me); +CdiIterator *cdiFallbackIterator_getSuper(CdiFallbackIterator *me); +char *cdiFallbackIterator_serialize(CdiIterator *me); +CdiFallbackIterator *cdiFallbackIterator_deserialize(const char *me); + +int cdiFallbackIterator_nextField(CdiIterator *me); + +char *cdiFallbackIterator_inqTime(CdiIterator *me, CdiTimeType timeType); +int cdiFallbackIterator_levelType(CdiIterator *me, int levelSelector, char **outName, char **outLongName, char **outStdName, + char **outUnit); +int cdiFallbackIterator_level(CdiIterator *me, int levelSelector, double *outValue1, double *outValue2); +int cdiFallbackIterator_zaxisUuid(CdiIterator *me, int *outVgridNumber, int *outLevelCount, unsigned char outUuid[CDI_UUID_SIZE]); +char *cdiFallbackIterator_copyVariableName(CdiIterator *me); +int cdiFallbackIterator_inqTile(CdiIterator *me, int *outTileIndex, int *outTileAttribute); +int cdiFallbackIterator_inqTileCount(CdiIterator *me, int *outTileCount, int *outTileAttributeCount); + +void cdiFallbackIterator_readField(CdiIterator *me, double *buffer, size_t *nmiss); +void cdiFallbackIterator_readFieldF(CdiIterator *me, float *buffer, size_t *nmiss); + +void cdiFallbackIterator_delete(CdiIterator *super); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +/* + * An implementation of the iterator interface for GRIB files. + * Since GRIB files do not contain an index, this avoids scanning the entire file to generate an in-memory index as streamOpenRead() + * does. Consequently, using this interface is much more efficient for GRIB files. + */ + +#ifndef INCLUDE_GUARD_CDI_ITERATOR_GRIB_H +#define INCLUDE_GUARD_CDI_ITERATOR_GRIB_H + +#ifdef HAVE_CONFIG_H +#endif + + +#ifdef HAVE_LIBGRIB_API +#include <grib_api.h> +#endif + +typedef struct recordList recordList; + +CdiIterator *cdiGribIterator_new(const char *path, int filetype); +CdiGribIterator *cdiGribIterator_makeClone(CdiIterator *me); +CdiIterator *cdiGribIterator_getSuper(CdiGribIterator *me); +char *cdiGribIterator_serialize(CdiIterator *me); +CdiGribIterator *cdiGribIterator_deserialize(const char *me); + +int cdiGribIterator_nextField(CdiIterator *me); + +char *cdiGribIterator_inqTime(CdiIterator *me, CdiTimeType timeType); +int cdiGribIterator_levelType(CdiIterator *me, int levelSelector, char **outName, char **outLongName, char **outStdName, + char **outUnit); +int cdiGribIterator_level(CdiIterator *me, int levelSelector, double *outValue1, double *outValue2); +int cdiGribIterator_zaxisUuid(CdiIterator *me, int *outVgridNumber, int *outLevelCount, unsigned char outUuid[CDI_UUID_SIZE]); +int cdiGribIterator_inqTile(CdiIterator *me, int *outTileIndex, int *outTileAttribute); +int cdiGribIterator_inqTileCount(CdiIterator *me, int *outTileCount, int *outTileAttributeCount); +char *cdiGribIterator_copyVariableName(CdiIterator *me); + +void cdiGribIterator_readField(CdiIterator *me, double *buffer, size_t *nmiss); +void cdiGribIterator_readFieldF(CdiIterator *me, float *buffer, size_t *nmiss); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + +#include <assert.h> +#include <ctype.h> + +static const char kUnexpectedFileTypeMessage[] = "Internal error: Unexpected file type encountered in iterator.\n" + "This is either due to an illegal memory access by the application\n" + " or an internal logical error in CDI (unlikely, but possible)."; +static const char kAdvancedString[] = "advanced"; +static const char kUnadvancedString[] = "unadvanced"; + +// Returns a static string. +static const char * +fileType2String(int fileType) +{ + switch (fileType) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: return "CDI::Iterator::GRIB1"; + case CDI_FILETYPE_GRB2: return "CDI::Iterator::GRIB2"; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NC: return "CDI::Iterator::NetCDF"; + case CDI_FILETYPE_NC2: return "CDI::Iterator::NetCDF2"; + case CDI_FILETYPE_NC4: return "CDI::Iterator::NetCDF4"; + case CDI_FILETYPE_NC4C: return "CDI::Iterator::NetCDF4C"; + case CDI_FILETYPE_NC5: return "CDI::Iterator::NetCDF5"; + case CDI_FILETYPE_NCZARR: return "CDI::Iterator::NCZarr"; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: return "CDI::Iterator::SRV"; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: return "CDI::Iterator::EXT"; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: return "CDI::Iterator::IEG"; +#endif + + default: return NULL; + } +} + +static int +string2FileType(const char *fileType, const char **outRestString) +{ + // This first part unconditionally checks all known type strings, and only if the given string matches one of these strings, we + // use fileType2string() to check whether support for this type has been compiled in. This is to avoid throwing "invalid type + // string" errors when we just have a library version mismatch. +#define check(givenString, typeString, typeConstant) \ + do \ + { \ + if (givenString == strstr(givenString, typeString)) \ + { \ + if (outRestString) *outRestString = givenString + strlen(typeString); \ + if (fileType2String(typeConstant)) return typeConstant; \ + Error("Support for " typeString \ + " not compiled in. Please check that the result of `cdiIterator_serialize()` is only passed to a " \ + "`cdiIterator_deserialize()` implementation of the same CDI library version."); \ + return CDI_FILETYPE_UNDEF; \ + } \ + } \ + while (0) + check(fileType, "CDI::Iterator::GRIB1", CDI_FILETYPE_GRB); + check(fileType, "CDI::Iterator::GRIB2", CDI_FILETYPE_GRB2); + check(fileType, "CDI::Iterator::NetCDF", CDI_FILETYPE_NC); + check(fileType, "CDI::Iterator::NetCDF2", CDI_FILETYPE_NC2); + check(fileType, "CDI::Iterator::NetCDF4", CDI_FILETYPE_NC4); + check(fileType, "CDI::Iterator::NetCDF4C", CDI_FILETYPE_NC4C); + check(fileType, "CDI::Iterator::NetCDF5", CDI_FILETYPE_NC5); + check(fileType, "CDI::Iterator::NCZarr", CDI_FILETYPE_NCZARR); + check(fileType, "CDI::Iterator::SRV", CDI_FILETYPE_SRV); + check(fileType, "CDI::Iterator::EXT", CDI_FILETYPE_EXT); + check(fileType, "CDI::Iterator::IEG", CDI_FILETYPE_IEG); +#undef check + + // If this point is reached, the given string does not seem to be produced by a cdiIterator_serialize() call. + Error("The string \"%s\" does not start with a valid iterator type. Please check the source of this string.", fileType); + *outRestString = fileType; + return CDI_FILETYPE_UNDEF; +} + +/* +@Function cdiIterator_new +@Title Create an iterator for an input file + +@Prototype CdiIterator* cdiIterator_new(const char* path) +@Parameter + @item path Path to the file that is to be read. + +@Result An iterator for the given file. + +@Description + Combined allocator and constructor for CdiIterator. + + The returned iterator does not point to the first field yet, + it must first be advanced once before the first field can be introspected. + This design decision has two benefits: 1. Empty files require no special + cases, 2. Users can start a while(!cdiIterator_nextField(iterator)) loop + right after the call to cdiIterator_new(). +*/ +CdiIterator * +cdiIterator_new(const char *path) +{ + int trash; + const int filetype = cdiGetFiletype(path, &trash); + switch (cdiBaseFiletype(filetype)) + { + case CDI_FILETYPE_UNDEF: Warning("Can't open file \"%s\": unknown format\n", path); return NULL; + +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_new(path, filetype); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_new(path, filetype); + + default: + Warning("the file \"%s\" is of type %s, but support for this format is not compiled in!", path, strfiletype(filetype)); + return NULL; + } +} + +void +baseIterConstruct(CdiIterator *me, int filetype) +{ + me->filetype = filetype; + me->isAdvanced = false; +} + +const char * +baseIter_constructFromString(CdiIterator *me, const char *description) +{ + const char *result = description; + me->filetype = string2FileType(result, &result); + assert(me->filetype != CDI_FILETYPE_UNDEF + && "Please report this error."); // This condition should have been checked for in a calling function. + for (; *result && isspace(*result); result++) + ; + if (result == strstr(result, kAdvancedString)) + { + me->isAdvanced = true; + result += sizeof(kAdvancedString) - 1; + } + else if (result == strstr(result, kUnadvancedString)) + { + me->isAdvanced = false; + result += sizeof(kUnadvancedString) - 1; + } + else + { + Error("Invalid iterator description string \"%s\". Please check the origin of this string.", description); + return NULL; + } + return result; +} + +#define sanityCheck(me) \ + do \ + { \ + if (!me) xabort("NULL was passed to %s as an iterator. Please check the return value of cdiIterator_new().", __func__); \ + if (!me->isAdvanced) xabort("Calling %s is not allowed without calling cdiIterator_nextField() first.", __func__); \ + } \ + while (0) + +/* +@Function cdiIterator_clone +@Title Make a copy of an iterator + +@Prototype CdiIterator* cdiIterator_clone(CdiIterator* me) +@Parameter + @item iterator The iterator to copy. + +@Result The clone. + +@Description + Clones the given iterator. Make sure to call cdiIterator_delete() on both + the copy and the original. + + This is not a cheap operation: Depending on the type of the file, it will + either make a copy of the current field in memory (GRIB files), or reopen + the file (all other file types). Use it sparingly. And if you do, try to + avoid keeping too many clones around: their memory footprint is + significant. +*/ +CdiIterator * +cdiIterator_clone(CdiIterator *me) +{ + sanityCheck(me); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_getSuper(cdiGribIterator_clone(me)); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_getSuper(cdiFallbackIterator_clone(me)); + + default: Error(kUnexpectedFileTypeMessage); return NULL; + } +} + +/* +@Function cdiGribIterator_clone +@Title Gain access to GRIB specific functionality + +@Prototype CdiGribIterator* cdiGribIterator_clone(CdiIterator* me) +@Parameter + @item iterator The iterator to operate on. + +@Result A clone that allows access to GRIB specific functionality, or NULL if the underlying file is not a GRIB file. + +@Description + Clones the given iterator iff the underlying file is a GRIB file, the returned iterator allows access to GRIB specific +functionality. Make sure to check that the return value is not NULL, and to call cdiGribIterator_delete() on the copy. + + This is not a cheap operation: It will make a copy of the current field in memory. Use it sparingly. And if you do, try to avoid +keeping too many clones around, their memory footprint is significant. +*/ +CdiGribIterator * +cdiGribIterator_clone(CdiIterator *me) +{ + sanityCheck(me); + switch (me->filetype) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_makeClone(me); +#endif + + default: return NULL; + } +} + +/* +@Function cdiIterator_serialize +@Title Serialize an iterator for sending it to another process + +@Prototype char* cdiIterator_serialize(CdiIterator* me) +@Parameter + @item iterator The iterator to operate on. + +@Result A malloc'ed string that contains the full description of the iterator. + +@Description + Make sure to call Free() on the resulting string. +*/ +char * +cdiIterator_serialize(CdiIterator *me) +{ + if (!me) xabort("NULL was passed to %s as an iterator. Please check the return value of cdiIterator_new().", __func__); + char *subclassDescription = NULL; + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: subclassDescription = cdiGribIterator_serialize(me); break; +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + subclassDescription = cdiFallbackIterator_serialize(me); + break; + + default: Error(kUnexpectedFileTypeMessage); return NULL; + } + + const char *ftypeStr = fileType2String(me->filetype), *advStr = me->isAdvanced ? kAdvancedString : kUnadvancedString; + char *result = (char *) Malloc(strlen(ftypeStr) + 1 + strlen(advStr) + 1 + strlen(subclassDescription) + 1); + sprintf(result, "%s %s %s", ftypeStr, advStr, subclassDescription); + Free(subclassDescription); + return result; +} + +/* +@Function cdiIterator_deserialize +@Title Recreate an iterator from its textual description + +@Prototype CdiIterator* cdiIterator_deserialize(const char* description) +@Parameter + @item description The result of a call to cdiIterator_serialize(). + +@Result A clone of the original iterator. + +@Description + A pair of cdiIterator_serialize() and cdiIterator_deserialize() is functionally equivalent to a call to cdiIterator_clone() + + This function will reread the current field from disk, so don't expect immediate return. +*/ +// This only checks the type of the iterator and calls the corresponding subclass function, +// the real deserialization is done in baseIter_constructFromString(). +CdiIterator * +cdiIterator_deserialize(const char *description) +{ + switch (cdiBaseFiletype(string2FileType(description, NULL))) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_getSuper(cdiGribIterator_deserialize(description)); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_getSuper(cdiFallbackIterator_deserialize(description)); + + default: Error(kUnexpectedFileTypeMessage); return NULL; + } +} + +/* +@Function cdiIterator_print +@Title Print a textual description of the iterator to a stream + +@Prototype void cdiIterator_print(CdiIterator* iterator, FILE* stream); +@Parameter + @item iterator The iterator to print. + @item stream The stream to print to. + +@Description + Use for debugging output. +*/ +void +cdiIterator_print(CdiIterator *me, FILE *stream) +{ + char *description = cdiIterator_serialize(me); + fprintf(stream, "%s\n", description); + Free(description); +} + +/* +@Function cdiIterator_nextField +@Title Advance an iterator to the next field in the file + +@Prototype int cdiIterator_nextField(CdiIterator* iterator) +@Parameter + @item iterator The iterator to operate on. + +@Result An error code. May be one of: + * CDI_NOERR: The iterator has successfully been advanced to the next field. + * CDI_EEOF: No more fields to read in this file. + +@Description + One call to cdiIterator_nextField() is required before the metadata of the first field can be examined. + Usually, it will be used directly as the condition for a while() loop. +*/ +int +cdiIterator_nextField(CdiIterator *me) +{ + if (!me) xabort("NULL was passed in as an iterator. Please check the return value of cdiIterator_new()."); + me->isAdvanced = true; + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_nextField(me); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_nextField(me); + + default: Error(kUnexpectedFileTypeMessage); return CDI_EINVAL; + } +} + +static char * +cdiIterator_inqTime(CdiIterator *me, CdiTimeType timeType) +{ + sanityCheck(me); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_inqTime(me, timeType); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_inqTime(me, timeType); + + default: Error(kUnexpectedFileTypeMessage); return NULL; + } +} + +/* +@Function cdiIterator_inqStartTime +@Title Get the start time of a measurement + +@Prototype char* cdiIterator_inqStartTime(CdiIterator* me) +@Parameter + @item iterator The iterator to operate on. + +@Result A malloc'ed string containing the (start) time of the current field in the format "YYYY-MM-DDTHH:MM:SS.mmm". + +@Description +The returned time is either the time of the data (fields defined at a time point), +or the start time of an integration time range (statistical fields). + +Converts the time to the ISO-8601 format and returns it in a newly allocated buffer. +The caller is responsible to Free() the resulting string. + +If the file is a GRIB file, the calendar that is used to resolve the relative times is the proleptic calendar +as it is implemented by the standard C mktime() function. +This is due to the fact that GRIB-API version 1.12.3 still does not implement the calendar identification fields. +*/ +char * +cdiIterator_inqStartTime(CdiIterator *me) +{ + return cdiIterator_inqTime(me, kCdiTimeType_startTime); +} + +/* +@Function cdiIterator_inqEndTime +@Title Get the end time of a measurement + +@Prototype char* cdiIterator_inqEndTime(CdiIterator* me) +@Parameter + @item iterator The iterator to operate on. + +@Result A malloc'ed string containing the end time of the current field in the format "YYYY-MM-DDTHH:MM:SS.mmm", or NULL if no such +time is defined. + +@Description +The returned time is the end time of an integration period if such a time exists (statistical fields). +Otherwise, NULL is returned. + +Converts the time to the ISO-8601 format and returns it in a newly allocated buffer. +The caller is responsible to Free() the resulting string. + +If the file is a GRIB file, the calendar that is used to resolve the relative times is the proleptic calendar +as it is implemented by the standard C mktime() function. +This is due to the fact that GRIB-API version 1.12.3 still does not implement the calendar identification fields. +*/ +char * +cdiIterator_inqEndTime(CdiIterator *me) +{ + return cdiIterator_inqTime(me, kCdiTimeType_endTime); +} + +/* +@Function cdiIterator_inqRTime +@Title Get the validity time of the current field + +@Prototype char* cdiIterator_inqRTime(CdiIterator* me) +@Parameter + @item iterator The iterator to operate on. + +@Result A malloc'ed string containing the validity time of the current field in the format "YYYY-MM-DDTHH:MM:SS.mmm". + +@Description +The returned time is the validity time as it is returned by taxisInqVtime(), only more precise. +That is, if the field is a time point, its time is returned, +if it is a statistical field with an integration period, the end time of the integration period is returned. + +Converts the time to the ISO-8601 format and returns it in a newly allocated buffer. +The caller is responsible to Free() the resulting string. + +If the file is a GRIB file, the calendar that is used to resolve the relative times is the proleptic calendar +as it is implemented by the standard C mktime() function. +This is due to the fact that GRIB-API version 1.12.3 still does not implement the calendar identification fields. +*/ +char * +cdiIterator_inqRTime(CdiIterator *me) +{ + return cdiIterator_inqTime(me, kCdiTimeType_referenceTime); +} + +/* +@Function cdiIterator_inqVTime +@Title Get the validity time of the current field + +@Prototype char* cdiIterator_inqVTime(CdiIterator* me) +@Parameter + @item iterator The iterator to operate on. + +@Result A malloc'ed string containing the validity time of the current field in the format "YYYY-MM-DDTHH:MM:SS.mmm". + +@Description +The returned time is the validity time as it is returned by taxisInqVtime(), only more precise. +That is, if the field is a time point, its time is returned, +if it is a statistical field with an integration period, the end time of the integration period is returned. + +Converts the time to the ISO-8601 format and returns it in a newly allocated buffer. +The caller is responsible to Free() the resulting string. + +If the file is a GRIB file, the calendar that is used to resolve the relative times is the proleptic calendar +as it is implemented by the standard C mktime() function. +This is due to the fact that GRIB-API version 1.12.3 still does not implement the calendar identification fields. +*/ +char * +cdiIterator_inqVTime(CdiIterator *me) +{ + char *result = cdiIterator_inqEndTime(me); + return (result) ? result : cdiIterator_inqStartTime(me); +} + +/* +@Function cdiIterator_inqLevelType +@Title Get the type of a level + +@Prototype int cdiIterator_inqLevelType(CdiIterator* me, int levelSelector, char **outName = NULL, char **outLongName = NULL, char +**outStdName = NULL, char **outUnit = NULL) +@Parameter + @item iterator The iterator to operate on. + @item levelSelector Zero for the top level, one for the bottom level + @item outName Will be set to a Malloc()'ed string with the name of the level if not NULL. + @item outLongName Will be set to a Malloc()'ed string with the long name of the level if not NULL. + @item outStdName Will be set to a Malloc()'ed string with the standard name of the level if not NULL. + @item outUnit Will be set to a Malloc()'ed string with the unit of the level if not NULL. + +@Result An integer indicating the type of the level. + +@Description +Find out some basic information about the given level, the levelSelector selects the function of the requested level. +If the requested level does not exist, this returns CDI_UNDEFID. +*/ +int +cdiIterator_inqLevelType(CdiIterator *me, int levelSelector, char **outName, char **outLongName, char **outStdName, char **outUnit) +{ + sanityCheck(me); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_levelType(me, levelSelector, outName, outLongName, outStdName, outUnit); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_levelType(me, levelSelector, outName, outLongName, outStdName, outUnit); + + default: Error(kUnexpectedFileTypeMessage); return CDI_UNDEFID; + } +} + +/* +@Function cdiIterator_inqLevel +@Title Get the value of the z-coordinate + +@Prototype void cdiIterator_inqLevel(CdiIterator* me, int levelSelector, double* outValue1, double* outValue2 = NULL) +@Parameter + @item iterator The iterator to operate on. + @item levelSelector Zero for the top level, one for the bottom level + @item outValue1 For "normal" levels this returns the value, for hybrid levels the first coordinate, for generalized levels the +level number. + @item outValue2 Zero for "normal" levels, for hybrid levels, this returns the second coordinate, for generalized levels the +level count. + +@Result An error code. + +@Description +Returns the value of the z-coordinate, whatever that may be. +*/ +int +cdiIterator_inqLevel(CdiIterator *me, int levelSelector, double *outValue1, double *outValue2) +{ + sanityCheck(me); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_level(me, levelSelector, outValue1, outValue2); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_level(me, levelSelector, outValue1, outValue2); + + default: Error(kUnexpectedFileTypeMessage); return CDI_EINVAL; + } +} + +/* +@Function cdiIterator_inqLevelUuid +@Title Get the UUID of the z-axis used by this field + +@Prototype int cdiIterator_inqLevelUuid(CdiIterator* me, int levelSelector, unsigned char (*outUuid)[16]) +@Parameter + @item iterator The iterator to operate on. + @item outVgridNumber The number of the associated vertical grid description. + @item outLevelCount The number of levels in the associated vertical grid description. + @item outUuid A pointer to a user supplied buffer of 16 bytes to store the UUID in. + +@Result An error code. + +@Description +Returns identifying information for the external z-axis description. May only be called for generalized levels. +*/ +int +cdiIterator_inqLevelUuid(CdiIterator *me, int *outVgridNumber, int *outLevelCount, unsigned char outUuid[CDI_UUID_SIZE]) +{ + sanityCheck(me); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_zaxisUuid(me, outVgridNumber, outLevelCount, outUuid); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_zaxisUuid(me, outVgridNumber, outLevelCount, outUuid); + + default: Error(kUnexpectedFileTypeMessage); return CDI_ELIBNAVAIL; + } +} + +/* +@Function cdiIterator_inqTile +@Title Inquire the tile information for the current field + +@Prototype int cdiIterator_inqTile(CdiIterator* me, int* outTileIndex, int* outTileAttribute) +@Parameter + @item iterator The iterator to operate on. + @item outTileIndex The index of the current tile, -1 if no tile information is available. + @item outTileAttribute The attribute of the current tile, -1 if no tile information is available. + +@Result An error code. CDI_EINVAL if there is no tile information associated with the current field. + +@Description +Inquire the tile index and attribute for the current field. +*/ +int +cdiIterator_inqTile(CdiIterator *me, int *outTileIndex, int *outTileAttribute) +{ + sanityCheck(me); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_inqTile(me, outTileIndex, outTileAttribute); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_inqTile(me, outTileIndex, outTileAttribute); + + default: Error(kUnexpectedFileTypeMessage); return CDI_ELIBNAVAIL; + } +} + +/** +@Function cdiIterator_inqTileCount +@Title Inquire the tile count and tile attribute counts for the current field + +@Prototype int cdiIterator_inqTileCount(CdiIterator* me, int* outTileCount, int* outTileAttributeCount) +@Parameter + @item iterator The iterator to operate on. + @item outTileCount The number of tiles used for this variable, zero if no tile information is available. + @item outTileAttributeCount The number of attributes available for the tile of this field, zero if no tile information is +available. Note: This is not the global attribute count, which would be impossible to infer without reading the entire file if it's +a GRIB file. + +@Result An error code. CDI_EINVAL if there is no tile information associated with the current field. + +@Description +Inquire the tile count and tile attribute counts for the current field. +*/ +int +cdiIterator_inqTileCount(CdiIterator *me, int *outTileCount, int *outTileAttributeCount) +{ + sanityCheck(me); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_inqTileCount(me, outTileCount, outTileAttributeCount); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_inqTileCount(me, outTileCount, outTileAttributeCount); + + default: Error(kUnexpectedFileTypeMessage); return CDI_ELIBNAVAIL; + } +} + +/* +@Function cdiIterator_inqParam +@Title Get discipline, category, and number + +@Prototype CdiParam cdiIterator_inqParam(CdiIterator* iterator) +@Parameter + @item iterator The iterator to operate on. + +@Result A struct containing the requested information. + +@Description + Simple metadata inspection function. +*/ +CdiParam +cdiIterator_inqParam(CdiIterator *me) +{ + sanityCheck(me); + return me->param; +} + +/* +@Function cdiIterator_inqParamParts +@Title Get discipline, category, and number + +@Prototype void cdiIterator_inqParamParts(CdiIterator *me, int *outDiscipline, int *outCategory, int *outNumber) +@Parameter + @item iterator The iterator to operate on. + @item outDiscipline This is used to return the discipline. + @item outCategory This is used to return the category. + @item outNumber This is used to return the number. + +@Description + Simple metadata inspection function. + + Some FORTRAN compilers produce wrong code for the cdiIterator_inqParam()-wrapper, + rendering it unusable from FORTRAN. This function is the workaround. +*/ +void +cdiIterator_inqParamParts(CdiIterator *me, int *outDiscipline, int *outCategory, int *outNumber) +{ + CdiParam result = cdiIterator_inqParam(me); + if (outDiscipline) *outDiscipline = result.discipline; + if (outCategory) *outCategory = result.category; + if (outNumber) *outNumber = result.number; +} + +/* +@Function cdiIterator_inqDatatype +@Title Get the datatype of the current field + +@Prototype int cdiIterator_inqDatatype(CdiIterator* iterator) +@Parameter + @item iterator The iterator to operate on. + +@Result The datatype that is used to store this field on disk. + +@Description + Simple metadata inspection function. +*/ +int +cdiIterator_inqDatatype(CdiIterator *me) +{ + sanityCheck(me); + return me->datatype; +} + +/* +@Function cdiIterator_inqFiletype +@Title Get the filetype of the current field + +@Prototype int cdiIterator_inqFiletype(CdiIterator* iterator) +@Parameter + @item iterator The iterator to operate on. + +@Result The filetype that is used to store this field on disk. + +@Description + Simple metadata inspection function. +*/ +int +cdiIterator_inqFiletype(CdiIterator *me) +{ + return me->filetype; +} + +/* +@Function cdiIterator_inqTsteptype +@Title Get the timestep type + +@Prototype int cdiIterator_inqTsteptype(CdiIterator* iterator) +@Parameter + @item iterator The iterator to operate on. + +@Result The timestep type. + +@Description + Simple metadata inspection function. +*/ +int +cdiIterator_inqTsteptype(CdiIterator *me) +{ + sanityCheck(me); + return me->timesteptype; +} + +/* +@Function cdiIterator_inqVariableName +@Title Get the variable name of the current field + +@Prototype char* cdiIterator_inqVariableName(CdiIterator* iterator) +@Parameter + @item iterator The iterator to operate on. + +@Result A pointer to a C-string containing the name. The storage for this string is allocated with Malloc(), and it is the +responsibility of the caller to Free() it. + +@Description + Allocates a buffer to hold the string, copies the current variable name into this buffer, and returns the buffer. + The caller is responsible to make the corresponding Free() call. +*/ +char * +cdiIterator_inqVariableName(CdiIterator *me) +{ + sanityCheck(me); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return cdiGribIterator_copyVariableName(me); +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + return cdiFallbackIterator_copyVariableName(me); + + default: Error(kUnexpectedFileTypeMessage); return NULL; + } +} + +/* +@Function cdiIterator_inqGridId +@Title Get the ID of the current grid + +@Prototype int cdiIterator_inqGridId(CdiIterator* iterator) +@Parameter + @item iterator The iterator to operate on. + +@Result A gridId that can be used for further introspection. + +@Description + This provides access to the grid related metadata. + The resulting ID is only valid until the next time cdiIterator_nextField() is called. +*/ +int +cdiIterator_inqGridId(CdiIterator *me) +{ + sanityCheck(me); + return me->gridId; +} + +/* +@Function cdiIterator_readField +@Title Read the whole field into a double buffer + +@Prototype void cdiIterator_readField(CdiIterator *me, double *buffer, SizeType *nmiss) +@Parameter + @item iterator The iterator to operate on. + @item buffer A pointer to the double array that the data should be written to. + @item nmiss A pointer to a variable where the count of missing values will be stored. May be NULL. + +@Description + It is assumed that the caller first analyses the return value of cdiIterator_inqGridId to determine the required size of the +buffer. Failing to do so results in undefined behavior. You have been warned. +*/ +void +cdiIterator_readField(CdiIterator *me, double *buffer, SizeType *nmiss) +{ + size_t numMiss = 0; + sanityCheck(me); + if (!buffer) xabort("NULL was passed in a buffer. Please provide a suitable buffer."); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: cdiGribIterator_readField(me, buffer, &numMiss); return; +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + cdiFallbackIterator_readField(me, buffer, &numMiss); + return; + default: Error(kUnexpectedFileTypeMessage); + } + + *nmiss = (SizeType) numMiss; +} + +/* +@Function cdiIterator_readFieldF +@Title Read the whole field into a double buffer + +@Prototype void cdiIterator_readFieldF(CdiIterator me, float *buffer, SizeType *nmiss) +@Parameter + @item iterator The iterator to operate on. + @item buffer A pointer to the double array that the data should be written to. + @item nmiss A pointer to a variable where the count of missing values will be stored. May be NULL. + +@Description + It is assumed that the caller first analyses the return value of cdiIterator_inqGridId to determine the required size of the +buffer. Failing to do so results in undefined behavior. You have been warned. +*/ +void +cdiIterator_readFieldF(CdiIterator *me, float *buffer, SizeType *nmiss) +{ + size_t numMiss = 0; + sanityCheck(me); + if (!buffer) xabort("NULL was passed in a buffer. Please provide a suitable buffer."); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: cdiGribIterator_readFieldF(me, buffer, &numMiss); return; +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + cdiFallbackIterator_readFieldF(me, buffer, &numMiss); + return; + default: Error(kUnexpectedFileTypeMessage); + } + + *nmiss = (SizeType) numMiss; +} + +/* +@Function cdiIterator_delete +@Title Destroy an iterator + +@Prototype void cdiIterator_delete(CdiIterator* iterator) +@Parameter + @item iterator The iterator to operate on. + +@Description + Combined destructor & deallocator. +*/ +void +cdiIterator_delete(CdiIterator *me) +{ + if (!me) xabort("NULL was passed in as an iterator. Please check the return value of cdiIterator_new()."); + switch (cdiBaseFiletype(me->filetype)) + { +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: cdiGribIterator_delete((CdiGribIterator *) me); break; +#endif + +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: +#endif + cdiFallbackIterator_delete(me); + break; + + default: Error(kUnexpectedFileTypeMessage); + } +} + +void +baseIterDestruct(CdiIterator *me) +{ + /*currently empty, but that's no reason not to call it*/ + (void) me; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + + +#include <assert.h> +#include <limits.h> +#include <stdlib.h> + +struct CdiFallbackIterator +{ + CdiIterator super; + char *path; // needed for clone() & serialize() + int streamId, vlistId, subtypeId; + + int variableCount, curVariable; + int curLevelCount, curLevel; + int curSubtypeCount, curSubtype; + int curTimestep; +}; + +CdiIterator * +cdiFallbackIterator_getSuper(CdiFallbackIterator *me) +{ + return &me->super; +} + +CdiIterator * +cdiFallbackIterator_new(const char *path, int filetype) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) Malloc(sizeof(*me)); + baseIterConstruct(&me->super, filetype); + me->subtypeId = CDI_UNDEFID; // Will be set in cdiFallbackIterator_nextField() + me->curSubtypeCount = -1; // Will be set in cdiFallbackIterator_nextField() + me->curLevelCount = -1; // Will be set in cdiFallbackIterator_nextField() + // These values are chosen so that the natural increment at the start of cdiFallbackIterator_nextField() will correctly position + // us at the first slice. + me->curTimestep = 0; + me->curVariable = -1; + me->curSubtype = -1; + me->curLevel = -1; + me->streamId = streamOpenRead(path); + if (me->streamId != CDI_UNDEFID) + { + me->vlistId = streamInqVlist(me->streamId); + if (me->vlistId != CDI_UNDEFID && (me->variableCount = vlistNvars(me->vlistId)) > 0 + && streamInqTimestep(me->streamId, me->curTimestep) > 0 && (me->path = strdup(path))) + { + return (CdiIterator *) me; + } + Free(me->path); + streamClose(me->streamId); + } + baseIterDestruct(&me->super); + Free(me); + return NULL; +} + +void +cdiFallbackIterator_delete(CdiIterator *super) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + Free(me->path); + streamClose(me->streamId); + baseIterDestruct(super); + Free(me); +} + +// Fetches the info that is derived from the current variable. Most of this is published by the data members in the base class. +static void +fetchVariableInfo(CdiFallbackIterator *me) +{ + // Fetch data that's published via base class data members. + me->super.datatype = vlistInqVarDatatype(me->vlistId, me->curVariable); + me->super.timesteptype = vlistInqVarTsteptype(me->vlistId, me->curVariable); + me->super.gridId = vlistInqVarGrid(me->vlistId, me->curVariable); + int param = vlistInqVarParam(me->vlistId, me->curVariable); + cdiDecodeParam(param, &me->super.param.number, &me->super.param.category, &me->super.param.discipline); + + // Fetch the current level and subtype counts. + me->curLevelCount = zaxisInqSize(vlistInqVarZaxis(me->vlistId, me->curVariable)); + me->subtypeId = vlistInqVarSubtype(me->vlistId, me->curVariable); + me->curSubtypeCount = (me->subtypeId == CDI_UNDEFID) ? 1 : subtypeInqSize(me->subtypeId); +} + +CdiFallbackIterator * +cdiFallbackIterator_clone(CdiIterator *super) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + + // Make another stream for this file. This yields an unadvanced iterator. + CdiFallbackIterator *clone = (CdiFallbackIterator *) (void *) cdiFallbackIterator_new(me->path, me->super.filetype); + if (clone) + { + // Point the clone to the same position in the file. + clone->variableCount = me->variableCount; + clone->curVariable = me->curVariable; + clone->curLevelCount = me->curLevelCount; + clone->curLevel = me->curLevel; + clone->curSubtypeCount = me->curSubtypeCount; + clone->curSubtype = me->curSubtype; + clone->curTimestep = me->curTimestep; + + clone->super.isAdvanced = super->isAdvanced; + if (super->isAdvanced) fetchVariableInfo(clone); + } + + return clone; +} + +char * +cdiFallbackIterator_serialize(CdiIterator *super) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + + char *escapedPath = cdiEscapeSpaces(me->path); + char *result = (char *) Malloc(strlen(escapedPath) + 7 * (3 * sizeof(int) * CHAR_BIT / 8 + 1) + 1); + sprintf(result, "%s %d %d %d %d %d %d %d", escapedPath, me->variableCount, me->curVariable, me->curLevelCount, me->curLevel, + me->curSubtypeCount, me->curSubtype, me->curTimestep); + Free(escapedPath); + return result; +} + +CdiFallbackIterator * +cdiFallbackIterator_deserialize(const char *description) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) Malloc(sizeof(*me)); + if (!me) goto fail; + + description = baseIter_constructFromString(&me->super, description); + + while (*description == ' ') description++; + me->path = cdiUnescapeSpaces(description, &description); + if (!me->path) goto destructSuper; + + me->streamId = streamOpenRead(me->path); + if (me->streamId == CDI_UNDEFID) goto freePath; + me->vlistId = streamInqVlist(me->streamId); + if (me->vlistId == CDI_UNDEFID) goto closeStream; + + // This reads one variable from the description string, does error checking, and advances the given string pointer. +#define decodeValue(variable, description) \ + do \ + { \ + const char *savedStart = description; \ + long long decodedValue \ + = strtoll(description, (char **) &description, 0); /*The cast is a workaround for the wrong signature of strtoll().*/ \ + variable = (int) decodedValue; \ + if (savedStart == description) goto closeStream; \ + if ((long long) decodedValue != (long long) variable) goto closeStream; \ + } \ + while (0) + decodeValue(me->variableCount, description); + decodeValue(me->curVariable, description); + decodeValue(me->curLevelCount, description); + decodeValue(me->curLevel, description); + decodeValue(me->curSubtypeCount, description); + decodeValue(me->curSubtype, description); + decodeValue(me->curTimestep, description); +#undef decodeValue + + if (streamInqTimestep(me->streamId, me->curTimestep) <= 0) goto closeStream; + if (me->super.isAdvanced) fetchVariableInfo(me); + + return me; + +closeStream: + streamClose(me->streamId); +freePath: + Free(me->path); +destructSuper: + baseIterDestruct(&me->super); + Free(me); +fail: + return NULL; +} + +static int +advance(CdiFallbackIterator *me) +{ + me->curLevel++; + if (me->curLevel >= me->curLevelCount) + { + me->curLevel = 0; + me->curSubtype++; + if (me->curSubtype >= me->curSubtypeCount) + { + me->curSubtype = 0; + me->curVariable++; + if (me->curVariable >= me->variableCount) + { + me->curVariable = 0; + me->curTimestep++; + if (streamInqTimestep(me->streamId, me->curTimestep) <= 0) return CDI_EEOF; + } + } + } + return CDI_NOERR; +} + +int +cdiFallbackIterator_nextField(CdiIterator *super) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + int result = advance(me); + if (result) return result; + + if (!me->curLevel && !me->curSubtype) + fetchVariableInfo(me); // Check whether we are processing a new variable/timestep and fetch the information that may have + // changed in this case. + return CDI_NOERR; +} + +char * +cdiFallbackIterator_inqTime(CdiIterator *super, CdiTimeType timeType) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + + // retrieve the time information + int taxisId = vlistInqTaxis(me->vlistId); + int date = 0, time = 0; + switch (timeType) + { + case kCdiTimeType_referenceTime: + date = taxisInqRdate(taxisId); + time = taxisInqRtime(taxisId); + break; + + case kCdiTimeType_startTime: + date = taxisInqVdate(taxisId); + time = taxisInqVtime(taxisId); + break; + + case kCdiTimeType_endTime: + return NULL; // The stream interface does not export the start/end times of statistical fields, so we treat all data as point + // of time data, returning the validity time as the start time. + + default: assert(0 && "internal error, please report this bug"); + } + + // decode the time information and reencode it into an ISO-compliant string + int year, month, day, hour, minute, second; + cdiDecodeDate(date, &year, &month, &day); + cdiDecodeTime(time, &hour, &minute, &second); + char *result = (char *) Malloc(4 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 4 + 1); + sprintf(result, "%04d-%02d-%02dT%02d:%02d:%02d.000", year, month, day, hour, minute, second); + return result; +} + +int +cdiFallbackIterator_levelType(CdiIterator *super, int levelSelector, char **outName, char **outLongName, char **outStdName, + char **outUnit) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + int zaxisId = vlistInqVarZaxis(me->vlistId, me->curVariable); + (void) levelSelector; +#define copyString(outPointer, key) \ + do \ + { \ + if (outPointer) \ + { \ + char tempBuffer[CDI_MAX_NAME]; \ + int length = CDI_MAX_NAME; \ + cdiInqKeyString(zaxisId, CDI_GLOBAL, key, tempBuffer, &length); \ + *outPointer = strdup(tempBuffer); \ + } \ + } \ + while (0) + copyString(outName, CDI_KEY_NAME); + copyString(outLongName, CDI_KEY_LONGNAME); + copyString(outStdName, CDI_KEY_STDNAME); + copyString(outUnit, CDI_KEY_UNITS); +#undef copyString + int ltype = 0; + cdiInqKeyInt(zaxisId, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, <ype); + return ltype; +} + +int +cdiFallbackIterator_level(CdiIterator *super, int levelSelector, double *outValue1, double *outValue2) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + int zaxisId = vlistInqVarZaxis(me->vlistId, me->curVariable); + + // handle NULL pointers once and for all + double trash; + if (!outValue1) outValue1 = &trash; + if (!outValue2) outValue2 = &trash; + + // get the level value + if (levelSelector) + { + *outValue1 = (zaxisInqLbounds(zaxisId, NULL)) ? zaxisInqLbound(zaxisId, me->curLevel) : zaxisInqLevel(zaxisId, me->curLevel); + } + else + { + *outValue1 = (zaxisInqUbounds(zaxisId, NULL)) ? zaxisInqUbound(zaxisId, me->curLevel) : zaxisInqLevel(zaxisId, me->curLevel); + } + *outValue2 = 0.0; + + // if this is a hybrid zaxis, lookup the coordinates in the vertical coordinate table + ssize_t intLevel = (ssize_t) (2 * *outValue1); + if (0 <= intLevel && intLevel < zaxisInqVctSize(zaxisId) - 1) + { + const double *coordinateTable = zaxisInqVctPtr(zaxisId); + *outValue1 = coordinateTable[intLevel]; + *outValue2 = coordinateTable[intLevel + 1]; + } + return CDI_NOERR; +} + +int +cdiFallbackIterator_zaxisUuid(CdiIterator *super, int *outVgridNumber, int *outLevelCount, unsigned char outUuid[CDI_UUID_SIZE]) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + int zaxisId = vlistInqVarZaxis(me->vlistId, me->curVariable); + int ltype = 0; + cdiInqKeyInt(zaxisId, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, <ype); + if (ltype != ZAXIS_HYBRID) return CDI_EINVAL; + if (outVgridNumber) + { + *outVgridNumber = 0; + cdiInqKeyInt(zaxisId, CDI_GLOBAL, CDI_KEY_NUMBEROFVGRIDUSED, outVgridNumber); + } + if (outLevelCount) + { + *outLevelCount = 0; + cdiInqKeyInt(zaxisId, CDI_GLOBAL, CDI_KEY_NLEV, outLevelCount); + } + if (outUuid) + { + int length = CDI_UUID_SIZE; + memset(outUuid, 0, length); + cdiInqKeyBytes(zaxisId, CDI_GLOBAL, CDI_KEY_UUID, outUuid, &length); + } + return CDI_NOERR; +} + +int +cdiFallbackIterator_inqTile(CdiIterator *super, int *outTileIndex, int *outTileAttribute) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; +#ifndef __cplusplus + if (!outTileIndex) outTileIndex = &(int){ 0 }; + if (!outTileAttribute) outTileAttribute = &(int){ 0 }; +#else + int dummy = 0; + if (!outTileIndex) outTileIndex = &dummy; + if (!outTileAttribute) outTileAttribute = &dummy; +#endif + + int error = CDI_NOERR; + if (me->subtypeId == CDI_UNDEFID) // must not call subtypeInqAttribute() with an invalid subtype ID, because it would abort the + // program instead of returning an error + { + error = CDI_EINVAL; + } + else + { + if (subtypeInqAttribute(me->subtypeId, me->curSubtype, "tileIndex", outTileIndex)) error = CDI_EINVAL; + if (subtypeInqAttribute(me->subtypeId, me->curSubtype, "tileAttribute", outTileAttribute)) error = CDI_EINVAL; + } + if (error) *outTileIndex = *outTileAttribute = -1; // Guarantee defined values in case of an error. + return error; +} + +int +cdiFallbackIterator_inqTileCount(CdiIterator *super, int *outTileCount, int *outTileAttributeCount) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; +#ifndef __cplusplus + if (!outTileCount) outTileCount = &(int){ 0 }; + if (!outTileAttributeCount) outTileAttributeCount = &(int){ 0 }; +#else + int temp = 0; + if (!outTileCount) outTileCount = &temp; + if (!outTileAttributeCount) outTileAttributeCount = &temp; +#endif + + int error = CDI_NOERR; + if (me->subtypeId == CDI_UNDEFID) // must not call subtypeInqAttribute() with an invalid subtype ID, because it would abort the + // program instead of returning an error + { + error = CDI_EINVAL; + } + else + { + if (subtypeInqAttribute(me->subtypeId, me->curSubtype, "numberOfTiles", outTileCount)) error = CDI_EINVAL; + if (subtypeInqAttribute(me->subtypeId, me->curSubtype, "numberOfTileAttributes", outTileAttributeCount)) error = CDI_EINVAL; + } + if (error) *outTileCount = *outTileAttributeCount = -1; // Guarantee defined values in case of an error. + return CDI_NOERR; +} + +char * +cdiFallbackIterator_copyVariableName(CdiIterator *super) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + return vlistCopyVarName(me->vlistId, me->curVariable); +} + +void +cdiFallbackIterator_readField(CdiIterator *super, double *buffer, size_t *nmiss) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + SizeType missingValues = 0; + streamReadVarSlice(me->streamId, me->curVariable, me->curLevel, buffer, &missingValues); + if (nmiss) *nmiss = (size_t) missingValues; +} + +void +cdiFallbackIterator_readFieldF(CdiIterator *super, float *buffer, size_t *nmiss) +{ + CdiFallbackIterator *me = (CdiFallbackIterator *) (void *) super; + SizeType missingValues = 0; + streamReadVarSliceF(me->streamId, me->curVariable, me->curLevel, buffer, &missingValues); + if (nmiss) *nmiss = (size_t) missingValues; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef STREAM_GRB_H +#define STREAM_GRB_H + +double zaxis_units_to_centimeter(int zaxisID); +double zaxis_units_to_meter(int zaxisID); +bool zaxis_units_is_Pa(int zaxisID); + +void ensureBufferSize(size_t requiredSize, size_t *curSize, void **buffer); +int grbDecompress(size_t recsize, size_t *buffersize, void **gribbuffer); + +static inline bool +gribbyte_get_bit(int number, int bit) +{ + return (bool) ((number >> (8 - bit)) & 1); +} +static inline void +gribbyte_set_bit(int *number, int bit) +{ + *number |= 1 << (8 - bit); +} +static inline void +gribbyte_clear_bit(int *number, int bit) +{ + *number &= ~(1 << (8 - bit)); +} + +int grbBitsPerValue(int datatype); + +int fdbInqContents(stream_t *streamptr); +int grbInqContents(stream_t *streamptr); +int fdbInqTimestep(stream_t *streamptr, int tsID); +int grbInqTimestep(stream_t *streamptr, int tsID); + +int grbInqRecord(stream_t *streamptr, int *varID, int *levelID); +void grbDefRecord(stream_t *streamptr); +void grb_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss); +void grb_write_record(stream_t *streamptr, int memtype, const void *data, size_t nmiss); +void grbCopyRecord(stream_t *streamptr2, stream_t *streamptr1); + +void grb_read_var(stream_t *streamptr, int varID, int memtype, void *data, size_t *nmiss); +void grb_write_var(stream_t *streamptr, int varID, int memtype, const void *data, size_t nmiss); + +void grb_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, size_t *nmiss); +void grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, size_t nmiss); + +int grib1ltypeToZaxisType(int grib_ltype); +int grib2ltypeToZaxisType(int grib_ltype); + +int zaxisTypeToGrib1ltype(int zaxistype); +int zaxisTypeToGrib2ltype(int zaxistype); + +int grbGetGridtype(int *gridID, size_t gridsize, bool *gridIsRotated, bool *gridIsCurvilinear); + +struct cdiGribParamChange +{ + int code, ltype, lev; + bool active; +}; + +struct cdiGribScanModeChange +{ + int value; + bool active; +}; + +extern struct cdiGribParamChange cdiGribChangeParameterID; +extern struct cdiGribScanModeChange cdiGribDataScanningMode; + +// Used in CDO +void streamGrbChangeParameterIdentification(int code, int ltype, int lev); +void streamGrbDefDataScanningMode(int scanmode); + +#endif /* STREAM_GRB_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef ZAXIS_H +#define ZAXIS_H + +#ifdef HAVE_CONFIG_H +#endif + + +// clang-format off +typedef struct +{ + double *vals; +#ifndef USE_MPI + char **cvals; + int clength; +#endif + double *lbounds; + double *ubounds; + double *weights; + int self; + int scalar; + int type; + int size; + int direction; + int vctsize; + unsigned positive; + double *vct; + cdi_keys_t keys; + cdi_atts_t atts; +} +zaxis_t; +// clang-format on + +void zaxisGetTypeDescription(int zaxisType, int *outPositive, const char **outName, const char **outLongName, + const char **outStdName, + const char **outUnit); // The returned const char* point to static storage. Don't free or modify them. + +unsigned cdiZaxisCount(void); + +zaxis_t *zaxis_to_pointer(int zaxisID); + +void cdiZaxisGetIndexList(unsigned numIDs, int *IDs); + +int zaxisUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, int force_id); + +const resOps *getZaxisOps(void); + +const char *zaxisInqNamePtr(int zaxisID); + +const double *zaxisInqLevelsPtr(int zaxisID); +#ifndef USE_MPI +char **zaxisInqCValsPtr(int zaxisID); +#endif +void zaxisResize(int zaxisID, int size); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + + + +#include <assert.h> +#include <limits.h> +#include <stdlib.h> +#include <string.h> + +#ifdef HAVE_LIBGRIB_API + +struct CdiGribIterator +{ + CdiIterator super; + + CdiInputFile *file; + off_t fileOffset; + unsigned char *gribBuffer; + size_t bufferSize, curRecordSize; + grib_handle *gribHandle; +}; + +CdiIterator * +cdiGribIterator_getSuper(CdiGribIterator *me) +{ + return &me->super; +} + +// Since the error handling in constructors is usually very closely related to the workings of a destructor, +// this function combines both functions in one, using a centralized exit. +// The mode of operation depends on whether me is a NULL pointer on entry: +// If it is NULL, a new object is allocated and constructed, which is returned if construction is successful. +// If a non-NULL pointer is passed in, the object is destructed and NULL is returned. In this case, the other arguments are ignored. +static CdiGribIterator * +cdiGribIterator_condestruct(CdiGribIterator *me, const char *path, int filetype) +{ +#define super() (&me->super) + if (me) goto destruct; + me = (CdiGribIterator *) Malloc(sizeof(*me)); + baseIterConstruct(super(), filetype); + + me->file = cdiInputFile_make(path); + if (!me->file) goto destructSuper; + me->fileOffset = 0; + me->gribHandle = NULL; + me->gribBuffer = NULL; + me->bufferSize = me->curRecordSize = 0; + me->super.gridId = CDI_UNDEFID; + + goto success; + + // ^ constructor code ^ + // | | + // v destructor/error-cleanup code v + +destruct: + if (me->super.gridId != CDI_UNDEFID) gridDestroy(me->super.gridId); + if (me->gribHandle) grib_handle_delete((struct grib_handle *) me->gribHandle); + Free(me->gribBuffer); + cdiRefObject_release(&me->file->super); +destructSuper: + baseIterDestruct(super()); + Free(me); + me = NULL; + +success: + return me; +#undef super +} + +CdiIterator * +cdiGribIterator_new(const char *path, int filetype) +{ + return &cdiGribIterator_condestruct(NULL, path, filetype)->super; +} + +CdiGribIterator * +cdiGribIterator_makeClone(CdiIterator *super) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + + // Allocate memory and copy data. (operations that may fail) + CdiGribIterator *result = (struct CdiGribIterator *) Malloc(sizeof(*result)); + if (!result) goto fail; + + result->file = me->file; + result->fileOffset = me->fileOffset; + result->gribBuffer = NULL; + result->bufferSize = me->bufferSize; + result->curRecordSize = me->curRecordSize; + result->gribHandle = NULL; + + if (me->gribBuffer) + { + result->gribBuffer = (unsigned char *) Malloc(me->bufferSize); + if (!result->gribBuffer) goto freeResult; + memcpy(result->gribBuffer, me->gribBuffer, me->curRecordSize); + } + if (me->gribHandle) + { + result->gribHandle = grib_handle_new_from_message(NULL, result->gribBuffer, result->curRecordSize); + if (!result->gribHandle) goto freeBuffer; + } + if (super->gridId != CDI_UNDEFID) + { + result->super.gridId = gridDuplicate(super->gridId); + if (result->super.gridId == CDI_UNDEFID) goto deleteGribHandle; + } + + // Finish construction. (operations that cannot fail) + baseIterConstruct(&result->super, super->filetype); + result->super.datatype = super->datatype; + result->super.timesteptype = super->timesteptype; + result->super.param = super->param; + cdiRefObject_retain(&result->file->super); + + return result; + + // Error handling. +deleteGribHandle: + if (result->gribHandle) grib_handle_delete(result->gribHandle); +freeBuffer: + Free(result->gribBuffer); +freeResult: + Free(result); +fail: + return NULL; +} + +char * +cdiGribIterator_serialize(CdiIterator *super) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + + const char *path = cdiInputFile_getPath(me->file); + char *escapedPath = cdiEscapeSpaces(path); + char *result = (char *) Malloc(strlen(escapedPath) + 3 * sizeof(int) * CHAR_BIT / 8); + sprintf(result, "%s %zu", escapedPath, (size_t) me->fileOffset); + Free(escapedPath); + return result; +} + +CdiGribIterator * +cdiGribIterator_deserialize(const char *description) +{ + char *path; + CdiGribIterator *me = (CdiGribIterator *) Malloc(sizeof(*me)); + if (!me) goto fail; + + description = baseIter_constructFromString(&me->super, description); + + while (*description == ' ') description++; + path = cdiUnescapeSpaces(description, &description); + if (!path) goto destructSuper; + + me->file = cdiInputFile_make(path); + Free(path); + if (!me->file) goto destructSuper; + + { + const char *savedStart = description; + char *description_ = (char *) description; + long long decodedOffset = strtoll(description, &description_, 0); + description = description_; + me->fileOffset = (off_t) decodedOffset; + if (savedStart == description) goto closeFile; + if ((unsigned long long) decodedOffset > (unsigned long long) me->fileOffset) goto closeFile; + } + + me->gribBuffer = NULL; + me->bufferSize = me->curRecordSize = 0; + me->gribHandle = NULL; + me->super.gridId = CDI_UNDEFID; + if (me->super.isAdvanced && cdiGribIterator_nextField(&me->super)) goto closeFile; + + return me; + +closeFile: + cdiRefObject_release(&me->file->super); +destructSuper: + baseIterDestruct(&me->super); + Free(me); +fail: + return NULL; +} + +static void +cdiGribIterator_ensureBuffer(CdiGribIterator *me, size_t requiredSize) +{ + if (me->bufferSize < requiredSize) + { + me->bufferSize *= 2; + if (me->bufferSize < requiredSize) me->bufferSize = requiredSize; + me->gribBuffer = (unsigned char *) Realloc(me->gribBuffer, me->bufferSize); + } +} + +static bool +isGrib1DualLevel(int levelType) +{ + switch (levelType) + { + case 101: + case 104: + case 106: + case 108: + case 110: + case 112: + case 114: + case 116: + case 120: + case 121: + case 128: + case 141: // This is the complete list after grib_api-1.12.3/definitions/grib1/sections.1.def:106-117:, the code in + // cdi/src/stream_gribapi.c:grib1GetLevel() seems to be incomplete. + return true; + default: return false; + } +} + +static const unsigned char * +positionOfGribMarker(const unsigned char *data, size_t size) +{ + for (const unsigned char *currentPosition = data, *end = data + size; currentPosition < end; currentPosition++) + { + currentPosition = (unsigned char *) memchr( + currentPosition, 'G', + size - (size_t) (currentPosition - data) - 3); //-3 to ensure that we don't overrun the buffer during the strncmp() call. + if (!currentPosition) return NULL; + if (!strncmp((const char *) currentPosition, "GRIB", 4)) return currentPosition; + } + return NULL; +} + +// This clobbers the contents of the gribBuffer! +// Returns the file offset of the next 'GRIB' marker. +static ssize_t +scanToGribMarker(CdiGribIterator *me) +{ + cdiGribIterator_ensureBuffer(me, 8 * 1024); + const size_t kMaxScanSize = 16 * 1024 * 1024; + for (size_t scannedBytes = 0, scanSize; scannedBytes < kMaxScanSize; scannedBytes += scanSize) + { + // Load a chunk of data into our buffer. + scanSize = me->bufferSize; + if (scannedBytes + scanSize > kMaxScanSize) scanSize = kMaxScanSize - scannedBytes; + assert(scanSize <= me->bufferSize); + int status = cdiInputFile_read(me->file, me->fileOffset + (off_t) scannedBytes, scanSize, &scanSize, me->gribBuffer); + if (status != CDI_NOERR && status != CDI_EEOF) return -1; + + const unsigned char *startPosition = positionOfGribMarker(me->gribBuffer, scanSize); + if (startPosition) + { + return (ssize_t) (me->fileOffset + (off_t) scannedBytes + (off_t) (startPosition - me->gribBuffer)); + } + + // Get the offset for the next iteration if there is a next iteration. + scanSize -= 3; // so that we won't miss a 'GRIB' sequence that happens to be cut off + scanSize &= ~(size_t) 0xf; // make 16 bytes aligned + if ((ssize_t) scanSize <= 0) return -1; // ensure that we make progress + } + return -1; +} + +static unsigned +decode24(void *beData) +{ + unsigned char *bytes = (unsigned char *) beData; + return ((unsigned) bytes[0] << 16) + ((unsigned) bytes[1] << 8) + (unsigned) bytes[2]; +} + +static uint64_t +decode64(void *beData) +{ + unsigned char *bytes = (unsigned char *) beData; + uint64_t result = 0; + for (size_t i = 0; i < 8; i++) result = (result << 8) + bytes[i]; + return result; +} + +// Determine the size of the GRIB record that begins at the given file offset. +static int +getRecordSize(CdiGribIterator *me, off_t gribFileOffset, size_t *outRecordSize) +{ + char buffer[16]; + size_t readSize; + int status = cdiInputFile_read(me->file, gribFileOffset, sizeof(buffer), &readSize, buffer); + if (status != CDI_NOERR && status != CDI_EEOF) return status; + if (readSize < sizeof(buffer)) return CDI_EEOF; + *outRecordSize = 0; + switch (buffer[7]) + { + case 1: + *outRecordSize = decode24(&buffer[4]); + if (*outRecordSize & (1 << 23)) + { + *outRecordSize = 120 * (*outRecordSize & ((1 << 23) - 1)); // Rescaling for long records. + // The corresponding code in cgribexlib.c:4532-4570: is much more complicated + // due to the fact that it subtracts the padding bytes that are inserted after section 4. + // However, we are only interested in the total size of data we need to read here, + // so we can ignore the presence of some padding bytes. + } + return CDI_NOERR; + + case 2: *outRecordSize = decode64(&buffer[8]); return CDI_NOERR; + + default: return CDI_EUFTYPE; + } +} + +#if 0 +static void hexdump(void *data, size_t size) +{ + unsigned char *charData = data; + for(size_t offset = 0; offset < size; ) + { + printf("%016zx:", offset); + for(size_t i = 0; i < 64 && offset < size; i++, offset++) + { + if((i & 63) && !(i & 15)) printf(" |"); + if((i & 15) && !(i & 3)) printf(" "); + printf(" %02x", charData[offset]); + } + printf("\n"); + } +} +#endif + +// Read a record into memory and wrap it in a grib_handle. +// XXX: I have omitted checking for szip compression as it is done in grbReadVarDP() & friends since that appears to be a +// non-standard extension of the GRIB1 standard: bit 1 in octet 14 of the binary data section which is used to signal szip +// compression is defined to be reserved in the standard. As such, it seems prudent not to support this and to encourage people with +// such szip compressed files to switch to the GRIB2/JPEG2000 format. However, in the case that this reasoning is wrong, this +// function is probably the place to add the check for zsip compression. +static int +readMessage(CdiGribIterator *me) +{ + // Destroy the old grib_handle. + if (me->gribHandle) grib_handle_delete(me->gribHandle), me->gribHandle = NULL; + me->fileOffset += (off_t) me->curRecordSize; + + // Find the next record and determine its size. + ssize_t gribFileOffset = scanToGribMarker(me); + int result = CDI_EEOF; + if (gribFileOffset < 0) goto fail; + result = getRecordSize(me, gribFileOffset, &me->curRecordSize); + if (result) goto fail; + + // Load the whole record into our buffer and create a grib_handle for it. + cdiGribIterator_ensureBuffer(me, me->curRecordSize); + result = cdiInputFile_read(me->file, gribFileOffset, me->curRecordSize, NULL, me->gribBuffer); + if (result) goto fail; + me->gribHandle = grib_handle_new_from_message(NULL, me->gribBuffer, me->curRecordSize); + result = CDI_EUFSTRUCT; + if (!me->gribHandle) goto fail; + + return CDI_NOERR; + +fail: + me->curRecordSize = 0; // This ensures that we won't jump to an uncontrolled file position if cdiGribIterator_nextField() is + // called another time after it has returned an error. + return result; +} + +int +cdiGribIterator_nextField(CdiIterator *super) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + + if (super->gridId != CDI_UNDEFID) gridDestroy(super->gridId), super->gridId = CDI_UNDEFID; + + // Get the next GRIB message into our buffer. + int result = readMessage(me); + if (result) return result; + + // Get the metadata that's published as variables in the base class. + super->datatype = gribGetDatatype(me->gribHandle); + super->timesteptype = gribapiGetTsteptype(me->gribHandle); + cdiDecodeParam(gribapiGetParam(me->gribHandle), &super->param.number, &super->param.category, &super->param.discipline); + grid_t grid; + gribapiGetGrid(me->gribHandle, &grid); + super->gridId = gridGenerate(&grid); + + return CDI_NOERR; +} + +char * +cdiGribIterator_inqTime(CdiIterator *super, CdiTimeType timeType) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + return gribMakeTimeString(me->gribHandle, timeType); +} + +int +cdiGribIterator_levelType(CdiIterator *super, int levelSelector, char **outName, char **outLongName, char **outStdName, + char **outUnit) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + + // First determine the zaxis type corresponding to the given level. + int zaxisType = ZAXIS_GENERIC; + if (gribEditionNumber(me->gribHandle) <= 1) + { + int levelType = (int) gribGetLongDefault(me->gribHandle, "indicatorOfTypeOfLevel", 255); + if (levelSelector && !isGrib1DualLevel(levelType)) levelType = 255; + zaxisType = grib1ltypeToZaxisType(levelType); + } + else + { + int levelType + = (int) gribGetLongDefault(me->gribHandle, levelSelector ? "typeOfSecondFixedSurface" : "typeOfFirstFixedSurface", 255); + zaxisType = grib2ltypeToZaxisType(levelType); + } + + // Then lookup the requested names. + const char *name, *longName, *stdName, *unit; + zaxisGetTypeDescription(zaxisType, NULL, &name, &longName, &stdName, &unit); + if (outName) *outName = strdup(name); + if (outLongName) *outLongName = strdup(longName); + if (outStdName) *outStdName = strdup(stdName); + if (outUnit) *outUnit = strdup(unit); + + return zaxisType; +} + +static double +logicalLevelValue2(long gribType, long storedValue, long power) +{ + double factor = 1; + assert(power >= 0); + while (power--) factor *= 10; // this is precise up to factor == 22. + switch (gribType) + { + case GRIB2_LTYPE_LANDDEPTH: + case GRIB2_LTYPE_ISOBARIC: + case GRIB2_LTYPE_SIGMA: + return (double) storedValue + * (1000.0 / factor); // The evaluation order allows the factors of ten to cancel out before rounding. + + case 255: return 0; + + default: return (double) storedValue / factor; + } +} + +// The output values must be preinitialized, this function does not always write them. +static int +readLevel2(grib_handle *gribHandle, const char *levelTypeKey, const char *powerKey, const char *valueKey, double *outValue1, + double *outValue2) +{ + assert(levelTypeKey && powerKey && valueKey && outValue1 && outValue2); + + long levelType = gribGetLongDefault(gribHandle, levelTypeKey, 255); // 1 byte + switch (levelType) + { + case 255: break; + + case 105: + case 113: + { + unsigned long value = (unsigned long) gribGetLongDefault(gribHandle, valueKey, 0); + unsigned long coordinateCount = (unsigned long) gribGetLongDefault(gribHandle, "numberOfCoordinatesValues", 0); + if (value >= coordinateCount / 2) + { + Error("Invalid level coordinate: Level has the hybrid coordinate index %lu, but only %lu coordinate pairs are present.", + value, coordinateCount / 2); + return CDI_EUFSTRUCT; + } + int status; + // XXX: I'm not 100% sure about how the coordinate pairs are stored in the file. + // I'm assuming an array of pairs due to the example code in grib_api-1.12.3/examples/F90/set_pv.f90, but that may be + // wrong. + if ((status = grib_get_double_element(gribHandle, "pv", (int) value * 2, outValue1))) return status; + if ((status = grib_get_double_element(gribHandle, "pv", (int) value * 2 + 1, outValue2))) return status; + break; + } + + default: + { + long power = 255 & gribGetLongDefault(gribHandle, powerKey, 0); // 1 byte + if (power == 255) power = 0; + long value = gribGetLongDefault(gribHandle, valueKey, 0); // 4 bytes + *outValue1 = logicalLevelValue2(levelType, value, power); + } + } + return CDI_NOERR; +} + +int +cdiGribIterator_level(CdiIterator *super, int levelSelector, double *outValue1, double *outValue2) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + double trash; + if (!outValue1) outValue1 = &trash; + if (!outValue2) outValue2 = &trash; + *outValue1 = *outValue2 = 0; + + if (gribEditionNumber(me->gribHandle) > 1) + { + if (levelSelector) + { + return readLevel2(me->gribHandle, "typeOfFirstFixedSurface", "scaleFactorOfFirstFixedSurface", + "scaledValueOfFirstFixedSurface", outValue1, outValue2); + } + else + { + return readLevel2(me->gribHandle, "typeOfSecondFixedSurface", "scaleFactorOfSecondFixedSurface", + "scaledValueOfSecondFixedSurface", outValue1, outValue2); + } + } + else + { + long levelType = (uint8_t) gribGetLongDefault(me->gribHandle, "indicatorOfTypeOfLevel", -1); // 1 byte + if (levelType == 255) + { + } + else if (isGrib1DualLevel((int) levelType)) + { + *outValue1 = (double) (gribGetLongDefault(me->gribHandle, (levelSelector ? "bottomLevel" : "topLevel"), 0)); + } + else if (levelType == 100) + { + *outValue1 = 100 * (double) (gribGetLongDefault(me->gribHandle, "level", 0)); // 2 bytes + } + else + { + *outValue1 = (double) (gribGetLongDefault(me->gribHandle, "level", 0)); // 2 bytes + } + } + return CDI_NOERR; +} + +int +cdiGribIterator_zaxisUuid(CdiIterator *super, int *outVgridNumber, int *outLevelCount, unsigned char outUuid[CDI_UUID_SIZE]) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + + if (outVgridNumber) + { + long temp; + if (grib_get_long(me->gribHandle, "numberOfVGridUsed", &temp)) return CDI_EINVAL; + *outVgridNumber = (int) temp; + } + if (outLevelCount) + { + long temp; + if (grib_get_long(me->gribHandle, "nlev", &temp)) return CDI_EINVAL; + *outLevelCount = (int) temp; + } + if (outUuid) + { + size_t size = CDI_UUID_SIZE; + if (grib_get_bytes(me->gribHandle, "uuidOfVGrid", outUuid, &size)) return CDI_EINVAL; + if (size != CDI_UUID_SIZE) return CDI_EUFSTRUCT; + } + + return CDI_NOERR; +} + +int +cdiGribIterator_inqTile(CdiIterator *super, int *outTileIndex, int *outTileAttribute) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + int trash; + if (!outTileIndex) outTileIndex = &trash; + if (!outTileAttribute) outTileAttribute = &trash; + + // Get the values if possible. + int error = CDI_NOERR; + long value; + if (grib_get_long(me->gribHandle, "tileIndex", &value)) error = CDI_EINVAL; + *outTileIndex = (int) value; + if (grib_get_long(me->gribHandle, "tileAttribute", &value)) error = CDI_EINVAL; + *outTileAttribute = (int) value; + + // Ensure defined return values in case of failure. + if (error) *outTileIndex = *outTileAttribute = -1; + return error; +} + +int +cdiGribIterator_inqTileCount(CdiIterator *super, int *outTileCount, int *outTileAttributeCount) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + int trash; + if (!outTileCount) outTileCount = &trash; + if (!outTileAttributeCount) outTileAttributeCount = &trash; + + // Get the values if possible. + int error = CDI_NOERR; + long value; + if (grib_get_long(me->gribHandle, "numberOfTiles", &value)) error = CDI_EINVAL; + *outTileCount = (int) value; + if (grib_get_long(me->gribHandle, "numberOfTileAttributes", &value)) error = CDI_EINVAL; + *outTileAttributeCount = (int) value; + + // Ensure defined return values in case of failure. + if (error) *outTileCount = *outTileAttributeCount = 0; + return error; +} + +char * +cdiGribIterator_copyVariableName(CdiIterator *super) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + return gribCopyString(me->gribHandle, "shortName"); +} + +void +cdiGribIterator_readField(CdiIterator *super, double *buffer, size_t *nmiss) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + + GRIB_CHECK(my_grib_set_double(me->gribHandle, "missingValue", CDI_Default_Missval), 0); + gribGetDoubleArray(me->gribHandle, "values", buffer); + long gridType = gribGetLong(me->gribHandle, "gridDefinitionTemplateNumber"); + if (nmiss) + { + // The condition excludes harmonic data. + *nmiss = (gridType >= 50 && gridType <= 53) ? (size_t) 0 : (size_t) gribGetLong(me->gribHandle, "numberOfMissing"); + } +} + +void +cdiGribIterator_readFieldF(CdiIterator *super, float *buffer, size_t *nmiss) +{ + CdiGribIterator *me = (CdiGribIterator *) (void *) super; + + size_t valueCount = gribGetArraySize(me->gribHandle, "values"); + double *temp = (double *) Malloc(valueCount * sizeof(*temp)); + cdiGribIterator_readField(super, temp, nmiss); + for (size_t i = valueCount; i--;) buffer[i] = (float) temp[i]; + Free(temp); +} +#endif + +/* +@Function cdiGribIterator_delete +@Title Dispose off a CdiGribIterator instance. + +@Prototype void cdiGribIterator_delete(CdiGribIterator *me) +@Parameter + @item me The iterator to delete. + +@Description + Combined destructor and deallocator. Make sure to match every call to cdiGribIterator_clone() with a call to this function. +*/ +void +cdiGribIterator_delete(CdiGribIterator *me) +{ +#ifdef HAVE_LIBGRIB_API + if (me) cdiGribIterator_condestruct(me, NULL, 0); +#else + if (me) + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); +#endif +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// callthroughs to provide direct access to the grib keys ////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +/* +@Function cdiGribIterator_inqEdition +@Title Get the version of the GRIB standard that is used + +@Prototype int cdiGribIterator_inqEdition(CdiGribIterator *me) +@Parameter + @item me The iterator to operate on. + +@Result The GRIB version. + +@Description + Returns the version of the file format. +*/ +int +cdiGribIterator_inqEdition(CdiGribIterator *me) +{ +#ifdef HAVE_LIBGRIB_API + return (int) gribEditionNumber(me->gribHandle); +#else + (void) me; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_getLong +@Title Access to grib_get_long() + +@Prototype int cdiGribIterator_getLong(CdiGribIterator *me, const char *key, long *result) +@Parameter + @item me The iterator to operate on. + @item ... The arguments to the underlying GRIB-API function. + +@Result An error code. + +@Description + Callthrough to grib_get_long(). +*/ +int +cdiGribIterator_getLong(CdiGribIterator *me, const char *key, long *result) +{ +#ifdef HAVE_LIBGRIB_API + return grib_get_long(me->gribHandle, key, result); +#else + (void) me; + (void) key; + (void) result; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_getLength +@Title Access to grib_get_length() + +@Prototype int cdiGribIterator_getLength(CdiGribIterator *me, const char *key, size_t *result) +@Parameter + @item me The iterator to operate on. + @item ... The arguments to the underlying GRIB-API function. + +@Result An error code. + +@Description + Callthrough to grib_get_length(). +*/ +int +cdiGribIterator_getLength(CdiGribIterator *me, const char *key, size_t *result) +{ +#ifdef HAVE_LIBGRIB_API +#ifdef HAVE_GRIB_GET_LENGTH + return grib_get_length(me->gribHandle, key, result); +#else + (void) me; + (void) key; + (void) result; + Error("grib_get_length() is not available, so cdiGribIterator_getLength() can't be used"); + return -1; +#endif +#else + (void) me; + (void) key; + (void) result; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_getString +@Title Access to grib_get_string() + +@Prototype int cdiGribIterator_getString(CdiGribIterator *me, const char *key, char *result, size_t *length) +@Parameter + @item me The iterator to operate on. + @item ... The arguments to the underlying GRIB-API function. + +@Result An error code. + +@Description + Callthrough to grib_get_string(). +*/ +int +cdiGribIterator_getString(CdiGribIterator *me, const char *key, char *result, size_t *length) +{ +#ifdef HAVE_LIBGRIB_API + return grib_get_string(me->gribHandle, key, result, length); +#else + (void) me; + (void) key; + (void) result; + (void) length; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_inqLongValue +@Title Get the value of a GRIB-API key as a long + +@Prototype long cdiGribIterator_inqLongValue(CdiGribIterator *me, const char *key) +@Parameter + @item me The iterator to operate on. + @item key The GRIB-API key to retrieve. + +@Result The value of the key. + +@Description + Use this to fetch a grib value if you are certain that the given key must be present. + This will abort the process if the key cannot be retrieved. +*/ +long +cdiGribIterator_inqLongValue(CdiGribIterator *me, const char *key) +{ +#ifdef HAVE_LIBGRIB_API + return gribGetLong(me->gribHandle, key); +#else + (void) me; + (void) key; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_inqLongDefaultValue +@Title Get the value of a GRIB-API key as a long + +@Prototype long cdiGribIterator_inqLongDefaultValue(CdiGribIterator *me, const char *key, long defaultValue) +@Parameter + @item me The iterator to operate on. + @item key The GRIB-API key to retrieve. + @item defaultValue The value to return if the key is not present. + +@Result The value of the key or the given default value. + +@Description + Use this if you can handle failure to fetch the key by supplying a default value. + This function cannot fail. +*/ +long +cdiGribIterator_inqLongDefaultValue(CdiGribIterator *me, const char *key, long defaultValue) +{ +#ifdef HAVE_LIBGRIB_API + return gribGetLongDefault(me->gribHandle, key, defaultValue); +#else + (void) me; + (void) key; + (void) defaultValue; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_inqStringValue +@Title Safely retrieve a GRIB-API key with a string value + +@Prototype char *cdiGribIterator_inqStringValue(CdiGribIterator *me, const char *key) +@Parameter + @item me The iterator to operate on. + @item key The GRIB-API key to retrieve. + +@Result A malloc'ed string or NULL. + +@Description + This will first call grib_get_length() to inquire the actual size of the string, + allocate memory accordingly, call grib_get_string(), and return the pointer to the new string. + Returns NULL on failure. +*/ +char * +cdiGribIterator_inqStringValue(CdiGribIterator *me, const char *key) +{ +#ifdef HAVE_LIBGRIB_API + return gribCopyString(me->gribHandle, key); +#else + (void) me; + (void) key; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return NULL; +#endif +} + +/* +@Function cdiGribIterator_getDouble +@Title Access to grib_get_double() + +@Prototype int cdiGribIterator_getDouble(CdiGribIterator *me, const char *key, double *result) +@Parameter + @item me The iterator to operate on. + @item ... The arguments to the underlying GRIB-API function. + +@Result An error code. + +@Description + Callthrough to grib_get_double(). +*/ +int +cdiGribIterator_getDouble(CdiGribIterator *me, const char *key, double *result) +{ +#ifdef HAVE_LIBGRIB_API + return grib_get_double(me->gribHandle, key, result); +#else + (void) me; + (void) key; + (void) result; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_getSize +@Title Access to grib_get_size() + +@Prototype int cdiGribIterator_getSize(CdiGribIterator *me, const char *key, size_t *result) +@Parameter + @item me The iterator to operate on. + @item ... The arguments to the underlying GRIB-API function. + +@Result An error code. + +@Description + Callthrough to grib_get_size(). +*/ +int +cdiGribIterator_getSize(CdiGribIterator *me, const char *key, size_t *result) +{ +#ifdef HAVE_LIBGRIB_API + return grib_get_size(me->gribHandle, key, result); +#else + (void) me; + (void) key; + (void) result; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_getLongArray +@Title Access to grib_get_long_array() + +@Prototype int cdiGribIterator_getLongArray(CdiGribIterator *me, const char *key, long *result, size_t *size) +@Parameter + @item me The iterator to operate on. + @item ... The arguments to the underlying GRIB-API function. + +@Result An error code. + +@Description + Callthrough to grib_get_long_array(). +*/ +int +cdiGribIterator_getLongArray(CdiGribIterator *me, const char *key, long *result, size_t *size) +{ +#ifdef HAVE_LIBGRIB_API + return grib_get_long_array(me->gribHandle, key, result, size); +#else + (void) me; + (void) key; + (void) result; + (void) size; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_getDoubleArray +@Title Access to grib_get_double_array() + +@Prototype int cdiGribIterator_getDoubleArray(CdiGribIterator *me, const char *key, double *result, size_t *size) +@Parameter + @item me The iterator to operate on. + @item ... The arguments to the underlying GRIB-API function. + +@Result An error code. + +@Description + Callthrough to grib_get_double_array(). +*/ +int +cdiGribIterator_getDoubleArray(CdiGribIterator *me, const char *key, double *result, size_t *size) +{ +#ifdef HAVE_LIBGRIB_API + return grib_get_double_array(me->gribHandle, key, result, size); +#else + (void) me; + (void) key; + (void) result; + (void) size; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_inqDoubleValue +@Title Get the value of a GRIB-API key as a double + +@Prototype double cdiGribIterator_inqDoubleValue(CdiGribIterator *me, const char *key) +@Parameter + @item me The iterator to operate on. + @item key The GRIB-API key to retrieve. + +@Result The value of the key. + +@Description + Use this to fetch a grib value if you are certain that the given key must be present. + This will abort the process if the key cannot be retrieved. +*/ +double +cdiGribIterator_inqDoubleValue(CdiGribIterator *me, const char *key) +{ +#ifdef HAVE_LIBGRIB_API + return gribGetDouble(me->gribHandle, key); +#else + (void) me; + (void) key; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* +@Function cdiGribIterator_inqDoubleDefaultValue +@Title Get the value of a GRIB-API key as a double + +@Prototype double cdiGribIterator_inqDoubleDefaultValue(CdiGribIterator *me, const char *key, double defaultValue) +@Parameter + @item me The iterator to operate on. + @item key The GRIB-API key to retrieve. + @item defaultValue The value to return if the key is not present. + +@Result The value of the key or the given default value. + +@Description + Use this if you can handle failure to fetch the key by supplying a default value. + This function cannot fail. +*/ +double +cdiGribIterator_inqDoubleDefaultValue(CdiGribIterator *me, const char *key, double defaultValue) +{ +#ifdef HAVE_LIBGRIB_API + return gribGetDoubleDefault(me->gribHandle, key, defaultValue); +#else + (void) me; + (void) key; + (void) defaultValue; + xabort( + "CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"); + return -4; +#endif +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <math.h> + +// convert Julian calendar day into year, months, day +static void +decode_julday(int calendar, int64_t julianDay, // Julian day number to convert + int *year, // Gregorian year (out) + int *mon, // Gregorian month (1-12) (out) + int *day) // Gregorian day (1-31) (out) +{ + const int64_t a = julianDay; + + const double b = floor((a - 1867216.25) / 36524.25); + double c = a + b - floor(b / 4) + 1525; + + if (calendar == CALENDAR_STANDARD || calendar == CALENDAR_GREGORIAN) + if (a < 2299161) c = a + 1524; + + const double d = floor((c - 122.1) / 365.25); + const double e = floor(365.25 * d); + const double f = floor((c - e) / 30.6001); + + *day = (int) (c - e - floor(30.6001 * f)); + *mon = (int) (f - 1 - 12 * floor(f / 14)); + *year = (int) (d - 4715 - floor((7 + *mon) / 10)); +} + +// convert year, month, day into Julian calendar day +static int64_t +encode_julday(int calendar, int year, int month, int day) +{ + const int iy = (month <= 2) ? year - 1 : year; + const int im = (month <= 2) ? month + 12 : month; + int ib = (iy < 0) ? ((iy + 1) / 400 - (iy + 1) / 100) : (iy / 400 - iy / 100); + + if (calendar == CALENDAR_STANDARD || calendar == CALENDAR_GREGORIAN) + { + if (year > 1582 || (year == 1582 && (month > 10 || (month == 10 && day >= 15)))) + { + // 15th October 1582 AD or later + } + else + { + // 4th October 1582 AD or earlier + ib = -2; + } + } + + int64_t julianDay = (int64_t) (floor(365.25 * iy) + (int64_t) (30.6001 * (im + 1)) + ib + 1720996.5 + day + 0.5); + + return julianDay; +} + +int64_t +date_to_julday(int calendar, int64_t date) +{ + int year, month, day; + cdiDecodeDate(date, &year, &month, &day); + + return encode_julday(calendar, year, month, day); +} + +int64_t +julday_to_date(int calendar, int64_t julianDay) +{ + int year, month, day; + decode_julday(calendar, julianDay, &year, &month, &day); + + return cdiEncodeDate(year, month, day); +} + +int +time_to_sec(int time) +{ + int hour, minute, second; + cdiDecodeTime(time, &hour, &minute, &second); + + const int seconds = hour * 3600 + minute * 60 + second; + + return seconds; +} + +int +sec_to_time(int secofday) +{ + const int hour = secofday / 3600; + const int minute = secofday / 60 - hour * 60; + const int second = secofday - hour * 3600 - minute * 60; + + return cdiEncodeTime(hour, minute, second); +} + +double +secofday_encode(CdiTime time) +{ + const int hour = time.hour; + const int minute = time.minute; + const int second = time.second; + return hour * 3600 + minute * 60 + second + time.ms / 1000.0; +} + +CdiTime +secofday_decode(double secondOfDay) +{ + CdiTime time; + + const int fullSeconds = (int) secondOfDay; + + time.ms = (int) lround((secondOfDay - fullSeconds) * 1000); + + const int hour = fullSeconds / 3600; + const int minute = fullSeconds / 60 - hour * 60; + const int second = fullSeconds - hour * 3600 - minute * 60; + + time.hour = hour; + time.minute = minute; + time.second = second; + + return time; +} + +static int64_t +calDay_encode(int calendar, CdiDate date) +{ + const int dpy = calendar_dpy(calendar); + + if (dpy == 360 || dpy == 365 || dpy == 366) + return encode_calday(dpy, date.year, date.month, date.day); + else + return encode_julday(calendar, date.year, date.month, date.day); +} + +static CdiDate +calDay_decode(int calendar, int64_t julday) +{ + int year, month, day; + const int dpy = calendar_dpy(calendar); + + if (dpy == 360 || dpy == 365 || dpy == 366) + decode_calday(dpy, julday, &year, &month, &day); + else + decode_julday(calendar, julday, &year, &month, &day); + + CdiDate date; + date.year = year; + date.month = month; + date.day = day; + + return date; +} + +JulianDate +julianDate_encode(int calendar, CdiDateTime dt) +{ + JulianDate julianDate; + + julianDate.julianDay = calDay_encode(calendar, dt.date); + julianDate.secondOfDay = secofday_encode(dt.time); + + return julianDate; +} + +CdiDateTime +julianDate_decode(int calendar, JulianDate julianDate) +{ + CdiDateTime dt; + + dt.date = calDay_decode(calendar, julianDate.julianDay); + dt.time = secofday_decode(julianDate.secondOfDay); + + return dt; +} + +static void +adjust_seconds(JulianDate *julianDate) +{ + const double SecondsPerDay = 86400.0; + + while (julianDate->secondOfDay >= SecondsPerDay) + { + julianDate->secondOfDay -= SecondsPerDay; + julianDate->julianDay++; + } + + while (julianDate->secondOfDay < 0.0) + { + julianDate->secondOfDay += SecondsPerDay; + julianDate->julianDay--; + } +} + +// add seconds to julianDate +JulianDate +julianDate_add_seconds(JulianDate julianDate, int64_t seconds) +{ + julianDate.secondOfDay += seconds; + + adjust_seconds(&julianDate); + + return julianDate; +} + +// add julianDate1 and julianDate2 +JulianDate +julianDate_add(JulianDate julianDate1, JulianDate julianDate2) +{ + JulianDate julianDate; + julianDate.julianDay = julianDate1.julianDay + julianDate2.julianDay; + julianDate.secondOfDay = julianDate1.secondOfDay + julianDate2.secondOfDay; + + adjust_seconds(&julianDate); + + return julianDate; +} + +// subtract julianDate2 from julianDate1 +JulianDate +julianDate_sub(JulianDate julianDate1, JulianDate julianDate2) +{ + JulianDate julianDate; + julianDate.julianDay = julianDate1.julianDay - julianDate2.julianDay; + julianDate.secondOfDay = julianDate1.secondOfDay - julianDate2.secondOfDay; + + adjust_seconds(&julianDate); + + return julianDate; +} + +double +julianDate_to_seconds(JulianDate julianDate) +{ + return julianDate.julianDay * 86400.0 + julianDate.secondOfDay; +} + +#ifdef TEST2 +int +main(void) +{ + int calendar = CALENDAR_STANDARD; + int factor = 86400; + int value = 30; + + int year = 1979; + int month = 1; + int day = 15; + int hour = 12; + int minute = 30; + int second = 17; + int ms = 0; + + CdiDateTime dt; + dt.date = cdiDate_encode(year, month, day); + dt.time = cdiTime_encode(hour, minute, second, ms); + printf("%d/%02d/%02d %02d:%02d:%02d.%03d\n", dt.date.year, dt.date.month, dt.date.day, dt.time.hour, dt.time.minute, + dt.time.second, dt.time.ms); + + JulianDate julianDate = julianDate_encode(calendar, dt); + + dt = julianDate_decode(calendar, julianDate); + printf("%d/%02d/%02d %02d:%02d:%02d.%03d %d %g\n", dt.date.year, dt.date.month, dt.date.day, dt.time.hour, dt.time.minute, + dt.time.second, dt.time.ms, (int) julianDate.julianDay, julianDate.secondOfDay); + + for (int i = 0; i < 420; i++) + { + dt = julianDate_decode(calendar, julianDate); + printf("%2d %d/%02d/%02d %02d:%02d:%02d.%03d\n", i, dt.date.year, dt.date.month, dt.date.day, dt.time.hour, dt.time.minute, + dt.time.second, dt.time.ms); + julianDate = julianDate_add_seconds(julianDate, value * factor); + } + + return 0; +} +#endif +#ifndef MODEL_H +#define MODEL_H + +int modelUnpack(void *buf, int size, int *position, int originNamespace, void *context, int force_id); + +void modelDefaultEntries(void); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <limits.h> + + +#undef CDI_UNDEFID +#define CDI_UNDEFID -1 + +typedef struct +{ + int self; + int instID; + int modelgribID; + char *name; +} model_t; + +static void modelInit(void); + +static int modelCompareP(void *modelptr1, void *modelptr2); +static void modelDestroyP(void *modelptr); +static void modelPrintP(void *modelptr, FILE *fp); +static int modelGetSizeP(void *modelptr, void *context); +static void modelPackP(void *modelptr, void *buff, int size, int *position, void *context); +static int modelTxCode(void *modelptr); + +static const resOps modelOps = { modelCompareP, modelDestroyP, modelPrintP, modelGetSizeP, modelPackP, modelTxCode }; + +static void +modelDefaultValue(model_t *modelptr) +{ + modelptr->self = CDI_UNDEFID; + modelptr->instID = CDI_UNDEFID; + modelptr->modelgribID = CDI_UNDEFID; + modelptr->name = NULL; +} + +static model_t * +modelNewEntry(cdiResH resH, int instID, int modelgribID, const char *name) +{ + model_t *modelptr = (model_t *) Malloc(sizeof(model_t)); + modelDefaultValue(modelptr); + if (resH == CDI_UNDEFID) + modelptr->self = reshPut(modelptr, &modelOps); + else + { + modelptr->self = resH; + reshReplace(resH, modelptr, &modelOps); + } + modelptr->instID = instID; + modelptr->modelgribID = modelgribID; + if (name && *name) modelptr->name = strdupx(name); + + return (modelptr); +} + +void +modelDefaultEntries(void) +{ + int instID; + enum + { + nDefModels = 10 + }; + cdiResH resH[nDefModels]; + + instID = institutInq(0, 0, "ECMWF", NULL); + /* (void) modelDef(instID, 131, "ERA15"); */ + /* (void) modelDef(instID, 199, "ERA40"); */ + + instID = institutInq(98, 232, "MPIMET", NULL); + resH[0] = modelDef(instID, 64, "ECHAM5.4"); + resH[1] = modelDef(instID, 63, "ECHAM5.3"); + resH[2] = modelDef(instID, 62, "ECHAM5.2"); + resH[3] = modelDef(instID, 61, "ECHAM5.1"); + + instID = institutInq(98, 255, "MPIMET", NULL); + resH[4] = modelDef(instID, 60, "ECHAM5.0"); + resH[5] = modelDef(instID, 50, "ECHAM4"); + resH[6] = modelDef(instID, 110, "MPIOM1"); + + instID = institutInq(0, 0, "DWD", NULL); + resH[7] = modelDef(instID, 149, "GME"); + + instID = institutInq(0, 0, "MCH", NULL); + //(void) = modelDef(instID, 137, "COSMO"); + resH[8] = modelDef(instID, 255, "COSMO"); + + instID = institutInq(0, 1, "NCEP", NULL); + resH[9] = modelDef(instID, 80, "T62L28MRF"); + + /* pre-defined models are not synchronized */ + for (int i = 0; i < nDefModels; i++) reshSetStatus(resH[i], &modelOps, RESH_IN_USE); +} + +static void +modelInit(void) +{ + static bool modelInitialized = false; + if (modelInitialized) return; +} + +struct modelLoc +{ + const char *name; + int instID, modelgribID, resID; +}; + +static enum cdiApplyRet +findModelByID(int resID, void *res, void *data) +{ + model_t *modelptr = (model_t *) res; + struct modelLoc *ret = (struct modelLoc *) data; + int instID = ret->instID, modelgribID = ret->modelgribID; + if (modelptr->instID == instID && modelptr->modelgribID == modelgribID) + { + ret->resID = resID; + return CDI_APPLY_STOP; + } + else + return CDI_APPLY_GO_ON; +} + +static enum cdiApplyRet +findModelByName(int resID, void *res, void *data) +{ + model_t *modelptr = (model_t *) res; + struct modelLoc *ret = (struct modelLoc *) data; + int instID = ret->instID, modelgribID = ret->modelgribID; + const char *name = ret->name; + if ((instID == -1 || modelptr->instID == instID) && (modelgribID == 0 || modelptr->modelgribID == modelgribID) && modelptr->name) + { + const char *p = name, *q = modelptr->name; + while (*p != '\0' && *p == *q) ++p, ++q; + if (*p == '\0' || *q == '\0') + { + ret->resID = resID; + return CDI_APPLY_STOP; + } + } + return CDI_APPLY_GO_ON; +} + +int +modelInq(int instID, int modelgribID, const char *name) +{ + modelInit(); + + struct modelLoc searchState = { .name = name, .instID = instID, .modelgribID = modelgribID, .resID = CDI_UNDEFID }; + if (name && *name) + cdiResHFilterApply(&modelOps, findModelByName, &searchState); + else + cdiResHFilterApply(&modelOps, findModelByID, &searchState); + return searchState.resID; +} + +int +modelDef(int instID, int modelgribID, const char *name) +{ + model_t *modelptr; + + modelInit(); + + modelptr = modelNewEntry(CDI_UNDEFID, instID, modelgribID, name); + + return modelptr->self; +} + +int +modelInqInstitut(int modelID) +{ + model_t *modelptr = NULL; + + modelInit(); + + if (modelID != CDI_UNDEFID) modelptr = (model_t *) reshGetVal(modelID, &modelOps); + + return modelptr ? modelptr->instID : CDI_UNDEFID; +} + +int +modelInqGribID(int modelID) +{ + model_t *modelptr = NULL; + + modelInit(); + + if (modelID != CDI_UNDEFID) modelptr = (model_t *) reshGetVal(modelID, &modelOps); + + return modelptr ? modelptr->modelgribID : CDI_UNDEFID; +} + +const char * +modelInqNamePtr(int modelID) +{ + model_t *modelptr = NULL; + + modelInit(); + + if (modelID != CDI_UNDEFID) modelptr = (model_t *) reshGetVal(modelID, &modelOps); + + return modelptr ? modelptr->name : NULL; +} + +static int +modelCompareP(void *modelptr1, void *modelptr2) +{ + model_t *model1 = (model_t *) modelptr1, *model2 = (model_t *) modelptr2; + int diff = (namespaceResHDecode(model1->instID).idx != namespaceResHDecode(model2->instID).idx) + | (model1->modelgribID != model2->modelgribID) | !str_is_equal(model1->name, model2->name); + return diff; +} + +void +modelDestroyP(void *modelptr) +{ + model_t *mp = (model_t *) modelptr; + if (mp->name) Free(mp->name); + Free(mp); +} + +void +modelPrintP(void *modelptr, FILE *fp) +{ + model_t *mp = (model_t *) modelptr; + fprintf(fp, + "#\n" + "# modelID %d\n" + "#\n" + "self = %d\n" + "instID = %d\n" + "modelgribID = %d\n" + "name = %s\n", + mp->self, mp->self, mp->instID, mp->modelgribID, mp->name ? mp->name : "NN"); +} + +static int +modelTxCode(void *modelptr) +{ + (void) modelptr; + return MODEL; +} + +enum +{ + MODEL_PACK_INT_SELF, + MODEL_PACK_INT_INSTID, + MODEL_PACK_INT_MODELGRIBID, + MODEL_PACK_INT_NAMELEN, + modelNints, +}; + +static int +modelGetSizeP(void *modelptr, void *context) +{ + model_t *p = (model_t *) modelptr; + size_t txsize = (size_t) serializeGetSize(modelNints, CDI_DATATYPE_INT, context) + + (size_t) serializeGetSize(p->name ? (int) strlen(p->name) : 0, CDI_DATATYPE_TXT, context); + xassert(txsize <= INT_MAX); + return (int) txsize; +} + +static void +modelPackP(void *modelptr, void *buf, int size, int *position, void *context) +{ + model_t *p = (model_t *) modelptr; + int tempbuf[modelNints]; + tempbuf[MODEL_PACK_INT_SELF] = p->self; + tempbuf[MODEL_PACK_INT_INSTID] = p->instID; + tempbuf[MODEL_PACK_INT_MODELGRIBID] = p->modelgribID; + tempbuf[MODEL_PACK_INT_NAMELEN] = p->name ? (int) strlen(p->name) : 0; + serializePack(tempbuf, modelNints, CDI_DATATYPE_INT, buf, size, position, context); + if (p->name) serializePack(p->name, tempbuf[MODEL_PACK_INT_NAMELEN], CDI_DATATYPE_TXT, buf, size, position, context); +} + +int +modelUnpack(void *buf, int size, int *position, int originNamespace, void *context, int force_id) +{ +#define adaptKey(key) (namespaceAdaptKey((key), originNamespace)) + int tempbuf[modelNints]; + char *name; + serializeUnpack(buf, size, position, tempbuf, modelNints, CDI_DATATYPE_INT, context); + if (tempbuf[MODEL_PACK_INT_NAMELEN] != 0) + { + size_t len = (size_t) tempbuf[MODEL_PACK_INT_NAMELEN]; + name = (char *) Malloc(len + 1); + serializeUnpack(buf, size, position, name, tempbuf[MODEL_PACK_INT_NAMELEN], CDI_DATATYPE_TXT, context); + name[len] = '\0'; + } + else + { + name = (char *) ""; + } + int targetID = adaptKey(tempbuf[MODEL_PACK_INT_SELF]); + model_t *mp = modelNewEntry(force_id ? targetID : CDI_UNDEFID, adaptKey(tempbuf[MODEL_PACK_INT_INSTID]), + tempbuf[MODEL_PACK_INT_MODELGRIBID], name); + if (tempbuf[MODEL_PACK_INT_NAMELEN] != 0) Free(name); + xassert(!force_id || (mp->self == adaptKey(tempbuf[0]))); + reshSetStatus(mp->self, &modelOps, reshGetStatus(mp->self, &modelOps) & ~RESH_SYNC_BIT); +#undef adaptKey + return mp->self; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef STREAM_CDF_POSTDEF_H +#define STREAM_CDF_POSTDEF_H + +#include <stdlib.h> + + +struct cdfPostDefAction +{ + void *data; + void (*action)(void *data); + void (*cleanup)(void *data); +}; + +struct cdfPostDefActionList +{ + size_t size, len; + struct cdfPostDefAction actions[]; +}; + +void cdfPostDefActionGridProp(stream_t *streamptr, int gridID, int ncvarid, enum gridPropInq gridProp, + struct cdfPostDefActionList **delayed); + +typedef void (*cdfFuncPtrPostDefActionGridProp)(stream_t *streamptr, int gridID, int ncvarid, enum gridPropInq gridProp, + struct cdfPostDefActionList **delayed); + +struct cdfPostDefActionList *cdfPostDefActionAdd(struct cdfPostDefActionList *list, struct cdfPostDefAction addendum); + +void cdfDelayedPutVarDeepCleanup(void *data); + +void cdfPostDefActionAddPutVal(struct cdfPostDefActionList **delayed, int fileID, int ncvarid, const double *values, + void (*cleanup)(void *)); + +#endif +#ifdef HAVE_CONFIG_H +#endif + +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 /* PTHREAD_MUTEX_RECURSIVE */ +#endif + +#include <limits.h> +#include <stdio.h> + +#ifdef HAVE_LIBNETCDF +#endif + +static unsigned nNamespaces = 1; +static int activeNamespace = 0; + +#ifdef HAVE_LIBNETCDF +// clang-format off +#define CDI_NETCDF_SWITCHES \ + { .func = (void (*)(void)) nc__create }, \ + { .func = (void (*)(void)) cdf_def_var_serial }, \ + { .func = (void (*)(void)) cdi_nc_enddef_serial }, \ + { .func = (void (*)(void)) cdi_nc__enddef_serial }, \ + { .func = (void (*)(void)) cdfDefTimestep }, \ + { .func = (void (*)(void)) cdfDefCoordinateVars }, \ + { .func = (void (*)(void)) cdfPostDefActionGridProp } +// clang-format on +#else +#define CDI_NETCDF_SWITCHES +#endif + +// clang-format off +#define defaultSwitches { \ + { .func = (void (*)(void)) cdiAbortC_serial }, \ + { .func = (void (*)(void)) cdiWarning }, \ + { .func = (void (*)(void)) serializeGetSizeInCore }, \ + { .func = (void (*)(void)) serializePackInCore }, \ + { .func = (void (*)(void)) serializeUnpackInCore }, \ + { .func = (void (*)(void)) fileOpen_serial }, \ + { .func = (void (*)(void)) fileWrite }, \ + { .func = (void (*)(void)) fileClose_serial }, \ + { .func = (void (*)(void)) cdiStreamOpenDefaultDelegate }, \ + { .func = (void (*)(void)) cdiStreamDefVlist_ }, \ + { .func = (void (*)(void)) cdiStreamSetupVlist_ }, \ + { .func = (void (*)(void)) cdiStreamWriteVar_ }, \ + { .func = (void (*)(void)) cdiStreamWriteVarChunk_ }, \ + { .func = (void (*)(void)) 0 }, \ + { .func = (void (*)(void)) 0 }, \ + { .func = (void (*)(void)) cdiStreamCloseDefaultDelegate }, \ + { .func = (void (*)(void)) cdiStreamDefTimestep_ }, \ + { .func = (void (*)(void)) cdiStreamSync_ }, \ + { .func = (void (*)(void)) cdiVlistDestroy_ }, \ + CDI_NETCDF_SWITCHES \ + } +// clang-format on + +#if defined(SX) || defined(__cplusplus) +static const union namespaceSwitchValue defaultSwitches_[NUM_NAMESPACE_SWITCH] = defaultSwitches; +#endif + +enum namespaceStatus +{ + NAMESPACE_STATUS_INUSE, + NAMESPACE_STATUS_UNUSED, +}; + +static union namespaceSwitchValue initialSwitches[NUM_NAMESPACE_SWITCH] = defaultSwitches; + +static struct Namespace +{ + enum namespaceStatus resStage; + unsigned numSwitches; + union namespaceSwitchValue *switches; +} initialNamespace = { .resStage = NAMESPACE_STATUS_INUSE, .numSwitches = NUM_NAMESPACE_SWITCH, .switches = initialSwitches }; + +static struct Namespace *namespaces = &initialNamespace; + +static unsigned namespacesSize = 1; + +#if defined(HAVE_LIBPTHREAD) +#include <pthread.h> + +static pthread_once_t namespaceOnce = PTHREAD_ONCE_INIT; +static pthread_mutex_t namespaceMutex; + +static void +namespaceInitialize(void) +{ + pthread_mutexattr_t ma; + pthread_mutexattr_init(&ma); + pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&namespaceMutex, &ma); + pthread_mutexattr_destroy(&ma); +} + +#define NAMESPACE_LOCK() pthread_mutex_lock(&namespaceMutex) +#define NAMESPACE_UNLOCK() pthread_mutex_unlock(&namespaceMutex) +#define NAMESPACE_INIT() pthread_once(&namespaceOnce, namespaceInitialize) + +#else + +#define NAMESPACE_INIT() \ + do \ + { \ + } \ + while (0) +#define NAMESPACE_LOCK() +#define NAMESPACE_UNLOCK() + +#endif + +enum +{ + intbits = sizeof(int) * CHAR_BIT, + nspbits = 4, + idxbits = intbits - nspbits, + nspmask = (int) ((((unsigned) 1 << nspbits) - 1) << idxbits), + idxmask = (1 << idxbits) - 1, +}; + +enum +{ + NUM_NAMESPACES = 1 << nspbits, + NUM_IDX = 1 << idxbits, +}; + +int +namespaceIdxEncode(namespaceTuple_t tin) +{ + xassert(tin.nsp < NUM_NAMESPACES && tin.idx < NUM_IDX); + return (tin.nsp << idxbits) + tin.idx; +} + +int +namespaceIdxEncode2(int nsp, int idx) +{ + xassert(nsp < NUM_NAMESPACES && idx < NUM_IDX); + return (nsp << idxbits) + idx; +} + +namespaceTuple_t +namespaceResHDecode(int resH) +{ + namespaceTuple_t tin; + + tin.idx = resH & idxmask; + tin.nsp = (int) (((unsigned) (resH & nspmask)) >> idxbits); + + return tin; +} + +int +namespaceNew() +{ + int newNamespaceID = -1; + NAMESPACE_INIT(); + NAMESPACE_LOCK(); + if (namespacesSize > nNamespaces) + { + /* namespace is already available and only needs reinitialization */ + for (unsigned i = 0; i < namespacesSize; ++i) + if (namespaces[i].resStage == NAMESPACE_STATUS_UNUSED) + { + newNamespaceID = (int) i; + break; + } + } + else if (namespacesSize == 1) + { + /* make room for additional namespace */ + struct Namespace *newNameSpaces = (struct Namespace *) Malloc(((size_t) namespacesSize + 1) * sizeof(namespaces[0])); + memcpy(newNameSpaces, namespaces, sizeof(namespaces[0])); + namespaces = newNameSpaces; + ++namespacesSize; + newNamespaceID = 1; + } + else if (namespacesSize < NUM_NAMESPACES) + { + /* make room for additional namespace */ + newNamespaceID = (int) namespacesSize; + namespaces = (struct Namespace *) Realloc(namespaces, ((size_t) namespacesSize + 1) * sizeof(namespaces[0])); + ++namespacesSize; + } + else /* implicit: namespacesSize >= NUM_NAMESPACES */ + { + NAMESPACE_UNLOCK(); + return -1; + } + xassert(newNamespaceID >= 0 && newNamespaceID < NUM_NAMESPACES); + ++nNamespaces; + namespaces[newNamespaceID].resStage = NAMESPACE_STATUS_INUSE; + namespaces[newNamespaceID].numSwitches = NUM_NAMESPACE_SWITCH; + enum + { + initialNSSWSize = sizeof(union namespaceSwitchValue) * NUM_NAMESPACE_SWITCH + }; + namespaces[newNamespaceID].switches = (union namespaceSwitchValue *) Malloc(initialNSSWSize); +#if defined(SX) || defined(__cplusplus) + memcpy(namespaces[newNamespaceID].switches, defaultSwitches_, initialNSSWSize); +#else + memcpy(namespaces[newNamespaceID].switches, (union namespaceSwitchValue[NUM_NAMESPACE_SWITCH]) defaultSwitches, initialNSSWSize); +#endif + reshListCreate(newNamespaceID); + NAMESPACE_UNLOCK(); + return newNamespaceID; +} + +void +namespaceDelete(int namespaceID) +{ + NAMESPACE_INIT(); + NAMESPACE_LOCK(); + xassert(namespaceID >= 0 && (unsigned) namespaceID < namespacesSize && nNamespaces); + reshListDestruct(namespaceID); + if (namespaces[namespaceID].switches != initialSwitches) Free(namespaces[namespaceID].switches); + namespaces[namespaceID].resStage = NAMESPACE_STATUS_UNUSED; + --nNamespaces; + NAMESPACE_UNLOCK(); +} + +int +namespaceGetNumber() +{ + return (int) nNamespaces; +} + +void +namespaceSetActive(int nId) +{ + xassert((unsigned) nId < namespacesSize && namespaces[nId].resStage != NAMESPACE_STATUS_UNUSED); + activeNamespace = nId; +} + +int +namespaceGetActive() +{ + return activeNamespace; +} + +int +namespaceAdaptKey(int originResH, int originNamespace) +{ + if (originResH == CDI_UNDEFID) return CDI_UNDEFID; + + namespaceTuple_t tin = { .idx = originResH & idxmask, .nsp = (int) (((unsigned) (originResH & nspmask)) >> idxbits) }; + xassert(tin.nsp == originNamespace); + + int nsp = namespaceGetActive(); + + return namespaceIdxEncode2(nsp, tin.idx); +} + +int +namespaceAdaptKey2(int originResH) +{ + + if (originResH == CDI_UNDEFID) return CDI_UNDEFID; + + namespaceTuple_t tin = { .idx = originResH & idxmask, .nsp = (int) (((unsigned) (originResH & nspmask)) >> idxbits) }; + int nsp = namespaceGetActive(); + return namespaceIdxEncode2(nsp, tin.idx); +} + +void +namespaceSwitchSet(int sw, union namespaceSwitchValue value) +{ + xassert(sw > NSSWITCH_NO_SUCH_SWITCH); + int nsp = namespaceGetActive(); + NAMESPACE_LOCK(); + if (namespaces[nsp].numSwitches <= (unsigned) sw) + { + if (namespaces[nsp].switches != initialSwitches) + namespaces[nsp].switches + = (union namespaceSwitchValue *) Realloc(namespaces[nsp].switches, ((unsigned) sw + 1) * sizeof value); + else + { + void *temp = Malloc(((unsigned) sw + 1) * sizeof value); + memcpy(temp, (void *) namespaces[nsp].switches, namespaces[nsp].numSwitches * sizeof value); + namespaces[nsp].switches = (union namespaceSwitchValue *) temp; + } + namespaces[nsp].numSwitches = (unsigned) sw + 1; + } + namespaces[nsp].switches[sw] = value; + NAMESPACE_UNLOCK(); +} + +union namespaceSwitchValue +namespaceSwitchGet(int sw) +{ + int nsp = namespaceGetActive(); + xassert(sw > NSSWITCH_NO_SUCH_SWITCH && (unsigned) sw < namespaces[nsp].numSwitches); + NAMESPACE_LOCK(); + union namespaceSwitchValue sw_val = namespaces[nsp].switches[sw]; + NAMESPACE_UNLOCK(); + return sw_val; +} + +int +cdiNamespaceSwitchNewKey(void) +{ + static unsigned reservedKeys = 0; +#if defined(HAVE_LIBPTHREAD) + static pthread_mutex_t keyMutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_lock(&keyMutex); +#endif + if (reservedKeys >= INT_MAX - NUM_NAMESPACE_SWITCH - 1) Error("pool of available namespace switch keys exhausted!"); + int newKey = (int) (reservedKeys++) + NUM_NAMESPACE_SWITCH; +#if defined(HAVE_LIBPTHREAD) + pthread_mutex_unlock(&keyMutex); +#endif + return newKey; +} + +void +cdiReset(void) +{ + NAMESPACE_INIT(); + NAMESPACE_LOCK(); + for (unsigned namespaceID = 0; namespaceID < namespacesSize; ++namespaceID) + if (namespaces[namespaceID].resStage != NAMESPACE_STATUS_UNUSED) namespaceDelete((int) namespaceID); + if (namespaces != &initialNamespace) + { + Free(namespaces); + namespaces = &initialNamespace; + namespaces[0].resStage = NAMESPACE_STATUS_UNUSED; + } + namespacesSize = 1; + nNamespaces = 0; + NAMESPACE_UNLOCK(); +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + + +void +cdiRefObject_construct(CdiReferencedObject *me) +{ + me->destructor = cdiRefObject_destruct; + me->refCount = 1; +} + +void +cdiRefObject_retain(CdiReferencedObject *me) +{ + size_t oldCount = me->refCount++; + xassert(oldCount && "A reference counted object was used after it was destructed."); +} + +void +cdiRefObject_release(CdiReferencedObject *me) +{ + size_t oldCount = me->refCount--; + xassert(oldCount && "A reference counted object was released too often."); + if (oldCount == 1) + { + me->destructor(me); + Free(me); + } +} + +void +cdiRefObject_destruct(CdiReferencedObject *me) +{ + (void) me; + /* Empty for now, but that's no reason not to call it! */ +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 /* PTHREAD_MUTEX_RECURSIVE */ +#endif + +#include <stdlib.h> +#include <stdio.h> +#include <assert.h> + +#if defined(HAVE_EXECINFO_H) +#include <execinfo.h> +#endif + +static void +show_stackframe() +{ +#if defined HAVE_EXECINFO_H && defined backtrace_size_t && defined HAVE_BACKTRACE + void *trace[16]; + backtrace_size_t trace_size = backtrace(trace, 16); + char **messages = backtrace_symbols(trace, trace_size); + + fprintf(stderr, "[bt] Execution path:\n"); + if (messages) + { + for (backtrace_size_t i = 0; i < trace_size; ++i) fprintf(stderr, "[bt] %s\n", messages[i]); + free(messages); + } +#endif +} + + +enum +{ + MIN_LIST_SIZE = 128 +}; + +static void listInitialize(void); + +typedef struct listElem +{ + union + { + /* free-list management data */ + struct + { + int next, prev; + } free; + /* holding an actual value */ + struct + { + const resOps *ops; + void *val; // ptr + } v; + } res; + int status; +} listElem_t; + +struct resHList_t +{ + int size, freeHead, hasDefaultRes; + listElem_t *resources; +}; + +static struct resHList_t *resHList; + +static int resHListSize = 0; + +#if defined(HAVE_LIBPTHREAD) +#include <pthread.h> + +static pthread_once_t listInitThread = PTHREAD_ONCE_INIT; +static pthread_mutex_t listMutex; + +#define LIST_LOCK() pthread_mutex_lock(&listMutex) +#define LIST_UNLOCK() pthread_mutex_unlock(&listMutex) +#define LIST_INIT(init0) \ + do \ + { \ + pthread_once(&listInitThread, listInitialize); \ + pthread_mutex_lock(&listMutex); \ + if ((init0) && (!resHList || !resHList[0].resources)) reshListCreate(0); \ + pthread_mutex_unlock(&listMutex); \ + } \ + while (0) + +#else + +static int listInit = 0; + +#define LIST_LOCK() +#define LIST_UNLOCK() +#define LIST_INIT(init0) \ + do \ + { \ + if (!listInit) \ + { \ + listInitialize(); \ + if ((init0) && (!resHList || !resHList[0].resources)) reshListCreate(0); \ + listInit = 1; \ + } \ + } \ + while (0) + +#endif + +#ifdef CDI_CHECK_RESOURCE_LISTS +static void +checkListLinear(const char *caller, int nsp) +{ + const listElem_t *restrict r = resHList[nsp].resources; + for (int i = 0; i < resHList[nsp].size; i++) + { + if (r[i].status != RESH_UNUSED) continue; + + int prev = r[i].res.free.prev; + int next = r[i].res.free.next; + + if (prev < -1 || prev >= resHList[nsp].size) xabortC(caller, "error: found invalid back-link in free-list!"); + if (prev != -1) + { + if (r[prev].res.free.next != i) xabortC(caller, "error: found incomplete back link in free-list!"); + if (r[prev].status & RESH_IN_USE_BIT) xabortC(caller, "error: found in-use back link element in free-list!"); + } + + if (next < -1 || next >= resHList[nsp].size) xabortC(caller, "error: found invalid forward-link in free-list!"); + if (next != -1) + { + if (r[next].res.free.prev != i) xabortC(caller, "error: found incomplete forward link in free-list!"); + if (r[next].status & RESH_IN_USE_BIT) xabortC(caller, "error: found in-use next element in free-list!"); + } + } +} + +static void +checkListFwdBwd(const char *caller, int nsp) +{ + const listElem_t *restrict r = resHList[nsp].resources; + + int next = resHList[nsp].freeHead, loopLimit = resHList[nsp].size + 1; + int i = 0, cur = -1; + while (next != -1) + { + if (next < 0 || next >= resHList[nsp].size) xabortC(caller, "error: found invalid index in free-list!"); + if (r[next].status & RESH_IN_USE_BIT) xabortC(caller, "error: found in-use next element in free-list!"); + + cur = next; + next = r[next].res.free.next; + + if (++i > loopLimit) xabortC(caller, "error: found loop in free-list!"); + } + + i = 0; + int prev = cur; + while (prev != -1) + { + if (prev < 0 || prev >= resHList[nsp].size) xabortC(caller, "error: found invalid index in free-list!"); + if (r[prev].status & RESH_IN_USE_BIT) xabortC(caller, "error: found in-use prev element in free-list!"); + + cur = prev; + prev = r[prev].res.free.prev; + + if (prev == -1) break; + + if (++i > loopLimit) xabortC(caller, "error: found loop in free-list!"); + } +} + +static void +checkList(const char *caller, int nsp) +{ + checkListLinear(caller, nsp); + checkListFwdBwd(caller, nsp); +} +#else +#define checkList(caller, nsp) +#endif + +/**************************************************************/ + +static void +listInitResources(int nsp) +{ + xassert(nsp < resHListSize && nsp >= 0); + int size = resHList[nsp].size = MIN_LIST_SIZE; + xassert(resHList[nsp].resources == NULL); + resHList[nsp].resources = (listElem_t *) Calloc(MIN_LIST_SIZE, sizeof(listElem_t)); + listElem_t *p = resHList[nsp].resources; + + for (int i = 0; i < size; i++) + { + p[i].res.free.next = i + 1; + p[i].res.free.prev = i - 1; + p[i].status = RESH_UNUSED; + } + p[size - 1].res.free.next = -1; + resHList[nsp].freeHead = 0; + + checkList(__func__, nsp); + + int oldNsp = namespaceGetActive(); + namespaceSetActive(nsp); + instituteDefaultEntries(); + modelDefaultEntries(); + namespaceSetActive(oldNsp); +} + +static inline void +reshListClearEntry(int i) +{ + resHList[i].size = 0; + resHList[i].resources = NULL; + resHList[i].freeHead = -1; +} + +void +reshListCreate(int namespaceID) +{ + LIST_INIT(namespaceID != 0); + LIST_LOCK(); + if (resHListSize <= namespaceID) + { + resHList = (struct resHList_t *) Realloc(resHList, (size_t) (namespaceID + 1) * sizeof(resHList[0])); + for (int i = resHListSize; i <= namespaceID; ++i) reshListClearEntry(i); + resHListSize = namespaceID + 1; + } + listInitResources(namespaceID); + LIST_UNLOCK(); +} + +/**************************************************************/ +static void reshRemove_(int nsp, int idx, const char *caller); + +void +reshListDestruct(int namespaceID) +{ + LIST_LOCK(); + xassert(resHList && namespaceID >= 0 && namespaceID < resHListSize); + int callerNamespaceID = namespaceGetActive(); + namespaceSetActive(namespaceID); + if (resHList[namespaceID].resources) + { + for (int j = 0; j < resHList[namespaceID].size; j++) + { + listElem_t *listElem = resHList[namespaceID].resources + j; + if (listElem->status & RESH_IN_USE_BIT) + { + listElem->res.v.ops->valDestroy(listElem->res.v.val); + reshRemove_(namespaceID, j, __func__); + } + } + Free(resHList[namespaceID].resources); + resHList[namespaceID].resources = NULL; + reshListClearEntry(namespaceID); + } + if (resHList[callerNamespaceID].resources) namespaceSetActive(callerNamespaceID); + LIST_UNLOCK(); +} + +static void +listDestroy(void) +{ + LIST_LOCK(); + for (int i = resHListSize; i > 0; --i) + if (resHList[i - 1].resources) namespaceDelete(i - 1); + resHListSize = 0; + Free(resHList); + resHList = NULL; + cdiReset(); + LIST_UNLOCK(); +} + +/**************************************************************/ + +static void +listInitialize(void) +{ +#if defined(HAVE_LIBPTHREAD) + pthread_mutexattr_t ma; + pthread_mutexattr_init(&ma); + pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE); + /* initialize global API mutex lock */ + pthread_mutex_init(&listMutex, &ma); + pthread_mutexattr_destroy(&ma); +#endif + /* file is special and has its own table, which needs to be + * created, before we register the listDestroy exit handler */ + { + int null_id; + null_id = fileOpen_serial("/dev/null", "r"); + if (null_id != -1) fileClose_serial(null_id); + } + atexit(listDestroy); +} + +/**************************************************************/ + +static void +listSizeExtend(void) +{ + int nsp = namespaceGetActive(); + checkList(__func__, nsp); + int oldSize = resHList[nsp].size; + size_t newListSize = (size_t) oldSize + MIN_LIST_SIZE; + + resHList[nsp].resources = (listElem_t *) Realloc(resHList[nsp].resources, newListSize * sizeof(listElem_t)); + + listElem_t *r = resHList[nsp].resources; + for (size_t i = (size_t) oldSize; i < newListSize; ++i) + { + r[i].res.free.next = (int) i + 1; + r[i].res.free.prev = (int) i - 1; + r[i].status = RESH_UNUSED; + } + + if (resHList[nsp].freeHead != -1) r[resHList[nsp].freeHead].res.free.prev = (int) newListSize - 1; + r[newListSize - 1].res.free.next = resHList[nsp].freeHead; + r[oldSize].res.free.prev = -1; + resHList[nsp].freeHead = oldSize; + resHList[nsp].size = (int) newListSize; + + checkList(__func__, nsp); +} + +/**************************************************************/ + +static void +reshPut_(int nsp, int entry, void *p, const resOps *ops) +{ + checkList(__func__, nsp); + + listElem_t *newListElem = resHList[nsp].resources + entry; + int next = newListElem->res.free.next, prev = newListElem->res.free.prev; + if (next != -1) resHList[nsp].resources[next].res.free.prev = prev; + if (prev != -1) + resHList[nsp].resources[prev].res.free.next = next; + else + resHList[nsp].freeHead = next; + newListElem->res.v.val = p; + newListElem->res.v.ops = ops; + newListElem->status = RESH_DESYNC_IN_USE; + + checkList(__func__, nsp); +} + +int +reshPut(void *p, const resOps *ops) +{ + xassert(p && ops); + + LIST_INIT(1); + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + + if (resHList[nsp].freeHead == -1) listSizeExtend(); + int entry = resHList[nsp].freeHead; + cdiResH resH = namespaceIdxEncode2(nsp, entry); + reshPut_(nsp, entry, p, ops); + + LIST_UNLOCK(); + + return resH; +} + +/**************************************************************/ + +static void +reshRemove_(int nsp, int idx, const char *caller) +{ + checkList(__func__, nsp); + + int curFree = resHList[nsp].freeHead; + listElem_t *r = resHList[nsp].resources; + if (!(r[idx].status & RESH_IN_USE_BIT)) xabortC(caller, "Attempting to remove an item that is already removed."); + r[idx].res.free.next = curFree; + r[idx].res.free.prev = -1; + if (curFree != -1) r[curFree].res.free.prev = idx; + r[idx].status = RESH_DESYNC_DELETED; + resHList[nsp].freeHead = idx; + + checkList(__func__, nsp); +} + +void +reshDestroy(cdiResH resH) +{ + int nsp; + namespaceTuple_t nspT; + + LIST_LOCK(); + + nsp = namespaceGetActive(); + + nspT = namespaceResHDecode(resH); + + listElem_t *r = resHList[nsp].resources + nspT.idx; + + xassert(nspT.nsp == nsp && nspT.idx >= 0 && nspT.idx < resHList[nsp].size && r->res.v.ops); + + if (r->status & RESH_IN_USE_BIT) + { + r->res.v.ops->valDestroy(r->res.v.val); + reshRemove_(nsp, nspT.idx, __func__); + } + + LIST_UNLOCK(); +} + +void +reshRemove(cdiResH resH, const resOps *ops) +{ + int nsp; + namespaceTuple_t nspT; + + LIST_LOCK(); + + nsp = namespaceGetActive(); + + nspT = namespaceResHDecode(resH); + + xassert(nspT.nsp == nsp && nspT.idx >= 0 && nspT.idx < resHList[nsp].size + && (resHList[nsp].resources[nspT.idx].status & RESH_IN_USE_BIT) && resHList[nsp].resources[nspT.idx].res.v.ops + && resHList[nsp].resources[nspT.idx].res.v.ops == ops); + + reshRemove_(nsp, nspT.idx, __func__); + + LIST_UNLOCK(); +} + +/**************************************************************/ + +void +reshReplace(cdiResH resH, void *p, const resOps *ops) +{ + xassert(p && ops); + LIST_INIT(1); + LIST_LOCK(); + int nsp = namespaceGetActive(); + + checkList(__func__, nsp); + + namespaceTuple_t nspT = namespaceResHDecode(resH); + while (resHList[nsp].size <= nspT.idx) listSizeExtend(); + listElem_t *q = resHList[nsp].resources + nspT.idx; + if (q->status & RESH_IN_USE_BIT) + { + q->res.v.ops->valDestroy(q->res.v.val); + reshRemove_(nsp, nspT.idx, __func__); + } + reshPut_(nsp, nspT.idx, p, ops); + LIST_UNLOCK(); + + checkList(__func__, nsp); +} + +static listElem_t * +reshGetElem(const char *caller, const char *expressionString, cdiResH resH, const resOps *ops) +{ + listElem_t *listElem; + xassert(ops); + + LIST_INIT(1); + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + + namespaceTuple_t nspT = namespaceResHDecode(resH); + assert(nspT.idx >= 0); + + if (nspT.nsp == nsp && nspT.idx < resHList[nsp].size) + { + listElem = resHList[nsp].resources + nspT.idx; + LIST_UNLOCK(); + } + else + { + LIST_UNLOCK(); + show_stackframe(); + + if (resH == CDI_UNDEFID) + { + xabortC(caller, + "Error while trying to resolve the ID \"%s\" in `%s()`: the value is CDI_UNDEFID (= %d).\n\tThis is most likely " + "the result of a failed earlier call. Please check the IDs returned by CDI.", + expressionString, caller, resH); + } + else + { + xabortC(caller, + "Error while trying to resolve the ID \"%s\" in `%s()`: the value is garbage (= %d, which resolves to namespace " + "= %d, index = %d).\n\tThis is either the result of using an uninitialized variable,\n\tof using a value as an " + "ID that is not an ID,\n\tor of using an ID after it has been invalidated.", + expressionString, caller, resH, nspT.nsp, nspT.idx); + } + } + + if (!(listElem && listElem->res.v.ops == ops)) + { + show_stackframe(); + + xabortC(caller, "Error while trying to resolve the ID \"%s\" in `%s()`: list element not found. The failed ID is %d", + expressionString, caller, (int) resH); + } + + return listElem; +} + +void * +reshGetValue(const char *caller, const char *expressionString, cdiResH resH, const resOps *ops) +{ + return reshGetElem(caller, expressionString, resH, ops)->res.v.val; +} + +/**************************************************************/ + +void +reshGetResHListOfType(unsigned numIDs, int resHs[], const resOps *ops) +{ + xassert(resHs && ops); + + LIST_INIT(1); + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + unsigned j = 0; + for (int i = 0; i < resHList[nsp].size && j < numIDs; i++) + if ((resHList[nsp].resources[i].status & RESH_IN_USE_BIT) && resHList[nsp].resources[i].res.v.ops == ops) + resHs[j++] = namespaceIdxEncode2(nsp, i); + + LIST_UNLOCK(); +} + +enum cdiApplyRet +cdiResHApply(enum cdiApplyRet (*func)(int id, void *res, const resOps *p, void *data), void *data) +{ + xassert(func); + + LIST_INIT(1); + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + enum cdiApplyRet ret = CDI_APPLY_GO_ON; + for (int i = 0; i < resHList[nsp].size && ret > 0; ++i) + if (resHList[nsp].resources[i].status & RESH_IN_USE_BIT) + ret = func(namespaceIdxEncode2(nsp, i), resHList[nsp].resources[i].res.v.val, resHList[nsp].resources[i].res.v.ops, data); + LIST_UNLOCK(); + return ret; +} + +enum cdiApplyRet +cdiResHFilterApply(const resOps *p, enum cdiApplyRet (*func)(int id, void *res, void *data), void *data) +{ + xassert(p && func); + + LIST_INIT(1); + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + enum cdiApplyRet ret = CDI_APPLY_GO_ON; + listElem_t *r = resHList[nsp].resources; + for (int i = 0; i < resHList[nsp].size && ret > 0; ++i) + if ((r[i].status & RESH_IN_USE_BIT) && r[i].res.v.ops == p) ret = func(namespaceIdxEncode2(nsp, i), r[i].res.v.val, data); + LIST_UNLOCK(); + return ret; +} + +/**************************************************************/ + +unsigned +reshCountType(const resOps *ops) +{ + unsigned countType = 0; + + xassert(ops); + + LIST_INIT(1); + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + + listElem_t *r = resHList[nsp].resources; + size_t len = (size_t) resHList[nsp].size; + for (size_t i = 0; i < len; i++) countType += ((r[i].status & RESH_IN_USE_BIT) && r[i].res.v.ops == ops); + + LIST_UNLOCK(); + + return countType; +} + +/**************************************************************/ + +int +reshResourceGetPackSize_intern(int resH, const resOps *ops, void *context, const char *caller, const char *expressionString) +{ + listElem_t *curr = reshGetElem(caller, expressionString, resH, ops); + return curr->res.v.ops->valGetPackSize(curr->res.v.val, context); +} + +void +reshPackResource_intern(int resH, const resOps *ops, void *buf, int buf_size, int *position, void *context, const char *caller, + const char *expressionString) +{ + listElem_t *curr = reshGetElem(caller, expressionString, resH, ops); + curr->res.v.ops->valPack(curr->res.v.val, buf, buf_size, position, context); +} + +enum +{ + resHPackHeaderNInt = 2, + resHDeleteNInt = 2, +}; + +static int +getPackBufferSize(void *context) +{ + int intpacksize, packBufferSize = 0; + + int nsp = namespaceGetActive(); + + /* pack start marker, namespace and sererator marker */ + packBufferSize += resHPackHeaderNInt * (intpacksize = serializeGetSize(1, CDI_DATATYPE_INT, context)); + + /* pack resources, type marker and seperator marker */ + listElem_t *r = resHList[nsp].resources; + for (int i = 0; i < resHList[nsp].size; i++) + if (r[i].status & RESH_SYNC_BIT) + { + if (r[i].status == RESH_DESYNC_DELETED) + { + packBufferSize += resHDeleteNInt * intpacksize; + } + else if (r[i].status == RESH_DESYNC_IN_USE) + { + xassert(r[i].res.v.ops); + /* packed resource plus 1 int for type */ + packBufferSize += r[i].res.v.ops->valGetPackSize(r[i].res.v.val, context) + intpacksize; + } + } + /* end marker */ + packBufferSize += intpacksize; + + return packBufferSize; +} + +/**************************************************************/ + +void +reshPackBufferDestroy(char **buffer) +{ + if (buffer) free(*buffer); +} + +/**************************************************************/ + +int +reshGetTxCode(cdiResH resH) +{ + int type = 0; + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + + namespaceTuple_t nspT = namespaceResHDecode(resH); + assert(nspT.idx >= 0); + + if (nspT.nsp == nsp && nspT.idx < resHList[nsp].size) + { + listElem_t *listElem = resHList[nsp].resources + nspT.idx; + xassert(listElem->res.v.ops); + type = listElem->res.v.ops->valTxCode(listElem->res.v.val); + } + + LIST_UNLOCK(); + + return type; +} + +/**************************************************************/ + +int +reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context) +{ + int packBufferPos = 0; + int end = END; + + xassert(packBuffer); + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + + int pBSize = *packBufferSize = getPackBufferSize(context); + char *pB = *packBuffer = (char *) Malloc((size_t) pBSize); + + { + int header[resHPackHeaderNInt] = { START, nsp }; + serializePack(header, resHPackHeaderNInt, CDI_DATATYPE_INT, pB, pBSize, &packBufferPos, context); + } + + listElem_t *r = resHList[nsp].resources; + for (int i = 0; i < resHList[nsp].size; i++) + if (r[i].status & RESH_SYNC_BIT) + { + if (r[i].status == RESH_DESYNC_DELETED) + { + int temp[resHDeleteNInt] = { RESH_DELETE, namespaceIdxEncode2(nsp, i) }; + serializePack(temp, resHDeleteNInt, CDI_DATATYPE_INT, pB, pBSize, &packBufferPos, context); + } + else + { + listElem_t *curr = r + i; + xassert(curr->res.v.ops); + int type = curr->res.v.ops->valTxCode(curr->res.v.val); + if (!type) continue; + serializePack(&type, 1, CDI_DATATYPE_INT, pB, pBSize, &packBufferPos, context); + curr->res.v.ops->valPack(curr->res.v.val, pB, pBSize, &packBufferPos, context); + } + r[i].status &= ~RESH_SYNC_BIT; + } + + LIST_UNLOCK(); + + serializePack(&end, 1, CDI_DATATYPE_INT, pB, pBSize, &packBufferPos, context); + + return packBufferPos; +} + +/**************************************************************/ + +/* for thread safety this feature would have to be integrated in reshPut */ + +void +reshSetStatus(cdiResH resH, const resOps *ops, int status) +{ + int nsp; + namespaceTuple_t nspT; + listElem_t *listElem; + + LIST_INIT(1); + + LIST_LOCK(); + + nsp = namespaceGetActive(); + + nspT = namespaceResHDecode(resH); + + xassert(nspT.nsp == nsp && nspT.idx >= 0 && nspT.idx < resHList[nsp].size); + + xassert(resHList[nsp].resources); + listElem = resHList[nsp].resources + nspT.idx; + + xassert((!ops || (listElem->res.v.ops == ops)) && (listElem->status & RESH_IN_USE_BIT) == (status & RESH_IN_USE_BIT)); + + listElem->status = status; + + LIST_UNLOCK(); +} + +/**************************************************************/ + +int +reshGetStatus(cdiResH resH, const resOps *ops) +{ + LIST_INIT(1); + + LIST_LOCK(); + + int nsp = namespaceGetActive(); + + namespaceTuple_t nspT = namespaceResHDecode(resH); + + xassert(nspT.nsp == nsp && nspT.idx >= 0); + + int status = RESH_UNUSED; + if (nspT.idx < resHList[nsp].size) + { + listElem_t *listElem = resHList[nsp].resources + nspT.idx; + const resOps *elemOps = listElem->res.v.ops; + xassert(listElem && (!(listElem->status & RESH_IN_USE_BIT) || elemOps == ops || !ops)); + status = listElem->status; + } + + LIST_UNLOCK(); + + return status; +} + +/**************************************************************/ + +void +reshLock() +{ + LIST_LOCK(); +} + +/**************************************************************/ + +void +reshUnlock() +{ + LIST_UNLOCK(); +} + +/**************************************************************/ + +int +reshListCompare(int nsp0, int nsp1) +{ + LIST_INIT(1); + LIST_LOCK(); + + xassert(resHListSize > nsp0 && resHListSize > nsp1 && nsp0 >= 0 && nsp1 >= 0); + + int valCompare = 0; + int i, listSizeMin = (resHList[nsp0].size <= resHList[nsp1].size) ? resHList[nsp0].size : resHList[nsp1].size; + listElem_t *resources0 = resHList[nsp0].resources, *resources1 = resHList[nsp1].resources; + for (i = 0; i < listSizeMin; i++) + { + int occupied0 = (resources0[i].status & RESH_IN_USE_BIT) != 0, occupied1 = (resources1[i].status & RESH_IN_USE_BIT) != 0; + /* occupation mismatch ? */ + int diff = occupied0 ^ occupied1; + valCompare |= (diff << cdiResHListOccupationMismatch); + if (!diff && occupied0) + { + /* both occupied, do resource types match? */ + diff = (resources0[i].res.v.ops != resources1[i].res.v.ops || resources0[i].res.v.ops == NULL); + valCompare |= (diff << cdiResHListResourceTypeMismatch); + if (!diff) + { + /* types match, does content match also? */ + diff = resources0[i].res.v.ops->valCompare(resources0[i].res.v.val, resources1[i].res.v.val); + valCompare |= (diff << cdiResHListResourceContentMismatch); + } + } + } + /* find resources in nsp 0 beyond end of nsp 1 */ + for (int j = listSizeMin; j < resHList[nsp0].size; ++j) + valCompare |= (((resources0[j].status & RESH_IN_USE_BIT) != 0) << cdiResHListOccupationMismatch); + /* find resources in nsp 1 beyond end of nsp 0 */ + for (; i < resHList[nsp1].size; ++i) + valCompare |= (((resources1[i].status & RESH_IN_USE_BIT) != 0) << cdiResHListOccupationMismatch); + + LIST_UNLOCK(); + + return valCompare; +} + +/**************************************************************/ + +void +reshListPrint(FILE *fp) +{ + int i, j, temp; + listElem_t *curr; + + LIST_INIT(1); + + temp = namespaceGetActive(); + + fprintf(fp, "\n\n##########################################\n#\n# print " + "global resource list \n#\n"); + + for (i = 0; i < namespaceGetNumber(); i++) + { + namespaceSetActive(i); + + fprintf(fp, "\n"); + fprintf(fp, "##################################\n"); + fprintf(fp, "#\n"); + fprintf(fp, "# namespace=%d\n", i); + fprintf(fp, "#\n"); + fprintf(fp, "##################################\n\n"); + + fprintf(fp, "resHList[%d].size=%d\n", i, resHList[i].size); + + for (j = 0; j < resHList[i].size; j++) + { + curr = resHList[i].resources + j; + if (!(curr->status & RESH_IN_USE_BIT)) + { + curr->res.v.ops->valPrint(curr->res.v.val, fp); + fprintf(fp, "\n"); + } + } + } + fprintf(fp, "#\n# end global resource list" + "\n#\n##########################################\n\n"); + + namespaceSetActive(temp); +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <inttypes.h> +#include <limits.h> +#include <string.h> + + +int +serializeGetSize(int count, int datatype, void *context) +{ + int (*serialize_get_size_p)(int count, int datatype, void *context) + = (int (*)(int, int, void *)) namespaceSwitchGet(NSSWITCH_SERIALIZE_GET_SIZE).func; + return serialize_get_size_p(count, datatype, context); +} + +void +serializePack(const void *data, int count, int datatype, void *buf, int buf_size, int *position, void *context) +{ + void (*serialize_pack_p)(const void *data, int count, int datatype, void *buf, int buf_size, int *position, void *context) + = (void (*)(const void *, int, int, void *, int, int *, void *)) namespaceSwitchGet(NSSWITCH_SERIALIZE_PACK).func; + serialize_pack_p(data, count, datatype, buf, buf_size, position, context); +} + +void +serializeUnpack(const void *buf, int buf_size, int *position, void *data, int count, int datatype, void *context) +{ + void (*serialize_unpack_p)(const void *buf, int buf_size, int *position, void *data, int count, int datatype, void *context) + = (void (*)(const void *, int, int *, void *, int, int, void *)) namespaceSwitchGet(NSSWITCH_SERIALIZE_UNPACK).func; + serialize_unpack_p(buf, buf_size, position, data, count, datatype, context); +} + +int +serializeGetSizeInCore(int count, int datatype, void *context) +{ + int elemSize; + (void) context; + switch (datatype) + { + case CDI_DATATYPE_INT8: elemSize = sizeof(int8_t); break; + case CDI_DATATYPE_INT16: elemSize = sizeof(int16_t); break; + case CDI_DATATYPE_UINT32: elemSize = sizeof(uint32_t); break; + case CDI_DATATYPE_INT: elemSize = sizeof(int); break; + case CDI_DATATYPE_UINT: elemSize = sizeof(unsigned); break; + case CDI_DATATYPE_FLT: + case CDI_DATATYPE_FLT64: elemSize = sizeof(double); break; + case CDI_DATATYPE_TXT: + case CDI_DATATYPE_UCHAR: elemSize = 1; break; + case CDI_DATATYPE_LONG: elemSize = sizeof(long); break; + default: xabort("Unexpected datatype"); + } + return count * elemSize; +} + +void +serializePackInCore(const void *data, int count, int datatype, void *buf, int buf_size, int *position, void *context) +{ + int size = serializeGetSize(count, datatype, context); + int pos = *position; + xassert(INT_MAX - pos >= size && buf_size - pos >= size); + memcpy((unsigned char *) buf + pos, data, (size_t) size); + pos += size; + *position = pos; +} + +void +serializeUnpackInCore(const void *buf, int buf_size, int *position, void *data, int count, int datatype, void *context) +{ + int size = serializeGetSize(count, datatype, context); + int pos = *position; + xassert(INT_MAX - pos >= size && buf_size - pos >= size); + memcpy(data, (unsigned char *) buf + pos, (size_t) size); + pos += size; + *position = pos; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <ctype.h> + + +enum +{ + SRV_HEADER_LEN = 8, +}; + +union SRV_HEADER +{ + INT32 i32[SRV_HEADER_LEN]; + INT64 i64[SRV_HEADER_LEN]; +}; + +static int initSrvLib = 0; +static int srvDefaultHprec = 0; +static int srvDefaultDprec = 0; + +// A version string. +#undef LIBVERSION +#define LIBVERSION 1.5.0 +#define XSTRING(x) #x +#define STRING(x) XSTRING(x) +static const char srv_libvers[] = STRING(LIBVERSION); + +const char * +srvLibraryVersion(void) +{ + return srv_libvers; +} + +static int SRV_Debug = 0; // If set to 1, debugging + +void +srvDebug(int debug) +{ + if (debug) Message("debug level %d", debug); + SRV_Debug = debug; +} + +static void +srvLibInit() +{ + const char *envName = "SRV_PRECISION"; + + char *envString = getenv(envName); + if (envString) + { + int nrun = (strlen(envString) == 2) ? 1 : 2; + int pos = 0; + while (nrun--) + { + switch (tolower((int) envString[pos])) + { + case 'i': + { + switch ((int) envString[pos + 1]) + { + case '4': srvDefaultHprec = EXSE_SINGLE_PRECISION; break; + case '8': srvDefaultHprec = EXSE_DOUBLE_PRECISION; break; + default: Warning("Invalid digit in %s: %s", envName, envString); + } + break; + } + case 'r': + { + switch ((int) envString[pos + 1]) + { + case '4': srvDefaultDprec = EXSE_SINGLE_PRECISION; break; + case '8': srvDefaultDprec = EXSE_DOUBLE_PRECISION; break; + default: Warning("Invalid digit in %s: %s", envName, envString); + } + break; + } + default: + { + Warning("Invalid character in %s: %s", envName, envString); + break; + } + } + pos += 2; + } + } + + initSrvLib = 1; +} + +static void +srvInit(srvrec_t *srvp) +{ + srvp->checked = 0; + srvp->byteswap = 0; + srvp->hprec = 0; + srvp->dprec = 0; + srvp->datasize = 0; + srvp->buffersize = 0; + srvp->buffer = NULL; +} + +void * +srvNew(void) +{ + if (!initSrvLib) srvLibInit(); + + srvrec_t *srvp = (srvrec_t *) Malloc(sizeof(srvrec_t)); + srvInit(srvp); + + return (void *) srvp; +} + +void +srvDelete(void *srv) +{ + srvrec_t *srvp = (srvrec_t *) srv; + + if (srvp) + { + if (srvp->buffer) Free(srvp->buffer); + Free(srvp); + } +} + +int +srvCheckFiletype(int fileID, int *swap) +{ + size_t data = 0; + size_t dimx = 0, dimy = 0; + size_t fact = 0; + unsigned char buffer[72], *pbuf; + + if (fileRead(fileID, buffer, 4) != 4) return 0; + + size_t blocklen = (size_t) get_UINT32(buffer); + size_t sblocklen = (size_t) get_SUINT32(buffer); + + if (SRV_Debug) Message("blocklen = %d sblocklen = %d", blocklen, sblocklen); + + // clang-format off + if (blocklen == 32) + { + *swap = 0; + fact = blocklen>>3; + if (fileRead(fileID, buffer, blocklen+8) != blocklen+8) return 0; + pbuf = buffer+4*fact; dimx = (size_t) get_UINT32(pbuf); + pbuf = buffer+5*fact; dimy = (size_t) get_UINT32(pbuf); + pbuf = buffer+blocklen+4; data = (size_t) get_UINT32(pbuf); + } + else if (blocklen == 64) + { + *swap = 0; + fact = blocklen>>3; + if (fileRead(fileID, buffer, blocklen+8) != blocklen+8) return 0; + pbuf = buffer+4*fact; dimx = (size_t) get_UINT64(pbuf); + pbuf = buffer+5*fact; dimy = (size_t) get_UINT64(pbuf); + pbuf = buffer+blocklen+4; data = (size_t) get_UINT32(pbuf); + } + else if (sblocklen == 32) + { + *swap = 1; + fact = sblocklen>>3; + if (fileRead(fileID, buffer, sblocklen+8) != sblocklen+8) return 0; + pbuf = buffer+4*fact; dimx = (size_t) get_SUINT32(pbuf); + pbuf = buffer+5*fact; dimy = (size_t) get_SUINT32(pbuf); + pbuf = buffer+sblocklen+4; data = (size_t) get_SUINT32(pbuf); + } + else if (sblocklen == 64) + { + *swap = 1; + fact = sblocklen>>3; + if (fileRead(fileID, buffer, sblocklen+8) != sblocklen+8) return 0; + pbuf = buffer+4*fact; dimx = (size_t) get_SUINT64(pbuf); + pbuf = buffer+5*fact; dimy = (size_t) get_SUINT64(pbuf); + pbuf = buffer+sblocklen+4; data = (size_t) get_SUINT32(pbuf); + } + // clang-format on + + fileRewind(fileID); + + if (SRV_Debug) Message("swap = %d fact = %d", *swap, fact); + if (SRV_Debug) Message("dimx = %lu dimy = %lu data = %lu", dimx, dimy, data); + + int found = data && (dimx * dimy * fact == data || dimx * dimy * 8 == data); + return found; +} + +int +srvInqHeader(void *srv, int *header) +{ + srvrec_t *srvp = (srvrec_t *) srv; + + for (int i = 0; i < SRV_HEADER_LEN; i++) header[i] = srvp->header[i]; + + if (SRV_Debug) Message("datasize = %lu", srvp->datasize); + + return 0; +} + +int +srvDefHeader(void *srv, const int *header) +{ + srvrec_t *srvp = (srvrec_t *) srv; + + for (int i = 0; i < SRV_HEADER_LEN; i++) srvp->header[i] = header[i]; + + srvp->datasize = (size_t) header[4] * (size_t) header[5]; + + if (SRV_Debug) Message("datasize = %zu", srvp->datasize); + + return 0; +} + +static int +srvInqData(srvrec_t *srvp, int prec, void *data) +{ + int ierr = 0; + int byteswap = srvp->byteswap; + size_t datasize = srvp->datasize; + void *buffer = srvp->buffer; + int dprec = srvp->dprec; + + switch (dprec) + { + case EXSE_SINGLE_PRECISION: + { + if (sizeof(FLT32) == 4) + { + if (byteswap) swap4byte(buffer, datasize); + + if (dprec == prec) + memcpy(data, buffer, datasize * sizeof(FLT32)); + else + for (size_t i = 0; i < datasize; i++) ((double *) data)[i] = (double) ((float *) buffer)[i]; + } + else + { + Error("not implemented for %d byte float", sizeof(FLT32)); + } + break; + } + case EXSE_DOUBLE_PRECISION: + if (sizeof(FLT64) == 8) + { + if (byteswap) swap8byte(buffer, datasize); + + if (dprec == prec) + memcpy(data, buffer, datasize * sizeof(FLT64)); + else + for (size_t i = 0; i < datasize; i++) ((float *) data)[i] = (float) ((double *) buffer)[i]; + } + else + { + Error("not implemented for %d byte float", sizeof(FLT64)); + } + break; + default: + { + Error("unexpected data precision %d", dprec); + break; + } + } + + return ierr; +} + +int +srvInqDataSP(void *srv, float *data) +{ + return srvInqData((srvrec_t *) srv, EXSE_SINGLE_PRECISION, (void *) data); +} + +int +srvInqDataDP(void *srv, double *data) +{ + return srvInqData((srvrec_t *) srv, EXSE_DOUBLE_PRECISION, (void *) data); +} + +static int +srvDefData(void *srv, int prec, const void *data) +{ + srvrec_t *srvp = (srvrec_t *) srv; + + int dprec = srvDefaultDprec ? srvDefaultDprec : srvp->dprec; + srvp->dprec = dprec ? dprec : prec; + + int hprec = srvDefaultHprec ? srvDefaultHprec : srvp->hprec; + srvp->hprec = hprec ? hprec : dprec; + + int *header = srvp->header; + + size_t datasize = (size_t) header[4] * (size_t) header[5]; + size_t blocklen = datasize * (size_t) dprec; + + srvp->datasize = datasize; + + if (srvp->buffersize != blocklen) + { + srvp->buffersize = blocklen; + srvp->buffer = Realloc(srvp->buffer, srvp->buffersize); + } + + switch (dprec) + { + case EXSE_SINGLE_PRECISION: + { + if (dprec == prec) + memcpy(srvp->buffer, data, datasize * sizeof(FLT32)); + else + for (size_t i = 0; i < datasize; i++) ((float *) srvp->buffer)[i] = (float) ((double *) data)[i]; + + break; + } + case EXSE_DOUBLE_PRECISION: + { + if (dprec == prec) + memcpy(srvp->buffer, data, datasize * sizeof(FLT64)); + else + for (size_t i = 0; i < datasize; i++) ((double *) srvp->buffer)[i] = (double) ((float *) data)[i]; + + break; + } + default: + { + Error("unexpected data precision %d", dprec); + break; + } + } + + return 0; +} + +int +srvDefDataSP(void *srv, const float *data) +{ + return srvDefData(srv, EXSE_SINGLE_PRECISION, (void *) data); +} + +int +srvDefDataDP(void *srv, const double *data) +{ + return srvDefData(srv, EXSE_DOUBLE_PRECISION, (void *) data); +} + +int +srvRead(int fileID, void *srv) +{ + srvrec_t *srvp = (srvrec_t *) srv; + union SRV_HEADER tempheader; + + if (!srvp->checked) + { + int status = srvCheckFiletype(fileID, &srvp->byteswap); + if (status == 0) Error("Not a SERVICE file!"); + srvp->checked = 1; + } + + int byteswap = srvp->byteswap; + + // read header record + size_t blocklen = binReadF77Block(fileID, byteswap); + + if (fileEOF(fileID)) return -1; + + if (SRV_Debug) Message("blocklen = %lu", blocklen); + + size_t hprec = blocklen / SRV_HEADER_LEN; + + srvp->hprec = (int) hprec; + + switch (hprec) + { + case EXSE_SINGLE_PRECISION: + { + binReadInt32(fileID, byteswap, SRV_HEADER_LEN, tempheader.i32); + for (int i = 0; i < SRV_HEADER_LEN; i++) srvp->header[i] = (int) tempheader.i32[i]; + break; + } + case EXSE_DOUBLE_PRECISION: + { + binReadInt64(fileID, byteswap, SRV_HEADER_LEN, tempheader.i64); + for (int i = 0; i < SRV_HEADER_LEN; i++) srvp->header[i] = (int) tempheader.i64[i]; + break; + } + default: + { + Error("Unexpected header precision %d", hprec); + break; + } + } + + size_t blocklen2 = binReadF77Block(fileID, byteswap); + + if (blocklen2 != blocklen) + { + Warning("Header blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2); + if (blocklen2 != 0) return -1; + } + + srvp->datasize = (size_t) srvp->header[4] * (size_t) srvp->header[5]; + + if (SRV_Debug) Message("datasize = %zu", srvp->datasize); + + blocklen = binReadF77Block(fileID, byteswap); + + if (srvp->buffersize < blocklen) + { + srvp->buffersize = blocklen; + srvp->buffer = Realloc(srvp->buffer, srvp->buffersize); + } + + size_t dprec = blocklen / srvp->datasize; + + srvp->dprec = (int) dprec; + + if (dprec != EXSE_SINGLE_PRECISION && dprec != EXSE_DOUBLE_PRECISION) + { + Warning("Unexpected data precision %d", dprec); + return -1; + } + + fileRead(fileID, srvp->buffer, blocklen); + + blocklen2 = binReadF77Block(fileID, byteswap); + + if (blocklen2 != blocklen) + { + Warning("Data blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2); + if (blocklen2 != 0) return -1; + } + + return 0; +} + +void +srvWrite(int fileID, void *srv) +{ + srvrec_t *srvp = (srvrec_t *) srv; + union SRV_HEADER tempheader; + int byteswap = srvp->byteswap; + int dprec = srvp->dprec; + int hprec = srvp->hprec; + int *restrict header = srvp->header; + + // write header record + size_t blocklen = SRV_HEADER_LEN * (size_t) hprec; + + binWriteF77Block(fileID, byteswap, blocklen); + + switch (hprec) + { + case EXSE_SINGLE_PRECISION: + { + for (int i = 0; i < SRV_HEADER_LEN; i++) tempheader.i32[i] = (INT32) header[i]; + binWriteInt32(fileID, byteswap, SRV_HEADER_LEN, tempheader.i32); + break; + } + case EXSE_DOUBLE_PRECISION: + { + for (int i = 0; i < SRV_HEADER_LEN; i++) tempheader.i64[i] = (INT64) header[i]; + binWriteInt64(fileID, byteswap, SRV_HEADER_LEN, tempheader.i64); + break; + } + default: + { + Error("unexpected header precision %d", hprec); + break; + } + } + + binWriteF77Block(fileID, byteswap, blocklen); + + srvp->datasize = (size_t) header[4] * (size_t) header[5]; + blocklen = srvp->datasize * (size_t) dprec; + + binWriteF77Block(fileID, byteswap, blocklen); + + switch (dprec) + { + case EXSE_SINGLE_PRECISION: + { + binWriteFlt32(fileID, byteswap, srvp->datasize, (FLT32 *) srvp->buffer); + break; + } + case EXSE_DOUBLE_PRECISION: + { + binWriteFlt64(fileID, byteswap, srvp->datasize, (FLT64 *) srvp->buffer); + break; + } + default: + { + Error("unexpected data precision %d", dprec); + break; + } + } + + binWriteF77Block(fileID, byteswap, blocklen); +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef STREAM_SCAN_H +#define STREAM_SCAN_H + + +void streamScanResizeRecords1(stream_t *streamptr); +int streamScanInitRecords2(stream_t *streamptr); +int streamScanInitRecords(stream_t *streamptr, int tsID); +void streamScanTimeConstAdjust(stream_t *streamptr, const taxis_t *taxis); +void streamScanTsFixNtsteps(stream_t *streamptr, off_t recpos); + +#endif /* STREAM_SCAN_H */ + +void +streamScanResizeRecords1(stream_t *streamptr) +{ + const int nrecords = streamptr->tsteps[0].nallrecs; + if (nrecords < streamptr->tsteps[0].recordSize) + { + streamptr->tsteps[0].recordSize = nrecords; + streamptr->tsteps[0].records = (record_t *) Realloc(streamptr->tsteps[0].records, (size_t) nrecords * sizeof(record_t)); + } + + streamptr->tsteps[0].recIDs = (int *) Malloc((size_t) nrecords * sizeof(int)); + streamptr->tsteps[0].nrecs = nrecords; + for (int recID = 0; recID < nrecords; ++recID) streamptr->tsteps[0].recIDs[recID] = recID; +} + +int +streamScanInitRecords2(stream_t *streamptr) +{ + const int nrecords = streamptr->tsteps[1].nallrecs; + streamptr->tsteps[1].recIDs = (int *) Malloc((size_t) nrecords * sizeof(int)); + streamptr->tsteps[1].nrecs = 0; + + for (int recID = 0; recID < nrecords; ++recID) + { + streamptr->tsteps[1].recIDs[recID] = -1; + streamptr->tsteps[1].records[recID].position = streamptr->tsteps[0].records[recID].position; + streamptr->tsteps[1].records[recID].size = streamptr->tsteps[0].records[recID].size; + } + + return nrecords; +} + +int +streamScanInitRecords(stream_t *streamptr, int tsID) +{ + const int nrecs = streamptr->tsteps[1].nrecs; + + streamptr->tsteps[tsID].nrecs = nrecs; + streamptr->tsteps[tsID].recIDs = (int *) Malloc((size_t) nrecs * sizeof(int)); + + for (int recID = 0; recID < nrecs; ++recID) streamptr->tsteps[tsID].recIDs[recID] = streamptr->tsteps[1].recIDs[recID]; + + return nrecs; +} + +void +streamScanTimeConstAdjust(stream_t *streamptr, const taxis_t *taxis) +{ + const int vlistID = streamptr->vlistID; + if (streamptr->ntsteps == 1 && cdiDateTime_isNull(taxis->vDateTime)) + { + streamptr->ntsteps = 0; + for (int varID = 0; varID < streamptr->nvars; ++varID) vlistDefVarTimetype(vlistID, varID, TIME_CONSTANT); + } +} + +void +streamScanTsFixNtsteps(stream_t *streamptr, off_t recpos) +{ + if (streamptr->ntsteps == -1) + { + const int tsID = tstepsNewEntry(streamptr); + if (tsID != streamptr->rtsteps) Error("Internal error. tsID = %d", tsID); + + streamptr->tsteps[tsID - 1].next = true; + streamptr->tsteps[tsID].position = recpos; + } +} +#ifndef CDI_FDB_H +#define CDI_FDB_H + +#ifdef HAVE_CONFIG_H +#endif + +extern int cdi_fdb_dummy; + +#ifdef HAVE_LIBFDB5 + +#include <fdb5/api/fdb_c.h> + +typedef struct +{ + char *item; + char *keys[32]; + char *values[32]; + int numKeys; +} KeyValueEntry; + +typedef struct +{ + int date; + int time; + int param; + int levtype; + int ilevel; +} RecordInfoEntry; + +void decode_fdbitem(const char *fdbItem, KeyValueEntry *keyValue); +int fdb_fill_itemlist(fdb_handle_t *fdb, fdb_request_t *request, char ***itemList); +long fdb_read_record(fdb_handle_t *fdb, char *item, size_t *buffersize, void **gribbuffer); +int check_keyvalueList(int numItems, KeyValueEntry *keyValueList); +void record_info_entry_init(RecordInfoEntry *recordInfo); +int get_num_records(int numItems, RecordInfoEntry *recordInfoList); +void decode_keyvalue(KeyValueEntry *keyValue, RecordInfoEntry *recordInfo); +int remove_duplicate_timesteps(RecordInfoEntry *recordInfoList, int numRecords, int numTimesteps, int *timestepRecordOffset); +fdb_request_t *create_fdb_request(const char *filename); + +#endif + +#endif /* CDI_FDB_H */ +#ifndef CDI_ACROSS_H +#define CDI_ACROSS_H + +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_ACROSS + + +#define ACROSS_DEFAULT_PORT "13859" + +typedef struct +{ + char *expid; + int expver; +} across_info_t; + +int across_connect(const char *path, char filemode, stream_t *streamptr); +void across_disconnect(int sock); +int across_write_grib_message(stream_t *streamptr, const void *gribbuffer, size_t nbytes); + +#endif + +#endif /* CDI_ACROSS_H */ +#ifndef STREAM_CGRIBEX_H +#define STREAM_CGRIBEX_H + +void *cgribexNew(); +void cgribexDelete(void *cgribexp); + +int cgribexScanTimestep1(stream_t *streamptr); +int cgribexScanTimestep2(stream_t *streamptr); +int cgribexScanTimestep(stream_t *streamptr); + +int cgribexDecode(int memtype, void *cgribexp, void *gribbuffer, size_t gribsize, void *data, size_t datasize, int unreduced, + size_t *nmiss, double missval); + +size_t cgribexEncode(int memtype, int varID, int levelID, int vlistID, int gridID, int zaxisID, CdiDateTime vDateTime, + int tsteptype, int numavg, size_t datasize, const void *data, size_t nmiss, void *gribbuffer, + size_t gribbuffersize); + +void *cgribex_handle_new_from_meassage(void *gribbuffer, size_t recsize); +void cgribex_handle_delete(void *gh); + +void cgribexChangeParameterIdentification(void *gh, int code, int ltype, int lev); + +#endif /* STREAM_CGRIBEX_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _STREAM_SRV_H +#define _STREAM_SRV_H + +#ifndef _SERVICE_H +#endif + +int srvInqContents(stream_t *streamptr); +int srvInqTimestep(stream_t *streamptr, int tsID); + +int srvInqRecord(stream_t *streamptr, int *varID, int *levelID); +void srvDefRecord(stream_t *streamptr); +void srvCopyRecord(stream_t *streamptr2, stream_t *streamptr1); +void srv_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss); +void srv_write_record(stream_t *streamptr, int memtype, const void *data); + +void srvReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss); +void srvWriteVarDP(stream_t *streamptr, int varID, const double *data); + +void srvReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, size_t *nmiss); +void srvWriteVarSliceDP(stream_t *streamptr, int varID, int levelID, const double *data); + +#endif /* _STREAM_SRV_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _STREAM_EXT_H +#define _STREAM_EXT_H + +#ifndef _EXTRA_H +#endif + +int extInqContents(stream_t *streamptr); +int extInqTimestep(stream_t *streamptr, int tsID); + +int extInqRecord(stream_t *streamptr, int *varID, int *levelID); +void extDefRecord(stream_t *streamptr); +void extCopyRecord(stream_t *streamptr2, stream_t *streamptr1); +void ext_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss); +void ext_write_record(stream_t *streamptr, int memtype, const void *data); + +void extReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss); +void extWriteVarDP(stream_t *streamptr, int varID, const double *data); + +void extReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, size_t *nmiss); +void extWriteVarSliceDP(stream_t *streamptr, int varID, int levelID, const double *data); + +#endif /* _STREAM_EXT_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _STREAM_IEG_H +#define _STREAM_IEG_H + +#ifndef _IEG_H +#endif + +int iegInqContents(stream_t *streamptr); +int iegInqTimestep(stream_t *streamptr, int tsID); + +int iegInqRecord(stream_t *streamptr, int *varID, int *levelID); +void iegDefRecord(stream_t *streamptr); +void iegCopyRecord(stream_t *streamptr2, stream_t *streamptr1); +void ieg_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss); +void ieg_write_record(stream_t *streamptr, int memtype, const void *data); + +void iegReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss); +void iegWriteVarDP(stream_t *streamptr, int varID, const double *data); + +void iegReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, size_t *nmiss); +void iegWriteVarSliceDP(stream_t *streamptr, int varID, int levelID, const double *data); + +#endif /* _STREAM_IEG_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 +#endif + +#ifdef HAVE_LIBFDB5 +#endif + +#include <sys/stat.h> // struct stat +#include <ctype.h> +#include <string.h> + + +static stream_t *stream_new_entry(int resH); +static int streamCompareP(void *streamptr1, void *streamptr2); +static void streamDestroyP(void *streamptr); +static void streamPrintP(void *streamptr, FILE *fp); +static int streamGetPackSize(void *streamptr, void *context); +static void streamPack(void *streamptr, void *buff, int size, int *position, void *context); +static int streamTxCode(void *streamptr); + +const resOps streamOps = { streamCompareP, streamDestroyP, streamPrintP, streamGetPackSize, streamPack, streamTxCode }; + +static int +getByteorder(int byteswap) +{ + int byteorder = -1; + + switch (HOST_ENDIANNESS) + { + case CDI_BIGENDIAN: byteorder = byteswap ? CDI_LITTLEENDIAN : CDI_BIGENDIAN; break; + case CDI_LITTLEENDIAN: byteorder = byteswap ? CDI_BIGENDIAN : CDI_LITTLEENDIAN; break; + /* FIXME: does not currently adjust for PDP endianness */ + case CDI_PDPENDIAN: + default: Error("unhandled endianness"); + } + + return byteorder; +} + +// used also in CDO +int +cdiGetFiletype(const char *uri, int *byteorder) +{ + // clang-format off + int filetype = CDI_EUFTYPE; + int swap = 0; + int version; + long recpos; + + const char *filename; + int protocol = cdiGetProtocol(uri, &filename); + + switch (protocol) + { + case CDI_PROTOCOL_ACROSS: return CDI_FILETYPE_GRB2; + case CDI_PROTOCOL_FDB: return CDI_FILETYPE_UNDEF; + case CDI_PROTOCOL_OTHER: return CDI_FILETYPE_NC; // support for NetCDF remote types and ESDM + case CDI_PROTOCOL_FILE: + // handled below; + break; + } + + int fileID = fileOpen(filename, "r"); + + if (fileID == CDI_UNDEFID) return CDI_ESYSTEM; + else if (fileID == -2) return CDI_ETMOF; + + char buffer[8]; + if (fileRead(fileID, buffer, 8) != 8) + { + struct stat buf; + if (stat(filename, &buf) == 0) + { + if (buf.st_size == 0) return CDI_EISEMPTY; + if (buf.st_mode & S_IFDIR) return CDI_EISDIR; + } + + return CDI_EUFTYPE; + } + + fileRewind(fileID); + + if (memcmp(buffer, "GRIB", 4) == 0) + { + version = buffer[7]; + if (version <= 1) filetype = CDI_FILETYPE_GRB; + else if (version == 2) filetype = CDI_FILETYPE_GRB2; + } + else if (memcmp(buffer, "CDF\001", 4) == 0) { filetype = CDI_FILETYPE_NC; } + else if (memcmp(buffer, "CDF\002", 4) == 0) { filetype = CDI_FILETYPE_NC2; } + else if (memcmp(buffer, "CDF\005", 4) == 0) { filetype = CDI_FILETYPE_NC5; } + else if (memcmp(buffer + 1, "HDF", 3) == 0) { filetype = CDI_FILETYPE_NC4; } +#ifdef HAVE_LIBSERVICE + else if (srvCheckFiletype(fileID, &swap)) { filetype = CDI_FILETYPE_SRV; } +#endif +#ifdef HAVE_LIBEXTRA + else if (extCheckFiletype(fileID, &swap)) { filetype = CDI_FILETYPE_EXT; } +#endif +#ifdef HAVE_LIBIEG + else if (iegCheckFiletype(fileID, &swap)) { filetype = CDI_FILETYPE_IEG; } +#endif +#ifdef HAVE_LIBGRIB + else if (gribCheckSeek(fileID, &recpos, &version) == 0) + { + if (version <= 1) filetype = CDI_FILETYPE_GRB; + else if (version == 2) filetype = CDI_FILETYPE_GRB2; + } +#endif + // clang-format on + + if (CDI_Debug && filetype != CDI_EUFTYPE) Message("found %s file = %s", strfiletype(filetype), filename); + + fileClose(fileID); + + *byteorder = getByteorder(swap); + + return filetype; +} + +/* +@Function streamInqFiletype +@Title Get the filetype + +@Prototype int streamInqFiletype(int streamID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead} or @fref{streamOpenWrite}. + +@Description +The function @func{streamInqFiletype} returns the filetype of a stream. + +@Result +@func{streamInqFiletype} returns the type of the file format, +one of the set of predefined CDI file format types. +The valid CDI file format types are @func{CDI_FILETYPE_GRB}, @func{CDI_FILETYPE_GRB2}, @func{CDI_FILETYPE_NC}, +@func{CDI_FILETYPE_NC2}, @func{CDI_FILETYPE_NC4}, @func{CDI_FILETYPE_NC4C}, @func{CDI_FILETYPE_NC5}, +@func{CDI_FILETYPE_NCZARR}, @func{CDI_FILETYPE_SRV}, @func{CDI_FILETYPE_EXT} and @func{CDI_FILETYPE_IEG}. +@EndFunction +*/ +int +streamInqFiletype(int streamID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + return streamptr->filetype; +} + +int +getByteswap(int byteorder) +{ + int byteswap = -1; + + switch (byteorder) + { + case CDI_BIGENDIAN: + case CDI_LITTLEENDIAN: + case CDI_PDPENDIAN: byteswap = (HOST_ENDIANNESS != byteorder); break; + case -1: break; + default: Error("unexpected byteorder %d query!", byteorder); + } + + return byteswap; +} + +void +streamDefMaxSteps(int streamID, int maxSteps) +{ + if (maxSteps >= 0) + { + stream_t *streamptr = stream_to_pointer(streamID); + streamptr->maxSteps = maxSteps; + } +} + +static long +cdiInqTimeSize(int streamID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + + long ntsteps = streamptr->ntsteps; + if (ntsteps == (long) CDI_UNDEFID) + { + int tsID = 0; + while (streamInqTimestep(streamID, tsID++)) ntsteps = streamptr->ntsteps; + } + + return ntsteps; +} + +void +streamDefNumWorker(int streamID, int numWorker) +{ + if (numWorker > 0) + { + stream_t *streamptr = stream_to_pointer(streamID); + streamptr->numWorker = numWorker; + + int filetype = streamptr->filetype; + bool filetypeIsGrib = (filetype == CDI_FILETYPE_GRB || filetype == CDI_FILETYPE_GRB2); + if (streamptr->filemode == 'r' && filetypeIsGrib) (void) cdiInqTimeSize(streamID); + } +} + +/* +@Function streamDefByteorder +@Title Define the byte order + +@Prototype void streamDefByteorder(int streamID, int byteorder) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item byteorder The byte order of a dataset, one of the CDI constants @func{CDI_BIGENDIAN} and + @func{CDI_LITTLEENDIAN}. + +@Description +The function @func{streamDefByteorder} defines the byte order of a binary dataset +with the file format type @func{CDI_FILETYPE_SRV}, @func{CDI_FILETYPE_EXT} or @func{CDI_FILETYPE_IEG}. + +@EndFunction +*/ +void +streamDefByteorder(int streamID, int byteorder) +{ + stream_t *streamptr = stream_to_pointer(streamID); + streamptr->byteorder = byteorder; + int filetype = streamptr->filetype; + + switch (filetype) + { +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: + { + srvrec_t *srvp = (srvrec_t *) streamptr->record->objectp; + srvp->byteswap = getByteswap(byteorder); + + break; + } +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: + { + extrec_t *extp = (extrec_t *) streamptr->record->objectp; + extp->byteswap = getByteswap(byteorder); + + break; + } +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: + { + iegrec_t *iegp = (iegrec_t *) streamptr->record->objectp; + iegp->byteswap = getByteswap(byteorder); + + break; + } +#endif + } + + reshSetStatus(streamID, &streamOps, RESH_DESYNC_IN_USE); +} + +/* +@Function streamInqByteorder +@Title Get the byte order + +@Prototype int streamInqByteorder(int streamID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead} or @fref{streamOpenWrite}. + +@Description +The function @func{streamInqByteorder} returns the byte order of a binary dataset +with the file format type @func{CDI_FILETYPE_SRV}, @func{CDI_FILETYPE_EXT} or @func{CDI_FILETYPE_IEG}. + +@Result +@func{streamInqByteorder} returns the type of the byte order. +The valid CDI byte order types are @func{CDI_BIGENDIAN} and @func{CDI_LITTLEENDIAN} + +@EndFunction +*/ +int +streamInqByteorder(int streamID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + return streamptr->byteorder; +} + +const char * +streamFilesuffix(int filetype) +{ + static const char *noSuffix = ""; + static const char *ncSuffix = ".nc"; + static const char *grbSuffix = ".grb"; + static const char *srvSuffix = ".srv"; + static const char *extSuffix = ".ext"; + static const char *iegSuffix = ".ieg"; + + switch (cdiBaseFiletype(filetype)) + { + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: return grbSuffix; + case CDI_FILETYPE_SRV: return srvSuffix; + case CDI_FILETYPE_EXT: return extSuffix; + case CDI_FILETYPE_IEG: return iegSuffix; + case CDI_FILETYPE_NETCDF: return ncSuffix; + default: return noSuffix; + } +} + +const char * +streamFilename(int streamID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + return streamptr->filename; +} + +static int +cdiInqContents(stream_t *streamptr) +{ + int status = 0; + int filetype = streamptr->filetype; + + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: + { + switch (streamptr->protocol) + { + case CDI_PROTOCOL_FDB: status = fdbInqContents(streamptr); break; + + case CDI_PROTOCOL_ACROSS: // TODO read from ACROSS + case CDI_PROTOCOL_OTHER: + case CDI_PROTOCOL_FILE: status = grbInqContents(streamptr); break; + } + break; + } +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: status = srvInqContents(streamptr); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: status = extInqContents(streamptr); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: status = iegInqContents(streamptr); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: status = cdfInqContents(streamptr); break; +#endif + default: + { + status = CDI_ELIBNAVAIL; + if (CDI_Debug) Message("%s support not compiled in!", strfiletype(filetype)); + } + } + + if (status == 0) + { + int taxisID = vlistInqTaxis(streamptr->vlistID); + if (taxisID != CDI_UNDEFID) + { + taxis_t *taxisptr1 = &streamptr->tsteps[0].taxis; + taxis_t *taxisptr2 = taxisPtr(taxisID); + ptaxisCopy(taxisptr2, taxisptr1); + } + } + + return status; +} + +int +cdiGetProtocol(const char *uri, const char **filename) +{ + const char *pos = strstr(uri, "://"); + if (pos == NULL) + { + *filename = uri; + return CDI_PROTOCOL_FILE; + } + + int protocollen = pos - uri; + *filename = pos + 3; + + // if (strncmp(uri, "file", protocollen) == 0) return CDI_PROTOCOL_FILE; // file is already used in NetCDF + if (strncmp(uri, "fdb", protocollen) == 0) return CDI_PROTOCOL_FDB; + if (strncmp(uri, "across", protocollen) == 0) return CDI_PROTOCOL_ACROSS; + + *filename = uri; + + return CDI_PROTOCOL_OTHER; +} + +int +cdiStreamOpenDefaultDelegate(const char *uri, char filemode, int filetype, stream_t *streamptr, int recordBufIsToBeCreated) +{ + int fileID; + char temp[2] = { filemode, 0 }; + + const char *filename; + streamptr->protocol = cdiGetProtocol(uri, &filename); + + switch (streamptr->protocol) + { + case CDI_PROTOCOL_ACROSS: +#if defined(HAVE_ACROSS) && defined(HAVE_LIBGRIB_API) + if (filetype != CDI_FILETYPE_GRB2) + { + Warning("ACROSS needs to be used with GRIB2"); + return CDI_EUFTYPE; + } + fileID = across_connect(filename, filemode, streamptr); + if (fileID >= 0) + { + streamptr->filetype = filetype; + if (recordBufIsToBeCreated) + { + streamptr->record = (Record *) Malloc(sizeof(Record)); + streamptr->record->buffer = NULL; + } + } + return fileID; +#else +#ifdef HAVE_ACROSS + Warning("ecCodes support not compiled in (Needed for ACROSS)!"); +#else + Warning("ACROSS support not compiled in!"); +#endif + return CDI_ELIBNAVAIL; +#endif + + case CDI_PROTOCOL_FDB: +#if defined(HAVE_FDB5) && defined(HAVE_LIBGRIB_API) + + if (filetype != CDI_FILETYPE_GRB && filetype != CDI_FILETYPE_GRB2) + { + Warning("FDB5 needs to be used with GRIB or GRIB2"); + return CDI_EUFTYPE; + } + + fdb_initialise(); + fdb_new_handle((fdb_handle_t **) &(streamptr->protocolData)); + streamptr->filetype = filetype; + if (recordBufIsToBeCreated) + { + streamptr->record = (Record *) Malloc(sizeof(Record)); + streamptr->record->buffer = NULL; + } + return 88; + +#else // !(defined(HAVE_FDB5) && defined(HAVE_LIBGRIB_API)) + +#ifdef HAVE_FDB5 + Warning("ecCodes support not compiled in (Needed for FDB5)!"); +#else + Warning("FDB5 support not compiled in!"); +#endif + + return CDI_ELIBNAVAIL; +#endif + + case CDI_PROTOCOL_OTHER: + case CDI_PROTOCOL_FILE: + // handled below; + break; + } + + switch (filetype) + { +#if defined(HAVE_LIBGRIB) && (defined(HAVE_LIBCGRIBEX) || defined(HAVE_LIBGRIB_API)) + case CDI_FILETYPE_GRB: + { + fileID = gribOpen(filename, temp); + if (fileID < 0) return CDI_ESYSTEM; + if (recordBufIsToBeCreated) + { + streamptr->record = (Record *) Malloc(sizeof(Record)); + streamptr->record->buffer = NULL; +#ifdef HAVE_LIBCGRIBEX + streamptr->record->objectp = cgribexNew(); +#else + streamptr->record->objectp = NULL; +#endif + } + break; + } +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB2: + { + fileID = gribOpen(filename, temp); + if (fileID < 0) return CDI_ESYSTEM; + if (recordBufIsToBeCreated) + { + streamptr->record = (Record *) Malloc(sizeof(Record)); + streamptr->record->buffer = NULL; + } + break; + } +#endif +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: + { + fileID = fileOpen(filename, temp); + if (fileID < 0) return CDI_ESYSTEM; + if (recordBufIsToBeCreated) + { + streamptr->record = (Record *) Malloc(sizeof(Record)); + streamptr->record->buffer = NULL; + streamptr->record->objectp = srvNew(); + } + break; + } +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: + { + fileID = fileOpen(filename, temp); + if (fileID < 0) return CDI_ESYSTEM; + if (recordBufIsToBeCreated) + { + streamptr->record = (Record *) Malloc(sizeof(Record)); + streamptr->record->buffer = NULL; + streamptr->record->objectp = extNew(); + } + break; + } +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: + { + fileID = fileOpen(filename, temp); + if (fileID < 0) return CDI_ESYSTEM; + if (recordBufIsToBeCreated) + { + streamptr->record = (Record *) Malloc(sizeof(Record)); + streamptr->record->buffer = NULL; + streamptr->record->objectp = iegNew(); + } + break; + } +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NC: + case CDI_FILETYPE_NC2: + case CDI_FILETYPE_NC5: + { + fileID = cdfOpen(filename, temp, filetype); + break; + } + case CDI_FILETYPE_NC4: + case CDI_FILETYPE_NC4C: + case CDI_FILETYPE_NCZARR: + { + fileID = cdf4Open(filename, temp, &filetype); + break; + } +#endif + default: + { + if (CDI_Debug) Message("%s support not compiled in!", strfiletype(filetype)); + return CDI_ELIBNAVAIL; + } + } + + streamptr->filetype = filetype; + + return fileID; +} + +static int +stream_create_vlist(stream_t *streamptr, CdiQuery *query) +{ + int vlistID = vlistCreate(); + if (vlistID < 0) return CDI_ELIMIT; + + cdiVlistMakeInternal(vlistID); + streamptr->vlistID = vlistID; + + if (query) streamptr->query = query; + + int status = cdiInqContents(streamptr); + if (status >= 0) + { + vlist_t *vlistptr = vlist_to_pointer(streamptr->vlistID); + vlistptr->ntsteps = streamptr->ntsteps; + cdiVlistMakeImmutable(vlistID); + } + + return status; +} + +int +streamOpenID(const char *filename, char filemode, int filetype, int resH) +{ + if (CDI_Debug) Message("Open %s mode %c file %s", strfiletype(filetype), filemode, filename ? filename : "(NUL)"); + + if (!filename || filetype < 0) return CDI_EINVAL; + + stream_t *streamptr = stream_new_entry(resH); + int streamID = CDI_ESYSTEM; + + int (*streamOpenDelegate)(const char *filename, char filemode, int filetype, stream_t *streamptr, int recordBufIsToBeCreated) + = (int (*)(const char *, char, int, stream_t *, int)) namespaceSwitchGet(NSSWITCH_STREAM_OPEN_BACKEND).func; + + int fileID = streamOpenDelegate(filename, filemode, filetype, streamptr, 1); + if (fileID < 0) + { + streamID = fileID; + if (streamptr->record) Free(streamptr->record); + reshRemove(streamptr->self, &streamOps); + Free(streamptr); + } + else + { + streamID = streamptr->self; + if (streamID < 0) return CDI_ELIMIT; + + streamptr->filemode = filemode; + streamptr->filename = strdupx(filename); + streamptr->fileID = fileID; + } + + return streamID; +} + +static int +streamOpen(const char *filename, const char *filemode, int filetype) +{ + if (!filemode || strlen(filemode) != 1) return CDI_EINVAL; + return streamOpenID(filename, (char) tolower(filemode[0]), filetype, CDI_UNDEFID); +} + +static int +streamOpenA(const char *filename, const char *filemode, int filetype) +{ + if (CDI_Debug) Message("Open %s file (mode=%c); filename: %s", strfiletype(filetype), (int) *filemode, filename); + if (CDI_Debug) printf("streamOpenA: %s\n", filename); // seg fault without this line on thunder/squall with "cdo cat x y" + + if (!filename || !filemode || filetype < 0) return CDI_EINVAL; + + stream_t *streamptr = stream_new_entry(CDI_UNDEFID); + int fileID = CDI_UNDEFID; + + { + int (*streamOpenDelegate)(const char *filename, char filemode, int filetype, stream_t *streamptr, int recordBufIsToBeCreated) + = (int (*)(const char *, char, int, stream_t *, int)) namespaceSwitchGet(NSSWITCH_STREAM_OPEN_BACKEND).func; + + fileID = streamOpenDelegate(filename, 'r', filetype, streamptr, 1); + } + + if (fileID == CDI_UNDEFID || fileID == CDI_ELIBNAVAIL || fileID == CDI_ESYSTEM) return fileID; + + int streamID = streamptr->self; + + streamptr->filemode = tolower(*filemode); + streamptr->filename = strdupx(filename); + streamptr->fileID = fileID; + + streamptr->vlistID = vlistCreate(); + cdiVlistMakeInternal(streamptr->vlistID); + // cdiReadByteorder(streamID); + int status = cdiInqContents(streamptr); + if (status < 0) return status; + vlist_t *vlistptr = vlist_to_pointer(streamptr->vlistID); + vlistptr->ntsteps = (int) cdiInqTimeSize(streamID); + + // Needed for NetCDF4 + for (int varID = 0; varID < vlistptr->nvars; ++varID) streamptr->vars[varID].defmiss = true; + + if (str_is_equal(filemode, "r")) cdiVlistMakeImmutable(streamptr->vlistID); + + { + void (*streamCloseDelegate)(stream_t * streamptr, int recordBufIsToBeDeleted) + = (void (*)(stream_t *, int)) namespaceSwitchGet(NSSWITCH_STREAM_CLOSE_BACKEND).func; + + streamCloseDelegate(streamptr, 0); + } + + switch (filetype) + { +#if defined(HAVE_LIBGRIB) && (defined(HAVE_LIBCGRIBEX) || defined(HAVE_LIBGRIB_API)) + case CDI_FILETYPE_GRB: +#ifdef HAVE_LIBGRIB_API + case CDI_FILETYPE_GRB2: +#endif + { + fileID = gribOpen(filename, filemode); + if (fileID != CDI_UNDEFID) gribContainersNew(streamptr); + break; + } +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: + { + fileID = fileOpen(filename, filemode); + break; + } +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: + { + fileID = fileOpen(filename, filemode); + break; + } +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: + { + fileID = fileOpen(filename, filemode); + break; + } +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NC: + case CDI_FILETYPE_NC2: + case CDI_FILETYPE_NC5: + { + fileID = cdfOpen(filename, filemode, filetype); + streamptr->ncmode = 2; + break; + } + case CDI_FILETYPE_NC4: + case CDI_FILETYPE_NC4C: + { + fileID = cdf4Open(filename, filemode, &filetype); + streamptr->ncmode = 2; + break; + } + case CDI_FILETYPE_NCZARR: + { + Warning("%s not available in append mode!", strfiletype(filetype)); + return CDI_ELIBNAVAIL; + } +#endif + default: + { + if (CDI_Debug) Message("%s support not compiled in!", strfiletype(filetype)); + return CDI_ELIBNAVAIL; + } + } + + if (fileID == CDI_UNDEFID) + streamID = CDI_UNDEFID; + else + streamptr->fileID = fileID; + + return streamID; +} + +/* +@Function streamOpenRead +@Title Open a dataset for reading + +@Prototype int streamOpenRead(const char *path) +@Parameter + @Item path The name of the dataset to be read. + +@Description +The function @func{streamOpenRead} opens an existing dataset for reading. + +@Result +Upon successful completion @func{streamOpenRead} returns an identifier to the +open stream. Otherwise, a negative number with the error status is returned. + +@Errors +@List + @Item CDI_ESYSTEM Operating system error. + @Item CDI_EINVAL Invalid argument. + @Item CDI_EUFILETYPE Unsupported file type. + @Item CDI_ELIBNAVAIL Library support not compiled in. +@EndList + +@Example +Here is an example using @func{streamOpenRead} to open an existing NetCDF +file named @func{foo.nc} for reading: + +@Source + ... +int streamID; + ... +streamID = streamOpenRead("foo.nc"); +if ( streamID < 0 ) handle_error(streamID); + ... +@EndSource +@EndFunction +*/ +int +streamOpenRead(const char *filename) +{ + cdiInitialize(); + + int byteorder = 0; + int filetype = cdiGetFiletype(filename, &byteorder); + if (filetype < 0) return filetype; + + int streamID = streamOpen(filename, "r", filetype); + if (streamID >= 0) + { + stream_t *streamptr = stream_to_pointer(streamID); + streamptr->byteorder = byteorder; + + int status = stream_create_vlist(streamptr, NULL); + if (status < 0) + { + streamID = status; + if (streamptr->record) Free(streamptr->record); + reshRemove(streamptr->self, &streamOps); + } + } + + return streamID; +} + +int +streamOpenReadQuery(const char *filename, CdiQuery *query) +{ + cdiInitialize(); + + int byteorder = 0; + int filetype = cdiGetFiletype(filename, &byteorder); + if (filetype < 0) return filetype; + + if (cdiBaseFiletype(filetype) != CDI_FILETYPE_NETCDF && filetype != CDI_FILETYPE_GRB2) return CDI_EQNAVAIL; + + int streamID = streamOpen(filename, "r", filetype); + if (streamID >= 0) + { + stream_t *streamptr = stream_to_pointer(streamID); + streamptr->byteorder = byteorder; + + int status = stream_create_vlist(streamptr, query); + if (status < 0) + { + streamID = status; + if (streamptr->record) Free(streamptr->record); + reshRemove(streamptr->self, &streamOps); + } + } + + return streamID; +} + +int +streamOpenAppend(const char *filename) +{ + cdiInitialize(); + + int byteorder = 0; + int filetype = cdiGetFiletype(filename, &byteorder); + if (filetype < 0) return filetype; + + int streamID = streamOpenA(filename, "a", filetype); + if (streamID >= 0) + { + stream_t *streamptr = stream_to_pointer(streamID); + streamptr->byteorder = byteorder; + } + + return streamID; +} + +/* +@Function streamOpenWrite +@Title Create a new dataset + +@Prototype int streamOpenWrite(const char *path, int filetype) +@Parameter + @Item path The name of the new dataset. + @Item filetype The type of the file format, one of the set of predefined CDI file format types. + The valid CDI file format types are @func{CDI_FILETYPE_GRB}, @func{CDI_FILETYPE_GRB2}, @func{CDI_FILETYPE_NC}, + @func{CDI_FILETYPE_NC2}, @func{CDI_FILETYPE_NC4}, @func{CDI_FILETYPE_NC4C}, @func{CDI_FILETYPE_NC5}, + @func{CDI_FILETYPE_NCZARR}, @func{CDI_FILETYPE_SRV}, @func{CDI_FILETYPE_EXT} and @func{CDI_FILETYPE_IEG}. + +@Description +The function @func{streamOpenWrite} creates a new datset. +@Result +Upon successful completion @func{streamOpenWrite} returns an identifier to the +open stream. Otherwise, a negative number with the error status is returned. + +@Errors +@List + @Item CDI_ESYSTEM Operating system error. + @Item CDI_EINVAL Invalid argument. + @Item CDI_EUFILETYPE Unsupported file type. + @Item CDI_ELIBNAVAIL Library support not compiled in. +@EndList + +@Example +Here is an example using @func{streamOpenWrite} to create a new NetCDF file named @func{foo.nc} for writing: + +@Source + ... +int streamID; + ... +streamID = streamOpenWrite("foo.nc", CDI_FILETYPE_NC); +if ( streamID < 0 ) handle_error(streamID); + ... +@EndSource +@EndFunction +*/ +int +streamOpenWrite(const char *filename, int filetype) +{ + cdiInitialize(); + + return streamOpen(filename, "w", filetype); +} + +static void +streamDefaultValue(stream_t *streamptr) +{ + streamptr->self = CDI_UNDEFID; + streamptr->accesstype = CDI_UNDEFID; + streamptr->accessmode = 0; + streamptr->filetype = CDI_FILETYPE_UNDEF; + streamptr->byteorder = CDI_UNDEFID; + streamptr->fileID = 0; + streamptr->filemode = 0; + streamptr->numvals = 0; + streamptr->filename = NULL; + streamptr->record = NULL; + streamptr->query = NULL; + streamptr->varsAllocated = 0; + streamptr->nrecs = 0; + streamptr->nvars = 0; + streamptr->vars = NULL; + streamptr->ncmode = 0; + streamptr->curTsID = CDI_UNDEFID; + streamptr->rtsteps = 0; + streamptr->ntsteps = CDI_UNDEFID; + streamptr->maxSteps = CDI_UNDEFID; + streamptr->tsteps = NULL; + streamptr->tstepsTableSize = 0; + streamptr->tstepsNextID = 0; + streamptr->vlistID = CDI_UNDEFID; + streamptr->globalatts = 0; + streamptr->localatts = 0; + streamptr->unreduced = cdiDataUnreduced; + streamptr->sortname = cdiSortName > 0; + streamptr->sortparam = cdiSortParam > 0; + streamptr->have_missval = cdiHaveMissval; + streamptr->comptype = CDI_COMPRESS_NONE; + streamptr->complevel = 0; + // netcdf4/HDF5 filter + streamptr->filterId = 0; + streamptr->numParams = 0; + streamptr->maxParams = sizeof(streamptr->params) / sizeof(streamptr->params[0]); + + basetimeInit(&streamptr->basetime); + +#ifdef HAVE_LIBNETCDF + streamptr->nc_complex_float_id = CDI_UNDEFID; + streamptr->nc_complex_double_id = CDI_UNDEFID; + + for (int i = 0; i < MAX_ZAXES_PS; i++) streamptr->zaxisID[i] = CDI_UNDEFID; + for (int i = 0; i < MAX_ZAXES_PS; i++) streamptr->nczvarID[i] = CDI_UNDEFID; + + for (int i = 0; i < MAX_GRIDS_PS; i++) + { + streamptr->ncgrid[i].start = CDI_UNDEFID; + streamptr->ncgrid[i].count = CDI_UNDEFID; + streamptr->ncgrid[i].gridID = CDI_UNDEFID; + for (size_t j = 0; j < CDF_SIZE_ncIDs; ++j) streamptr->ncgrid[i].ncIDs[j] = CDI_UNDEFID; + } + + streamptr->ncNumDims = 0; + for (int i = 0; i < MAX_DIMS_PS; i++) streamptr->ncDimID[i] = CDI_UNDEFID; + for (int i = 0; i < MAX_DIMS_PS; i++) streamptr->ncDimLen[i] = 0; + + streamptr->vct.ilev = 0; + streamptr->vct.mlev = 0; + streamptr->vct.ilevID = CDI_UNDEFID; + streamptr->vct.mlevID = CDI_UNDEFID; +#endif + + streamptr->gribContainers = NULL; + + streamptr->numWorker = 0; + streamptr->nextGlobalRecId = 0; + streamptr->cachedTsID = -1; + streamptr->jobs = NULL; + streamptr->jobManager = NULL; + + streamptr->protocolData = NULL; +} + +static stream_t * +stream_new_entry(int resH) +{ + cdiInitialize(); /* ***************** make MT version !!! */ + + stream_t *streamptr = (stream_t *) Malloc(sizeof(stream_t)); + streamDefaultValue(streamptr); + + if (resH == CDI_UNDEFID) + streamptr->self = reshPut(streamptr, &streamOps); + else + { + streamptr->self = resH; + reshReplace(resH, streamptr, &streamOps); + } + + return streamptr; +} + +void +cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted) +{ + int fileID = streamptr->fileID; + int filetype = streamptr->filetype; + + switch (streamptr->protocol) + { + case CDI_PROTOCOL_ACROSS: +#ifdef HAVE_ACROSS + if (fileID) across_disconnect(fileID); + if (streamptr->protocolData) + { + Free(((across_info_t *) streamptr->protocolData)->expid); + Free(streamptr->protocolData); + streamptr->protocolData = NULL; + } +#endif + return; + + case CDI_PROTOCOL_FDB: +#ifdef HAVE_LIBFDB5 + if (streamptr->protocolData) fdb_delete_handle(streamptr->protocolData); + streamptr->protocolData = NULL; +#endif + return; + + case CDI_PROTOCOL_OTHER: + case CDI_PROTOCOL_FILE: + // handled below; + break; + } + + if (fileID == CDI_UNDEFID) + { + Warning("File %s not open!", streamptr->filename); + return; + } + + switch (cdiBaseFiletype(filetype)) + { +#if defined(HAVE_LIBGRIB) && (defined(HAVE_LIBCGRIBEX) || defined(HAVE_LIBGRIB_API)) + case CDI_FILETYPE_GRB: + { + gribClose(fileID); + if (recordBufIsToBeDeleted) gribContainersDelete(streamptr); +#ifdef HAVE_LIBCGRIBEX + if (recordBufIsToBeDeleted) cgribexDelete(streamptr->record->objectp); +#endif + break; + } + case CDI_FILETYPE_GRB2: + { + gribClose(fileID); + if (recordBufIsToBeDeleted) gribContainersDelete(streamptr); + break; + } +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: + { + fileClose(fileID); + if (recordBufIsToBeDeleted) srvDelete(streamptr->record->objectp); + break; + } +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: + { + fileClose(fileID); + if (recordBufIsToBeDeleted) extDelete(streamptr->record->objectp); + break; + } +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: + { + fileClose(fileID); + if (recordBufIsToBeDeleted) iegDelete(streamptr->record->objectp); + break; + } +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: + { + cdfClose(fileID); + if (streamptr->ntsteps == 0 && streamptr->tsteps != NULL) + { + if (streamptr->tsteps[0].records) + { + Free(streamptr->tsteps[0].records); + streamptr->tsteps[0].records = NULL; + } + if (streamptr->tsteps[0].recIDs) + { + Free(streamptr->tsteps[0].recIDs); + streamptr->tsteps[0].recIDs = NULL; + } + } + break; + } +#endif + default: + { + Error("%s support not compiled in (fileID = %d)!", strfiletype(filetype), fileID); + break; + } + } +} + +static void +deallocate_sleveltable_t(sleveltable_t *entry) +{ + if (entry->recordID) Free(entry->recordID); + if (entry->lindex) Free(entry->lindex); + entry->recordID = NULL; + entry->lindex = NULL; +} + +static void +streamDestroy(stream_t *streamptr) +{ + xassert(streamptr); + int vlistID = streamptr->vlistID; + + void (*streamCloseDelegate)(stream_t * streamptr, int recordBufIsToBeDeleted) + = (void (*)(stream_t *, int)) namespaceSwitchGet(NSSWITCH_STREAM_CLOSE_BACKEND).func; + + if (streamptr->filetype != -1) streamCloseDelegate(streamptr, 1); + + if (streamptr->record) + { + if (streamptr->record->buffer) Free(streamptr->record->buffer); + Free(streamptr->record); + } + + streamptr->filetype = 0; + if (streamptr->filename) + { + Free(streamptr->filename); + streamptr->filename = NULL; + } + + for (int index = 0; index < streamptr->nvars; index++) + { + sleveltable_t *pslev = streamptr->vars[index].recordTable; + unsigned nsub = streamptr->vars[index].subtypeSize >= 0 ? (unsigned) streamptr->vars[index].subtypeSize : 0U; + for (size_t isub = 0; isub < nsub; isub++) deallocate_sleveltable_t(pslev + isub); + if (pslev) Free(pslev); + } + Free(streamptr->vars); + streamptr->vars = NULL; + + if (streamptr->tsteps) + { + int maxSteps = streamptr->tstepsNextID; + for (int index = 0; index < maxSteps; ++index) + { + tsteps_t *tstep = &(streamptr->tsteps[index]); +#ifdef HAVE_LIBFDB5 + if (tstep->records && tstep->records->fdbItem) free(tstep->records->fdbItem); +#endif + if (tstep->records) Free(tstep->records); + if (tstep->recIDs) Free(tstep->recIDs); + taxisDestroyKernel(&(tstep->taxis)); + } + + Free(streamptr->tsteps); + } + + if (vlistID != -1) + { + if (streamptr->filemode != 'w' && vlistInqTaxis(vlistID) != -1) taxisDestroy(vlistInqTaxis(vlistID)); + void (*mycdiVlistDestroy_)(int, bool) = (void (*)(int, bool)) namespaceSwitchGet(NSSWITCH_VLIST_DESTROY_).func; + mycdiVlistDestroy_(vlistID, true); + } + + if (streamptr->jobs) free(streamptr->jobs); + if (streamptr->jobManager) AsyncWorker_finalize((AsyncManager *) streamptr->jobManager); + + Free(streamptr); +} + +static void +streamDestroyP(void *streamptr) +{ + streamDestroy((stream_t *) streamptr); +} + +/* +@Function streamClose +@Title Close an open dataset + +@Prototype void streamClose(int streamID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead} or @fref{streamOpenWrite}. + +@Description +The function @func{streamClose} closes an open dataset. + +@EndFunction +*/ +void +streamClose(int streamID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + + if (CDI_Debug) Message("streamID = %d filename = %s", streamID, streamptr->filename); + streamDestroy(streamptr); + reshRemove(streamID, &streamOps); + if (CDI_Debug) Message("Removed stream %d from stream list", streamID); +} + +void +cdiStreamSync_(stream_t *streamptr) +{ + int fileID = streamptr->fileID; + int filetype = streamptr->filetype; + int vlistID = streamptr->vlistID; + int nvars = vlistNvars(vlistID); + + if (fileID == CDI_UNDEFID) + Warning("File %s not open!", streamptr->filename); + else if (vlistID == CDI_UNDEFID) + Warning("Vlist undefined for file %s!", streamptr->filename); + else if (nvars == 0) + Warning("No variables defined!"); + else + { + if (streamptr->filemode == 'w' || streamptr->filemode == 'a') + { + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: + { + void cdf_sync(int ncid); + if (streamptr->ncmode == 2) cdf_sync(fileID); + break; + } +#endif + default: + { + fileFlush(fileID); + break; + } + } + } + } +} + +/* +@Function streamSync +@Title Synchronize an Open Dataset to Disk + +@Prototype void streamSync(int streamID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + +@Description +The function @func{streamSync} offers a way to synchronize the disk copy of a dataset with in-memory buffers. + +@EndFunction +*/ +void +streamSync(int streamID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + + void (*myStreamSync_)(stream_t * streamptr) = (void (*)(stream_t *)) namespaceSwitchGet(NSSWITCH_STREAM_SYNC).func; + myStreamSync_(streamptr); +} + +int +cdiStreamDefTimestep_(stream_t *streamptr, int tsID) +{ + stream_check_ptr(__func__, streamptr); + + if (CDI_Debug) Message("streamID = %d tsID = %d", streamptr->self, tsID); + + int vlistID = streamptr->vlistID; + if (vlistID == CDI_UNDEFID) + Error("Must not call streamDefTimestep for stream (ID=%d)" + " with (not yet) defined vlist", + streamptr->self); + + int timeIsVarying = vlistHasTime(vlistID); + int taxisID = vlistInqTaxis(vlistID); + + /* moved to cdiStreamSetupVlist + int taxisID = timeIsVarying ? vlistInqTaxis(vlistID) : CDI_UNDEFID; + if (timeIsVarying) + { + if (taxisID == CDI_UNDEFID) + { + Warning("taxisID undefined for fileID = %d! Using absolute time axis.", streamptr->self); + taxisID = taxisCreate(TAXIS_ABSOLUTE); + vlistDefTaxis(vlistID, taxisID); + } + } + */ + if (tsID > 0) + { + int newtsID = tstepsNewEntry(streamptr); + if (tsID != newtsID) Error("Internal problem: tsID = %d newtsID = %d", tsID, newtsID); + } + + if (timeIsVarying) ptaxisCopy(&streamptr->tsteps[tsID].taxis, taxisPtr(taxisID)); + + streamptr->curTsID = tsID; + streamptr->ntsteps = tsID + 1; + +#ifdef HAVE_LIBNETCDF + if (cdiBaseFiletype(streamptr->filetype) == CDI_FILETYPE_NETCDF && timeIsVarying) + { + /* usually points to cdfDefTimestep in serial mode but + * to cdiPioCdfDefTimestep on servers and to a null-op on + * clients in client/server mode */ + void (*myCdfDefTimestep)(stream_t * streamptr, int tsID, size_t) + = (void (*)(stream_t *, int, size_t)) namespaceSwitchGet(NSSWITCH_CDF_DEF_TIMESTEP).func; + myCdfDefTimestep(streamptr, tsID, 1); + } +#endif + + cdi_create_records(streamptr, tsID); + + return (int) streamptr->ntsteps; +} + +/* +@Function streamDefTimestep +@Title Define a timestep + +@Prototype int streamDefTimestep(int streamID, int tsID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item tsID Timestep identifier. + +@Description +The function @func{streamDefTimestep} defines a timestep of a stream by the identifier tsID. +The identifier tsID is the timestep index starting at 0 for the first timestep. +Before calling this function the functions @func{taxisDefVdate} and @func{taxisDefVtime} should be used +to define the timestamp for this timestep. All calls to write the data refer to this timestep. + +@Result +@func{streamDefTimestep} returns the number of expected records of the timestep. + +@EndFunction +*/ +int +streamDefTimestep(int streamID, int tsID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + int (*myStreamDefTimestep_)(stream_t * streamptr, int tsID) + = (int (*)(stream_t *, int)) namespaceSwitchGet(NSSWITCH_STREAM_DEF_TIMESTEP_).func; + return myStreamDefTimestep_(streamptr, tsID); +} + +int +streamInqCurTimestepID(int streamID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + return streamptr->curTsID; +} + +/* +@Function streamInqTimestep +@Title Get timestep information + +@Prototype int streamInqTimestep(int streamID, int tsID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead} or @fref{streamOpenWrite}. + @Item tsID Timestep identifier. + +@Description +The function @func{streamInqTimestep} sets the next timestep to the identifier tsID. +The identifier tsID is the timestep index starting at 0 for the first timestep. +After a call to this function the functions @func{taxisInqVdate} and @func{taxisInqVtime} can be used +to read the timestamp for this timestep. All calls to read the data refer to this timestep. + +@Result +@func{streamInqTimestep} returns the number of records of the timestep or 0, if the end of the file is reached. + +@EndFunction +*/ +int +streamInqTimestep(int streamID, int tsID) +{ + int nrecs = 0; + stream_t *streamptr = stream_to_pointer(streamID); + int vlistID = streamptr->vlistID; + + if (tsID < streamptr->ntsteps) streamptr->tsteps[tsID].curRecID = CDI_UNDEFID; // fix for netCDF + if (tsID < streamptr->rtsteps) + { + streamptr->curTsID = tsID; + nrecs = streamptr->tsteps[tsID].nrecs; + streamptr->tsteps[tsID].curRecID = CDI_UNDEFID; + int taxisID = vlistInqTaxis(vlistID); + if (taxisID == -1) Error("Timestep undefined for fileID = %d", streamID); + ptaxisCopy(taxisPtr(taxisID), &streamptr->tsteps[tsID].taxis); + + return nrecs; + } + + if (tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID) return 0; + + int filetype = streamptr->filetype; + + if (CDI_Debug) Message("streamID = %d tsID = %d filetype = %d", streamID, tsID, filetype); + + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: + { + switch (streamptr->protocol) + { + case CDI_PROTOCOL_FDB: nrecs = fdbInqTimestep(streamptr, tsID); break; + + case CDI_PROTOCOL_ACROSS: // TODO read from ACROSS + case CDI_PROTOCOL_OTHER: + case CDI_PROTOCOL_FILE: nrecs = grbInqTimestep(streamptr, tsID); break; + } + break; + } +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: + { + nrecs = srvInqTimestep(streamptr, tsID); + break; + } +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: + { + nrecs = extInqTimestep(streamptr, tsID); + break; + } +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: + { + nrecs = iegInqTimestep(streamptr, tsID); + break; + } +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: + { + nrecs = cdfInqTimestep(streamptr, tsID); + break; + } +#endif + default: + { + Error("%s support not compiled in!", strfiletype(filetype)); + break; + } + } + + int taxisID = vlistInqTaxis(vlistID); + if (taxisID == -1) Error("Timestep undefined for fileID = %d", streamID); + + ptaxisCopy(taxisPtr(taxisID), &streamptr->tsteps[tsID].taxis); + + return nrecs; +} + +// This function is used in CDO! +SizeType +streamNvals(int streamID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + return streamptr->numvals; +} + +/* +@Function streamDefVlist +@Title Define the variable list + +@Prototype void streamDefVlist(int streamID, int vlistID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + +@Description +The function @func{streamDefVlist} defines the variable list of a stream. + +To safeguard against errors by modifying the wrong vlist object, +this function makes the passed vlist object immutable. +All further vlist changes have to use the vlist object returned by streamInqVlist(). + +@EndFunction +*/ +void +streamDefVlist(int streamID, int vlistID) +{ + void (*myStreamDefVlist)(int streamID, int vlistID) = (void (*)(int, int)) namespaceSwitchGet(NSSWITCH_STREAM_DEF_VLIST_).func; + myStreamDefVlist(streamID, vlistID); +} + +// The single image implementation of streamDefVlist +void +cdiStreamDefVlist_(int streamID, int vlistID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + + if (streamptr->vlistID == CDI_UNDEFID) + { + int vlistCopy = vlistDuplicate(vlistID); + cdiVlistMakeInternal(vlistCopy); + cdiVlistMakeImmutable(vlistID); + cdiStreamSetupVlist(streamptr, vlistCopy); + } + else + Warning("vlist already defined for %s!", streamptr->filename); +} + +/* +@Function streamInqVlist +@Title Get the variable list + +@Prototype int streamInqVlist(int streamID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead} or @fref{streamOpenWrite}. + +@Description +The function @func{streamInqVlist} returns the variable list of a stream. + +@Result +@func{streamInqVlist} returns an identifier to the variable list. + +@EndFunction +*/ +int +streamInqVlist(int streamID) +{ + stream_t *s = stream_to_pointer(streamID); + return s->vlistID; +} + +void +streamDefFilter(int streamID, int filterId, int numParams, const int *params) +{ + stream_t *s = stream_to_pointer(streamID); + if ((int) s->filterId != filterId) + { + if (numParams > (int) s->maxParams) Error("Too many filter parameter %d (max=%zu)!", numParams, s->maxParams); + s->filterId = filterId; + s->numParams = numParams; + for (int i = 0; i < numParams; ++i) s->params[i] = params[i]; + reshSetStatus(streamID, &streamOps, RESH_DESYNC_IN_USE); + } +} + +void +streamDefCompType(int streamID, int comptype) +{ + stream_t *s = stream_to_pointer(streamID); + if (s->comptype != comptype) + { + s->comptype = comptype; + reshSetStatus(streamID, &streamOps, RESH_DESYNC_IN_USE); + } +} + +void +streamDefCompLevel(int streamID, int complevel) +{ + stream_t *s = stream_to_pointer(streamID); + if (s->complevel != complevel) + { + s->complevel = complevel; + reshSetStatus(streamID, &streamOps, RESH_DESYNC_IN_USE); + } +} + +int +streamInqCompType(int streamID) +{ + stream_t *s = stream_to_pointer(streamID); + return s->comptype; +} + +int +streamInqCompLevel(int streamID) +{ + stream_t *s = stream_to_pointer(streamID); + return s->complevel; +} + +int +streamInqFileID(int streamID) +{ + stream_t *s = (stream_t *) reshGetVal(streamID, &streamOps); + return s->fileID; +} + +void +cdiDefAccesstype(int streamID, int type) +{ + stream_t *s = (stream_t *) reshGetVal(streamID, &streamOps); + + if (s->accesstype == CDI_UNDEFID) + { + s->accesstype = type; + } + else if (s->accesstype != type) + Error("Changing access type from %s not allowed!", s->accesstype == TYPE_REC ? "REC to VAR" : "VAR to REC"); +} + +int +cdiInqAccesstype(int streamID) +{ + stream_t *s = (stream_t *) reshGetVal(streamID, &streamOps); + return s->accesstype; +} + +static int +streamTxCode(void *s) +{ + (void) s; + return STREAM; +} + +void +cdiStreamSetupVlist(stream_t *s, int vlistID) +{ + void (*myStreamSetupVlist)(stream_t * s, int vlistID) + = (void (*)(stream_t *, int)) namespaceSwitchGet(NSSWITCH_STREAM_SETUP_VLIST).func; + myStreamSetupVlist(s, vlistID); +} + +void +cdiStreamSetupVlist_(stream_t *streamptr, int vlistID) +{ + streamptr->vlistID = vlistID; + int nvars = vlistNvars(vlistID); + for (int varID = 0; varID < nvars; ++varID) + { + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + int tilesetID = vlistInqVarSubtype(vlistID, varID); + stream_new_var(streamptr, gridID, zaxisID, tilesetID); + if (streamptr->have_missval) vlistDefVarMissval(vlistID, varID, vlistInqVarMissval(vlistID, varID)); + } + + if (streamptr->filemode == 'w') + { + tstepsNewEntry(streamptr); // timestep 0 + int vlistIDw = streamptr->vlistID; + int timeIsVarying = vlistHasTime(vlistIDw); + if (timeIsVarying) + { + int taxisID = vlistInqTaxis(vlistIDw); + if (taxisID == CDI_UNDEFID) + { + Warning("taxisID undefined for fileID = %d! Using absolute time axis.", streamptr->self); + taxisID = taxisCreate(TAXIS_ABSOLUTE); + vlistDefTaxis(vlistIDw, taxisID); + } + +#ifdef HAVE_LIBNETCDF + if (taxisInqType(taxisID) == TAXIS_RELATIVE) + if (cdiBaseFiletype(streamptr->filetype) == CDI_FILETYPE_NETCDF) + { + const taxis_t *taxisptr = taxisPtr(taxisID); + if (cdiDateTime_isNull(taxisptr->rDateTime)) + { + int vdate = taxisInqVdate(taxisID); + if (vdate == 0) vdate = 10101; + taxisDefRdate(taxisID, vdate); + } + } +#endif + ptaxisCopy(&streamptr->tsteps[0].taxis, taxisPtr(taxisID)); + } + + switch (cdiBaseFiletype(streamptr->filetype)) + { +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: + { + /* calls cdfDefCoordinateVars in serial mode but + * cdiPioClientStreamNOP (i.e. nothing) on client ranks + * and cdiPioServerCdfDefVars on server ranks in parallel mode*/ + void (*myCdfDefVars)(stream_t * streamptr) = (void (*)(stream_t *)) namespaceSwitchGet(NSSWITCH_CDF_STREAM_SETUP).func; + myCdfDefVars(streamptr); + } + break; +#endif +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: gribContainersNew(streamptr); break; +#endif + default:; + } + } +} + +void +cdiStreamGetIndexList(unsigned numIDs, int *IDs) +{ + reshGetResHListOfType(numIDs, IDs, &streamOps); +} + +int +streamInqNvars(int streamID) +{ + stream_t *s = (stream_t *) reshGetVal(streamID, &streamOps); + return s->nvars; +} + +static int +streamCompareP(void *streamptr1, void *streamptr2) +{ + stream_t *s1 = (stream_t *) streamptr1; + stream_t *s2 = (stream_t *) streamptr2; + enum + { + differ = -1, + equal = 0, + }; + + xassert(s1); + xassert(s2); + + if (s1->filetype != s2->filetype) return differ; + if (s1->byteorder != s2->byteorder) return differ; + if (s1->comptype != s2->comptype) return differ; + if (s1->complevel != s2->complevel) return differ; + + if (s1->filename) + { + if (!str_is_equal(s1->filename, s2->filename)) return differ; + } + else if (s2->filename) + return differ; + + return equal; +} + +void +streamPrintP(void *streamptr, FILE *fp) +{ + stream_t *sp = (stream_t *) streamptr; + + if (!sp) return; + + fprintf(fp, + "#\n" + "# streamID %d\n" + "#\n" + "self = %d\n" + "accesstype = %d\n" + "accessmode = %d\n" + "filetype = %d\n" + "byteorder = %d\n" + "fileID = %d\n" + "filemode = %d\n" + "filename = %s\n" + "nrecs = %d\n" + "nvars = %d\n" + "varsAllocated = %d\n" + "curTsID = %d\n" + "rtsteps = %d\n" + "ntsteps = %ld\n" + "tstepsTableSize= %d\n" + "tstepsNextID = %d\n" + "ncmode = %d\n" + "vlistID = %d\n" + "globalatts = %d\n" + "localatts = %d\n" + "unreduced = %d\n" + "sortname = %d\n" + "have_missval = %d\n" + "ztype = %d\n" + "zlevel = %d\n", + sp->self, sp->self, sp->accesstype, sp->accessmode, sp->filetype, sp->byteorder, sp->fileID, sp->filemode, sp->filename, + sp->nrecs, sp->nvars, sp->varsAllocated, sp->curTsID, sp->rtsteps, sp->ntsteps, sp->tstepsTableSize, sp->tstepsNextID, + sp->ncmode, sp->vlistID, sp->globalatts, sp->localatts, sp->unreduced, sp->sortname, sp->have_missval, sp->comptype, + sp->complevel); +} + +enum +{ + streamNint = 10, +}; + +static int +streamGetPackSize(void *voidP, void *context) +{ + stream_t *streamP = (stream_t *) voidP; + int packBufferSize = serializeGetSize(streamNint, CDI_DATATYPE_INT, context) + serializeGetSize(2, CDI_DATATYPE_UINT32, context) + + serializeGetSize((int) strlen(streamP->filename) + 1, CDI_DATATYPE_TXT, context) + + serializeGetSize(1, CDI_DATATYPE_FLT64, context); + return packBufferSize; +} + +static void +streamPack(void *streamptr, void *packBuffer, int packBufferSize, int *packBufferPos, void *context) +{ + stream_t *streamP = (stream_t *) streamptr; + int intBuffer[streamNint]; + + intBuffer[0] = streamP->self; + intBuffer[1] = streamP->filetype; + intBuffer[2] = (int) strlen(streamP->filename) + 1; + intBuffer[3] = streamP->vlistID; + intBuffer[4] = streamP->byteorder; + intBuffer[5] = streamP->comptype; + intBuffer[6] = streamP->complevel; + intBuffer[7] = streamP->unreduced; + intBuffer[8] = streamP->sortname; + intBuffer[9] = streamP->have_missval; + + serializePack(intBuffer, streamNint, CDI_DATATYPE_INT, packBuffer, packBufferSize, packBufferPos, context); + uint32_t d = cdiCheckSum(CDI_DATATYPE_INT, streamNint, intBuffer); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + + serializePack(&CDI_Default_Missval, 1, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + serializePack(streamP->filename, intBuffer[2], CDI_DATATYPE_TXT, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_TXT, intBuffer[2], streamP->filename); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); +} + +struct streamAssoc +streamUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context) +{ + int intBuffer[streamNint]; + uint32_t d; + char filename[CDI_MAX_NAME]; + + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, intBuffer, streamNint, CDI_DATATYPE_INT, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_INT, streamNint, intBuffer) == d); + + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &CDI_Default_Missval, 1, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &filename, intBuffer[2], CDI_DATATYPE_TXT, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(d == cdiCheckSum(CDI_DATATYPE_TXT, intBuffer[2], filename)); + int targetStreamID = namespaceAdaptKey(intBuffer[0], originNamespace), + streamID = streamOpenID(filename, 'w', intBuffer[1], targetStreamID); + xassert(streamID >= 0 && targetStreamID == streamID); + streamDefByteorder(streamID, intBuffer[4]); + streamDefCompType(streamID, intBuffer[5]); + streamDefCompLevel(streamID, intBuffer[6]); + stream_t *streamptr = stream_to_pointer(streamID); + streamptr->unreduced = intBuffer[7]; + streamptr->sortname = intBuffer[8]; + streamptr->have_missval = intBuffer[9]; + struct streamAssoc retval = { streamID, intBuffer[3] }; + return retval; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + + +// the single image implementation +int +cdiStreamWriteVar_(int streamID, int varID, int memtype, const void *data, SizeType nmiss) +{ + // May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision writing. + // A value > 0 is returned in this case, otherwise it returns zero. + int status = 0; + + if (CDI_Debug) Message("streamID = %d varID = %d", streamID, varID); + + check_parg(data); + + stream_t *streamptr = stream_to_pointer(streamID); + if (subtypeInqActiveIndex(streamptr->vars[varID].subtypeID) != 0) Error("Writing of non-trivial subtypes not yet implemented!"); + + // check taxis + if (streamptr->curTsID == CDI_UNDEFID) streamDefTimestep(streamID, 0); + + const int filetype = streamptr->filetype; + + if (memtype == MEMTYPE_FLOAT && cdiFiletypeIsExse(filetype)) return 1; + + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: grb_write_var(streamptr, varID, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: srvWriteVarDP(streamptr, varID, (double *) data); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: extWriteVarDP(streamptr, varID, (double *) data); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: iegWriteVarDP(streamptr, varID, (double *) data); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: cdf_write_var(streamptr, varID, memtype, data, nmiss); break; +#endif + default: Error("%s support not compiled in!", strfiletype(filetype)); + } + + return status; +} + +/* +@Function streamWriteVar +@Title Write a variable + +@Prototype void streamWriteVar(int streamID, int varID, const double *data, SizeType nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item varID Variable identifier. + @Item data Pointer to a block of double precision floating point data values to be written. + @Item nmiss Number of missing values. + +@Description +The function streamWriteVar writes the values of one time step of a variable to an open dataset. +The values are converted to the external data type of the variable, if necessary. +@EndFunction +*/ +void +streamWriteVar(int streamID, int varID, const double *data, SizeType nmiss) +{ + void (*myCdiStreamWriteVar_)(int streamID, int varID, int memtype, const void *data, SizeType nmiss) + = (void (*)(int, int, int, const void *, SizeType)) namespaceSwitchGet(NSSWITCH_STREAM_WRITE_VAR_).func; + + myCdiStreamWriteVar_(streamID, varID, MEMTYPE_DOUBLE, (const void *) data, nmiss); +} + +/* +@Function streamWriteVarF +@Title Write a variable + +@Prototype void streamWriteVarF(int streamID, int varID, const float *data, SizeType nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item varID Variable identifier. + @Item data Pointer to a block of single precision floating point data values to be written. + @Item nmiss Number of missing values. + +@Description +The function streamWriteVarF writes the values of one time step of a variable to an open dataset. +The values are converted to the external data type of the variable, if necessary. +@EndFunction +*/ +void +streamWriteVarF(int streamID, int varID, const float *data, SizeType nmiss) +{ + int (*myCdiStreamWriteVar_)(int streamID, int varID, int memtype, const void *data, SizeType nmiss) + = (int (*)(int, int, int, const void *, SizeType)) namespaceSwitchGet(NSSWITCH_STREAM_WRITE_VAR_).func; + + if (myCdiStreamWriteVar_(streamID, varID, MEMTYPE_FLOAT, (const void *) data, nmiss)) + { + // In case the file format does not support single precision writing, + // we fall back to double precision writing, converting the data on the fly. + const int vlistID = streamInqVlist(streamID); + SizeType elementCount = gridInqSize(vlistInqVarGrid(vlistID, varID)); + elementCount *= (SizeType) zaxisInqSize(vlistInqVarZaxis(vlistID, varID)); + double *conversionBuffer = (double *) Malloc(elementCount * sizeof(*conversionBuffer)); + for (SizeType i = elementCount; i--;) conversionBuffer[i] = (double) data[i]; + myCdiStreamWriteVar_(streamID, varID, MEMTYPE_DOUBLE, (const void *) conversionBuffer, nmiss); + Free(conversionBuffer); + } +} + +static int +cdiStreamWriteVarSlice(int streamID, int varID, int levelID, int memtype, const void *data, SizeType nmiss) +{ + // May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision writing. + // A value > 0 is returned in this case, otherwise it returns zero. + int status = 0; + + if (CDI_Debug) Message("streamID = %d varID = %d", streamID, varID); + + check_parg(data); + + stream_t *streamptr = stream_to_pointer(streamID); + if (subtypeInqActiveIndex(streamptr->vars[varID].subtypeID) != 0) Error("Writing of non-trivial subtypes not yet implemented!"); + + // check taxis + if (streamptr->curTsID == CDI_UNDEFID) streamDefTimestep(streamID, 0); + + const int filetype = streamptr->filetype; + + if (memtype == MEMTYPE_FLOAT && cdiFiletypeIsExse(filetype)) return 1; + + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: grb_write_var_slice(streamptr, varID, levelID, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: srvWriteVarSliceDP(streamptr, varID, levelID, (double *) data); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: extWriteVarSliceDP(streamptr, varID, levelID, (double *) data); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: iegWriteVarSliceDP(streamptr, varID, levelID, (double *) data); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: cdf_write_var_slice(streamptr, varID, levelID, memtype, data, nmiss); break; +#endif + default: Error("%s support not compiled in!", strfiletype(filetype)); + } + + return status; +} + +/* +@Function streamWriteVarSlice +@Title Write a horizontal slice of a variable + +@Prototype void streamWriteVarSlice(int streamID, int varID, int levelID, const double *data, SizeType nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item varID Variable identifier. + @Item levelID Level identifier. + @Item data Pointer to a block of double precision floating point data values to be written. + @Item nmiss Number of missing values. + +@Description +The function streamWriteVarSlice writes the values of a horizontal slice of a variable to an open dataset. +The values are converted to the external data type of the variable, if necessary. +@EndFunction +*/ +void +streamWriteVarSlice(int streamID, int varID, int levelID, const double *data, SizeType nmiss) +{ + cdiStreamWriteVarSlice(streamID, varID, levelID, MEMTYPE_DOUBLE, (const void *) data, nmiss); +} + +/* +@Function streamWriteVarSliceF +@Title Write a horizontal slice of a variable + +@Prototype void streamWriteVarSliceF(int streamID, int varID, int levelID, const float *data, SizeType nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item varID Variable identifier. + @Item levelID Level identifier. + @Item data Pointer to a block of single precision floating point data values to be written. + @Item nmiss Number of missing values. + +@Description +The function streamWriteVarSliceF writes the values of a horizontal slice of a variable to an open dataset. +The values are converted to the external data type of the variable, if necessary. +@EndFunction +*/ +void +streamWriteVarSliceF(int streamID, int varID, int levelID, const float *data, SizeType nmiss) +{ + if (cdiStreamWriteVarSlice(streamID, varID, levelID, MEMTYPE_FLOAT, (const void *) data, nmiss)) + { + // In case the file format does not support single precision writing, + // we fall back to double precision writing, converting the data on the fly. + const SizeType elementCount = gridInqSize(vlistInqVarGrid(streamInqVlist(streamID), varID)); + double *conversionBuffer = (double *) Malloc(elementCount * sizeof(*conversionBuffer)); + for (SizeType i = elementCount; i--;) conversionBuffer[i] = (double) data[i]; + streamWriteVarSlice(streamID, varID, levelID, conversionBuffer, nmiss); + Free(conversionBuffer); + } +} + +void +streamWriteVarChunk(int streamID, int varID, const int rect[][2], const double *data, SizeType nmiss) +{ + void (*myCdiStreamWriteVarChunk_)(int streamID, int varID, int memtype, const int rect[3][2], const void *data, SizeType nmiss) + = (void (*)(int, int, int, const int[3][2], const void *, SizeType)) namespaceSwitchGet(NSSWITCH_STREAM_WRITE_VAR_CHUNK_) + .func; + myCdiStreamWriteVarChunk_(streamID, varID, MEMTYPE_DOUBLE, rect, data, nmiss); +} + +void +streamWriteVarChunkF(int streamID, int varID, const int rect[][2], const float *data, SizeType nmiss) +{ + void (*myCdiStreamWriteVarChunk_)(int streamID, int varID, int memtype, const int rect[3][2], const void *data, SizeType nmiss) + = (void (*)(int, int, int, const int[3][2], const void *, SizeType)) namespaceSwitchGet(NSSWITCH_STREAM_WRITE_VAR_CHUNK_) + .func; + myCdiStreamWriteVarChunk_(streamID, varID, MEMTYPE_FLOAT, rect, data, nmiss); +} + +// single image implementation +void +cdiStreamWriteVarChunk_(int streamID, int varID, int memtype, const int rect[][2], const void *data, SizeType nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamID, varID); + + stream_t *streamptr = stream_to_pointer(streamID); + + // streamDefineTaxis(streamID); + + const int filetype = streamptr->filetype; + + switch (cdiBaseFiletype(filetype)) + { +#if defined(HAVE_LIBGRIB) + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: +#endif +#if defined(HAVE_LIBSERVICE) + case CDI_FILETYPE_SRV: +#endif +#if defined(HAVE_LIBEXTRA) + case CDI_FILETYPE_EXT: +#endif +#if defined(HAVE_LIBIEG) + case CDI_FILETYPE_IEG: +#endif +#if defined(HAVE_LIBGRIB) || defined(HAVE_LIBSERVICE) || defined(HAVE_LIBEXTRA) || defined(HAVE_LIBIEG) + xabort("streamWriteVarChunk not implemented for filetype %s!", strfiletype(filetype)); + break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: cdf_write_var_chunk(streamptr, varID, memtype, rect, data, nmiss); break; +#endif + default: Error("%s support not compiled in!", strfiletype(filetype)); break; + } +} + +static void +stream_write_record(int streamID, int memtype, const void *data, SizeType nmiss) +{ + check_parg(data); + + stream_t *streamptr = stream_to_pointer(streamID); + + switch (cdiBaseFiletype(streamptr->filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: grb_write_record(streamptr, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: srv_write_record(streamptr, memtype, data); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: ext_write_record(streamptr, memtype, data); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: ieg_write_record(streamptr, memtype, data); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: cdf_write_record(streamptr, memtype, data, nmiss); break; +#endif + default: Error("%s support not compiled in!", strfiletype(streamptr->filetype)); + } +} + +/* +@Function streamWriteRecord +@Title Write a horizontal slice of a variable + +@Prototype void streamWriteRecord(int streamID, const double *data, SizeType nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item data Pointer to a block of double precision floating point data values to be written. + @Item nmiss Number of missing values. + +@Description +The function streamWriteRecord writes the values of a horizontal slice (record) of a variable to an open dataset. +The values are converted to the external data type of the variable, if necessary. +@EndFunction +*/ +void +streamWriteRecord(int streamID, const double *data, SizeType nmiss) +{ + stream_write_record(streamID, MEMTYPE_DOUBLE, (const void *) data, nmiss); +} + +void +streamWriteRecordF(int streamID, const float *data, SizeType nmiss) +{ + stream_write_record(streamID, MEMTYPE_FLOAT, (const void *) data, nmiss); +} +#ifdef HAVE_CONFIG_H +#endif + + +// the single image implementation +static int +cdiStreamReadVar(int streamID, int varID, int memtype, void *data, size_t *nmiss) +{ + // May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision reading. + // A value > 0 is returned in this case, otherwise it returns zero. + int status = 0; + + if (CDI_Debug) Message("streamID = %d varID = %d", streamID, varID); + + check_parg(data); + check_parg(nmiss); + + stream_t *streamptr = stream_to_pointer(streamID); + const int filetype = streamptr->filetype; + + *nmiss = 0; + + if (memtype == MEMTYPE_FLOAT && cdiFiletypeIsExse(filetype)) return 1; + + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: grb_read_var(streamptr, varID, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: srvReadVarDP(streamptr, varID, (double *) data, nmiss); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: extReadVarDP(streamptr, varID, (double *) data, nmiss); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: iegReadVarDP(streamptr, varID, (double *) data, nmiss); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: cdf_read_var(streamptr, varID, memtype, data, nmiss); break; +#endif + default: Error("%s support not compiled in!", strfiletype(filetype)); + } + + return status; +} + +/* +@Function streamReadVar +@Title Read a variable + +@Prototype void streamReadVar(int streamID, int varID, double *data, SizeType *nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead}. + @Item varID Variable identifier. + @Item data Pointer to the location into which the data values are read. + The caller must allocate space for the returned values. + @Item nmiss Number of missing values. + +@Description +The function streamReadVar reads all the values of one time step of a variable +from an open dataset. +@EndFunction +*/ +void +streamReadVar(int streamID, int varID, double *data, SizeType *nmiss) +{ + size_t numMiss = 0; + cdiStreamReadVar(streamID, varID, MEMTYPE_DOUBLE, data, &numMiss); + *nmiss = (SizeType) numMiss; +} + +/* +@Function streamReadVarF +@Title Read a variable + +@Prototype void streamReadVar(int streamID, int varID, float *data, SizeType *nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead}. + @Item varID Variable identifier. + @Item data Pointer to the location into which the data values are read. + The caller must allocate space for the returned values. + @Item nmiss Number of missing values. + +@Description +The function streamReadVar reads all the values of one time step of a variable +from an open dataset. +@EndFunction +*/ +void +streamReadVarF(int streamID, int varID, float *data, SizeType *nmiss) +{ + size_t numMiss = 0; + if (cdiStreamReadVar(streamID, varID, MEMTYPE_FLOAT, data, &numMiss)) + { + // In case the file format does not support single precision reading, + // we fall back to double precision reading, converting the data on the fly. + size_t elementCount = gridInqSize(vlistInqVarGrid(streamInqVlist(streamID), varID)); + elementCount *= (size_t) zaxisInqSize(vlistInqVarZaxis(streamInqVlist(streamID), varID)); + double *conversionBuffer = (double *) Malloc(elementCount * sizeof(*conversionBuffer)); + streamReadVar(streamID, varID, conversionBuffer, nmiss); + for (size_t i = elementCount; i--;) data[i] = (float) conversionBuffer[i]; + Free(conversionBuffer); + } + *nmiss = (SizeType) numMiss; +} + +static int +cdiStreamReadVarSlice(int streamID, int varID, int levelID, int memtype, void *data, size_t *nmiss) +{ + // May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision reading. + // A value > 0 is returned in this case, otherwise it returns zero. + int status = 0; + + if (CDI_Debug) Message("streamID = %d varID = %d", streamID, varID); + + check_parg(data); + check_parg(nmiss); + + stream_t *streamptr = stream_to_pointer(streamID); + const int filetype = streamptr->filetype; + + *nmiss = 0; + + if (memtype == MEMTYPE_FLOAT && cdiFiletypeIsExse(filetype)) return 1; + + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: grb_read_var_slice(streamptr, varID, levelID, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: srvReadVarSliceDP(streamptr, varID, levelID, (double *) data, nmiss); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: extReadVarSliceDP(streamptr, varID, levelID, (double *) data, nmiss); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: iegReadVarSliceDP(streamptr, varID, levelID, (double *) data, nmiss); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: cdf_read_var_slice(streamptr, varID, levelID, memtype, data, nmiss); break; +#endif + default: Error("%s support not compiled in!", strfiletype(filetype)); + } + + return status; +} + +/* +@Function streamReadVarSlice +@Title Read a horizontal slice of a variable + +@Prototype void streamReadVarSlice(int streamID, int varID, int levelID, double *data, SizeType *nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead}. + @Item varID Variable identifier. + @Item levelID Level identifier. + @Item data Pointer to the location into which the data values are read. + The caller must allocate space for the returned values. + @Item nmiss Number of missing values. + +@Description +The function streamReadVarSlice reads all the values of a horizontal slice of a variable +from an open dataset. +@EndFunction +*/ +void +streamReadVarSlice(int streamID, int varID, int levelID, double *data, SizeType *nmiss) +{ + size_t numMiss = 0; + if (cdiStreamReadVarSlice(streamID, varID, levelID, MEMTYPE_DOUBLE, data, &numMiss)) + { + Warning("Unexpected error returned from cdiStreamReadVarSlice()!"); + size_t elementCount = gridInqSize(vlistInqVarGrid(streamInqVlist(streamID), varID)); + memset(data, 0, elementCount * sizeof(*data)); + } + *nmiss = (SizeType) numMiss; +} + +/* +@Function streamReadVarSliceF +@Title Read a horizontal slice of a variable + +@Prototype void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, SizeType *nmiss) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenRead}. + @Item varID Variable identifier. + @Item levelID Level identifier. + @Item data Pointer to the location into which the data values are read. + The caller must allocate space for the returned values. + @Item nmiss Number of missing values. + +@Description +The function streamReadVarSliceF reads all the values of a horizontal slice of a variable +from an open dataset. +@EndFunction +*/ +void +streamReadVarSliceF(int streamID, int varID, int levelID, float *data, SizeType *nmiss) +{ + size_t numMiss = 0; + if (cdiStreamReadVarSlice(streamID, varID, levelID, MEMTYPE_FLOAT, data, &numMiss)) + { + // In case the file format does not support single precision reading, + // we fall back to double precision reading, converting the data on the fly. + size_t elementCount = gridInqSize(vlistInqVarGrid(streamInqVlist(streamID), varID)); + double *conversionBuffer = (double *) Malloc(elementCount * sizeof(*conversionBuffer)); + streamReadVarSlice(streamID, varID, levelID, conversionBuffer, nmiss); + for (size_t i = elementCount; i--;) data[i] = (float) conversionBuffer[i]; + Free(conversionBuffer); + } + *nmiss = (SizeType) numMiss; +} + +static void +stream_read_record(int streamID, int memtype, void *data, size_t *nmiss) +{ + check_parg(data); + check_parg(nmiss); + + stream_t *streamptr = stream_to_pointer(streamID); + + *nmiss = 0; + + switch (cdiBaseFiletype(streamptr->filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: grb_read_record(streamptr, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: srv_read_record(streamptr, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: ext_read_record(streamptr, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: ieg_read_record(streamptr, memtype, data, nmiss); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: cdf_read_record(streamptr, memtype, data, nmiss); break; +#endif + default: Error("%s support not compiled in!", strfiletype(streamptr->filetype)); + } +} + +void +streamReadRecord(int streamID, double *data, SizeType *nmiss) +{ + size_t numMiss = 0; + stream_read_record(streamID, MEMTYPE_DOUBLE, (void *) data, &numMiss); + *nmiss = (SizeType) numMiss; +} + +void +streamReadRecordF(int streamID, float *data, SizeType *nmiss) +{ + size_t numMiss = 0; + stream_read_record(streamID, MEMTYPE_FLOAT, (void *) data, &numMiss); + *nmiss = (SizeType) numMiss; +} +#ifndef VARSCAN_H +#define VARSCAN_H + +#ifndef GRID_H +#endif + +void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds, int level1, int level2, int level_sf, + int level_unit, int prec, int *pvarID, int *plevelID, int tsteptype, int ltype1, int ltype2, const char *name, + const VarScanKeys *scanKeys, const var_tile_t *tiles, int *tile_index); + +void varDefVCT(size_t vctsize, double *vctptr); +void varDefZAxisReference(int nlev, int nvgrid, unsigned char uuid[CDI_UUID_SIZE]); + +int varDefZaxis(int vlistID, int zaxistype, int nlevels, const double *levels, const char **cvals, size_t clength, bool lbounds, + const double *levels1, const double *levels2, int vctsize, const double *vct, char *name, const char *longname, + const char *units, int prec, int mode, int ltype1, int ltype2); + +void varDefMissval(int varID, double missval); +void varDefCompType(int varID, int comptype); +void varDefCompLevel(int varID, int complevel); +void varDefInst(int varID, int instID); +int varInqInst(int varID); +void varDefModel(int varID, int modelID); +int varInqModel(int varID); +void varDefTable(int varID, int tableID); +int varInqTable(int varID); + +void varDefKeyInt(int varID, int key, int value); +void varDefKeyBytes(int varID, int key, const unsigned char *bytes, int length); +void varDefKeyString(int varID, int key, const char *string); + +void varDefOptGribInt(int varID, int tile_index, long lval, const char *keyword); +void varDefOptGribDbl(int varID, int tile_index, double dval, const char *keyword); +int varOptGribNentries(int varID); + +bool zaxis_compare(int zaxisID, int zaxistype, int nlevels, const double *levels, const double *lbounds, const double *ubounds, + const char *longname, const char *units, int ltype1, int ltype2); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBNETCDF + +#include <ctype.h> +#include <limits.h> + + +enum VarStatus +{ + UndefVar = -1, + CoordVar = 0, + DataVar = 1, +}; + +enum AxisType +{ + X_AXIS = 1, + Y_AXIS = 2, + Z_AXIS = 3, + E_AXIS = 4, + T_AXIS = 5, +}; + +typedef struct +{ + int dimid; + int ncvarid; + int dimtype; + size_t len; + char name[CDI_MAX_NAME]; +} ncdim_t; + +#define MAX_COORDVARS 5 +#define MAX_AUXVARS 4 +#define MAX_DIMS_CDF 8 + +typedef struct +{ + int ncid; + int varStatus; + bool ignoreVar; + bool isCubeSphere; + bool isCharAxis; + bool isXaxis; + bool isYaxis; + bool isZaxis; + bool isTaxis; + bool isLon; + bool isLat; + bool isClimatology; + bool hasCalendar; + bool hasFormulaterms; + bool printWarning; + int timetype; + int param; + int code; + int tabnum; + int bounds; + int gridID; + int zaxisID; + int gridtype; + int zaxistype; + int xdim; + int ydim; + int zdim; + int xvarid; + int yvarid; + int rpvarid; + int zvarid; + int tvarid; + int psvarid; + int p0varid; + int ncoordvars; + int cvarids[MAX_COORDVARS]; + int coordvarids[MAX_COORDVARS]; + int auxvarids[MAX_AUXVARS]; + int nauxvars; + int cellarea; + int tableID; + int truncation; + int position; + int numLPE; + bool missvalDefined; + bool fillvalDefined; + int xtype; + int gmapid; + int positive; + int ndims; + int dimids[MAX_DIMS_CDF]; + int dimtype[MAX_DIMS_CDF]; + size_t chunks[MAX_DIMS_CDF]; + bool isChunked; + int chunkType; + int chunkSize; + size_t chunkCacheSize; + size_t chunkCacheNelems; + float chunkCachePreemption; + size_t gridSize; + size_t numLevels; + int natts; + int *atts; + size_t vctsize; + double *vct; + double missval; + double fillval; + double addoffset; + double scalefactor; + bool hasFilter; + bool hasDeflate; + bool hasSzip; + bool isUnsigned; + bool validrangeDefined; + double validrange[2]; + int typeOfEnsembleForecast; + int numberOfForecastsInEnsemble; + int perturbationNumber; + int unitsLen; + char name[CDI_MAX_NAME]; + char longname[CDI_MAX_NAME]; + char stdname[CDI_MAX_NAME]; + char units[CDI_MAX_NAME]; + char extra[CDI_MAX_NAME]; +} ncvar_t; + +typedef struct +{ + char gridfile[8912]; + unsigned char uuid[CDI_UUID_SIZE]; + int number_of_grid_used; + int timedimid; +} GridInfo; + +static CdiDateTime +scan_time_string(const char *ptu) +{ + int year = 0, month = 0, day = 0; + int hour = 0, minute = 0; + double fseconds = 0.0; + char ch = ' '; + + if (*ptu) sscanf(ptu, "%d-%d-%d%c%d:%d:%lf", &year, &month, &day, &ch, &hour, &minute, &fseconds); + + if (day > 999 && year < 32) + { + int tmp = year; + year = day; + day = tmp; + } + + int second = (int) fseconds; + int ms = (fseconds - second) * 1000; + + CdiDateTime datetime; + datetime.date.year = year; + datetime.date.month = month; + datetime.date.day = day; + datetime.time.hour = hour; + datetime.time.minute = minute; + datetime.time.second = second; + datetime.time.ms = ms; + + return datetime; +} + +static int +scan_time_units(const char *unitstr) +{ + int timeunit = get_time_units(strlen(unitstr), unitstr); + if (timeunit == -1) Warning("Unsupported TIMEUNIT: %s!", unitstr); + return timeunit; +} + +static void +set_forecast_time(const char *timestr, taxis_t *taxis) +{ + if (strlen(timestr) != 0) + taxis->fDateTime = scan_time_string(timestr); + else + cdiDateTime_init(&(taxis->fDateTime)); +} + +static int +set_base_time(const char *timeUnitsStr, taxis_t *taxis) +{ + int taxisType = TAXIS_ABSOLUTE; + + size_t len = strlen(timeUnitsStr); + while (isspace(*timeUnitsStr) && len) + { + timeUnitsStr++; + len--; + } + + char *tu = (char *) malloc((len + 1) * sizeof(char)); + + for (size_t i = 0; i < len; i++) tu[i] = (char) tolower((int) timeUnitsStr[i]); + tu[len] = 0; + + int timeUnits = get_time_units(len, tu); + if (timeUnits == -1) + { + Warning("Unsupported TIMEUNIT: %s!", timeUnitsStr); + return 1; + } + + size_t pos = 0; + while (pos < len && !isspace(tu[pos])) ++pos; + if (tu[pos]) + { + while (isspace(tu[pos])) ++pos; + + if (strStartsWith(tu + pos, "since")) taxisType = TAXIS_RELATIVE; + + while (pos < len && !isspace(tu[pos])) ++pos; + if (tu[pos]) + { + while (isspace(tu[pos])) ++pos; + + if (taxisType == TAXIS_ABSOLUTE) + { + if (timeUnits == TUNIT_DAY) + { + if (!strStartsWith(tu + pos, "%y%m%d.%f")) + { + Warning("Unsupported format %s for TIMEUNIT day!", tu + pos); + timeUnits = -1; + } + } + else if (timeUnits == TUNIT_MONTH) + { + if (!strStartsWith(tu + pos, "%y%m.%f")) + { + Warning("Unsupported format %s for TIMEUNIT month!", tu + pos); + timeUnits = -1; + } + } + else if (timeUnits == TUNIT_YEAR) + { + if (!strStartsWith(tu + pos, "%y.%f")) + { + Warning("Unsupported format %s for TIMEUNIT year!", tu + pos); + timeUnits = -1; + } + } + else + { + Warning("Unsupported format for time units: %s!", tu); + } + } + else if (taxisType == TAXIS_RELATIVE) + { + taxis->rDateTime = scan_time_string(tu + pos); + if (CDI_Debug) + Message("rdate = %d rtime = %d", (int) cdiDate_get(taxis->rDateTime.date), cdiTime_get(taxis->rDateTime.time)); + } + } + } + + taxis->type = taxisType; + taxis->unit = timeUnits; + + free(tu); + + if (CDI_Debug) Message("taxisType = %d timeUnits = %d", taxisType, timeUnits); + + return 0; +} + +bool +xtypeIsText(int xtype) +{ + bool isText = (xtype == NC_CHAR) +#ifdef HAVE_NETCDF4 + || (xtype == NC_STRING) +#endif + ; + return isText; +} + +static bool +xtypeIsFloat(nc_type xtype) +{ + return (xtype == NC_FLOAT || xtype == NC_DOUBLE); +} + +static bool +xtypeIsInt(nc_type xtype) +{ + bool isInt = xtype == NC_SHORT || xtype == NC_INT || xtype == NC_BYTE +#ifdef HAVE_NETCDF4 + || xtype == NC_USHORT || xtype == NC_UINT || xtype == NC_UBYTE +#endif + ; + + return isInt; +} + +static int +cdfInqDatatype(stream_t *streamptr, int xtype, bool isUnsigned) +{ + int datatype = -1; + +#ifdef HAVE_NETCDF4 + if (xtype == NC_BYTE && isUnsigned) xtype = NC_UBYTE; +#endif + + // clang-format off + if (xtype == NC_BYTE ) datatype = CDI_DATATYPE_INT8; + else if (xtype == NC_CHAR ) datatype = CDI_DATATYPE_UINT8; + else if (xtype == NC_SHORT ) datatype = CDI_DATATYPE_INT16; + else if (xtype == NC_INT ) datatype = CDI_DATATYPE_INT32; + else if (xtype == NC_FLOAT ) datatype = CDI_DATATYPE_FLT32; + else if (xtype == NC_DOUBLE) datatype = CDI_DATATYPE_FLT64; +#ifdef HAVE_NETCDF4 + else if (xtype == NC_UBYTE ) datatype = CDI_DATATYPE_UINT8; + else if (xtype == NC_LONG ) datatype = CDI_DATATYPE_INT32; + else if (xtype == NC_USHORT) datatype = CDI_DATATYPE_UINT16; + else if (xtype == NC_UINT ) datatype = CDI_DATATYPE_UINT32; + else if (xtype == NC_INT64 ) datatype = CDI_DATATYPE_FLT64; + else if (xtype == NC_UINT64) datatype = CDI_DATATYPE_FLT64; + else + { + if (xtype != streamptr->nc_complex_float_id && xtype != streamptr->nc_complex_double_id) + { + bool isUserDefinedType = false; +#ifdef NC_FIRSTUSERTYPEID + isUserDefinedType = (xtype >= NC_FIRSTUSERTYPEID); +#endif + if (isUserDefinedType) + { + int fileID = streamptr->fileID; + size_t nfields = 0, compoundsize = 0; + int status = nc_inq_compound(fileID, xtype, NULL, &compoundsize, &nfields); + if (status == NC_NOERR && nfields == 2 && (compoundsize == 8 || compoundsize == 16)) + { + nc_type field_type1 = -1, field_type2 = -1; + int field_dims1 = 0, field_dims2 = 0; + nc_inq_compound_field(fileID, xtype, 0, NULL, NULL, &field_type1, &field_dims1, NULL); + nc_inq_compound_field(fileID, xtype, 1, NULL, NULL, &field_type2, &field_dims2, NULL); + if (field_type1 == field_type2 && field_dims1 == 0 && field_dims2 == 0) + { + if (field_type1 == NC_FLOAT) streamptr->nc_complex_float_id = xtype; + else if (field_type1 == NC_DOUBLE) streamptr->nc_complex_double_id = xtype; + } + } + } + } + if (xtype == streamptr->nc_complex_float_id ) datatype = CDI_DATATYPE_CPX32; + else if (xtype == streamptr->nc_complex_double_id) datatype = CDI_DATATYPE_CPX64; + } +#endif + // clang-format on + + return datatype; +} + +static void +cdfGetAttInt(int fileID, int ncvarid, const char *attname, size_t attlen, int *attint) +{ + *attint = 0; + + nc_type atttype; + size_t nc_attlen; + cdf_inq_atttype(fileID, ncvarid, attname, &atttype); + cdf_inq_attlen(fileID, ncvarid, attname, &nc_attlen); + + if (xtypeIsFloat(atttype) || xtypeIsInt(atttype)) + { + bool needAlloc = (nc_attlen > attlen); + int *pintatt = needAlloc ? (int *) (Malloc(nc_attlen * sizeof(int))) : attint; + cdf_get_att_int(fileID, ncvarid, attname, pintatt); + if (needAlloc) + { + memcpy(attint, pintatt, attlen * sizeof(int)); + Free(pintatt); + } + } +} + +static void +cdfGetAttDouble(int fileID, int ncvarid, char *attname, size_t attlen, double *attdouble) +{ + *attdouble = 0.0; + + nc_type atttype; + size_t nc_attlen; + cdf_inq_atttype(fileID, ncvarid, attname, &atttype); + cdf_inq_attlen(fileID, ncvarid, attname, &nc_attlen); + + if (xtypeIsFloat(atttype) || xtypeIsInt(atttype)) + { + bool needAlloc = (nc_attlen > attlen); + double *pdoubleatt = needAlloc ? (double *) Malloc(nc_attlen * sizeof(double)) : attdouble; + cdf_get_att_double(fileID, ncvarid, attname, pdoubleatt); + if (needAlloc) + { + memcpy(attdouble, pdoubleatt, attlen * sizeof(double)); + Free(pdoubleatt); + } + } +} + +static bool +cdfCheckAttText(int fileID, int ncvarid, const char *attname) +{ + nc_type atttype; + int status_nc = nc_inq_atttype(fileID, ncvarid, attname, &atttype); + + return (status_nc == NC_NOERR + && (atttype == NC_CHAR +#ifdef HAVE_NETCDF4 + || atttype == NC_STRING +#endif + )); +} + +static void +cdfGetAttText(int fileID, int ncvarid, const char *attname, size_t attlen, char *atttext) +{ + atttext[0] = 0; + + nc_type atttype; + size_t nc_attlen; + cdf_inq_atttype(fileID, ncvarid, attname, &atttype); + cdf_inq_attlen(fileID, ncvarid, attname, &nc_attlen); + + if (atttype == NC_CHAR) + { + char attbuf[65636]; + if (nc_attlen < sizeof(attbuf)) + { + cdf_get_att_text(fileID, ncvarid, attname, attbuf); + + if (nc_attlen > (attlen - 1)) nc_attlen = (attlen - 1); + + attbuf[nc_attlen++] = 0; + memcpy(atttext, attbuf, nc_attlen); + } + } +#ifdef HAVE_NETCDF4 + else if (atttype == NC_STRING) + { + if (nc_attlen == 1) + { + char *attbuf = NULL; + cdf_get_att_string(fileID, ncvarid, attname, &attbuf); + + size_t ssize = strlen(attbuf) + 1; + if (ssize > attlen) ssize = attlen; + memcpy(atttext, attbuf, ssize); + atttext[ssize - 1] = 0; + Free(attbuf); + } + } +#endif +} + +void +cdf_scale_add(size_t size, double *data, double addoffset, double scalefactor) +{ + bool haveAddoffset = IS_NOT_EQUAL(addoffset, 0.0); + bool haveScalefactor = IS_NOT_EQUAL(scalefactor, 1.0); + + if (haveAddoffset && haveScalefactor) + { + for (size_t i = 0; i < size; ++i) data[i] = data[i] * scalefactor + addoffset; + } + else if (haveScalefactor) + { + for (size_t i = 0; i < size; ++i) data[i] *= scalefactor; + } + else if (haveAddoffset) + { + for (size_t i = 0; i < size; ++i) data[i] += addoffset; + } +} + +static int +cdf_time_dimid(int fileID, int ndims, int nvars, ncdim_t *ncdims) +{ + char dimname[CDI_MAX_NAME]; + + for (int dimid = 0; dimid < ndims; ++dimid) + { + dimname[0] = 0; + cdf_inq_dimname(fileID, ncdims[dimid].dimid, dimname); + if ((dimname[0] = 'T' || dimname[0] == 't') && dimname[1] == 'i' && dimname[2] == 'm' && dimname[3] == 'e') return dimid; + } + + for (int varid = 0; varid < nvars; ++varid) + { + nc_type xtype; + int nvdims, nvatts, dimids[9]; + cdf_inq_var(fileID, varid, NULL, &xtype, &nvdims, dimids, &nvatts); + for (int i = 0; i < nvdims; ++i) + for (int dimid = 0; dimid < ndims; ++dimid) + if (ncdims[dimid].dimid == dimids[i]) + { + dimids[i] = dimid; + break; + } + + if (nvdims == 1) + { + char sbuf[CDI_MAX_NAME]; + for (int iatt = 0; iatt < nvatts; ++iatt) + { + sbuf[0] = 0; + cdf_inq_attname(fileID, varid, iatt, sbuf); + if (strStartsWith(sbuf, "units")) + { + cdfGetAttText(fileID, varid, "units", sizeof(sbuf), sbuf); + str_to_lower(sbuf); + + if (is_time_units(sbuf)) return dimids[0]; + } + } + } + } + + return CDI_UNDEFID; +} + +static void +init_ncdims(int ndims, ncdim_t *ncdims) +{ + for (int ncdimid = 0; ncdimid < ndims; ncdimid++) + { + ncdim_t *ncdim = &ncdims[ncdimid]; + ncdim->dimid = CDI_UNDEFID; + ncdim->ncvarid = CDI_UNDEFID; + ncdim->dimtype = CDI_UNDEFID; + ncdim->len = 0; + ncdim->name[0] = 0; + } +} + +static void +init_ncvars(int nvars, ncvar_t *ncvars, int ncid) +{ + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + ncvar->ncid = ncid; + ncvar->varStatus = UndefVar; + ncvar->ignoreVar = false; + ncvar->isCubeSphere = false; + ncvar->isCharAxis = false; + ncvar->isXaxis = false; + ncvar->isYaxis = false; + ncvar->isZaxis = false; + ncvar->isTaxis = false; + ncvar->isLon = false; + ncvar->isLat = false; + ncvar->isClimatology = false; + ncvar->hasCalendar = false; + ncvar->hasFormulaterms = false; + ncvar->printWarning = true; + ncvar->timetype = TIME_CONSTANT; + ncvar->param = CDI_UNDEFID; + ncvar->code = CDI_UNDEFID; + ncvar->tabnum = 0; + ncvar->bounds = CDI_UNDEFID; + ncvar->gridID = CDI_UNDEFID; + ncvar->zaxisID = CDI_UNDEFID; + ncvar->gridtype = CDI_UNDEFID; + ncvar->zaxistype = CDI_UNDEFID; + ncvar->xdim = CDI_UNDEFID; + ncvar->ydim = CDI_UNDEFID; + ncvar->zdim = CDI_UNDEFID; + ncvar->xvarid = CDI_UNDEFID; + ncvar->yvarid = CDI_UNDEFID; + ncvar->rpvarid = CDI_UNDEFID; + ncvar->zvarid = CDI_UNDEFID; + ncvar->tvarid = CDI_UNDEFID; + ncvar->psvarid = CDI_UNDEFID; + ncvar->p0varid = CDI_UNDEFID; + ncvar->ncoordvars = 0; + for (int i = 0; i < MAX_COORDVARS; ++i) ncvar->cvarids[i] = CDI_UNDEFID; + for (int i = 0; i < MAX_COORDVARS; ++i) ncvar->coordvarids[i] = CDI_UNDEFID; + for (int i = 0; i < MAX_AUXVARS; ++i) ncvar->auxvarids[i] = CDI_UNDEFID; + ncvar->nauxvars = 0; + ncvar->cellarea = CDI_UNDEFID; + ncvar->tableID = CDI_UNDEFID; + ncvar->truncation = 0; + ncvar->position = 0; + ncvar->numLPE = 0; + ncvar->missvalDefined = false; + ncvar->fillvalDefined = false; + ncvar->xtype = 0; + ncvar->gmapid = CDI_UNDEFID; + ncvar->positive = 0; + ncvar->ndims = 0; + for (int i = 0; i < MAX_DIMS_CDF; ++i) ncvar->dimids[i] = CDI_UNDEFID; + for (int i = 0; i < MAX_DIMS_CDF; ++i) ncvar->dimtype[i] = CDI_UNDEFID; + for (int i = 0; i < MAX_DIMS_CDF; ++i) ncvar->chunks[i] = 0; + ncvar->isChunked = false; + ncvar->chunkType = CDI_UNDEFID; + ncvar->chunkSize = CDI_UNDEFID; + ncvar->chunkCacheSize = 0; + ncvar->chunkCacheNelems = 0; + ncvar->chunkCachePreemption = 0.0; + ncvar->gridSize = 0; + ncvar->numLevels = 0; + ncvar->natts = 0; + ncvar->atts = NULL; + ncvar->vctsize = 0; + ncvar->vct = NULL; + ncvar->missval = 0; + ncvar->fillval = 0; + ncvar->addoffset = 0.0; + ncvar->scalefactor = 1.0; + ncvar->hasFilter = false; + ncvar->hasDeflate = false; + ncvar->hasSzip = false; + ncvar->isUnsigned = false; + ncvar->validrangeDefined = false; + ncvar->validrange[0] = VALIDMISS; + ncvar->validrange[1] = VALIDMISS; + ncvar->typeOfEnsembleForecast = -1; + ncvar->numberOfForecastsInEnsemble = -1; + ncvar->perturbationNumber = -1; + ncvar->unitsLen = 0; + memset(ncvar->name, 0, CDI_MAX_NAME); + memset(ncvar->longname, 0, CDI_MAX_NAME); + memset(ncvar->stdname, 0, CDI_MAX_NAME); + memset(ncvar->units, 0, CDI_MAX_NAME); + memset(ncvar->extra, 0, CDI_MAX_NAME); + } +} + +static void +cdf_set_var(ncvar_t *ncvar, int varStatus) +{ + if (ncvar->varStatus != UndefVar && ncvar->varStatus != varStatus && ncvar->printWarning) + { + if (!ncvar->ignoreVar) Warning("Inconsistent variable definition for %s!", ncvar->name); + + ncvar->printWarning = false; + varStatus = CoordVar; + } + + ncvar->varStatus = varStatus; +} + +static void +cdf_set_dim(ncvar_t *ncvar, int dimid, int dimtype) +{ + if (ncvar->dimtype[dimid] != CDI_UNDEFID && ncvar->dimtype[dimid] != dimtype) + { + Warning("Inconsistent dimension definition for %s! dimid = %d; type = %d; newtype = %d", ncvar->name, dimid, + ncvar->dimtype[dimid], dimtype); + } + + ncvar->dimtype[dimid] = dimtype; +} + +static void +scan_hybrid_formulaterms(int ncid, int ncfvarid, int *avarid, int *bvarid, int *psvarid, int *p0varid) +{ + *avarid = -1; + *bvarid = -1; + *psvarid = -1; + *p0varid = -1; + + char attstring[1024]; + cdfGetAttText(ncid, ncfvarid, "formula_terms", sizeof(attstring), attstring); + char *pstring = attstring; + + bool lstop = false; + for (int i = 0; i < 4; i++) + { + while (isspace((int) *pstring)) pstring++; + if (*pstring == 0) break; + char *tagname = pstring; + while (!isspace((int) *pstring) && *pstring != 0) pstring++; + if (*pstring == 0) lstop = true; + *pstring++ = 0; + + while (isspace((int) *pstring)) pstring++; + if (*pstring == 0) break; + char *varname = pstring; + while (!isspace((int) *pstring) && *pstring != 0) pstring++; + if (*pstring == 0) lstop = true; + *pstring++ = 0; + + int dimvarid; + int status_nc = nc_inq_varid(ncid, varname, &dimvarid); + if (status_nc == NC_NOERR) + { + // clang-format off + if (str_is_equal(tagname, "ap:")) *avarid = dimvarid; + else if (str_is_equal(tagname, "a:") ) *avarid = dimvarid; + else if (str_is_equal(tagname, "b:") ) *bvarid = dimvarid; + else if (str_is_equal(tagname, "ps:")) *psvarid = dimvarid; + else if (str_is_equal(tagname, "p0:")) *p0varid = dimvarid; + // clang-format on + } + else if (!str_is_equal(tagname, "ps:")) + { + Warning("%s - %s", nc_strerror(status_nc), varname); + } + + if (lstop) break; + } +} + +static void +readVCT(int ncid, int ndims2, size_t dimlen, size_t dimlen2, int avarid2, int bvarid2, double *vct) +{ + double *abuf = (double *) Malloc(dimlen * 2 * sizeof(double)); + double *bbuf = (double *) Malloc(dimlen * 2 * sizeof(double)); + cdf_get_var_double(ncid, avarid2, abuf); + cdf_get_var_double(ncid, bvarid2, bbuf); + + if (ndims2 == 2) + { + for (size_t i = 0; i < dimlen; ++i) + { + vct[i] = abuf[i * 2]; + vct[i + dimlen + 1] = bbuf[i * 2]; + } + vct[dimlen] = abuf[dimlen * 2 - 1]; + vct[dimlen * 2 + 1] = bbuf[dimlen * 2 - 1]; + } + else + { + for (size_t i = 0; i < dimlen2; ++i) + { + vct[i] = abuf[i]; + vct[i + dimlen + 1] = bbuf[i]; + } + } + + Free(abuf); + Free(bbuf); +} + +static bool +isHybridSigmaPressureCoordinate(int ncid, int ncvarid, ncvar_t *ncvars, const ncdim_t *ncdims) +{ + bool status = false; + ncvar_t *ncvar = &ncvars[ncvarid]; + + if (str_is_equal(ncvar->stdname, "atmosphere_hybrid_sigma_pressure_coordinate")) + { + CDI_Convention = CDI_CONVENTION_CF; + + status = true; + ncvar->zaxistype = ZAXIS_HYBRID; + // int ndims = ncvar->ndims; + int dimid = ncvar->dimids[0]; + size_t dimlen = ncdims[dimid].len; + int avarid1 = -1, bvarid1 = -1, psvarid1 = -1, p0varid1 = -1; + int ncfvarid = ncvarid; + if (ncvars[ncfvarid].hasFormulaterms) scan_hybrid_formulaterms(ncid, ncfvarid, &avarid1, &bvarid1, &psvarid1, &p0varid1); + // printf("avarid1, bvarid1, psvarid1, p0varid1 %d %d %d %d\n", avarid1, bvarid1, psvarid1, p0varid1); + if (avarid1 != -1) ncvars[avarid1].varStatus = CoordVar; + if (bvarid1 != -1) ncvars[bvarid1].varStatus = CoordVar; + if (psvarid1 != -1) ncvar->psvarid = psvarid1; + if (p0varid1 != -1) ncvar->p0varid = p0varid1; + + if (ncvar->bounds != CDI_UNDEFID && ncvars[ncvar->bounds].hasFormulaterms) + { + ncfvarid = ncvar->bounds; + int avarid2 = -1, bvarid2 = -1, psvarid2 = -1, p0varid2 = -1; + if (ncvars[ncfvarid].hasFormulaterms) scan_hybrid_formulaterms(ncid, ncfvarid, &avarid2, &bvarid2, &psvarid2, &p0varid2); + // printf("avarid2, bvarid2, psvarid2, p0varid2 %d %d %d %d\n", avarid2, bvarid2, psvarid2, p0varid2); + if (avarid2 != -1 && bvarid2 != -1) + { + ncvars[avarid2].varStatus = CoordVar; + ncvars[bvarid2].varStatus = CoordVar; + + int ndims2 = ncvars[avarid2].ndims; + int dimid2 = ncvars[avarid2].dimids[0]; + size_t dimlen2 = ncdims[dimid2].len; + + if ((ndims2 == 2 && dimid == ncvars[avarid2].dimids[0]) || (ndims2 == 1 && dimlen == dimlen2 - 1)) + { + double px = 1; + if (p0varid1 != -1 && p0varid1 == p0varid2) cdf_get_var_double(ncid, p0varid2, &px); + + size_t vctsize = (dimlen + 1) * 2; + double *vct = (double *) Malloc(vctsize * sizeof(double)); + + readVCT(ncid, ndims2, dimlen, dimlen2, avarid2, bvarid2, vct); + + if (p0varid1 != -1 && IS_NOT_EQUAL(px, 1)) + for (size_t i = 0; i < dimlen + 1; ++i) vct[i] *= px; + + ncvar->vct = vct; + ncvar->vctsize = vctsize; + } + } + } + } + + return status; +} + +static void +cdf_set_cdi_attr(int ncid, int ncvarid, int attnum, int cdiID, int varID, bool removeFillValue) +{ + nc_type atttype; + size_t attlen; + char attname[CDI_MAX_NAME]; + + cdf_inq_attname(ncid, ncvarid, attnum, attname); + cdf_inq_attlen(ncid, ncvarid, attname, &attlen); + cdf_inq_atttype(ncid, ncvarid, attname, &atttype); + + if (removeFillValue && str_is_equal("_FillValue", attname)) return; + + if (xtypeIsInt(atttype)) + { + int attint; + int *pattint = (attlen > 1) ? (int *) malloc(attlen * sizeof(int)) : &attint; + cdfGetAttInt(ncid, ncvarid, attname, attlen, pattint); + // clang-format off + int datatype = (atttype == NC_SHORT) ? CDI_DATATYPE_INT16 : + (atttype == NC_BYTE) ? CDI_DATATYPE_INT8 : +#ifdef HAVE_NETCDF4 + (atttype == NC_UBYTE) ? CDI_DATATYPE_UINT8 : + (atttype == NC_USHORT) ? CDI_DATATYPE_UINT16 : + (atttype == NC_UINT) ? CDI_DATATYPE_UINT32 : +#endif + CDI_DATATYPE_INT32; + // clang-format on + cdiDefAttInt(cdiID, varID, attname, datatype, (int) attlen, pattint); + if (attlen > 1) free(pattint); + } + else if (xtypeIsFloat(atttype)) + { + double attflt; + double *pattflt = (attlen > 1) ? (double *) malloc(attlen * sizeof(double)) : &attflt; + cdfGetAttDouble(ncid, ncvarid, attname, attlen, pattflt); + int datatype = (atttype == NC_FLOAT) ? CDI_DATATYPE_FLT32 : CDI_DATATYPE_FLT64; + cdiDefAttFlt(cdiID, varID, attname, datatype, (int) attlen, pattflt); + if (attlen > 1) free(pattflt); + } + else if (xtypeIsText(atttype)) + { + char attstring[8192]; + cdfGetAttText(ncid, ncvarid, attname, sizeof(attstring), attstring); + cdiDefAttTxt(cdiID, varID, attname, strlen(attstring), attstring); + } +} + +static void +cdf_print_vars(const ncvar_t *ncvars, int nvars, const char *oname) +{ + // clang-format off + char axis[7]; + enum { TAXIS = 't', ZAXIS = 'z', EAXIS = 'e', YAXIS = 'y', XAXIS = 'x' }; + + fprintf(stderr, "%s:\n", oname); + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + const ncvar_t *ncvar = &ncvars[ncvarid]; + int ndim = 0; + if (ncvar->varStatus == DataVar) + { + axis[ndim++] = 'v'; + axis[ndim++] = ':'; + for (int i = 0; i < ncvar->ndims; i++) + { + if (ncvar->dimtype[i] == T_AXIS) axis[ndim++] = TAXIS; + else if (ncvar->dimtype[i] == Z_AXIS) axis[ndim++] = ZAXIS; + else if (ncvar->dimtype[i] == E_AXIS) axis[ndim++] = EAXIS; + else if (ncvar->dimtype[i] == Y_AXIS) axis[ndim++] = YAXIS; + else if (ncvar->dimtype[i] == X_AXIS) axis[ndim++] = XAXIS; + else axis[ndim++] = '?'; + } + } + else + { + axis[ndim++] = 'c'; + axis[ndim++] = ':'; + if (ncvar->isTaxis) axis[ndim++] = TAXIS; + else if (ncvar->isZaxis) axis[ndim++] = ZAXIS; + else if (ncvar->isLat ) axis[ndim++] = YAXIS; + else if (ncvar->isYaxis) axis[ndim++] = YAXIS; + else if (ncvar->isLon ) axis[ndim++] = XAXIS; + else if (ncvar->isXaxis) axis[ndim++] = XAXIS; + else axis[ndim++] = '?'; + } + + axis[ndim++] = 0; + + fprintf(stderr, "%3d %3d %-6s %s\n", ncvarid, ndim-3, axis, ncvar->name); + } + // clang-format on +} + +static void +cdfScanAttrAxis(ncvar_t *ncvars, ncdim_t *ncdims, int ncvarid, const char *attstring, int nvdims, const int *dimidsp) +{ + ncvar_t *ncvar = &ncvars[ncvarid]; + int attlen = (int) strlen(attstring); + + if (nvdims == 0 && attlen == 1) + { + if (attstring[0] == 'z') + { + cdf_set_var(ncvar, CoordVar); + ncvar->isZaxis = true; + return; + } + } + + if (attlen != nvdims) return; + + static const char accept[] = "-tTzZyYxX"; + if ((int) strspn(attstring, accept) != attlen) return; + + while (attlen--) + { + int dimtype; + bool setVar = false; + switch (attstring[attlen]) + { + case 't': + case 'T': + if (attlen != 0) Warning("axis attribute 't' not on first position"); + dimtype = T_AXIS; + break; + case 'z': + case 'Z': + ncvar->zdim = dimidsp[attlen]; + dimtype = Z_AXIS; + + setVar = ncvar->ndims == 1; + break; + case 'y': + case 'Y': + ncvar->ydim = dimidsp[attlen]; + dimtype = Y_AXIS; + + setVar = ncvar->ndims == 1; + break; + case 'x': + case 'X': + ncvar->xdim = dimidsp[attlen]; + dimtype = X_AXIS; + + setVar = ncvar->ndims == 1; + break; + default: continue; + } + cdf_set_dim(ncvar, attlen, dimtype); + if (setVar) + { + cdf_set_var(ncvar, CoordVar); + ncdims[ncvar->dimids[0]].dimtype = dimtype; + } + } +} + +static int +cdf_get_cell_varid(char *attstring, int ncid) +{ + int nc_cell_id = CDI_UNDEFID; + + char *pstring = attstring; + while (isspace((int) *pstring)) pstring++; + char *cell_measures = pstring; + while (isalnum((int) *pstring)) pstring++; + *pstring++ = 0; + while (isspace((int) *pstring)) pstring++; + char *cell_var = pstring; + while (!isspace((int) *pstring) && *pstring != 0) pstring++; + *pstring++ = 0; + /* + printf("cell_measures >%s<\n", cell_measures); + printf("cell_var >%s<\n", cell_var); + */ + if (strStartsWith(cell_measures, "area")) + { + int nc_var_id; + int status = nc_inq_varid(ncid, cell_var, &nc_var_id); + if (status == NC_NOERR) nc_cell_id = nc_var_id; + /* + else + Warning("%s - %s", nc_strerror(status), cell_var); + */ + } + + return nc_cell_id; +} + +static void +set_extra_attr(char *buf, int nvdims, const size_t *chunks) +{ + size_t pos = strlen(buf); + static const char prefix[] = "chunks="; + memcpy(buf + pos, prefix, sizeof(prefix)); + pos += sizeof(prefix) - 1; + for (int i = nvdims - 1; i >= 0; --i) + { + pos += (size_t) (sprintf(buf + pos, "%zu%s", chunks[i], i > 0 ? "x" : "")); + } + buf[pos] = ' '; + buf[pos + 1] = 0; +} + +static void +cdfScanVarAttr(int nvars, ncvar_t *ncvars, int ndims, ncdim_t *ncdims, int timedimid, int modelID, int format) +{ + int nvdims, nvatts; + nc_type xtype, atttype; + size_t attlen; + char name[CDI_MAX_NAME]; + char attname[CDI_MAX_NAME]; + char attstring[8192]; + + int nchecked_vars = 0; + enum + { + max_check_vars = 9 + }; + char *checked_vars[max_check_vars]; + for (int i = 0; i < max_check_vars; ++i) checked_vars[i] = NULL; + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + int ncid = ncvar->ncid; + int *dimidsp = ncvar->dimids; + + cdf_inq_var(ncid, ncvarid, name, &xtype, &nvdims, dimidsp, &nvatts); + for (int i = 0; i < nvdims; ++i) + for (int dimid = 0; dimid < ndims; ++dimid) + if (ncdims[dimid].dimid == dimidsp[i]) + { + dimidsp[i] = dimid; + break; + } + strcpy(ncvar->name, name); + + for (int ncdimid = 0; ncdimid < nvdims; ncdimid++) ncvar->dimtype[ncdimid] = -1; + + ncvar->xtype = xtype; + ncvar->ndims = nvdims; + +#ifdef HAVE_NETCDF4 + if (format == NC_FORMAT_NETCDF4_CLASSIC || format == NC_FORMAT_NETCDF4) + { + int shuffle = 0, deflate = 0, deflateLevel = 0; + nc_inq_var_deflate(ncid, ncvarid, &shuffle, &deflate, &deflateLevel); + if (deflate > 0) ncvar->hasDeflate = true; + +#ifdef HAVE_NC_DEF_VAR_SZIP + int options_mask = 0, pixels_per_block = 0; + nc_inq_var_szip(ncid, ncvarid, &options_mask, &pixels_per_block); + if (options_mask && pixels_per_block) ncvar->hasSzip = true; +#endif + unsigned filterId; + size_t numParams; + nc_inq_var_filter(ncid, ncvarid, &filterId, &numParams, NULL); + if (filterId > 0) ncvar->hasFilter = true; + if (filterId > 0 && numParams <= 16 && CDI_Debug) + { + unsigned int params[16]; + nc_inq_var_filter(ncid, ncvarid, &filterId, &numParams, params); + fprintf(stderr, "%s: filterId=%d params=", ncvar->name, filterId); + for (int i = 0; i < (int) numParams; ++i) fprintf(stderr, " %u", params[i]); + fprintf(stderr, "\n"); + } + + size_t chunks[nvdims]; + int storageIn; + if (nc_inq_var_chunking(ncid, ncvarid, &storageIn, chunks) == NC_NOERR) + { + if (storageIn == NC_CHUNKED) + { + ncvar->isChunked = true; + for (int i = 0; i < nvdims; ++i) ncvar->chunks[i] = chunks[i]; + if (CDI_Debug) + { + fprintf(stderr, "%s: chunking %d %d %d chunks ", name, storageIn, NC_CONTIGUOUS, NC_CHUNKED); + for (int i = 0; i < nvdims; ++i) fprintf(stderr, "%zu ", chunks[i]); + fprintf(stderr, "\n"); + } + + set_extra_attr(ncvar->extra, nvdims, chunks); + } + } + + size_t size; + size_t nelems; + float preemption; + if (nc_get_var_chunk_cache(ncid, ncvarid, &size, &nelems, &preemption) == NC_NOERR) + { + ncvar->chunkCacheSize = size; + ncvar->chunkCacheNelems = nelems; + ncvar->chunkCachePreemption = preemption; + if (CDI_Debug) fprintf(stderr, "%s: chunkCacheSize=%zu nelems=%zu preemption=%g\n", name, size, nelems, preemption); + } + } +#endif + + if (nvdims > 0) + { + if (timedimid == dimidsp[0]) + { + ncvar->timetype = TIME_VARYING; + cdf_set_dim(ncvar, 0, T_AXIS); + } + else + { + for (int ncdimid = 1; ncdimid < nvdims; ncdimid++) + { + if (timedimid == dimidsp[ncdimid]) + { + Warning("Time must be the first dimension! Unsupported array structure, skipped variable %s!", ncvar->name); + ncvar->varStatus = CoordVar; + } + } + } + } + + if (ncvar->natts == 0 && nvatts > 0) ncvar->atts = (int *) Malloc((size_t) nvatts * sizeof(int)); + + for (int iatt = 0; iatt < nvatts; ++iatt) + { + int nc_cell_id = CDI_UNDEFID; + + cdf_inq_attname(ncid, ncvarid, iatt, attname); + cdf_inq_atttype(ncid, ncvarid, attname, &atttype); + cdf_inq_attlen(ncid, ncvarid, attname, &attlen); + + size_t attstringsize = sizeof(attstring); + bool isText = xtypeIsText(atttype), isNumber = xtypeIsFloat(atttype) || xtypeIsInt(atttype); + bool isRealization = false, isEnsembleMembers = false, isForecastInitType = false; + if (isText) + { + cdfGetAttText(ncid, ncvarid, attname, sizeof(attstring), attstring); + attstringsize = strlen(attstring) + 1; + if (attstringsize > CDI_MAX_NAME) attstringsize = CDI_MAX_NAME; + } + + if (isText && str_is_equal(attname, "long_name")) + { + memcpy(ncvar->longname, attstring, attstringsize); + } + else if (isText && str_is_equal(attname, "standard_name")) + { + memcpy(ncvar->stdname, attstring, attstringsize); + } + else if (isText && str_is_equal(attname, "units")) + { + ncvar->unitsLen = attstringsize; + memcpy(ncvar->units, attstring, attstringsize); + } + else if (isText && str_is_equal(attname, "calendar")) + { + ncvar->hasCalendar = true; + } + else if (isText && str_is_equal(attname, "param")) + { + int pnum = 0, pcat = 255, pdis = 255; + sscanf(attstring, "%d.%d.%d", &pnum, &pcat, &pdis); + ncvar->param = cdiEncodeParam(pnum, pcat, pdis); + cdf_set_var(ncvar, DataVar); + } + else if (isNumber && str_is_equal(attname, "code")) + { + cdfGetAttInt(ncid, ncvarid, attname, 1, &ncvar->code); + cdf_set_var(ncvar, DataVar); + } + else if (isNumber && str_is_equal(attname, "table")) + { + int tablenum; + cdfGetAttInt(ncid, ncvarid, attname, 1, &tablenum); + if (tablenum > 0) + { + ncvar->tabnum = tablenum; + ncvar->tableID = tableInq(modelID, tablenum, NULL); + if (ncvar->tableID == CDI_UNDEFID) ncvar->tableID = tableDef(modelID, tablenum, NULL); + } + cdf_set_var(ncvar, DataVar); + } + else if (isText && str_is_equal(attname, "trunc_type")) + { + if (str_is_equal(attstring, "Triangular")) ncvar->gridtype = GRID_SPECTRAL; + } + else if (isText && (str_is_equal(attname, "grid_type") || str_is_equal(attname, "CDI_grid_type"))) + { + str_to_lower(attstring); + cdf_set_gridtype(attstring, &ncvar->gridtype); + cdf_set_var(ncvar, DataVar); + } + else if (isText && str_is_equal(attname, "CDI_grid_latitudes")) + { + int nc_yvar_id; + int status = nc_inq_varid(ncid, attstring, &nc_yvar_id); + if (status == NC_NOERR) + { + ncvar->yvarid = nc_yvar_id; + cdf_set_var(&ncvars[ncvar->yvarid], CoordVar); + } + else + Warning("%s - %s", nc_strerror(status), attstring); + + cdf_set_var(ncvar, DataVar); + } + else if (isText && str_is_equal(attname, "CDI_grid_reduced_points")) + { + int nc_rpvar_id; + int status = nc_inq_varid(ncid, attstring, &nc_rpvar_id); + if (status == NC_NOERR) + { + ncvar->rpvarid = nc_rpvar_id; + cdf_set_var(&ncvars[ncvar->rpvarid], CoordVar); + } + else + Warning("%s - %s", nc_strerror(status), attstring); + + cdf_set_var(ncvar, DataVar); + } + else if (isNumber && str_is_equal(attname, "CDI_grid_num_LPE")) + { + cdfGetAttInt(ncid, ncvarid, attname, 1, &ncvar->numLPE); + } + else if (isText && str_is_equal(attname, "level_type")) + { + str_to_lower(attstring); + cdf_set_zaxistype(attstring, &ncvar->zaxistype); + cdf_set_var(ncvar, DataVar); + } + else if (isNumber && str_is_equal(attname, "trunc_count")) + { + cdfGetAttInt(ncid, ncvarid, attname, 1, &ncvar->truncation); + } + else if (isNumber && str_is_equal(attname, "truncation")) + { + cdfGetAttInt(ncid, ncvarid, attname, 1, &ncvar->truncation); + } + else if (isNumber && str_is_equal(attname, "number_of_grid_in_reference")) + { + cdfGetAttInt(ncid, ncvarid, attname, 1, &ncvar->position); + } + else if (isNumber && str_is_equal(attname, "add_offset")) + { + cdfGetAttDouble(ncid, ncvarid, attname, 1, &ncvar->addoffset); + /* + if ( atttype != NC_BYTE && atttype != NC_SHORT && atttype != NC_INT ) + if ( ncvar->addoffset != 0 ) + Warning("attribute add_offset not supported for atttype %d", atttype); + */ + // (also used for lon/lat) cdf_set_var(ncvar, DataVar); + } + else if (isNumber && str_is_equal(attname, "scale_factor")) + { + cdfGetAttDouble(ncid, ncvarid, attname, 1, &ncvar->scalefactor); + /* + if ( atttype != NC_BYTE && atttype != NC_SHORT && atttype != NC_INT ) + if ( ncvar->scalefactor != 1 ) + Warning("attribute scale_factor not supported for atttype %d", atttype); + */ + // (also used for lon/lat) cdf_set_var(ncvar, DataVar); + } + else if (isText && str_is_equal(attname, "climatology")) + { + int ncboundsid; + int status = nc_inq_varid(ncid, attstring, &ncboundsid); + if (status == NC_NOERR) + { + ncvar->isClimatology = true; + ncvar->bounds = ncboundsid; + cdf_set_var(&ncvars[ncvar->bounds], CoordVar); + cdf_set_var(ncvar, CoordVar); + } + else + Warning("%s - %s", nc_strerror(status), attstring); + } + else if (isText && str_is_equal(attname, "bounds")) + { + int ncboundsid; + int status = nc_inq_varid(ncid, attstring, &ncboundsid); + if (status == NC_NOERR) + { + ncvar->bounds = ncboundsid; + cdf_set_var(&ncvars[ncvar->bounds], CoordVar); + cdf_set_var(ncvar, CoordVar); + } + else + Warning("%s - %s", nc_strerror(status), attstring); + } + else if (isText && str_is_equal(attname, "formula_terms")) + { + ncvar->hasFormulaterms = true; + } + else if (isText && str_is_equal(attname, "cell_measures") + && (nc_cell_id = cdf_get_cell_varid(attstring, ncid)) != CDI_UNDEFID) + { + ncvar->cellarea = nc_cell_id; + ncvars[nc_cell_id].varStatus = CoordVar; + cdf_set_var(ncvar, DataVar); + } + else if (isText && (str_is_equal(attname, "associate") || str_is_equal(attname, "coordinates"))) + { + bool lstop = false; + char *pstring = attstring; + + for (int i = 0; i < MAX_COORDVARS && !lstop; i++) + { + while (isspace((int) *pstring)) pstring++; + if (*pstring == 0) break; + char *varname = pstring; + while (!isspace((int) *pstring) && *pstring != 0) pstring++; + if (*pstring == 0) lstop = true; + if (*(pstring - 1) == ',') *(pstring - 1) = 0; + *pstring++ = 0; + + int dimvarid; + int status = nc_inq_varid(ncid, varname, &dimvarid); + if (status == NC_NOERR) + { + cdf_set_var(&ncvars[dimvarid], CoordVar); + if (!CDI_Ignore_Att_Coordinates) + { + ncvar->coordvarids[i] = dimvarid; + ncvar->ncoordvars++; + } + } + else + { + if (!CDI_Ignore_Att_Coordinates) ncvar->ncoordvars++; + + int k; + for (k = 0; k < nchecked_vars; ++k) + if (str_is_equal(checked_vars[k], varname)) break; + + if (k == nchecked_vars) + { + if (nchecked_vars < max_check_vars) checked_vars[nchecked_vars++] = strdup(varname); + Warning("%s - >%s<", nc_strerror(status), varname); + } + } + } + + cdf_set_var(ncvar, DataVar); + } + else if (isText && str_is_equal(attname, "auxiliary_variable")) + { + bool lstop = false; + char *pstring = attstring; + + for (int i = 0; i < MAX_AUXVARS; i++) + { + while (isspace((int) *pstring)) pstring++; + if (*pstring == 0) break; + char *varname = pstring; + while (!isspace((int) *pstring) && *pstring != 0) pstring++; + if (*pstring == 0) lstop = true; + *pstring++ = 0; + + int dimvarid; + int status = nc_inq_varid(ncid, varname, &dimvarid); + if (status == NC_NOERR) + { + cdf_set_var(&ncvars[dimvarid], CoordVar); + // if ( !CDI_Ignore_Att_Coordinates ) + { + ncvar->auxvarids[i] = dimvarid; + ncvar->nauxvars++; + } + } + else + Warning("%s - %s", nc_strerror(status), varname); + + if (lstop) break; + } + + cdf_set_var(ncvar, DataVar); + } + else if (isText && str_is_equal(attname, "grid_mapping")) + { + int nc_gmap_id; + int status = nc_inq_varid(ncid, attstring, &nc_gmap_id); + if (status == NC_NOERR) + { + ncvar->gmapid = nc_gmap_id; + cdf_set_var(&ncvars[ncvar->gmapid], CoordVar); + } + else + Warning("%s - %s", nc_strerror(status), attstring); + + cdf_set_var(ncvar, DataVar); + } + else if (isText && str_is_equal(attname, "positive")) + { + str_to_lower(attstring); + + if (str_is_equal(attstring, "down")) + ncvar->positive = POSITIVE_DOWN; + else if (str_is_equal(attstring, "up")) + ncvar->positive = POSITIVE_UP; + + if (ncvar->ndims == 1) + { + cdf_set_var(ncvar, CoordVar); + cdf_set_dim(ncvar, 0, Z_AXIS); + ncdims[ncvar->dimids[0]].dimtype = Z_AXIS; + } + else if (ncvar->ndims == 0) + { + cdf_set_var(ncvar, CoordVar); + ncvar->isZaxis = true; + } + else + { + ncvar->atts[ncvar->natts++] = iatt; + } + } + else if (isNumber && str_is_equal(attname, "_FillValue")) + { + cdfGetAttDouble(ncid, ncvarid, attname, 1, &ncvar->fillval); + ncvar->fillvalDefined = true; + // cdf_set_var(ncvar, DataVar); + } + else if (isNumber && str_is_equal(attname, "missing_value")) + { + cdfGetAttDouble(ncid, ncvarid, attname, 1, &ncvar->missval); + ncvar->missvalDefined = true; + // cdf_set_var(ncvar, DataVar); + } + else if (isNumber && str_is_equal(attname, "valid_range") && attlen == 2) + { + if (ncvar->validrangeDefined == false) + { + bool ignoreDatatype = (xtypeIsFloat(atttype) != xtypeIsFloat(xtype)); + if (!CDI_Ignore_Valid_Range && ignoreDatatype == false) + { + cdfGetAttDouble(ncid, ncvarid, attname, 2, ncvar->validrange); + ncvar->validrangeDefined = (ncvar->validrange[0] <= ncvar->validrange[1]); + if (((int) ncvar->validrange[0]) == 0 && ((int) ncvar->validrange[1]) == 255) ncvar->isUnsigned = true; + // cdf_set_var(ncvar, DataVar); + } + else if (ignoreDatatype) + { + Warning("Inconsistent data type for attribute %s:valid_range, ignored!", name); + } + } + } + else if (isNumber && str_is_equal(attname, "valid_min") && attlen == 1) + { + bool ignoreDatatype = (xtypeIsFloat(atttype) != xtypeIsFloat(xtype)); + if (!CDI_Ignore_Valid_Range && ignoreDatatype == false) + { + cdfGetAttDouble(ncid, ncvarid, attname, 1, &(ncvar->validrange)[0]); + ncvar->validrangeDefined = true; + } + else if (ignoreDatatype) + { + Warning("Inconsistent data type for attribute %s:valid_min, ignored!", name); + } + } + else if (isNumber && str_is_equal(attname, "valid_max") && attlen == 1) + { + bool ignoreDatatype = (xtypeIsFloat(atttype) != xtypeIsFloat(xtype)); + if (!CDI_Ignore_Valid_Range && ignoreDatatype == false) + { + cdfGetAttDouble(ncid, ncvarid, attname, 1, &(ncvar->validrange)[1]); + ncvar->validrangeDefined = true; + } + else if (ignoreDatatype) + { + Warning("Inconsistent data type for attribute %s:valid_max, ignored!", name); + } + } + else if (isText && str_is_equal(attname, "_Unsigned")) + { + str_to_lower(attstring); + if (str_is_equal(attstring, "true")) + { + ncvar->isUnsigned = true; + /* + ncvar->validrangeDefined = true; + ncvar->validrange[0] = 0; + ncvar->validrange[1] = 255; + */ + } + // cdf_set_var(ncvar, DataVar); + } + else if (isText && str_is_equal(attname, "cdi")) + { + str_to_lower(attstring); + + if (str_is_equal(attstring, "ignore")) + { + ncvar->ignoreVar = true; + cdf_set_var(ncvar, CoordVar); + } + } + else if (isNumber + && ((isRealization = str_is_equal(attname, "realization")) + || (isEnsembleMembers = str_is_equal(attname, "ensemble_members")) + || (isForecastInitType = str_is_equal(attname, "forecast_init_type")))) + { + int temp; + cdfGetAttInt(ncid, ncvarid, attname, 1, &temp); + + // clang-format off + if (isRealization) ncvar->perturbationNumber = temp; + else if (isEnsembleMembers) ncvar->numberOfForecastsInEnsemble = temp; + else if (isForecastInitType) ncvar->typeOfEnsembleForecast = temp; + // clang-format on + + cdf_set_var(ncvar, DataVar); + } + else + { + ncvar->atts[ncvar->natts++] = iatt; + } + } + } + + for (int i = 0; i < max_check_vars; ++i) + if (checked_vars[i]) Free(checked_vars[i]); +} + +static void +cdfVerifyVarAttr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims) +{ + nc_type atttype; + size_t attlen; + char attname[CDI_MAX_NAME]; + char attstring[8192]; + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + int ncid = ncvar->ncid; + const int *dimidsp = ncvar->dimids; + int nvdims = ncvar->ndims; + int nvatts = ncvar->natts; + + for (int i = 0; i < nvatts; i++) + { + int attnum = ncvar->atts[i]; + cdf_inq_attname(ncid, ncvarid, attnum, attname); + cdf_inq_attlen(ncid, ncvarid, attname, &attlen); + cdf_inq_atttype(ncid, ncvarid, attname, &atttype); + + size_t attstringsize = sizeof(attstring); + bool isText = xtypeIsText(atttype); + // bool isNumber = (xtypeIsFloat(atttype) || xtypeIsInt(atttype)); + + if (isText) + { + cdfGetAttText(ncid, ncvarid, attname, sizeof(attstring), attstring); + attstringsize = strlen(attstring) + 1; + if (attstringsize > CDI_MAX_NAME) attstringsize = CDI_MAX_NAME; + + if (str_is_equal(attname, "axis")) + { + cdfScanAttrAxis(ncvars, ncdims, ncvarid, attstring, nvdims, dimidsp); + } + /* + else if (str_is_equal(attname, "standard_name")) + { + memcpy(ncvar->stdname, attstring, attstringsize); + } + */ + } + } + } +} + +static void +cdf_set_dimtype(int nvars, ncvar_t *ncvars, ncdim_t *ncdims) +{ + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == DataVar) + { + int ndims = ncvar->ndims; + for (int i = 0; i < ndims; i++) + { + int ncdimid = ncvar->dimids[i]; + int dimtype = ncdims[ncdimid].dimtype; + if (dimtype >= X_AXIS && dimtype <= T_AXIS) cdf_set_dim(ncvar, i, dimtype); + } + + if (CDI_Debug) + { + Message("var %d %s", ncvarid, ncvar->name); + for (int i = 0; i < ndims; i++) printf(" dim%d type=%d ", i, ncvar->dimtype[i]); + printf("\n"); + } + } + } + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == DataVar) + { + bool lxdim = false, lydim = false, lzdim = false /* , ltdim = false */; + int lcdim = 0; + int ndims = ncvar->ndims; + for (int i = 0; i < ndims; i++) + { + int dimtype = ncvar->dimtype[i]; + lxdim |= (dimtype == X_AXIS); + lydim |= (dimtype == Y_AXIS); + lzdim |= (dimtype == Z_AXIS); + if (ncvar->cvarids[i] != CDI_UNDEFID) lcdim++; + // ltdim |= (dimtype == T_AXIS); + } + + int allcdims = lcdim; + + if (!lxdim && ncvar->xvarid != CDI_UNDEFID && ncvars[ncvar->xvarid].ndims == 0) lxdim = true; + if (!lydim && ncvar->yvarid != CDI_UNDEFID && ncvars[ncvar->yvarid].ndims == 0) lydim = true; + + if (lxdim && (lydim || ncvar->gridtype == GRID_UNSTRUCTURED)) + for (int i = ndims - 1; i >= 0; i--) + { + if (ncvar->dimtype[i] == -1 && !lzdim) + { + if (lcdim) + { + int cdimvar = ncvar->cvarids[allcdims - lcdim]; + ncvar->zvarid = cdimvar; + lcdim--; + ncvars[cdimvar].zaxistype = ZAXIS_CHAR; + } + cdf_set_dim(ncvar, i, Z_AXIS); + lzdim = true; + int ncdimid = ncvar->dimids[i]; + if (ncdims[ncdimid].dimtype == CDI_UNDEFID) ncdims[ncdimid].dimtype = Z_AXIS; + } + } + } + } + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + int ndims = ncvar->ndims; + for (int i = 0; i < ndims; i++) + { + if (ncvar->dimtype[i] == CDI_UNDEFID) + { + int ncdimid = ncvar->dimids[i]; + if (ncdims[ncdimid].dimtype == Z_AXIS) + { + ncvar->isZaxis = true; + cdf_set_dim(ncvar, i, Z_AXIS); + } + } + } + } + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == DataVar) + { + bool lxdim = false, lydim = false, lzdim = false /*, ltdim = false */; + int lcdim = 0; + int ndims = ncvar->ndims; + for (int i = 0; i < ndims; i++) + { + int dimtype = ncvar->dimtype[i]; + lxdim |= (dimtype == X_AXIS); + lydim |= (dimtype == Y_AXIS); + lzdim |= (dimtype == Z_AXIS); + if (ncvar->cvarids[i] != CDI_UNDEFID) lcdim++; + // ltdim |= (dimtype == T_AXIS); + } + + int allcdims = lcdim; + + if (!lxdim && ncvar->xvarid != CDI_UNDEFID && ncvars[ncvar->xvarid].ndims == 0) lxdim = true; + if (!lydim && ncvar->yvarid != CDI_UNDEFID && ncvars[ncvar->yvarid].ndims == 0) lydim = true; + + // if ( ndims > 1 ) + for (int i = ndims - 1; i >= 0; i--) + { + if (ncvar->dimtype[i] == -1) + { + int dimtype; + if (!lxdim) + { + if (lcdim && ncvar->xvarid == CDI_UNDEFID) + { + int cdimvar = ncvar->cvarids[allcdims - lcdim]; + ncvar->xvarid = cdimvar; + lcdim--; + } + dimtype = X_AXIS; + lxdim = true; + } + else if (!lydim && ncvar->gridtype != GRID_UNSTRUCTURED) + // else if ( !lydim && ! (ncvars[ncvar->xvarid].dimids[0] == ncvars[ncvar->yvarid].dimids[0] && + // ncvars[ncvar->xvarid].ndims == 1 && ncvars[ncvar->yvarid].ndims == 1)) + { + if (lcdim && ncvar->yvarid == CDI_UNDEFID) + { + int cdimvar = ncvar->cvarids[allcdims - lcdim]; + ncvar->yvarid = cdimvar; + lcdim--; + } + dimtype = Y_AXIS; + lydim = true; + } + else if (!lzdim) + { + if (lcdim > 0) + { + int cdimvar = ncvar->cvarids[allcdims - lcdim]; + ncvar->zvarid = cdimvar; + lcdim--; + ncvars[cdimvar].zaxistype = ZAXIS_CHAR; + } + dimtype = Z_AXIS; + lzdim = true; + } + else + continue; + cdf_set_dim(ncvar, i, dimtype); + } + } + if (lcdim > 0) Warning("Could not assign all character coordinates to data variable!"); + } + } +} + +// verify coordinates vars - first scan (dimname == varname) +static void +verify_coordinates_vars_1(int ncid, int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int timedimid, bool *isHybridCF) +{ + for (int ncdimid = 0; ncdimid < ndims; ncdimid++) + { + int ncvarid = ncdims[ncdimid].ncvarid; + if (ncvarid != -1) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->dimids[0] == timedimid) + { + ncvar->isTaxis = true; + ncdims[ncdimid].dimtype = T_AXIS; + continue; + } + + if (isHybridSigmaPressureCoordinate(ncid, ncvarid, ncvars, ncdims)) + { + *isHybridCF = true; + continue; + } + + if (ncvar->units[0] != 0) + { + if (is_lon_axis(ncvar->units, ncvar->stdname)) + { + ncvar->isLon = true; + cdf_set_var(ncvar, CoordVar); + cdf_set_dim(ncvar, 0, X_AXIS); + ncdims[ncdimid].dimtype = X_AXIS; + } + else if (is_lat_axis(ncvar->units, ncvar->stdname)) + { + ncvar->isLat = true; + cdf_set_var(ncvar, CoordVar); + cdf_set_dim(ncvar, 0, Y_AXIS); + ncdims[ncdimid].dimtype = Y_AXIS; + } + else if (is_x_axis(ncvar->units, ncvar->stdname)) + { + ncvar->isXaxis = true; + cdf_set_var(ncvar, CoordVar); + cdf_set_dim(ncvar, 0, X_AXIS); + ncdims[ncdimid].dimtype = X_AXIS; + } + else if (is_y_axis(ncvar->units, ncvar->stdname)) + { + ncvar->isYaxis = true; + cdf_set_var(ncvar, CoordVar); + cdf_set_dim(ncvar, 0, Y_AXIS); + ncdims[ncdimid].dimtype = Y_AXIS; + } + else if (is_pressure_units(ncvar->units)) + { + ncvar->zaxistype = ZAXIS_PRESSURE; + } + else if (str_is_equal(ncvar->units, "level") || str_is_equal(ncvar->units, "1")) + { + if (str_is_equal(ncvar->longname, "hybrid level at layer midpoints")) + ncvar->zaxistype = ZAXIS_HYBRID; + else if (strStartsWith(ncvar->longname, "hybrid level at midpoints")) + ncvar->zaxistype = ZAXIS_HYBRID; + else if (str_is_equal(ncvar->longname, "hybrid level at layer interfaces")) + ncvar->zaxistype = ZAXIS_HYBRID_HALF; + else if (strStartsWith(ncvar->longname, "hybrid level at interfaces")) + ncvar->zaxistype = ZAXIS_HYBRID_HALF; + else if (str_is_equal(ncvar->units, "level")) + ncvar->zaxistype = ZAXIS_GENERIC; + } + else if (is_DBL_axis(ncvar->longname)) + { + ncvar->zaxistype = ZAXIS_DEPTH_BELOW_LAND; + } + else if (is_height_units(ncvar->units)) + { + // clang-format off + if (is_depth_axis(ncvar->stdname, ncvar->longname)) ncvar->zaxistype = ZAXIS_DEPTH_BELOW_SEA; + else if (is_height_axis(ncvar->stdname, ncvar->longname)) ncvar->zaxistype = ZAXIS_HEIGHT; + else if (is_altitude_axis(ncvar->stdname, ncvar->longname)) ncvar->zaxistype = ZAXIS_ALTITUDE; + // clang-format on + } + } + else + { + // clang-format off + if (is_reference_axis(ncvar->stdname, ncvar->longname)) ncvar->zaxistype = ZAXIS_REFERENCE; + else if (str_is_equal(ncvar->stdname, "air_pressure")) ncvar->zaxistype = ZAXIS_PRESSURE; + // clang-format on + } + + if (!ncvar->isLon && (ncvar->longname[0] != 0) && !ncvar->isLat && (ncvar->longname[1] != 0)) + { + if (strStartsWith(ncvar->longname + 1, "ongitude")) + { + ncvar->isLon = true; + cdf_set_var(ncvar, CoordVar); + cdf_set_dim(ncvar, 0, X_AXIS); + ncdims[ncdimid].dimtype = X_AXIS; + continue; + } + else if (strStartsWith(ncvar->longname + 1, "atitude")) + { + ncvar->isLat = true; + cdf_set_var(ncvar, CoordVar); + cdf_set_dim(ncvar, 0, Y_AXIS); + ncdims[ncdimid].dimtype = Y_AXIS; + continue; + } + } + + if (ncvar->zaxistype != CDI_UNDEFID) + { + ncvar->isZaxis = true; + cdf_set_var(ncvar, CoordVar); + cdf_set_dim(ncvar, 0, Z_AXIS); + ncdims[ncdimid].dimtype = Z_AXIS; + } + } + } +} + +// verify coordinates vars - second scan (all other variables) +static void +verify_coordinates_vars_2(stream_t *streamptr, int nvars, ncvar_t *ncvars) +{ + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == CoordVar) + { + if (ncvar->units[0] != 0) + { + if (is_lon_axis(ncvar->units, ncvar->stdname)) + { + ncvar->isLon = true; + continue; + } + else if (is_lat_axis(ncvar->units, ncvar->stdname)) + { + ncvar->isLat = true; + continue; + } + else if (is_x_axis(ncvar->units, ncvar->stdname)) + { + ncvar->isXaxis = true; + continue; + } + else if (is_y_axis(ncvar->units, ncvar->stdname)) + { + ncvar->isYaxis = true; + continue; + } + else if (ncvar->zaxistype == CDI_UNDEFID && (str_is_equal(ncvar->units, "level") || str_is_equal(ncvar->units, "1"))) + { + // clang-format off + if (str_is_equal(ncvar->longname, "hybrid level at layer midpoints")) ncvar->zaxistype = ZAXIS_HYBRID; + else if (strStartsWith(ncvar->longname, "hybrid level at midpoints")) ncvar->zaxistype = ZAXIS_HYBRID; + else if (str_is_equal(ncvar->longname, "hybrid level at layer interfaces")) ncvar->zaxistype = ZAXIS_HYBRID_HALF; + else if (strStartsWith(ncvar->longname, "hybrid level at interfaces")) ncvar->zaxistype = ZAXIS_HYBRID_HALF; + else if (str_is_equal(ncvar->units, "level")) ncvar->zaxistype = ZAXIS_GENERIC; + // clang-format on + continue; + } + else if (ncvar->zaxistype == CDI_UNDEFID && is_pressure_units(ncvar->units)) + { + ncvar->zaxistype = ZAXIS_PRESSURE; + continue; + } + else if (is_DBL_axis(ncvar->longname)) + { + ncvar->zaxistype = ZAXIS_DEPTH_BELOW_LAND; + continue; + } + else if (is_height_units(ncvar->units)) + { + // clang-format off + if (is_depth_axis(ncvar->stdname, ncvar->longname)) ncvar->zaxistype = ZAXIS_DEPTH_BELOW_SEA; + else if (is_height_axis(ncvar->stdname, ncvar->longname)) ncvar->zaxistype = ZAXIS_HEIGHT; + // clang-format on + continue; + } + } + else if (str_is_equal(ncvar->stdname, "region") || str_is_equal(ncvar->stdname, "area_type") + || cdfInqDatatype(streamptr, ncvar->xtype, ncvar->isUnsigned) == CDI_DATATYPE_UINT8) + { + ncvar->isCharAxis = true; + } + else if (str_is_equal(ncvar->stdname, "air_pressure")) + ncvar->zaxistype = ZAXIS_PRESSURE; + + // not needed anymore for rotated grids + if (!ncvar->isLon && (ncvar->longname[0] != 0) && !ncvar->isLat && (ncvar->longname[1] != 0)) + { + if (strStartsWith(ncvar->longname + 1, "ongitude")) + { + ncvar->isLon = true; + continue; + } + else if (strStartsWith(ncvar->longname + 1, "atitude")) + { + ncvar->isLat = true; + continue; + } + } + } + } +} + +static void +grid_set_chunktype(grid_t *grid, ncvar_t *ncvar) +{ + if (ncvar->isChunked) + { + int ndims = ncvar->ndims; + + if (grid->type == GRID_UNSTRUCTURED) + { + size_t chunkSize = ncvar->chunks[ndims - 1]; + ncvar->chunkType = (chunkSize == grid->size) ? CDI_CHUNK_GRID : CDI_CHUNK_AUTO; + if (ncvar->chunkType == CDI_CHUNK_AUTO && ncvar->chunks[ndims - 1] > 1) ncvar->chunkSize = chunkSize; + } + else + { + if (grid->x.size > 1 && grid->y.size > 1 && ndims > 1 && grid->x.size == ncvar->chunks[ndims - 1] + && grid->y.size == ncvar->chunks[ndims - 2]) + ncvar->chunkType = CDI_CHUNK_GRID; + else if (grid->x.size > 1 && grid->x.size == ncvar->chunks[ndims - 1]) + ncvar->chunkType = CDI_CHUNK_LINES; + else + ncvar->chunkType = CDI_CHUNK_AUTO; + } + } +} + +// define all input grids +static void +cdf_load_vals(size_t size, int ndims, int varid, ncvar_t *ncvar, double **gridvals, struct xyValGet *valsGet, bool hasTimeDim, + bool readPart, size_t *start, size_t *count) +{ + if (CDI_Netcdf_Lazy_Grid_Load) + { + *valsGet = (struct xyValGet){ + .scalefactor = ncvar->scalefactor, + .addoffset = ncvar->addoffset, + .start = { start[0], start[1], start[2] }, + .count = { count[0], count[1], count[2] }, + .size = size, + .datasetNCId = ncvar->ncid, + .varNCId = varid, + .ndims = (short) ndims, + }; + *gridvals = cdfPendingLoad; + } + else + { + *gridvals = (double *) Malloc(size * sizeof(double)); + if (hasTimeDim || readPart) + cdf_get_vara_double(ncvar->ncid, varid, start, count, *gridvals); + else + cdf_get_var_double(ncvar->ncid, varid, *gridvals); + cdf_scale_add(size, *gridvals, ncvar->addoffset, ncvar->scalefactor); + } +} + +#ifndef USE_MPI +static void +cdf_load_cvals(size_t size, int varid, ncvar_t *ncvar, char ***gridvals, size_t dimlength) +{ + size_t startc[] = { 0, 0 }; + size_t countc[] = { 1, size / dimlength }; + *gridvals = (char **) Malloc(dimlength * sizeof(char *)); + for (size_t i = 0; i < dimlength; i++) + { + (*gridvals)[i] = (char *) Malloc((size / dimlength) * sizeof(char)); + cdf_get_vara_text(ncvar->ncid, varid, startc, countc, (*gridvals)[i]); + startc[0] = i + 1; + } +} +#endif + +static void +cdf_load_bounds(size_t size, ncvar_t *ncvar, double **gridbounds, struct cdfLazyGridIds *cellBoundsGet, bool readPart, + size_t *start, size_t *count) +{ + if (CDI_Netcdf_Lazy_Grid_Load) + { + cellBoundsGet->datasetNCId = ncvar->ncid; + cellBoundsGet->varNCId = ncvar->bounds; + *gridbounds = cdfPendingLoad; + } + else + { + *gridbounds = (double *) Malloc(size * sizeof(double)); + if (readPart) + cdf_get_vara_double(ncvar->ncid, ncvar->bounds, start, count, *gridbounds); + else + cdf_get_var_double(ncvar->ncid, ncvar->bounds, *gridbounds); + } +} + +static void +cdf_load_bounds_cube_sphere(size_t bxsize, size_t bysize, size_t size, ncvar_t *ncvar, double **gridbounds, + struct cdfLazyGridIds *cellBoundsGet) +{ + if (CDI_Netcdf_Lazy_Grid_Load) + { + cellBoundsGet->datasetNCId = ncvar->ncid; + cellBoundsGet->varNCId = ncvar->bounds; + *gridbounds = cdfPendingLoad; + } + else + { + float *bounds = (float *) Malloc(6 * bxsize * bysize * sizeof(float)); + cdf_get_var_float(ncvar->ncid, ncvar->bounds, bounds); + + *gridbounds = (double *) Malloc(size * sizeof(double)); + double *pbounds = *gridbounds; + + size_t m = 0; + for (size_t k = 0; k < 6; ++k) + for (size_t j = 0; j < (bysize - 1); ++j) + for (size_t i = 0; i < (bxsize - 1); ++i) + { + size_t offset = k * bysize * bxsize; + pbounds[m + 0] = bounds[offset + (j + 1) * bxsize + i]; + pbounds[m + 1] = bounds[offset + j * bxsize + i]; + pbounds[m + 2] = bounds[offset + j * bxsize + (i + 1)]; + pbounds[m + 3] = bounds[offset + (j + 1) * bxsize + (i + 1)]; + m += 4; + } + + Free(bounds); + } +} + +static void +cdf_load_cellarea(size_t size, ncvar_t *ncvar, double **gridarea, struct cdfLazyGridIds *cellAreaGet) +{ + if (CDI_Netcdf_Lazy_Grid_Load) + { + cellAreaGet->datasetNCId = ncvar->ncid; + cellAreaGet->varNCId = ncvar->cellarea; + *gridarea = cdfPendingLoad; + } + else + { + *gridarea = (double *) Malloc(size * sizeof(double)); + cdf_get_var_double(ncvar->ncid, ncvar->cellarea, *gridarea); + } +} + +static void +cdf_copy_grid_axis_attr(ncvar_t *ncvar, struct gridaxis_t *gridaxis) +{ + cdiDefVarKeyBytes(&gridaxis->keys, CDI_KEY_NAME, (const unsigned char *) ncvar->name, (int) strlen(ncvar->name) + 1); + if (ncvar->longname[0]) + cdiDefVarKeyBytes(&gridaxis->keys, CDI_KEY_LONGNAME, (const unsigned char *) ncvar->longname, + (int) strlen(ncvar->longname) + 1); + if (ncvar->units[0]) + cdiDefVarKeyBytes(&gridaxis->keys, CDI_KEY_UNITS, (const unsigned char *) ncvar->units, (int) strlen(ncvar->units) + 1); +#ifndef USE_MPI + if (gridaxis->cvals) + if (ncvar->stdname[0]) + cdiDefVarKeyBytes(&gridaxis->keys, CDI_KEY_STDNAME, (const unsigned char *) ncvar->stdname, (int) strlen(ncvar->stdname) + 1); +#endif +} + +static int +cdf_get_xydimid(int ndims, int *dimids, int *dimtype, int *xdimid, int *ydimid) +{ + int nxdims = 0, nydims = 0; + int xdimids[2] = { -1, -1 }, ydimids[2] = { -1, -1 }; + + for (int i = 0; i < ndims; i++) + { + if (dimtype[i] == X_AXIS && nxdims < 2) + { + xdimids[nxdims] = dimids[i]; + nxdims++; + } + else if (dimtype[i] == Y_AXIS && nydims < 2) + { + ydimids[nydims] = dimids[i]; + nydims++; + } + } + + if (nxdims == 2) + { + *xdimid = xdimids[1]; + *ydimid = xdimids[0]; + } + else if (nydims == 2) + { + *xdimid = ydimids[1]; + *ydimid = ydimids[0]; + } + else + { + *xdimid = xdimids[0]; + *ydimid = ydimids[0]; + } + + return nydims; +} + +static void +cdf_check_gridtype(int *gridtype, bool isLon, bool isLat, size_t xsize, size_t ysize, grid_t *grid) +{ + if (isLat && (isLon || xsize == 0)) + { + double yinc = 0.0; + if (isLon && ysize > 1) + { + yinc = fabs(grid->y.vals[0] - grid->y.vals[1]); + for (size_t i = 2; i < ysize; i++) + if ((fabs(grid->y.vals[i - 1] - grid->y.vals[i]) - yinc) > (yinc / 1000)) + { + yinc = 0; + break; + } + } + if (ysize < 10000 && IS_EQUAL(yinc, 0.0) && isGaussianLatitudes(ysize, grid->y.vals)) + { + *gridtype = GRID_GAUSSIAN; + grid->np = (int) (ysize / 2); + } + else + { + *gridtype = GRID_LONLAT; + } + } + else + { + *gridtype = (isLon && !isLat && ysize == 0) ? GRID_LONLAT : GRID_GENERIC; + } +} + +static bool +cdf_read_xcoord(stream_t *streamptr, struct cdfLazyGrid *lazyGrid, ncdim_t *ncdims, ncvar_t *ncvar, int xvarid, ncvar_t *axisvar, + size_t *xsize, size_t ysize, bool hasTimeDim, bool readPart, size_t *start, size_t *count, bool *isLon) +{ + grid_t *grid = &lazyGrid->base; + bool skipvar = true; + *isLon = axisvar->isLon; + int ndims = axisvar->ndims; + size_t size = 0; + + if (ndims == 1 && xtypeIsText(axisvar->xtype)) + { + ncvar->varStatus = CoordVar; + Warning("Unsupported x-coordinate type (char/string), skipped variable %s!", ncvar->name); + return true; + } + + int datatype = cdfInqDatatype(streamptr, axisvar->xtype, axisvar->isUnsigned); + + if ((ndims - hasTimeDim) == 2) + { + // Check size of 2 dimensional coordinates variables + int dimid = axisvar->dimids[ndims - 2]; + size_t dimsize1 = ncdims[dimid].len; + dimid = axisvar->dimids[ndims - 1]; + size_t dimsize2 = ncdims[dimid].len; + + if (datatype == CDI_DATATYPE_UINT8) + { + ncvar->gridtype = GRID_CHARXY; + size = dimsize1 * dimsize2; + skipvar = (dimsize1 != *xsize); + } + else + { + ncvar->gridtype = GRID_CURVILINEAR; + size = (*xsize) * ysize; + skipvar = (dimsize1 * dimsize2 != size); + } + } + else if ((ndims - hasTimeDim) == 1) + { + size = *xsize; + // Check size of 1 dimensional coordinates variables + int dimid = axisvar->dimids[ndims - 1]; + size_t dimsize = ncdims[dimid].len; + skipvar = readPart ? false : (dimsize != size); + } + else if (ndims == 0 && *xsize == 0) + { + size = *xsize = 1; + skipvar = false; + } + else if (ncvar->isCubeSphere) + { + size = *xsize; + skipvar = false; + } + + if (skipvar) + { + Warning("Unsupported array structure, skipped variable %s!", ncvar->name); + ncvar->varStatus = UndefVar; + return true; + } + + if (datatype != -1) grid->datatype = datatype; + + if (datatype == CDI_DATATYPE_UINT8 && !CDI_Netcdf_Lazy_Grid_Load) + { +#ifndef USE_MPI + cdf_load_cvals(size, xvarid, axisvar, &grid->x.cvals, *xsize); + grid->x.clength = size / (*xsize); +#endif + } + else + cdf_load_vals(size, ndims, xvarid, axisvar, &grid->x.vals, &lazyGrid->xValsGet, hasTimeDim, readPart, start, count); + + cdf_copy_grid_axis_attr(axisvar, &grid->x); + + return false; +} + +static bool +cdf_read_ycoord(stream_t *streamptr, struct cdfLazyGrid *lazyGrid, ncdim_t *ncdims, ncvar_t *ncvar, int yvarid, ncvar_t *axisvar, + size_t xsize, size_t *ysize, bool hasTimeDim, bool readPart, size_t *start, size_t *count, bool *isLat) +{ + grid_t *grid = &lazyGrid->base; + bool skipvar = true; + *isLat = axisvar->isLat; + int ndims = axisvar->ndims; + size_t size = 0; + + if (ndims == 1 && xtypeIsText(axisvar->xtype)) + { + ncvar->varStatus = CoordVar; + Warning("Unsupported y-coordinate type (char/string), skipped variable %s!", ncvar->name); + return true; + } + + int datatype = cdfInqDatatype(streamptr, axisvar->xtype, axisvar->isUnsigned); + + if ((ndims - hasTimeDim) == 2) + { + // Check size of 2 dimensional coordinates variables + int dimid = axisvar->dimids[ndims - 2]; + size_t dimsize1 = ncdims[dimid].len; + dimid = axisvar->dimids[ndims - 1]; + size_t dimsize2 = ncdims[dimid].len; + + if (datatype == CDI_DATATYPE_UINT8) + { + ncvar->gridtype = GRID_CHARXY; + size = dimsize1 * dimsize2; + skipvar = (dimsize1 != *ysize); + } + else + { + ncvar->gridtype = GRID_CURVILINEAR; + size = xsize * (*ysize); + skipvar = (dimsize1 * dimsize2 != size); + } + } + else if ((ndims - hasTimeDim) == 1) + { + size = (*ysize) ? *ysize : xsize; + int dimid = axisvar->dimids[ndims - 1]; + size_t dimsize = ncdims[dimid].len; + skipvar = readPart ? false : (dimsize != size); + } + else if (ndims == 0 && *ysize == 0) + { + size = *ysize = 1; + skipvar = false; + } + else if (ncvar->isCubeSphere) + { + size = *ysize; + skipvar = false; + } + + if (skipvar) + { + Warning("Unsupported array structure, skipped variable %s!", ncvar->name); + ncvar->varStatus = UndefVar; + return true; + } + + if (datatype != -1) grid->datatype = datatype; + + if (datatype == CDI_DATATYPE_UINT8 && !CDI_Netcdf_Lazy_Grid_Load) + { +#ifndef USE_MPI + cdf_load_cvals(size, yvarid, axisvar, &grid->y.cvals, *ysize); + grid->y.clength = size / (*ysize); +#endif + } + else + cdf_load_vals(size, ndims, yvarid, axisvar, &grid->y.vals, &lazyGrid->yValsGet, hasTimeDim, readPart, start, count); + + cdf_copy_grid_axis_attr(axisvar, &grid->y); + + return false; +} + +typedef struct +{ + long start; + long count; + bool readPart; +} GridPart; + +static void +gridpart_init(GridPart *gridPart) +{ + gridPart->start = -1; + gridPart->count = -1; + gridPart->readPart = false; +} + +static bool +cdf_read_coordinates(stream_t *streamptr, struct cdfLazyGrid *lazyGrid, ncvar_t *ncvar, ncvar_t *ncvars, ncdim_t *ncdims, + int timedimid, int xvarid, int yvarid, size_t xsize, size_t ysize, int *vdimid, const GridPart *gridPart) +{ + grid_t *grid = &lazyGrid->base; + size_t size = 0; + size_t start[3] = { 0, 0, 0 }, count[3] = { 1, 1, 1 }; + bool readPart = false; + + grid->datatype = CDI_DATATYPE_FLT64; + + if (ncvar->gridtype == GRID_TRAJECTORY) + { + if (ncvar->xvarid == CDI_UNDEFID) Error("Longitude coordinates undefined for %s!", ncvar->name); + if (ncvar->yvarid == CDI_UNDEFID) Error("Latitude coordinates undefined for %s!", ncvar->name); + } + else + { + bool hasTimeDim = false; + + if (xvarid != CDI_UNDEFID && yvarid != CDI_UNDEFID) + { + int ndims = ncvars[xvarid].ndims; + if (ndims != ncvars[yvarid].ndims && !ncvars[xvarid].isCharAxis && !ncvars[yvarid].isCharAxis) + { + Warning("Inconsistent grid structure for variable %s!", ncvar->name); + ncvar->xvarid = xvarid = CDI_UNDEFID; + ncvar->yvarid = yvarid = CDI_UNDEFID; + } + if (ndims > 1) + { + if (ndims <= 3) + { + if (ncvars[xvarid].dimids[0] == timedimid && ncvars[yvarid].dimids[0] == timedimid) + { + static bool ltwarn = true; + size_t ntsteps = 0; + cdf_inq_dimlen(ncvar->ncid, ncdims[timedimid].dimid, &ntsteps); + if (ltwarn && ntsteps > 1) Warning("Time varying grids unsupported, using grid at time step 1!"); + ltwarn = false; + hasTimeDim = true; + count[1] = ysize; + count[2] = xsize; + } + } + else + { + Warning("Unsupported grid structure for variable %s (grid dims > 2)!", ncvar->name); + ncvar->xvarid = xvarid = CDI_UNDEFID; + ncvar->yvarid = yvarid = CDI_UNDEFID; + } + } + else if (gridPart && gridPart->readPart) + { + start[0] = gridPart->start; + count[0] = gridPart->count; + readPart = true; + } + } + + if (xvarid != CDI_UNDEFID) + { + if (!ncvar->isCubeSphere && (ncvars[xvarid].ndims - hasTimeDim) > 2) + { + Warning("Coordinates variable %s has too many dimensions (%d), skipped!", ncvars[xvarid].name, ncvars[xvarid].ndims); + // ncvar->xvarid = CDI_UNDEFID; + xvarid = CDI_UNDEFID; + } + } + + if (yvarid != CDI_UNDEFID) + { + if (!ncvar->isCubeSphere && (ncvars[yvarid].ndims - hasTimeDim) > 2) + { + Warning("Coordinates variable %s has too many dimensions (%d), skipped!", ncvars[yvarid].name, ncvars[yvarid].ndims); + // ncvar->yvarid = CDI_UNDEFID; + yvarid = CDI_UNDEFID; + } + } + + bool isLon = false, isLat = false; + + if (xvarid != CDI_UNDEFID) + if (cdf_read_xcoord(streamptr, lazyGrid, ncdims, ncvar, xvarid, &ncvars[xvarid], &xsize, ysize, hasTimeDim, readPart, start, + count, &isLon)) + return true; + + if (yvarid != CDI_UNDEFID) + if (cdf_read_ycoord(streamptr, lazyGrid, ncdims, ncvar, yvarid, &ncvars[yvarid], xsize, &ysize, hasTimeDim, readPart, start, + count, &isLat)) + return true; + + // clang-format off + if (ncvar->gridtype == GRID_UNSTRUCTURED) size = xsize; + else if (ncvar->gridtype == GRID_GAUSSIAN_REDUCED) size = xsize; + else if (ysize == 0) size = xsize; + else if (xsize == 0) size = ysize; + else size = xsize * ysize; + // clang-format on + + if (ncvar->gridtype == CDI_UNDEFID || ncvar->gridtype == GRID_GENERIC) + cdf_check_gridtype(&ncvar->gridtype, isLon, isLat, xsize, ysize, grid); + } + + int gridtype = grid->type; + if (gridtype != GRID_PROJECTION) + { + gridtype = ncvar->gridtype; + } + else if (gridtype == GRID_PROJECTION && ncvar->gridtype == GRID_LONLAT) + { + int gmapvarid = ncvar->gmapid; + if (gmapvarid != CDI_UNDEFID && cdfCheckAttText(ncvar->ncid, gmapvarid, "grid_mapping_name")) + { + char attstring[CDI_MAX_NAME]; + cdfGetAttText(ncvar->ncid, gmapvarid, "grid_mapping_name", CDI_MAX_NAME, attstring); + if (str_is_equal(attstring, "latitude_longitude")) gridtype = ncvar->gridtype; + } + } + + switch (gridtype) + { + case GRID_GENERIC: + case GRID_LONLAT: + case GRID_GAUSSIAN: + case GRID_UNSTRUCTURED: + case GRID_CURVILINEAR: + case GRID_PROJECTION: + { + grid->size = size; + grid->x.size = xsize; + grid->y.size = ysize; + if (xvarid != CDI_UNDEFID && CDI_Read_Cell_Corners) + { + grid->x.flag = 1; + int bvarid = ncvars[xvarid].bounds; + if (bvarid != CDI_UNDEFID) + { + int ndims = ncvars[xvarid].ndims; + int nbdims = ncvars[bvarid].ndims; + if (nbdims == 2 || nbdims == 3) + { + if (ncvars[bvarid].dimids[0] == timedimid) + { + static bool ltwarn = true; + if (ltwarn) Warning("Time varying grid x-bounds unsupported, skipped!"); + ltwarn = false; + } + else if (ncvar->isCubeSphere) + { + grid->nvertex = 4; + size_t bxsize = ncdims[ncvars[bvarid].dimids[2]].len; + size_t bysize = ncdims[ncvars[bvarid].dimids[1]].len; + cdf_load_bounds_cube_sphere(bxsize, bysize, size * (size_t) grid->nvertex, &ncvars[xvarid], &grid->x.bounds, + &lazyGrid->xBoundsGet); + } + else if (nbdims == ndims + 1) + { + *vdimid = ncvars[bvarid].dimids[nbdims - 1]; + grid->nvertex = (int) ncdims[*vdimid].len; + if (readPart) + { + start[1] = 0; + count[1] = grid->nvertex; + } + cdf_load_bounds(size * (size_t) grid->nvertex, &ncvars[xvarid], &grid->x.bounds, &lazyGrid->xBoundsGet, + readPart, start, count); + } + else + { + static bool lwarn = true; + if (lwarn) Warning("x-bounds doesn't follow the CF-Convention, skipped!"); + lwarn = false; + } + } + } + } + if (yvarid != CDI_UNDEFID && CDI_Read_Cell_Corners) + { + grid->y.flag = 1; + int bvarid = ncvars[yvarid].bounds; + if (bvarid != CDI_UNDEFID) + { + int ndims = ncvars[yvarid].ndims; + int nbdims = ncvars[bvarid].ndims; + if (nbdims == 2 || nbdims == 3) + { + if (ncvars[bvarid].dimids[0] == timedimid) + { + static bool ltwarn = true; + if (ltwarn) Warning("Time varying grid y-bounds unsupported, skipped!"); + ltwarn = false; + } + else if (ncvar->isCubeSphere) + { + grid->nvertex = 4; + size_t bxsize = ncdims[ncvars[bvarid].dimids[2]].len; + size_t bysize = ncdims[ncvars[bvarid].dimids[1]].len; + cdf_load_bounds_cube_sphere(bxsize, bysize, size * (size_t) grid->nvertex, &ncvars[yvarid], &grid->y.bounds, + &lazyGrid->yBoundsGet); + } + else if (nbdims == ndims + 1) + { + if (*vdimid == CDI_UNDEFID) + { + *vdimid = ncvars[bvarid].dimids[nbdims - 1]; + grid->nvertex = (int) ncdims[*vdimid].len; + } + if (readPart) + { + start[1] = 0; + count[1] = grid->nvertex; + } + cdf_load_bounds(size * (size_t) grid->nvertex, &ncvars[yvarid], &grid->y.bounds, &lazyGrid->yBoundsGet, + readPart, start, count); + } + else + { + static bool lwarn = true; + if (lwarn) Warning("y-bounds doesn't follow the CF-Convention, skipped!"); + lwarn = false; + } + } + } + } + + if (ncvar->cellarea != CDI_UNDEFID) cdf_load_cellarea(size, ncvar, &grid->area, &lazyGrid->cellAreaGet); + + if (gridtype == GRID_GAUSSIAN) + { + if (ncvar->numLPE > 0) grid->np = ncvar->numLPE; + } + + break; + } + case GRID_GAUSSIAN_REDUCED: + { + if (ncvar->numLPE > 0 && ncvar->rpvarid != CDI_UNDEFID) + { + if (ncvars[ncvar->rpvarid].ndims == 1) + { + grid->size = size; + int dimid = ncvars[ncvar->rpvarid].dimids[0]; + size_t len = ncdims[dimid].len; + grid->y.size = len; + grid->reducedPointsSize = len; + grid->reducedPoints = (int *) Malloc(len * sizeof(int)); + cdf_get_var_int(ncvar->ncid, ncvar->rpvarid, grid->reducedPoints); + grid->np = ncvar->numLPE; + + int bvarid = (yvarid == CDI_UNDEFID) ? CDI_UNDEFID : ncvars[yvarid].bounds; + if (bvarid != CDI_UNDEFID) + { + int nbdims = ncvars[bvarid].ndims; + if (nbdims == 2 || nbdims == 3) + { + if (*vdimid == CDI_UNDEFID) + { + *vdimid = ncvars[bvarid].dimids[nbdims - 1]; + grid->nvertex = (int) ncdims[*vdimid].len; + } + cdf_load_bounds(size * (size_t) grid->nvertex, &ncvars[yvarid], &grid->y.bounds, &lazyGrid->yBoundsGet, + false, NULL, NULL); + } + } + } + } + break; + } + case GRID_SPECTRAL: + { + grid->size = size; + grid->lcomplex = 1; + grid->trunc = ncvar->truncation; + break; + } + case GRID_FOURIER: + { + grid->size = size; + grid->trunc = ncvar->truncation; + break; + } + case GRID_TRAJECTORY: + { + grid->size = 1; + break; + } + case GRID_CHARXY: + { + grid->size = size; + grid->x.size = xsize; + grid->y.size = ysize; + break; + } + } + + // if ( grid->type != GRID_PROJECTION && grid->type != ncvar->gridtype ) + if (grid->type != gridtype) + { + // int gridtype = ncvar->gridtype; + grid->type = gridtype; + cdiGridTypeInit(grid, gridtype, grid->size); + } + + if (grid->size == 0) + { + int ndims = ncvar->ndims; + int *dimtype = ncvar->dimtype; + if (ndims == 0 || (ndims == 1 && dimtype[0] == T_AXIS) || (ndims == 1 && dimtype[0] == Z_AXIS) + || (ndims == 2 && dimtype[0] == T_AXIS && dimtype[1] == Z_AXIS)) + { + grid->type = GRID_GENERIC; + grid->size = 1; + grid->x.size = 0; + grid->y.size = 0; + } + else + { + Warning("Unsupported grid, skipped variable %s!", ncvar->name); + ncvar->varStatus = UndefVar; + return true; + } + } + + return false; +} + +static bool +cdf_set_unstructured_par(ncvar_t *ncvar, grid_t *grid, int *xdimid, int *ydimid, GridInfo *gridInfo, bool readPart) +{ + int ndims = ncvar->ndims; + int *dimtype = ncvar->dimtype; + + int zdimid = CDI_UNDEFID; + int xdimidx = CDI_UNDEFID, ydimidx = CDI_UNDEFID; + + for (int i = 0; i < ndims; i++) + { + // clang-format off + if (dimtype[i] == X_AXIS) xdimidx = i; + else if (dimtype[i] == Y_AXIS) ydimidx = i; + else if (dimtype[i] == Z_AXIS) zdimid = ncvar->dimids[i]; + // clang-format on + } + + if (*xdimid != CDI_UNDEFID && *ydimid != CDI_UNDEFID && zdimid == CDI_UNDEFID) + { + if (grid->x.size > grid->y.size && grid->y.size < 1000) + { + dimtype[ydimidx] = Z_AXIS; + *ydimid = CDI_UNDEFID; + grid->size = grid->x.size; + grid->y.size = 0; + } + else if (grid->y.size > grid->x.size && grid->x.size < 1000) + { + dimtype[xdimidx] = Z_AXIS; + *xdimid = *ydimid; + *ydimid = CDI_UNDEFID; + grid->size = grid->y.size; + grid->x.size = grid->y.size; + grid->y.size = 0; + } + } + + if (grid->size != grid->x.size) + { + Warning("Unsupported array structure, skipped variable %s!", ncvar->name); + ncvar->varStatus = UndefVar; + return true; + } + + if (!readPart) + { + if (gridInfo->number_of_grid_used != CDI_UNDEFID) + cdiDefVarKeyInt(&grid->keys, CDI_KEY_NUMBEROFGRIDUSED, gridInfo->number_of_grid_used); + if (ncvar->position > 0) cdiDefVarKeyInt(&grid->keys, CDI_KEY_NUMBEROFGRIDINREFERENCE, ncvar->position); + if (!cdiUUIDIsNull(gridInfo->uuid)) cdiDefVarKeyBytes(&grid->keys, CDI_KEY_UUID, gridInfo->uuid, CDI_UUID_SIZE); + } + + return false; +} + +static void +cdf_read_mapping_atts(int ncid, int gmapvarid, int projID) +{ + if (cdfCheckAttText(ncid, gmapvarid, "grid_mapping_name")) + { + char attstring[CDI_MAX_NAME]; + cdfGetAttText(ncid, gmapvarid, "grid_mapping_name", CDI_MAX_NAME, attstring); + cdiDefKeyString(projID, CDI_GLOBAL, CDI_KEY_GRIDMAP_NAME, attstring); + } + + int nvatts; + cdf_inq_varnatts(ncid, gmapvarid, &nvatts); + bool removeFillValue = true; + for (int attnum = 0; attnum < nvatts; ++attnum) cdf_set_cdi_attr(ncid, gmapvarid, attnum, projID, CDI_GLOBAL, removeFillValue); +} + +static void +cdf_set_grid_to_similar_vars(ncvar_t *ncvar1, ncvar_t *ncvar2, int gridtype, int xdimid, int ydimid) +{ + if (ncvar2->varStatus == DataVar && ncvar2->gridID == CDI_UNDEFID) + { + int xdimid2 = CDI_UNDEFID, ydimid2 = CDI_UNDEFID, zdimid2 = CDI_UNDEFID; + int xdimidx = CDI_UNDEFID, ydimidx = CDI_UNDEFID; + + const int *dimtype2 = ncvar2->dimtype; + const int *dimids2 = ncvar2->dimids; + int ndims2 = ncvar2->ndims; + for (int i = 0; i < ndims2; i++) + { + if (dimtype2[i] == X_AXIS) + { + xdimid2 = dimids2[i]; + xdimidx = i; + } + else if (dimtype2[i] == Y_AXIS) + { + ydimid2 = dimids2[i]; + ydimidx = i; + } + else if (dimtype2[i] == Z_AXIS) + { + zdimid2 = dimids2[i]; + } + } + + if (!ncvar2->isCubeSphere) + { + if (ncvar2->gridtype == CDI_UNDEFID && gridtype == GRID_UNSTRUCTURED) + { + if (xdimid == xdimid2 && ydimid2 != CDI_UNDEFID && zdimid2 == CDI_UNDEFID) + { + ncvar2->dimtype[ydimidx] = Z_AXIS; + ydimid2 = CDI_UNDEFID; + } + + if (xdimid == ydimid2 && xdimid2 != CDI_UNDEFID && zdimid2 == CDI_UNDEFID) + { + ncvar2->dimtype[xdimidx] = Z_AXIS; + xdimid2 = ydimid2; + ydimid2 = CDI_UNDEFID; + } + } + else if (ncvar2->gridtype == GRID_GAUSSIAN_REDUCED && gridtype == GRID_GAUSSIAN_REDUCED) + { + ydimid = CDI_UNDEFID; + } + } + + if (xdimid == xdimid2 && (ydimid == ydimid2 || (xdimid == ydimid && ydimid2 == CDI_UNDEFID))) + { + bool isSameGrid + = (ncvar1->xvarid == ncvar2->xvarid && ncvar1->yvarid == ncvar2->yvarid && ncvar1->position == ncvar2->position); + + // if (xvarid != -1 && ncvar2->xvarid != CDI_UNDEFID && xvarid != ncvar2->xvarid) isSameGrid = false; + // if (yvarid != -1 && ncvar2->yvarid != CDI_UNDEFID && yvarid != ncvar2->yvarid) isSameGrid = false; + + if (isSameGrid) + { + if (CDI_Debug) Message("Same gridID %d %s", ncvar1->gridID, ncvar2->name); + ncvar2->gridID = ncvar1->gridID; + ncvar2->chunkType = ncvar1->chunkType; + ncvar2->chunkSize = ncvar1->chunkSize; + ncvar2->gridSize = ncvar1->gridSize; + } + } + } +} + +static void +destroy_grid(struct cdfLazyGrid *lazyGrid, grid_t *grid) +{ + if (lazyGrid) + { + if (CDI_Netcdf_Lazy_Grid_Load) cdfLazyGridDestroy(lazyGrid); + if (grid) + { + grid_free(grid); + Free(grid); + } + } +} + +static int +cdf_define_all_grids(stream_t *streamptr, ncgrid_t *ncgrid, int vlistID, ncdim_t *ncdims, int nvars, ncvar_t *ncvars, + GridInfo *gridInfo) +{ + for (int ncvarid = 0; ncvarid < nvars; ++ncvarid) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == DataVar && ncvar->gridID == CDI_UNDEFID) + { + GridPart gridPart; + gridpart_init(&gridPart); + int ndims = ncvar->ndims; + int *dimtype = ncvar->dimtype; + int vdimid = CDI_UNDEFID; + struct addIfNewRes projAdded = { .Id = CDI_UNDEFID, .isNew = 0 }, gridAdded = { .Id = CDI_UNDEFID, .isNew = 0 }; + int xdimid = CDI_UNDEFID, ydimid = CDI_UNDEFID; + int nydims = cdf_get_xydimid(ndims, ncvar->dimids, dimtype, &xdimid, &ydimid); + + int xaxisid = (xdimid != CDI_UNDEFID) ? ncdims[xdimid].ncvarid : CDI_UNDEFID; + int yaxisid = (ydimid != CDI_UNDEFID) ? ncdims[ydimid].ncvarid : CDI_UNDEFID; + int xvarid = (ncvar->xvarid != CDI_UNDEFID) ? ncvar->xvarid : xaxisid; + int yvarid = (ncvar->yvarid != CDI_UNDEFID) ? ncvar->yvarid : yaxisid; + + size_t xsize = (xdimid != CDI_UNDEFID) ? ncdims[xdimid].len : 0; + size_t ysize = (ydimid != CDI_UNDEFID) ? ncdims[ydimid].len : 0; + + if (ydimid == CDI_UNDEFID && yvarid != CDI_UNDEFID) + { + if (ncvars[yvarid].ndims == 1) + { + ydimid = ncvars[yvarid].dimids[0]; + ysize = ncdims[ydimid].len; + } + } + + int gmapvarid = ncvar->gmapid; + bool lproj = (gmapvarid != CDI_UNDEFID); + + if (!lproj && xaxisid != CDI_UNDEFID && xaxisid != xvarid && yaxisid != CDI_UNDEFID && yaxisid != yvarid) lproj = true; + + if (ncvar->isCubeSphere && lproj && xvarid != CDI_UNDEFID && yvarid != CDI_UNDEFID && ncvars[xvarid].ndims == 3 + && ncvars[yvarid].ndims == 3) + { + lproj = false; + ncvar->gridtype = GRID_UNSTRUCTURED; + xsize = xsize * ysize * 6; + ysize = xsize; + } + + bool lgrid = !(lproj && ncvar->xvarid == CDI_UNDEFID); + + bool isUnstructured = (xdimid != CDI_UNDEFID && xdimid == ydimid && nydims == 0); + if ((ncvar->gridtype == CDI_UNDEFID || ncvar->gridtype == GRID_GENERIC) && isUnstructured) + ncvar->gridtype = GRID_UNSTRUCTURED; + + struct cdfLazyGrid *lazyGrid = NULL, *lazyProj = NULL; + + { + int gridtype = (!lgrid) ? GRID_PROJECTION : ncvar->gridtype; + if (CDI_Netcdf_Lazy_Grid_Load) + { + cdfLazyGridRenew(&lazyGrid, gridtype); + if (lgrid && lproj) cdfLazyGridRenew(&lazyProj, GRID_PROJECTION); + } + else + { + cdfBaseGridRenew(&lazyGrid, gridtype); + if (lgrid && lproj) cdfBaseGridRenew(&lazyProj, GRID_PROJECTION); + } + } + grid_t *grid = &lazyGrid->base; + grid_t *proj = (lgrid && lproj) ? &lazyProj->base : NULL; + + xaxisid = (xdimid != CDI_UNDEFID) ? ncdims[xdimid].ncvarid : CDI_UNDEFID; + yaxisid = (ydimid != CDI_UNDEFID) ? ncdims[ydimid].ncvarid : CDI_UNDEFID; + + // process query information if available + CdiQuery *query = streamptr->query; + if (query) + { + if (ncvar->gridtype != GRID_UNSTRUCTURED) + { + Warning("Query parameter cell is only available for unstructured grids, skipped variable %s!", ncvar->name); + ncvar->varStatus = UndefVar; + continue; + } + + int numCellidx = cdiQueryNumCellidx(query); + if (numCellidx > 0) + { + size_t start = cdiQueryGetCellidx(query, 0); + size_t count = (numCellidx == 2) ? cdiQueryGetCellidx(query, 1) : 1; + if ((start + count) <= xsize) + { + cdiQueryCellidx(query, start); + if (numCellidx == 2) cdiQueryCellidx(query, count); + xsize = count; + ysize = count; + gridPart.start = start - 1; + gridPart.count = count; + gridPart.readPart = true; + } + } + } + + if (cdf_read_coordinates(streamptr, lazyGrid, ncvar, ncvars, ncdims, gridInfo->timedimid, xvarid, yvarid, xsize, ysize, + &vdimid, &gridPart)) + continue; + + if (gridInfo->number_of_grid_used != CDI_UNDEFID && (grid->type == CDI_UNDEFID || grid->type == GRID_GENERIC) + && xdimid != CDI_UNDEFID && xsize > 999) + grid->type = GRID_UNSTRUCTURED; + + if (!ncvar->isCubeSphere && grid->type == GRID_UNSTRUCTURED) + if (cdf_set_unstructured_par(ncvar, grid, &xdimid, &ydimid, gridInfo, gridPart.readPart)) continue; + + if (lgrid && lproj) + { + int dimid; + cdf_read_coordinates(streamptr, lazyProj, ncvar, ncvars, ncdims, gridInfo->timedimid, xaxisid, yaxisid, xsize, ysize, + &dimid, NULL); + } + + if (CDI_Debug) + { + Message("grid: type = %d, size = %zu, nx = %zu, ny = %zu", grid->type, grid->size, grid->x.size, grid->y.size); + if (proj) + Message("proj: type = %d, size = %zu, nx = %zu, ny = %zu", proj->type, proj->size, proj->x.size, proj->y.size); + } + + if (lgrid && lproj) + { + projAdded = cdiVlistAddGridIfNew(vlistID, proj, 2); + grid->proj = projAdded.Id; + } + + gridAdded = cdiVlistAddGridIfNew(vlistID, grid, 1); + ncvar->gridID = gridAdded.Id; + ncvar->gridSize = grid->size; + + int gridID = ncvar->gridID; + + if (lproj && gmapvarid != CDI_UNDEFID) + { + bool gridIsNew = lgrid ? projAdded.isNew : gridAdded.isNew; + if (gridIsNew) + { + int projID = lgrid ? grid->proj : gridID; + int ncid = ncvars[gmapvarid].ncid; + int gmapvartype = ncvars[gmapvarid].xtype; + cdiDefKeyInt(projID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARTYPE, gmapvartype); + const char *gmapvarname = ncvars[gmapvarid].name; + cdf_read_mapping_atts(ncid, gmapvarid, projID); + cdiDefKeyString(projID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARNAME, gmapvarname); + gridVerifyProj(projID); + } + } + + if (grid->type == GRID_UNSTRUCTURED && gridInfo->gridfile[0] != 0 && !gridPart.readPart) + gridDefReference(gridID, gridInfo->gridfile); + + if (ncvar->isChunked) grid_set_chunktype(grid, ncvar); + + int gridindex = vlistGridIndex(vlistID, gridID); + if (gridPart.readPart) + { + ncgrid[gridindex].start = gridPart.start; + ncgrid[gridindex].count = gridPart.count; + } + ncgrid[gridindex].gridID = gridID; + if (grid->type == GRID_TRAJECTORY) + { + ncgrid[gridindex].ncIDs[CDF_VARID_X] = xvarid; + ncgrid[gridindex].ncIDs[CDF_VARID_Y] = yvarid; + } + else + { + if (xdimid != CDI_UNDEFID) ncgrid[gridindex].ncIDs[CDF_DIMID_X] = ncdims[xdimid].dimid; + if (ydimid != CDI_UNDEFID) ncgrid[gridindex].ncIDs[CDF_DIMID_Y] = ncdims[ydimid].dimid; + if (ncvar->isCubeSphere) ncgrid[gridindex].ncIDs[CDF_DIMID_E] = ncdims[ncvar->dimids[ndims - 3]].dimid; + } + + if (xdimid == CDI_UNDEFID && ydimid == CDI_UNDEFID && grid->size == 1) gridDefHasDims(gridID, CoordVar); + + if (xdimid != CDI_UNDEFID) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_DIMNAME, ncdims[xdimid].name); + if (ydimid != CDI_UNDEFID) cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_DIMNAME, ncdims[ydimid].name); + if (vdimid != CDI_UNDEFID) cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_VDIMNAME, ncdims[vdimid].name); + + if (CDI_Debug) Message("gridID %d %d %s", gridID, ncvarid, ncvar->name); + + for (int ncvarid2 = ncvarid + 1; ncvarid2 < nvars; ncvarid2++) + cdf_set_grid_to_similar_vars(ncvar, &ncvars[ncvarid2], grid->type, xdimid, ydimid); + + if (gridAdded.isNew) lazyGrid = NULL; + if (projAdded.isNew) lazyProj = NULL; + + if (lazyGrid) destroy_grid(lazyGrid, grid); + if (lazyProj) destroy_grid(lazyProj, proj); + } + } + + return 0; +} + +// define all input zaxes +static int +cdf_define_all_zaxes(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nvars, ncvar_t *ncvars, size_t vctsize_echam, + double *vct_echam, unsigned char *uuidOfVGrid) +{ + char *pname, *plongname, *punits, *pstdname; + size_t vctsize = vctsize_echam; + double *vct = vct_echam; + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == DataVar && ncvar->zaxisID == CDI_UNDEFID) + { + bool isScalar = false; + bool withBounds = false; + int zdimid = CDI_UNDEFID; + int zvarid = CDI_UNDEFID; + size_t zsize = 1; + int psvarid = -1; + int p0varid = -1; + + int positive = 0; + int ndims = ncvar->ndims; + + if (ncvar->zvarid != -1 && ncvars[ncvar->zvarid].ndims == 0) + { + zvarid = ncvar->zvarid; + isScalar = true; + } + else + { + for (int i = 0; i < ndims; i++) + { + if (ncvar->dimtype[i] == Z_AXIS) zdimid = ncvar->dimids[i]; + } + + if (zdimid != CDI_UNDEFID) + { + // zvarid = ncdims[zdimid].ncvarid; + zvarid = (ncvar->zvarid != CDI_UNDEFID) ? ncvar->zvarid : ncdims[zdimid].ncvarid; + zsize = ncdims[zdimid].len; + } + } + + if (CDI_Debug) Message("nlevs = %zu", zsize); + + double *zvar = NULL; + char **zcvals = NULL; + size_t zclength = 0; + + int zaxisType = CDI_UNDEFID; + if (zvarid != CDI_UNDEFID) zaxisType = ncvars[zvarid].zaxistype; + if (zaxisType == CDI_UNDEFID) zaxisType = ZAXIS_GENERIC; + + int zdatatype = CDI_DATATYPE_FLT64; + double *lbounds = NULL; + double *ubounds = NULL; + + if (zvarid != CDI_UNDEFID) + { + positive = ncvars[zvarid].positive; + pname = ncvars[zvarid].name; + plongname = ncvars[zvarid].longname; + punits = ncvars[zvarid].units; + pstdname = ncvars[zvarid].stdname; + // clang-format off + if (ncvars[zvarid].xtype == NC_FLOAT) zdatatype = CDI_DATATYPE_FLT32; + else if (ncvars[zvarid].xtype == NC_INT) zdatatype = CDI_DATATYPE_INT32; + else if (ncvars[zvarid].xtype == NC_SHORT) zdatatype = CDI_DATATYPE_INT16; + // clang-format on + // don't change the name !!! + /* + if ((len = strlen(pname)) > 2) + if (pname[len-2] == '_' && isdigit((int) pname[len-1])) pname[len-2] = 0; + */ +#ifndef USE_MPI + if (zaxisType == ZAXIS_CHAR && ncvars[zvarid].ndims == 2) + { + zdatatype = CDI_DATATYPE_UINT8; + zclength = ncdims[ncvars[zvarid].dimids[1]].len; + cdf_load_cvals(zsize * zclength, zvarid, ncvar, &zcvals, zsize); + } +#endif + + if (zaxisType == ZAXIS_HYBRID && ncvars[zvarid].vct) + { + vct = ncvars[zvarid].vct; + vctsize = ncvars[zvarid].vctsize; + + if (ncvars[zvarid].psvarid != -1) psvarid = ncvars[zvarid].psvarid; + if (ncvars[zvarid].p0varid != -1) p0varid = ncvars[zvarid].p0varid; + } + + if (zaxisType != ZAXIS_CHAR) + { + zvar = (double *) Malloc(zsize * sizeof(double)); + cdf_get_var_double(ncvars[zvarid].ncid, zvarid, zvar); + } + + if (ncvars[zvarid].bounds != CDI_UNDEFID) + { + int nbdims = ncvars[ncvars[zvarid].bounds].ndims; + if (nbdims == 2 || isScalar) + { + size_t nlevel = isScalar ? 1 : ncdims[ncvars[ncvars[zvarid].bounds].dimids[0]].len; + int nvertex = (int) ncdims[ncvars[ncvars[zvarid].bounds].dimids[1 - isScalar]].len; + if (nlevel == zsize && nvertex == 2) + { + withBounds = true; + lbounds = (double *) Malloc(4 * nlevel * sizeof(double)); + ubounds = lbounds + nlevel; + double *zbounds = lbounds + 2 * nlevel; + cdf_get_var_double(ncvars[zvarid].ncid, ncvars[zvarid].bounds, zbounds); + for (size_t i = 0; i < nlevel; ++i) + { + lbounds[i] = zbounds[i * 2]; + ubounds[i] = zbounds[i * 2 + 1]; + } + } + } + } + } + else + { + pname = (zdimid != CDI_UNDEFID) ? ncdims[zdimid].name : NULL; + plongname = NULL; + punits = NULL; + pstdname = NULL; + + if (zsize == 1 && zdimid == CDI_UNDEFID) + { + zaxisType = (ncvar->zaxistype != CDI_UNDEFID) ? ncvar->zaxistype : ZAXIS_SURFACE; + // if ( pname ) + { + zvar = (double *) Malloc(sizeof(double)); + zvar[0] = 0; + } + } + } + + if (zsize > INT_MAX) + { + Warning("Size limit exceeded for z-axis dimension (limit=%d)!", INT_MAX); + return CDI_EDIMSIZE; + } + + ncvar->numLevels = zsize; + ncvar->zaxisID = varDefZaxis(vlistID, zaxisType, (int) zsize, zvar, (const char **) zcvals, zclength, withBounds, lbounds, + ubounds, (int) vctsize, vct, pname, plongname, punits, zdatatype, 1, 0, -1); + + int zaxisID = ncvar->zaxisID; + + if (CDI_CMOR_Mode && zsize == 1 && zaxisType != ZAXIS_HYBRID) zaxisDefScalar(zaxisID); + + if (pstdname && *pstdname) + cdiDefKeyBytes(zaxisID, CDI_GLOBAL, CDI_KEY_STDNAME, (const unsigned char *) pstdname, (int) strlen(pstdname) + 1); + + if (!cdiUUIDIsNull(uuidOfVGrid)) cdiDefKeyBytes(zaxisID, CDI_GLOBAL, CDI_KEY_UUID, uuidOfVGrid, CDI_UUID_SIZE); + + if (zaxisType == ZAXIS_HYBRID) + { + if (psvarid != -1) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_PSNAME, ncvars[psvarid].name); + if (p0varid != -1) + { + double px = 1; + cdf_get_var_double(ncvars[p0varid].ncid, p0varid, &px); + cdiDefKeyFloat(zaxisID, CDI_GLOBAL, CDI_KEY_P0VALUE, px); + cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_P0NAME, ncvars[p0varid].name); + } + } + + if (positive > 0) zaxisDefPositive(zaxisID, positive); + if (isScalar) zaxisDefScalar(zaxisID); + + if (zdimid != CDI_UNDEFID) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_DIMNAME, ncdims[zdimid].name); + + if (zvar) Free(zvar); + if (zcvals) + { + for (size_t i = 0; i < zsize; i++) Free(zcvals[i]); + Free(zcvals); + } + if (lbounds) Free(lbounds); + + if (zvarid != CDI_UNDEFID) + { + int ncid = ncvars[zvarid].ncid; + int nvatts = ncvars[zvarid].natts; + for (int iatt = 0; iatt < nvatts; ++iatt) + { + int attnum = ncvars[zvarid].atts[iatt]; + cdf_set_cdi_attr(ncid, zvarid, attnum, zaxisID, CDI_GLOBAL, false); + } + } + + int zaxisindex = vlistZaxisIndex(vlistID, zaxisID); + streamptr->zaxisID[zaxisindex] = zdimid >= 0 ? ncdims[zdimid].dimid : zdimid; + + if (CDI_Debug) Message("zaxisID %d %d %s", zaxisID, ncvarid, ncvar->name); + + for (int ncvarid2 = ncvarid + 1; ncvarid2 < nvars; ncvarid2++) + if (ncvars[ncvarid2].varStatus == DataVar + && ncvars[ncvarid2].zaxisID == CDI_UNDEFID /*&& ncvars[ncvarid2].zaxistype == CDI_UNDEFID*/) + { + int zvarid2 = CDI_UNDEFID; + if (ncvars[ncvarid2].zvarid != CDI_UNDEFID && ncvars[ncvars[ncvarid2].zvarid].ndims == 0) + zvarid2 = ncvars[ncvarid2].zvarid; + + int zdimid2 = CDI_UNDEFID; + ndims = ncvars[ncvarid2].ndims; + for (int i = 0; i < ndims; i++) + { + if (ncvars[ncvarid2].dimtype[i] == Z_AXIS) zdimid2 = ncvars[ncvarid2].dimids[i]; + } + + if (zdimid == zdimid2 /* && zvarid == zvarid2 */) + { + if ((zdimid != CDI_UNDEFID && ncvars[ncvarid2].zaxistype == CDI_UNDEFID) + || (zdimid == CDI_UNDEFID && zvarid != CDI_UNDEFID && zvarid == zvarid2) + || (zdimid == CDI_UNDEFID && zaxisType == ncvars[ncvarid2].zaxistype) + || (zdimid == CDI_UNDEFID && zvarid2 == CDI_UNDEFID && ncvars[ncvarid2].zaxistype == CDI_UNDEFID)) + { + if (CDI_Debug) Message("zaxisID %d %d %s", zaxisID, ncvarid2, ncvars[ncvarid2].name); + ncvars[ncvarid2].zaxisID = zaxisID; + } + } + } + } + } + + return 0; +} + +struct cdf_varinfo +{ + int varid; + const char *name; +}; + +static int +cdf_cmp_varname(const void *s1, const void *s2) +{ + const struct cdf_varinfo *x = (const struct cdf_varinfo *) s1, *y = (const struct cdf_varinfo *) s2; + return strcmp(x->name, y->name); +} + +static void +cdf_sort_varnames(int *varids, int nvars, const ncvar_t *ncvars) +{ + struct cdf_varinfo *varInfo = (struct cdf_varinfo *) Malloc((size_t) nvars * sizeof(struct cdf_varinfo)); + + for (int varID = 0; varID < nvars; varID++) + { + int ncvarid = varids[varID]; + varInfo[varID].varid = ncvarid; + varInfo[varID].name = ncvars[ncvarid].name; + } + qsort(varInfo, (size_t) nvars, sizeof(varInfo[0]), cdf_cmp_varname); + for (int varID = 0; varID < nvars; varID++) + { + varids[varID] = varInfo[varID].varid; + } + Free(varInfo); + if (CDI_Debug) + for (int i = 0; i < nvars; i++) Message("sorted varids[%d] = %d", i, varids[i]); +} + +static void +cdf_define_code_and_param(int vlistID, int varID) +{ + if (vlistInqVarCode(vlistID, varID) == -varID - 1) + { + char name[CDI_MAX_NAME]; + name[0] = 0; + vlistInqVarName(vlistID, varID, name); + size_t len = strlen(name); + if (len > 3 && isdigit((int) name[3])) + { + if (strStartsWith(name, "var")) vlistDefVarCode(vlistID, varID, atoi(name + 3)); + } + else if (len > 4 && isdigit((int) name[4])) + { + if (strStartsWith(name, "code")) vlistDefVarCode(vlistID, varID, atoi(name + 4)); + } + else if (len > 5 && isdigit((int) name[5])) + { + if (strStartsWith(name, "param")) + { + int pnum = -1, pcat = 255, pdis = 255; + sscanf(name + 5, "%d.%d.%d", &pnum, &pcat, &pdis); + vlistDefVarParam(vlistID, varID, cdiEncodeParam(pnum, pcat, pdis)); + } + } + } +} + +static void +cdf_define_institut_and_model_id(int vlistID, int varID) +{ + int varInstID = vlistInqVarInstitut(vlistID, varID); + int varModelID = vlistInqVarModel(vlistID, varID); + int varTableID = vlistInqVarTable(vlistID, varID); + int code = vlistInqVarCode(vlistID, varID); + if (CDI_Default_TableID != CDI_UNDEFID) + { + char name[CDI_MAX_NAME]; + name[0] = 0; + char longname[CDI_MAX_NAME]; + longname[0] = 0; + char units[CDI_MAX_NAME]; + units[0] = 0; + tableInqEntry(CDI_Default_TableID, code, -1, name, longname, units); + if (name[0]) + { + cdiDeleteKey(vlistID, varID, CDI_KEY_NAME); + cdiDeleteKey(vlistID, varID, CDI_KEY_LONGNAME); + cdiDeleteKey(vlistID, varID, CDI_KEY_UNITS); + + if (varTableID != CDI_UNDEFID) + { + cdiDefKeyString(vlistID, varID, CDI_KEY_NAME, name); + if (longname[0]) cdiDefKeyString(vlistID, varID, CDI_KEY_LONGNAME, longname); + if (units[0]) cdiDefKeyString(vlistID, varID, CDI_KEY_UNITS, units); + } + else + { + varTableID = CDI_Default_TableID; + } + } + + if (CDI_Default_ModelID != CDI_UNDEFID) varModelID = CDI_Default_ModelID; + if (CDI_Default_InstID != CDI_UNDEFID) varInstID = CDI_Default_InstID; + } + if (varInstID != CDI_UNDEFID) vlistDefVarInstitut(vlistID, varID, varInstID); + if (varModelID != CDI_UNDEFID) vlistDefVarModel(vlistID, varID, varModelID); + if (varTableID != CDI_UNDEFID) vlistDefVarTable(vlistID, varID, varTableID); +} + +static int +cdf_xtype_to_numbytes(int xtype) +{ + int numBytes = 8; + + // clang-format off + if (xtype == NC_BYTE ) numBytes = 1; + else if (xtype == NC_CHAR ) numBytes = 1; + else if (xtype == NC_SHORT ) numBytes = 2; + else if (xtype == NC_INT ) numBytes = 4; + else if (xtype == NC_FLOAT ) numBytes = 4; +#ifdef HAVE_NETCDF4 + else if (xtype == NC_UBYTE ) numBytes = 1; + else if (xtype == NC_LONG ) numBytes = 4; + else if (xtype == NC_USHORT) numBytes = 2; + else if (xtype == NC_UINT ) numBytes = 4; +#endif + // clang-format on + + return numBytes; +} + +static size_t +calc_chunk_cache_size(int timedimid, ncvar_t *ncvar) +{ + size_t chunkCacheSize = ncvar->gridSize; + + chunkCacheSize *= (ncvar->dimids[0] == timedimid) ? ncvar->chunks[0] : 1; + + int zdimid = CDI_UNDEFID; + for (int i = 0; i < ncvar->ndims; i++) + { + if (ncvar->dimtype[i] == Z_AXIS) zdimid = ncvar->dimids[i]; + } + if (zdimid != CDI_UNDEFID) chunkCacheSize *= ncvar->chunks[zdimid]; + + chunkCacheSize *= cdf_xtype_to_numbytes(ncvar->xtype); + + if (CDI_Chunk_Cache_Max > 0 && chunkCacheSize > CDI_Chunk_Cache_Max) chunkCacheSize = CDI_Chunk_Cache_Max; + + return chunkCacheSize; +} + +static void +cdf_set_var_chunk_cache(ncvar_t *ncvar, int ncvarid, size_t chunckCacheSize) +{ + if (CDI_Debug) Message("%s: chunckCacheSize=%zu", ncvar->name, chunckCacheSize); + nc_set_var_chunk_cache(ncvar->ncid, ncvarid, chunckCacheSize, ncvar->chunkCacheNelems, ncvar->chunkCachePreemption); +} + +// define all input data variables +static void +cdf_define_all_vars(stream_t *streamptr, int vlistID, int instID, int modelID, int nvars, int num_ncvars, ncvar_t *ncvars, + ncdim_t *ncdims, int timedimid) +{ + int *varids = (int *) Malloc((size_t) nvars * sizeof(int)); + int n = 0; + for (int ncvarid = 0; ncvarid < num_ncvars; ncvarid++) + if (ncvars[ncvarid].varStatus == DataVar) varids[n++] = ncvarid; + + if (CDI_Debug) + for (int i = 0; i < nvars; i++) Message("varids[%d] = %d", i, varids[i]); + + if (streamptr->sortname) cdf_sort_varnames(varids, nvars, ncvars); + + for (int varID1 = 0; varID1 < nvars; varID1++) + { + int ncvarid = varids[varID1]; + ncvar_t *ncvar = &ncvars[ncvarid]; + int gridID = ncvar->gridID; + int zaxisID = ncvar->zaxisID; + + stream_new_var(streamptr, gridID, zaxisID, CDI_UNDEFID); + int varID = vlistDefVar(vlistID, gridID, zaxisID, ncvar->timetype); + +#ifdef HAVE_NETCDF4 + if (ncvar->hasFilter) vlistDefVarCompType(vlistID, varID, CDI_COMPRESS_FILTER); + if (ncvar->hasDeflate) vlistDefVarCompType(vlistID, varID, CDI_COMPRESS_ZIP); + if (ncvar->hasSzip) vlistDefVarCompType(vlistID, varID, CDI_COMPRESS_SZIP); + if (ncvar->isChunked) + { + if (ncvar->chunkType != CDI_UNDEFID) cdiDefKeyInt(vlistID, varID, CDI_KEY_CHUNKTYPE, ncvar->chunkType); + if (ncvar->chunkSize > 1) cdiDefKeyInt(vlistID, varID, CDI_KEY_CHUNKSIZE, ncvar->chunkSize); + + size_t varChunkCacheSize = calc_chunk_cache_size(timedimid, ncvar); + if (CDI_Chunk_Cache > 0) + cdf_set_var_chunk_cache(ncvar, ncvarid, CDI_Chunk_Cache); + else if (varChunkCacheSize > ncvar->chunkCacheSize) + cdf_set_var_chunk_cache(ncvar, ncvarid, varChunkCacheSize); + } +#endif + + streamptr->vars[varID1].defmiss = false; + streamptr->vars[varID1].ncvarid = ncvarid; + + cdiDefKeyString(vlistID, varID, CDI_KEY_NAME, ncvar->name); + if (ncvar->param != CDI_UNDEFID) vlistDefVarParam(vlistID, varID, ncvar->param); + if (ncvar->code != CDI_UNDEFID) vlistDefVarCode(vlistID, varID, ncvar->code); + if (ncvar->code != CDI_UNDEFID) vlistDefVarParam(vlistID, varID, cdiEncodeParam(ncvar->code, ncvar->tabnum, 255)); + if (ncvar->longname[0]) cdiDefKeyString(vlistID, varID, CDI_KEY_LONGNAME, ncvar->longname); + if (ncvar->stdname[0]) cdiDefKeyString(vlistID, varID, CDI_KEY_STDNAME, ncvar->stdname); + if (ncvar->unitsLen > 0) cdiDefKeyString(vlistID, varID, CDI_KEY_UNITS, ncvar->units); + + if (ncvar->validrangeDefined) vlistDefVarValidrange(vlistID, varID, ncvar->validrange); + + if (IS_NOT_EQUAL(ncvar->addoffset, 0.0)) cdiDefKeyFloat(vlistID, varID, CDI_KEY_ADDOFFSET, ncvar->addoffset); + if (IS_NOT_EQUAL(ncvar->scalefactor, 1.0)) cdiDefKeyFloat(vlistID, varID, CDI_KEY_SCALEFACTOR, ncvar->scalefactor); + + vlistDefVarDatatype(vlistID, varID, cdfInqDatatype(streamptr, ncvar->xtype, ncvar->isUnsigned)); + + vlistDefVarInstitut(vlistID, varID, instID); + vlistDefVarModel(vlistID, varID, modelID); + if (ncvar->tableID != CDI_UNDEFID) vlistDefVarTable(vlistID, varID, ncvar->tableID); + + if (ncvar->fillvalDefined == false && ncvar->missvalDefined) + { + ncvar->fillvalDefined = true; + ncvar->fillval = ncvar->missval; + } + + if (ncvar->fillvalDefined) vlistDefVarMissval(vlistID, varID, ncvar->fillval); + + if (CDI_Debug) + Message("varID = %d gridID = %d zaxisID = %d", varID, vlistInqVarGrid(vlistID, varID), vlistInqVarZaxis(vlistID, varID)); + + int gridindex = vlistGridIndex(vlistID, gridID); + int xdimid = streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_X]; + int ydimid = streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_Y]; + + int zaxisindex = vlistZaxisIndex(vlistID, zaxisID); + int zdimid = streamptr->zaxisID[zaxisindex]; + + int ndims = ncvar->ndims; + static const int ipow10[4] = { 1, 10, 100, 1000 }; + + int iodim = (ncvar->timetype != TIME_CONSTANT); + + const int *dimids = ncvar->dimids; + + int ixyz = 0; + if (gridInqType(gridID) == GRID_UNSTRUCTURED && ndims - iodim <= 2 && (ydimid == xdimid || ydimid == CDI_UNDEFID)) + { + ixyz = (xdimid == ncdims[dimids[ndims - 1]].dimid) ? 321 : 213; + } + else + { + for (int idim = iodim; idim < ndims; idim++) + { + int dimid = ncdims[dimids[idim]].dimid; + // clang-format off + if (xdimid == dimid) ixyz += 1*ipow10[ndims-idim-1]; + else if (ydimid == dimid) ixyz += 2*ipow10[ndims-idim-1]; + else if (zdimid == dimid) ixyz += 3*ipow10[ndims-idim-1]; + // clang-format on + } + } + + if (ncvar->isCubeSphere) ixyz = 0; + vlistDefVarXYZ(vlistID, varID, ixyz); + /* + printf("ixyz %d\n", ixyz); + printf("ndims %d\n", ncvar->ndims); + for (int i = 0; i < ncvar->ndims; ++i) + printf("dimids: %d %d\n", i, dimids[i]); + printf("xdimid, ydimid %d %d\n", xdimid, ydimid); + */ + if (ncvar->numberOfForecastsInEnsemble != -1) + { + cdiDefKeyInt(vlistID, varID, CDI_KEY_TYPEOFENSEMBLEFORECAST, ncvar->typeOfEnsembleForecast); + cdiDefKeyInt(vlistID, varID, CDI_KEY_NUMBEROFFORECASTSINENSEMBLE, ncvar->numberOfForecastsInEnsemble); + cdiDefKeyInt(vlistID, varID, CDI_KEY_PERTURBATIONNUMBER, ncvar->perturbationNumber); + } + + if (ncvar->extra[0] != 0) cdiDefKeyString(vlistID, varID, CDI_KEY_CHUNKS, ncvar->extra); + } + + for (int varID = 0; varID < nvars; varID++) + { + int ncvarid = varids[varID]; + ncvar_t *ncvar = &ncvars[ncvarid]; + int ncid = ncvar->ncid; + int nvatts = ncvar->natts; + for (int iatt = 0; iatt < nvatts; ++iatt) cdf_set_cdi_attr(ncid, ncvarid, ncvar->atts[iatt], vlistID, varID, false); + + if (ncvar->atts) Free(ncvar->atts); + if (ncvar->vct) Free(ncvar->vct); + + ncvar->atts = NULL; + ncvar->vct = NULL; + } + + // release mem of not freed attributes + for (int ncvarid = 0; ncvarid < num_ncvars; ncvarid++) + if (ncvars[ncvarid].atts) Free(ncvars[ncvarid].atts); + + if (varids) Free(varids); + + for (int varID = 0; varID < nvars; varID++) cdf_define_code_and_param(vlistID, varID); + for (int varID = 0; varID < nvars; varID++) cdf_define_institut_and_model_id(vlistID, varID); +} + +static void +cdf_copy_attint(int fileID, int vlistID, nc_type xtype, size_t attlen, char *attname) +{ + int attint[8]; + int *pattint = (attlen > 8) ? (int *) malloc(attlen * sizeof(int)) : attint; + cdfGetAttInt(fileID, NC_GLOBAL, attname, attlen, pattint); + int datatype = (xtype == NC_SHORT) ? CDI_DATATYPE_INT16 : CDI_DATATYPE_INT32; + cdiDefAttInt(vlistID, CDI_GLOBAL, attname, datatype, (int) attlen, pattint); + if (attlen > 8) free(pattint); +} + +static void +cdf_copy_attflt(int fileID, int vlistID, nc_type xtype, size_t attlen, char *attname) +{ + double attflt[8]; + double *pattflt = (attlen > 8) ? (double *) malloc(attlen * sizeof(double)) : attflt; + cdfGetAttDouble(fileID, NC_GLOBAL, attname, attlen, pattflt); + int datatype = (xtype == NC_FLOAT) ? CDI_DATATYPE_FLT32 : CDI_DATATYPE_FLT64; + cdiDefAttFlt(vlistID, CDI_GLOBAL, attname, datatype, (int) attlen, pattflt); + if (attlen > 8) free(pattflt); +} + +static bool +check_cube_sphere(int vlistID, int nvars, ncvar_t *ncvars, ncdim_t *ncdims) +{ + bool isGeosData = false; + int numNames = 4; + const char *attnames[] = { "additional_vars", "file_format_version", "gridspec_file", "grid_mapping_name" }; + const char *grid_mapping = "gnomonic cubed-sphere"; + char attstring[256]; + int nf_dimid = -1, ncontact_dimid = -1; + + int numFound = 0; + for (int i = 0; i < numNames; ++i) + if (0 == cdiInqAttTxt(vlistID, CDI_GLOBAL, attnames[i], (int) sizeof(attstring), attstring)) numFound++; + + if (numFound == numNames && strStartsWith(attstring, grid_mapping)) + { + for (int i = 0; i < numNames; ++i) cdiDelAtt(vlistID, CDI_GLOBAL, attnames[i]); + + const char *nf_name = "nf"; + const char *ncontact_name = "ncontact"; + for (int varid = 0; varid < nvars; ++varid) + { + ncvar_t *ncvar = &ncvars[varid]; + if (ncvar->ndims == 1) + { + int dimid = ncvar->dimids[0]; + if (ncdims[dimid].len == 6 && str_is_equal(nf_name, ncvar->name)) + { + isGeosData = true; + nf_dimid = ncvar->dimids[0]; + } + if (ncdims[dimid].len == 4 && str_is_equal(ncontact_name, ncvar->name)) ncontact_dimid = ncvar->dimids[0]; + } + if (isGeosData && ncontact_dimid != -1) break; + } + } + + if (isGeosData) + { + ncdims[nf_dimid].dimtype = E_AXIS; + for (int varid = 0; varid < nvars; ++varid) + { + ncvar_t *ncvar = &ncvars[varid]; + if (str_is_equal("orientation", ncvar->name) || str_is_equal("anchor", ncvar->name) + || str_is_equal("contacts", ncvar->name)) + cdf_set_var(ncvar, CoordVar); + } + + for (int varid = 0; varid < nvars; ++varid) + { + ncvar_t *ncvar = &ncvars[varid]; + int ndims = ncvar->ndims; + if (ndims >= 3 && ncvar->dimids[ndims - 3] == nf_dimid && ncvar->ncoordvars == 2 && ncvar->gmapid != -1) + ncvar->isCubeSphere = true; + } + + int xvarid = -1, yvarid = -1; + int xboundsid = -1, yboundsid = -1; + for (int varid = 0; varid < nvars; ++varid) + { + ncvar_t *ncvar = &ncvars[varid]; + int ndims = ncvar->ndims; + if (ndims == 3) + { + // clang-format off + if (str_is_equal("lons", ncvar->name)) xvarid = varid; + else if (str_is_equal("lats", ncvar->name)) yvarid = varid; + else if (str_is_equal("corner_lons", ncvar->name)) xboundsid = varid; + else if (str_is_equal("corner_lats", ncvar->name)) yboundsid = varid; + // clang-format on + } + if (xvarid != -1 && xboundsid != -1 && yvarid != -1 && yboundsid != -1) + { + cdf_set_var(&ncvars[xboundsid], CoordVar); + cdf_set_var(&ncvars[yboundsid], CoordVar); + ncvars[xvarid].bounds = xboundsid; + ncvars[yvarid].bounds = yboundsid; + break; + } + } + } + + return isGeosData; +} + +static void +cdf_scan_global_attr(int fileID, int vlistID, int ngatts, int *instID, int *modelID, bool *ucla_les, unsigned char *uuidOfVGrid, + GridInfo *gridInfo) +{ + nc_type xtype = 0; + size_t attlen = 0; + char attname[CDI_MAX_NAME] = { 0 }; + + for (int iatt = 0; iatt < ngatts; iatt++) + { + cdf_inq_attname(fileID, NC_GLOBAL, iatt, attname); + cdf_inq_atttype(fileID, NC_GLOBAL, attname, &xtype); + cdf_inq_attlen(fileID, NC_GLOBAL, attname, &attlen); + + if (xtypeIsText(xtype)) + { + enum + { + attstringsize = 65636 + }; + char attstring[attstringsize] = { 0 }; + + cdfGetAttText(fileID, NC_GLOBAL, attname, attstringsize, attstring); + + size_t attstrlen = strlen(attstring); + + if (attlen > 0 && attstring[0] != 0) + { + if (str_is_equal(attname, "institution")) + { + *instID = institutInq(0, 0, NULL, attstring); + if (*instID == CDI_UNDEFID) *instID = institutDef(0, 0, NULL, attstring); + + cdiDefAttTxt(vlistID, CDI_GLOBAL, attname, (int) attstrlen, attstring); + } + else if (str_is_equal(attname, "source")) + { + *modelID = modelInq(-1, 0, attstring); + if (*modelID == CDI_UNDEFID) *modelID = modelDef(-1, 0, attstring); + + cdiDefAttTxt(vlistID, CDI_GLOBAL, attname, (int) attstrlen, attstring); + } + else if (str_is_equal(attname, "Source") && strStartsWith(attstring, "UCLA-LES")) + { + *ucla_les = true; + cdiDefAttTxt(vlistID, CDI_GLOBAL, attname, (int) attstrlen, attstring); + } + /* + else if ( str_is_equal(attname, "Conventions") ) + { + } + */ + else if (str_is_equal(attname, "_NCProperties")) + { + } + else if (str_is_equal(attname, "CDI")) + { + } + else if (str_is_equal(attname, "CDO")) + { + } + /* + else if ( str_is_equal(attname, "forecast_reference_time") ) + { + memcpy(fcreftime, attstring, attstrlen+1); + } + */ + else if (str_is_equal(attname, "grid_file_uri")) + { + memcpy(gridInfo->gridfile, attstring, attstrlen + 1); + } + else if (attstrlen == 36 && str_is_equal(attname, "uuidOfHGrid")) + { + cdiStr2UUID(attstring, gridInfo->uuid); + } + else if (attstrlen == 36 && str_is_equal(attname, "uuidOfVGrid")) + { + cdiStr2UUID(attstring, uuidOfVGrid); + } + else + { + if (str_is_equal(attname, "ICON_grid_file_uri") && gridInfo->gridfile[0] == 0) + memcpy(gridInfo->gridfile, attstring, attstrlen + 1); + + cdiDefAttTxt(vlistID, CDI_GLOBAL, attname, (int) attstrlen, attstring); + } + } + else + { + cdiDefAttTxt(vlistID, CDI_GLOBAL, attname, (int) attstrlen, attstring); + } + } + else if (xtype == NC_SHORT || xtype == NC_INT) + { + if (str_is_equal(attname, "number_of_grid_used")) + { + gridInfo->number_of_grid_used = CDI_UNDEFID; + cdfGetAttInt(fileID, NC_GLOBAL, attname, 1, &gridInfo->number_of_grid_used); + } + else + { + cdf_copy_attint(fileID, vlistID, xtype, attlen, attname); + } + } + else if (xtype == NC_FLOAT || xtype == NC_DOUBLE) + { + cdf_copy_attflt(fileID, vlistID, xtype, attlen, attname); + } + } +} + +static int +find_leadtime(int nvars, ncvar_t *ncvars, int timedimid) +{ + int leadtime_id = CDI_UNDEFID; + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->ndims == 1 && timedimid == ncvar->dimids[0]) + if (ncvar->stdname[0] && str_is_equal(ncvar->stdname, "forecast_period")) + { + leadtime_id = ncvarid; + break; + } + } + + return leadtime_id; +} + +static void +find_time_vars(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimid, stream_t *streamptr, bool *timeHasUnits, + bool *timeHasBounds, bool *timeClimatology) +{ + int ncvarid; + + if (timedimid == CDI_UNDEFID) + { + char timeUnitsStr[CDI_MAX_NAME]; + + for (ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->ndims == 0 && ncvar->units[0] && str_is_equal(ncvar->name, "time")) + { + strcpy(timeUnitsStr, ncvar->units); + str_to_lower(timeUnitsStr); + + if (is_time_units(timeUnitsStr)) + { + streamptr->basetime.ncvarid = ncvarid; + break; + } + } + } + } + else + { + bool hasTimeVar = false; + + if (ncdims[timedimid].ncvarid != CDI_UNDEFID) + { + streamptr->basetime.ncvarid = ncdims[timedimid].ncvarid; + hasTimeVar = true; + } + + for (ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvarid != streamptr->basetime.ncvarid && ncvar->ndims == 1 && timedimid == ncvar->dimids[0] + && !xtypeIsText(ncvar->xtype) && is_timeaxis_units(ncvar->units)) + { + ncvar->varStatus = CoordVar; + + if (!hasTimeVar) + { + hasTimeVar = true; + streamptr->basetime.ncvarid = ncvarid; + } + else + { + Warning("Found more than one time variable, skipped variable %s!", ncvar->name); + } + } + } + + if (hasTimeVar == false) // search for WRF time description + { + for (ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvarid != streamptr->basetime.ncvarid && ncvar->ndims == 2 && timedimid == ncvar->dimids[0] + && xtypeIsText(ncvar->xtype) && (ncdims[ncvar->dimids[1]].len == 19 || ncdims[ncvar->dimids[1]].len == 64)) + { + ncvar->isTaxis = true; + streamptr->basetime.ncvarid = ncvarid; + streamptr->basetime.isWRF = true; + break; + } + } + } + + // time varID + ncvarid = streamptr->basetime.ncvarid; + + if (ncvarid == CDI_UNDEFID && ncdims[timedimid].len > 0) Warning("Time variable >%s< not found!", ncdims[timedimid].name); + } + + // time varID + ncvarid = streamptr->basetime.ncvarid; + + if (ncvarid != CDI_UNDEFID && streamptr->basetime.isWRF == false) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->units[0] != 0) *timeHasUnits = true; + + if (ncvar->bounds != CDI_UNDEFID) + { + int nbdims = ncvars[ncvar->bounds].ndims; + if (nbdims == 2) + { + int len = (int) ncdims[ncvars[ncvar->bounds].dimids[nbdims - 1]].len; + if (len == 2 && timedimid == ncvars[ncvar->bounds].dimids[0]) + { + *timeHasBounds = true; + streamptr->basetime.ncvarboundsid = ncvar->bounds; + if (ncvar->isClimatology) *timeClimatology = true; + } + } + } + } +} + +static void +read_vct_echam(int fileID, int nvars, ncvar_t *ncvars, ncdim_t *ncdims, double **vct, size_t *pvctsize) +{ + // find ECHAM VCT + int nvcth_id = CDI_UNDEFID, vcta_id = CDI_UNDEFID, vctb_id = CDI_UNDEFID; + // int p0_id = CDI_UNDEFID; + + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + const char *name = ncvar->name; + if (ncvar->ndims == 1) + { + size_t len = strlen(name); + if (len == 4 && name[0] == 'h' && name[1] == 'y') + { + if (name[2] == 'a' && name[3] == 'i') // hyai + { + vcta_id = ncvarid; + nvcth_id = ncvar->dimids[0]; + ncvar->varStatus = CoordVar; + } + else if (name[2] == 'b' && name[3] == 'i') // hybi + { + vctb_id = ncvarid; + nvcth_id = ncvar->dimids[0]; + ncvar->varStatus = CoordVar; + } + else if ((name[2] == 'a' || name[2] == 'b') && name[3] == 'm') + { + ncvar->varStatus = CoordVar; // hyam or hybm + } + } + } + /* + else if (ncvar->ndims == 0) + { + size_t len = strlen(name); + if (len == 2 && name[0] == 'P' && name[1] == '0') p0_id = ncvarid; + } + */ + } + + // read VCT + if (nvcth_id != CDI_UNDEFID && vcta_id != CDI_UNDEFID && vctb_id != CDI_UNDEFID) + { + size_t vctsize = 2 * ncdims[nvcth_id].len; + *vct = (double *) Malloc(vctsize * sizeof(double)); + cdf_get_var_double(fileID, vcta_id, *vct); + cdf_get_var_double(fileID, vctb_id, *vct + vctsize / 2); + *pvctsize = vctsize; + /* + if (p0_id != CDI_UNDEFID) + { + double p0; + cdf_get_var_double(fileID, p0_id, &p0); + } + */ + } +} + +static void +cdf_set_ucla_dimtype(int ndims, ncdim_t *ncdims, ncvar_t *ncvars) +{ + for (int ncdimid = 0; ncdimid < ndims; ncdimid++) + { + int ncvarid = ncdims[ncdimid].ncvarid; + if (ncvarid != -1) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncdims[ncdimid].dimtype == CDI_UNDEFID && ncvar->units[0] == 'm') + { + // clang-format off + if ( ncvar->name[0] == 'x' ) ncdims[ncdimid].dimtype = X_AXIS; + else if ( ncvar->name[0] == 'y' ) ncdims[ncdimid].dimtype = Y_AXIS; + else if ( ncvar->name[0] == 'z' ) ncdims[ncdimid].dimtype = Z_AXIS; + // clang-format on + } + } + } +} + +static int +cdf_check_variables(stream_t *streamptr, int nvars, ncvar_t *ncvars, size_t ntsteps, int timedimid) +{ + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->isTaxis && ncvar->ndims == 2) + { + ncvar->varStatus = CoordVar; + continue; + } + + if (ncvar->varStatus == UndefVar && ncvar->ndims > 1 && timedimid != CDI_UNDEFID && timedimid == ncvar->dimids[0]) + cdf_set_var(ncvar, DataVar); + + if (ncvar->varStatus == UndefVar) + { + if (ncvar->ndims == 0) + cdf_set_var(ncvar, nvars == 1 ? DataVar : CoordVar); + else if (ncvar->ndims > 0) + cdf_set_var(ncvar, DataVar); + else + { + ncvar->varStatus = CoordVar; + Warning("Variable %s has an unknown type, skipped!", ncvar->name); + } + } + + if (ncvar->varStatus == CoordVar) continue; + + if ((ncvar->ndims > 4 && !ncvar->isCubeSphere) || ncvar->ndims > 5) + { + ncvar->varStatus = CoordVar; + Warning("%d dimensional variables are not supported, skipped variable %s!", ncvar->ndims, ncvar->name); + continue; + } + + if (((ncvar->ndims == 4 && !ncvar->isCubeSphere) || ncvar->ndims == 5) && timedimid == CDI_UNDEFID) + { + ncvar->varStatus = CoordVar; + Warning("%d dimensional variables without time dimension are not supported, skipped variable %s!", ncvar->ndims, + ncvar->name); + continue; + } + + if (xtypeIsText(ncvar->xtype)) + { + ncvar->varStatus = CoordVar; + Warning("Unsupported data type (char/string), skipped variable %s!", ncvar->name); + continue; + } + + if (cdfInqDatatype(streamptr, ncvar->xtype, ncvar->isUnsigned) == -1) + { + ncvar->varStatus = CoordVar; + Warning("Unsupported data type, skipped variable %s!", ncvar->name); + continue; + } + + if (timedimid != CDI_UNDEFID && ntsteps == 0 && ncvar->ndims > 0) + { + if (timedimid == ncvar->dimids[0]) + { + ncvar->varStatus = CoordVar; + Warning("Number of time steps undefined, skipped variable %s!", ncvar->name); + continue; + } + } + } + + return timedimid; +} + +static void +cdfVerifyVars(int nvars, ncvar_t *ncvars, ncdim_t *ncdims) +{ + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == DataVar && ncvar->ndims > 0) + { + int ndims = 0; + for (int i = 0; i < ncvar->ndims; ++i) + { + // clang-format off + if (ncvar->dimtype[i] == T_AXIS) ndims++; + else if (ncvar->dimtype[i] == E_AXIS) ndims++; + else if (ncvar->dimtype[i] == Z_AXIS) ndims++; + else if (ncvar->dimtype[i] == Y_AXIS) ndims++; + else if (ncvar->dimtype[i] == X_AXIS) ndims++; + // clang-format on + } + + if (ncvar->ndims != ndims) + { + ncvar->varStatus = CoordVar; + Warning("Inconsistent number of dimensions, skipped variable %s!", ncvar->name); + } + + int zdimid = -1; + for (int i = 0; i < ncvar->ndims; ++i) + { + if (ncvar->dimtype[i] == Z_AXIS) zdimid = ncvar->dimids[i]; + } + + int zaxisID = ncvar->zaxisID; + if (zaxisInqScalar(zaxisID) && zdimid != -1) + { + ncvar->varStatus = CoordVar; + Warning("Unsupported dimension >%s<, skipped variable %s!", ncdims[zdimid].name, ncvar->name); + } + } + } +} + +static CdiDateTime +wrf_read_timestep(int fileID, int nctimevarid, int tsID) +{ + enum + { + // position of terminator separating date and time from rest of + dateTimeSepPos = 19, + dateTimeStrSize = 128, + }; + const size_t start[2] = { (size_t) tsID, 0 }, count[2] = { 1, dateTimeSepPos }; + char stvalue[dateTimeStrSize]; + stvalue[0] = 0; + cdf_get_vara_text(fileID, nctimevarid, start, count, stvalue); + stvalue[dateTimeSepPos] = 0; + + int year = 1, month = 1, day = 1, hour = 0, minute = 0, second = 0; + if (strlen(stvalue) == dateTimeSepPos) sscanf(stvalue, "%d-%d-%d_%d:%d:%d", &year, &month, &day, &hour, &minute, &second); + return cdiDateTime_set(cdiEncodeDate(year, month, day), cdiEncodeTime(hour, minute, second)); +} + +static double +get_timevalue(int fileID, int nctimevarid, size_t ncStepIndex) +{ + double timevalue = 0.0; + + cdf_get_var1_double(fileID, nctimevarid, &ncStepIndex, &timevalue); + + if (timevalue >= NC_FILL_DOUBLE || timevalue < -NC_FILL_DOUBLE) timevalue = 0.0; + + return timevalue; +} + +static void +cdf_read_timesteps(int numTimesteps, stream_t *streamptr, taxis_t *taxis0) +{ + streamptr->curTsID = 0; + streamptr->rtsteps = 1; + + if (numTimesteps == 0) + { + cdi_create_timesteps(numTimesteps, streamptr); + cdf_create_records(streamptr, 0); + } + else if (numTimesteps < 0) + { + } + else + { + int fileID = streamptr->fileID; + int nctimevarid = streamptr->basetime.ncvarid; + int nctimeboundsid = streamptr->basetime.ncvarboundsid; + bool hasTimesteps = (nctimevarid != CDI_UNDEFID && streamptr->basetime.hasUnits); + + int *ncStepIndices = (int *) malloc(numTimesteps * sizeof(int)); + for (int tsID = 0; tsID < numTimesteps; ++tsID) ncStepIndices[tsID] = tsID; + + CdiDateTime *vDateTimeList = NULL; + + if (hasTimesteps) + { + vDateTimeList = (CdiDateTime *) malloc(numTimesteps * sizeof(CdiDateTime)); + + if (streamptr->basetime.isWRF) + { + for (int tsID = 0; tsID < numTimesteps; ++tsID) vDateTimeList[tsID] = wrf_read_timestep(fileID, nctimevarid, tsID); + } + else + { + for (int tsID = 0; tsID < numTimesteps; ++tsID) + vDateTimeList[tsID] = cdi_decode_timeval(get_timevalue(fileID, nctimevarid, tsID), taxis0); + } + } + + // process query information if available + CdiQuery *query = streamptr->query; + if (query && cdiQueryNumStepidx(query) > 0) + { + for (int tsID = 0; tsID < numTimesteps; ++tsID) + { + if (cdiQueryStepidx(query, tsID + 1) < 0) ncStepIndices[tsID] = -1; + } + } + + int numSteps = 0; + for (int tsID = 0; tsID < numTimesteps; ++tsID) + if (ncStepIndices[tsID] >= 0) numSteps++; + + cdi_create_timesteps(numSteps, streamptr); + + for (int tsID = 0, stepID = 0; tsID < numTimesteps; ++tsID) + { + if (ncStepIndices[tsID] >= 0) + { + streamptr->tsteps[stepID].ncStepIndex = ncStepIndices[tsID]; + cdf_create_records(streamptr, stepID); + + taxis_t *taxis = &streamptr->tsteps[stepID].taxis; + ptaxisCopy(taxis, taxis0); + + if (hasTimesteps) taxis->vDateTime = vDateTimeList[tsID]; + + stepID++; + } + } + + if (ncStepIndices) free(ncStepIndices); + + if (hasTimesteps) + { + if (nctimeboundsid != CDI_UNDEFID) + { + enum + { + numBnds = 2, + tbNdims = 2 + }; + + for (int tsID = 0; tsID < numSteps; ++tsID) + { + size_t ncStepIndex = streamptr->tsteps[tsID].ncStepIndex; + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + const size_t start[tbNdims] = { ncStepIndex, 0 }; + static const size_t count[tbNdims] = { 1, numBnds }; + double timeBnds[numBnds]; + cdf_get_vara_double(fileID, nctimeboundsid, start, count, timeBnds); + for (size_t i = 0; i < numBnds; ++i) + if (timeBnds[i] >= NC_FILL_DOUBLE || timeBnds[i] < -NC_FILL_DOUBLE) timeBnds[i] = 0.0; + + taxis->vDateTime_lb = cdi_decode_timeval(timeBnds[0], taxis); + taxis->vDateTime_ub = cdi_decode_timeval(timeBnds[1], taxis); + } + } + + int leadtimeid = streamptr->basetime.leadtimeid; + if (leadtimeid != CDI_UNDEFID) + { + for (int tsID = 0; tsID < numSteps; ++tsID) + { + size_t ncStepIndex = streamptr->tsteps[tsID].ncStepIndex; + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + cdi_set_forecast_period(get_timevalue(fileID, leadtimeid, ncStepIndex), taxis); + } + } + } + + if (vDateTimeList) free(vDateTimeList); + } +} + +static void +stream_set_ncdims(stream_t *streamptr, int ndims, ncdim_t *ncdims) +{ + int n = (ndims > MAX_DIMS_PS) ? MAX_DIMS_PS : ndims; + streamptr->ncNumDims = n; + for (int i = 0; i < n; i++) streamptr->ncDimID[i] = ncdims[i].dimid; + for (int i = 0; i < n; i++) streamptr->ncDimLen[i] = ncdims[i].len; +} + +int +cdfInqContents(stream_t *streamptr) +{ + bool timeHasUnits = false; + bool timeHasBounds = false; + bool timeClimatology = false; + int leadtime_id = CDI_UNDEFID; + int format = 0; + char fcreftime[CDI_MAX_NAME]; + GridInfo gridInfo; + gridInfo.gridfile[0] = 0; + memset(gridInfo.uuid, 0, CDI_UUID_SIZE); + gridInfo.number_of_grid_used = CDI_UNDEFID; + gridInfo.timedimid = CDI_UNDEFID; + + fcreftime[0] = 0; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + if (CDI_Debug) Message("streamID = %d, fileID = %d", streamptr->self, fileID); + +#ifdef HAVE_NETCDF4 + nc_inq_format(fileID, &format); +#endif + + int ndims = 0, nvars = 0, ngatts = 0, unlimdimid = 0; + cdf_inq(fileID, &ndims, &nvars, &ngatts, &unlimdimid); + + if (CDI_Debug) Message("root: ndims %d, nvars %d, ngatts %d", ndims, nvars, ngatts); + /* + if ( ndims == 0 ) + { + Warning("No dimensions found!"); + return CDI_EUFSTRUCT; + } + */ + // alloc ncdims + ncdim_t *ncdims = ndims ? (ncdim_t *) Malloc((size_t) ndims * sizeof(ncdim_t)) : NULL; + init_ncdims(ndims, ncdims); + + if (ndims) + { + int ncdimid = 0; + for (int dimid = 0; dimid < NC_MAX_DIMS; ++dimid) + { + if (nc_inq_dimlen(fileID, dimid, NULL) == NC_NOERR) + { + ncdims[ncdimid++].dimid = dimid; + if (ncdimid == ndims) break; + } + } + } + +#ifdef HAVE_NETCDF4 + if (format == NC_FORMAT_NETCDF4) + { + int numgrps = 0; + int ncids[NC_MAX_VARS]; + char gname[CDI_MAX_NAME]; + nc_inq_grps(fileID, &numgrps, ncids); + for (int i = 0; i < numgrps; ++i) + { + int ncid = ncids[i]; + nc_inq_grpname(ncid, gname); + int gndims, gnvars, gngatts, gunlimdimid; + cdf_inq(ncid, &gndims, &gnvars, &gngatts, &gunlimdimid); + + if (CDI_Debug) Message("%s: ndims %d, nvars %d, ngatts %d", gname, gndims, gnvars, gngatts); + + if (gndims == 0) + { + } + } + if (numgrps) Warning("NetCDF4 groups not supported! Found %d root group%s.", numgrps, (numgrps > 1) ? "s" : ""); + } +#endif + + if (nvars == 0) + { + Warning("No arrays found!"); + return CDI_EUFSTRUCT; + } + + // alloc ncvars + ncvar_t *ncvars = (ncvar_t *) Malloc((size_t) nvars * sizeof(ncvar_t)); + init_ncvars(nvars, ncvars, fileID); + + // scan global attributes + int instID = CDI_UNDEFID; + int modelID = CDI_UNDEFID; + bool ucla_les = false; + unsigned char uuidOfVGrid[CDI_UUID_SIZE] = { 0 }; + cdf_scan_global_attr(fileID, vlistID, ngatts, &instID, &modelID, &ucla_les, uuidOfVGrid, &gridInfo); + + // find time dim + int timedimid = (unlimdimid >= 0) ? unlimdimid : cdf_time_dimid(fileID, ndims, nvars, ncdims); + + streamptr->basetime.ncdimid = timedimid; + + size_t ntsteps = 0; + if (timedimid != CDI_UNDEFID) cdf_inq_dimlen(fileID, ncdims[timedimid].dimid, &ntsteps); + if (ntsteps > INT_MAX) + { + Warning("Size limit exceeded for time dimension (limit=%d)!", INT_MAX); + return CDI_EDIMSIZE; + } + + if (CDI_Debug) Message("Number of timesteps = %zu", ntsteps); + if (CDI_Debug) Message("Time dimid = %d", streamptr->basetime.ncdimid); + + // read ncdims + for (int ncdimid = 0; ncdimid < ndims; ncdimid++) + { + cdf_inq_dimlen(fileID, ncdims[ncdimid].dimid, &ncdims[ncdimid].len); + cdf_inq_dimname(fileID, ncdims[ncdimid].dimid, ncdims[ncdimid].name); + if (timedimid == ncdimid) ncdims[ncdimid].dimtype = T_AXIS; + } + + stream_set_ncdims(streamptr, ndims, ncdims); + + if (CDI_Debug) cdf_print_vars(ncvars, nvars, "cdfScanVarAttr"); + + // scan attributes of all variables + cdfScanVarAttr(nvars, ncvars, ndims, ncdims, timedimid, modelID, format); + + cdfVerifyVarAttr(nvars, ncvars, ncdims); + + if (CDI_Convert_Cubesphere) + { + bool isGeosData = check_cube_sphere(vlistID, nvars, ncvars, ncdims); + if (CDI_Debug) Message("isGeosData %d", isGeosData); + } + + if (CDI_Debug) cdf_print_vars(ncvars, nvars, "find coordinates vars"); + + // find coordinates vars + for (int ncdimid = 0; ncdimid < ndims; ncdimid++) + { + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->ndims == 1) + { + if (timedimid != CDI_UNDEFID && timedimid == ncvar->dimids[0]) + { + if (ncvar->varStatus != CoordVar) cdf_set_var(ncvar, DataVar); + } + else + { + // if ( ncvar->varStatus != DataVar ) cdf_set_var(ncvar, CoordVar); + } + // if ( ncvar->varStatus != DataVar ) cdf_set_var(ncvar, CoordVar); + + if (ncdimid == ncvar->dimids[0] && ncdims[ncdimid].ncvarid == CDI_UNDEFID) + if (str_is_equal(ncvar->name, ncdims[ncdimid].name)) + { + ncdims[ncdimid].ncvarid = ncvarid; + ncvar->varStatus = CoordVar; + } + } + } + } + + // find time vars + find_time_vars(nvars, ncvars, ncdims, timedimid, streamptr, &timeHasUnits, &timeHasBounds, &timeClimatology); + + leadtime_id = find_leadtime(nvars, ncvars, timedimid); + if (leadtime_id != CDI_UNDEFID) ncvars[leadtime_id].varStatus = CoordVar; + + // check ncvars + timedimid = cdf_check_variables(streamptr, nvars, ncvars, ntsteps, timedimid); + + // verify coordinates vars - first scan (dimname == varname) + bool isHybridCF = false; + verify_coordinates_vars_1(fileID, ndims, ncdims, ncvars, timedimid, &isHybridCF); + + // verify coordinates vars - second scan (all other variables) + verify_coordinates_vars_2(streamptr, nvars, ncvars); + + if (CDI_Debug) cdf_print_vars(ncvars, nvars, "verify_coordinate_vars"); + + if (ucla_les) cdf_set_ucla_dimtype(ndims, ncdims, ncvars); + + /* + for (int ncdimid = 0; ncdimid < ndims; ncdimid++) + { + int ncvarid = ncdims[ncdimid].ncvarid; + if ( ncvarid != -1 ) + { + printf("coord var %d %s %s\n", ncvarid, ncvar->name, ncvar->units); + if ( ncdims[ncdimid].dimtype == X_AXIS ) + printf("coord var %d %s is x dim\n", ncvarid, ncvar->name); + if ( ncdims[ncdimid].dimtype == Y_AXIS ) + printf("coord var %d %s is y dim\n", ncvarid, ncvar->name); + if ( ncdims[ncdimid].dimtype == Z_AXIS ) + printf("coord var %d %s is z dim\n", ncvarid, ncvar->name); + if ( ncdims[ncdimid].dimtype == T_AXIS ) + printf("coord var %d %s is t dim\n", ncvarid, ncvar->name); + + if ( ncvar->isLon ) + printf("coord var %d %s is lon\n", ncvarid, ncvar->name); + if ( ncvar->isLat ) + printf("coord var %d %s is lat\n", ncvarid, ncvar->name); + if ( ncvar->isZaxis ) + printf("coord var %d %s is lev\n", ncvarid, ncvar->name); + } + } + */ + + // Set coordinates varids (att: associate) + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == DataVar && ncvar->ncoordvars) + { + for (int i = 0; i < ncvar->ncoordvars; i++) + { + int ncvaridc = ncvar->coordvarids[i]; + if (ncvaridc != CDI_UNDEFID) + { + ncvar_t *ncvarc = &ncvars[ncvaridc]; + // clang-format off + if (ncvarc->isLon || ncvarc->isXaxis) ncvar->xvarid = ncvaridc; + else if (ncvarc->isLat || ncvarc->isYaxis) ncvar->yvarid = ncvaridc; + else if (ncvarc->isZaxis) ncvar->zvarid = ncvaridc; + else if (ncvarc->isTaxis) ncvar->tvarid = ncvaridc; + else if (ncvarc->isCharAxis) ncvar->cvarids[i] = ncvaridc; + else if (ncvarc->printWarning) + { + Warning("Coordinates variable %s can't be assigned!", ncvarc->name); + ncvarc->printWarning = false; + } + // clang-format on + } + } + } + } + + // set dim type + cdf_set_dimtype(nvars, ncvars, ncdims); + + // read ECHAM VCT if present + size_t vctsize = 0; + double *vct = NULL; + if (!isHybridCF) read_vct_echam(fileID, nvars, ncvars, ncdims, &vct, &vctsize); + + // process query information if available + CdiQuery *query = streamptr->query; + if (query && cdiQueryNumNames(query) > 0) + { + for (int ncvarid = 0; ncvarid < nvars; ++ncvarid) + { + ncvar_t *ncvar = &ncvars[ncvarid]; + if (ncvar->varStatus == DataVar && cdiQueryName(query, ncvar->name) < 0) ncvar->varStatus = CoordVar; + } + } + + if (CDI_Debug) cdf_print_vars(ncvars, nvars, "cdf_define_all_grids"); + + // define all grids + gridInfo.timedimid = timedimid; + int status = cdf_define_all_grids(streamptr, streamptr->ncgrid, vlistID, ncdims, nvars, ncvars, &gridInfo); + if (status < 0) return status; + + // define all zaxes + status = cdf_define_all_zaxes(streamptr, vlistID, ncdims, nvars, ncvars, vctsize, vct, uuidOfVGrid); + if (vct) Free(vct); + if (status < 0) return status; + + // verify vars + cdfVerifyVars(nvars, ncvars, ncdims); + + // select vars + int nvars_data = 0; + for (int ncvarid = 0; ncvarid < nvars; ncvarid++) + if (ncvars[ncvarid].varStatus == DataVar) nvars_data++; + + if (CDI_Debug) Message("time varid = %d", streamptr->basetime.ncvarid); + if (CDI_Debug) Message("ntsteps = %zu", ntsteps); + if (CDI_Debug) Message("nvars_data = %d", nvars_data); + + if (nvars_data == 0) + { + streamptr->ntsteps = 0; + Warning("No data arrays found!"); + return CDI_EUFSTRUCT; + } + + if (ntsteps == 0 && streamptr->basetime.ncdimid == CDI_UNDEFID && streamptr->basetime.ncvarid != CDI_UNDEFID) ntsteps = 1; + + // define all data variables + cdf_define_all_vars(streamptr, vlistID, instID, modelID, nvars_data, nvars, ncvars, ncdims, timedimid); + + // time varID + int nctimevarid = streamptr->basetime.ncvarid; + + if (nctimevarid != CDI_UNDEFID && (!timeHasUnits || streamptr->basetime.isWRF)) ncvars[nctimevarid].units[0] = 0; + if (nctimevarid != CDI_UNDEFID && timeHasUnits) streamptr->basetime.hasUnits = true; + + taxis_t taxis0; + ptaxisInit(&taxis0); + + if (timeHasUnits) + { + if (set_base_time(ncvars[nctimevarid].units, &taxis0) == 1) + { + nctimevarid = CDI_UNDEFID; + streamptr->basetime.ncvarid = CDI_UNDEFID; + streamptr->basetime.hasUnits = false; + } + + if (leadtime_id != CDI_UNDEFID && taxis0.type == TAXIS_RELATIVE) + { + streamptr->basetime.leadtimeid = leadtime_id; + taxis0.type = TAXIS_FORECAST; + + int timeunit = -1; + if (ncvars[leadtime_id].units[0] != 0) timeunit = scan_time_units(ncvars[leadtime_id].units); + if (timeunit == -1) timeunit = taxis0.unit; + taxis0.fc_unit = timeunit; + + set_forecast_time(fcreftime, &taxis0); + } + } + + if (timeHasBounds) + { + taxis0.hasBounds = true; + if (timeClimatology) taxis0.climatology = true; + } + + if (nctimevarid != CDI_UNDEFID) + { + ptaxisDefName(&taxis0, ncvars[nctimevarid].name); + if (ncvars[nctimevarid].longname[0]) ptaxisDefLongname(&taxis0, ncvars[nctimevarid].longname); + if (ncvars[nctimevarid].units[0]) ptaxisDefUnits(&taxis0, ncvars[nctimevarid].units); + + int xtype = ncvars[nctimevarid].xtype; + int datatype = (xtype == NC_INT) ? CDI_DATATYPE_INT32 : ((xtype == NC_FLOAT) ? CDI_DATATYPE_FLT32 : CDI_DATATYPE_FLT64); + ptaxisDefDatatype(&taxis0, datatype); + } + + int calendar = CDI_UNDEFID; + if (nctimevarid != CDI_UNDEFID && ncvars[nctimevarid].hasCalendar) + { + char attstring[1024]; + cdfGetAttText(fileID, nctimevarid, "calendar", sizeof(attstring), attstring); + str_to_lower(attstring); + calendar = attribute_to_calendar(attstring); + } + + if (streamptr->basetime.isWRF) taxis0.type = TAXIS_ABSOLUTE; + + int taxisID; + if (taxis0.type == TAXIS_FORECAST) + { + taxisID = taxisCreate(TAXIS_FORECAST); + } + else if (taxis0.type == TAXIS_RELATIVE) + { + taxisID = taxisCreate(TAXIS_RELATIVE); + } + else + { + taxisID = taxisCreate(TAXIS_ABSOLUTE); + if (!timeHasUnits) + { + taxisDefTunit(taxisID, TUNIT_DAY); + taxis0.unit = TUNIT_DAY; + } + } + + if (calendar == CDI_UNDEFID && taxis0.type != TAXIS_ABSOLUTE) calendar = CALENDAR_STANDARD; + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5) +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wstrict-overflow" +#endif + if (calendar != CDI_UNDEFID) + { + taxis0.calendar = calendar; + taxisDefCalendar(taxisID, calendar); + } +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5) +#pragma GCC diagnostic pop +#endif + + vlistDefTaxis(vlistID, taxisID); + + cdf_read_timesteps(ntsteps, streamptr, &taxis0); + taxisDestroyKernel(&taxis0); + + // free ncdims + if (ncdims) Free(ncdims); + + // free ncvars + if (ncvars) Free(ncvars); + + return 0; +} + +int +cdfInqTimestep(stream_t *streamptr, int tsID) +{ + if (tsID < 0 || tsID >= streamptr->ntsteps) Error("tsID=%d out of range (0-%d)!", tsID, streamptr->ntsteps - 1); + + streamptr->curTsID = tsID; + int numRecs = streamptr->tsteps[tsID].nrecs; + + return numRecs; +} + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBNETCDF + + +static const char bndsName[] = "bnds"; + +void +cdfCopyRecord(stream_t *streamptr2, stream_t *streamptr1) +{ + int vlistID1 = streamptr1->vlistID; + int tsID = streamptr1->curTsID; + int vrecID = streamptr1->tsteps[tsID].curRecID; + int recID = streamptr1->tsteps[tsID].recIDs[vrecID]; + int ivarID = streamptr1->tsteps[tsID].records[recID].varID; + int gridID = vlistInqVarGrid(vlistID1, ivarID); + size_t datasize = gridInqSize(gridID); + int datatype = vlistInqVarDatatype(vlistID1, ivarID); + int memtype = (datatype != CDI_DATATYPE_FLT32) ? MEMTYPE_DOUBLE : MEMTYPE_FLOAT; + + void *data = Malloc(datasize * ((memtype == MEMTYPE_DOUBLE) ? sizeof(double) : sizeof(float))); + + size_t nmiss; + cdf_read_record(streamptr1, memtype, data, &nmiss); + cdf_write_record(streamptr2, memtype, data, nmiss); + + Free(data); +} + +void +cdfDefRecord(stream_t *streamptr) +{ + (void) streamptr; +} + +static void +cdfDefComplex(stream_t *streamptr, int gridID, int gridIndex) +{ + int dimID; + ncgrid_t *ncgrid = streamptr->ncgrid; + + for (int index = 0; index < gridIndex; ++index) + { + if (ncgrid[index].ncIDs[CDF_DIMID_X] != CDI_UNDEFID) + { + int gridID0 = ncgrid[index].gridID; + int gridtype0 = gridInqType(gridID0); + if (gridtype0 == GRID_SPECTRAL || gridtype0 == GRID_FOURIER) + { + dimID = ncgrid[index].ncIDs[CDF_DIMID_X]; + goto dimIDEstablished; + } + } + } + + { + static const char axisname[] = "nc2"; + size_t dimlen = 2; + int fileID = streamptr->fileID; + + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + cdf_def_dim(fileID, axisname, dimlen, &dimID); + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + } + +dimIDEstablished: + ncgrid[gridIndex].gridID = gridID; + ncgrid[gridIndex].ncIDs[CDF_DIMID_X] = dimID; +} + +struct idSearch +{ + int numNonMatching, foundID; + size_t foundIdx; +}; + +static inline struct idSearch +cdfSearchIDBySize(size_t startIdx, size_t numIDs, const ncgrid_t ncgrid[/*numIDs*/], int ncIDType, int searchType, int searchSize, + int (*typeInq)(int id), SizeType (*sizeInq)(int id)) +{ + int numNonMatching = 0, foundID = CDI_UNDEFID; + size_t foundIdx = SIZE_MAX; + for (size_t index = startIdx; index < numIDs; index++) + { + if (ncgrid[index].ncIDs[ncIDType] != CDI_UNDEFID) + { + int id0 = ncgrid[index].gridID, id0Type = typeInq(id0); + if (id0Type == searchType) + { + int size0 = sizeInq(id0); + if (searchSize == size0) + { + foundID = ncgrid[index].ncIDs[ncIDType]; + foundIdx = index; + break; + } + numNonMatching++; + } + } + } + return (struct idSearch){ .numNonMatching = numNonMatching, .foundID = foundID, .foundIdx = foundIdx }; +} + +static SizeType +cdfGridInqHalfSize(int gridID) +{ + return gridInqSize(gridID) / 2; +} + +static void +cdfDefSPorFC(stream_t *streamptr, int gridID, int gridIndex, char *restrict axisname, int gridRefType) +{ + ncgrid_t *ncgrid = streamptr->ncgrid; + + size_t dimlen = gridInqSize(gridID) / 2; + + struct idSearch search + = cdfSearchIDBySize(0, (size_t) gridIndex, ncgrid, CDF_DIMID_Y, gridRefType, (int) dimlen, gridInqType, cdfGridInqHalfSize); + int dimID = search.foundID; + int iz = search.numNonMatching; + + if (dimID == CDI_UNDEFID) + { + int fileID = streamptr->fileID; + if (iz == 0) + axisname[3] = '\0'; + else + sprintf(&axisname[3], "%1d", iz + 1); + + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + cdf_def_dim(fileID, axisname, dimlen, &dimID); + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + } + + ncgrid[gridIndex].gridID = gridID; + ncgrid[gridIndex].ncIDs[CDF_DIMID_Y] = dimID; +} + +static void +cdfDefSP(stream_t *streamptr, int gridID, int gridIndex) +{ + // char longname[] = "Spherical harmonic coefficient"; + char axisname[5] = "nspX"; + cdfDefSPorFC(streamptr, gridID, gridIndex, axisname, GRID_SPECTRAL); +} + +static void +cdfDefFC(stream_t *streamptr, int gridID, int gridIndex) +{ + char axisname[5] = "nfcX"; + cdfDefSPorFC(streamptr, gridID, gridIndex, axisname, GRID_FOURIER); +} + +static const struct cdfDefGridAxisInqs +{ + SizeType (*axisSize)(int gridID); + double (*axisVal)(int gridID, SizeType index); + const double *(*axisValsPtr)(int gridID); + const double *(*axisBoundsPtr)(int gridID); + enum cdfIDIdx dimIdx, varIdx; + char axisSym; + enum gridPropInq valsQueryKey, bndsQueryKey; + char axisPanoplyName[4]; +} gridInqsX = { + .axisSize = gridInqXsize, + .axisVal = gridInqXval, + .axisValsPtr = gridInqXvalsPtr, + .axisBoundsPtr = gridInqXboundsPtr, + .dimIdx = CDF_DIMID_X, + .varIdx = CDF_VARID_X, + .axisSym = 'X', + .valsQueryKey = GRID_PROP_XVALS, + .bndsQueryKey = GRID_PROP_XBOUNDS, + .axisPanoplyName = "Lon", +}, gridInqsY = { + .axisSize = gridInqYsize, + .axisVal = gridInqYval, + .axisValsPtr = gridInqYvalsPtr, + .axisBoundsPtr = gridInqYboundsPtr, + .dimIdx = CDF_DIMID_Y, + .varIdx = CDF_VARID_Y, + .axisSym = 'Y', + .valsQueryKey = GRID_PROP_YVALS, + .bndsQueryKey = GRID_PROP_YBOUNDS, + .axisPanoplyName = "Lat", +}; + +static void +cdfPutGridStdAtts(int fileID, int ncvarid, int gridID, int dimtype) +{ + size_t len; + + int axisKey = (dimtype == 'Z') ? CDI_GLOBAL : ((dimtype == 'X') ? CDI_XAXIS : CDI_YAXIS); + + { + char stdname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, axisKey, CDI_KEY_STDNAME, stdname, &length); + if (stdname[0] && (len = strlen(stdname))) cdf_put_att_text(fileID, ncvarid, "standard_name", len, stdname); + } + { + char longname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, axisKey, CDI_KEY_LONGNAME, longname, &length); + if (longname[0] && (len = strlen(longname))) cdf_put_att_text(fileID, ncvarid, "long_name", len, longname); + } + { + char units[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, axisKey, CDI_KEY_UNITS, units, &length); + if (units[0] && (len = strlen(units))) cdf_put_att_text(fileID, ncvarid, "units", len, units); + } +} + +static int +grid_inq_xtype(int gridID) +{ + int datatype = CDI_UNDEFID; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); + return (datatype == CDI_DATATYPE_FLT32) ? NC_FLOAT : NC_DOUBLE; +} + +static void +cdfDefTrajLatLon(stream_t *streamptr, int gridID, int gridIndex, const struct cdfDefGridAxisInqs *inqs) +{ + nc_type xtype = grid_inq_xtype(gridID); + ncgrid_t *ncgrid = streamptr->ncgrid; + + size_t dimlen = inqs->axisSize(gridID); + if (dimlen != 1) Error("%c size isn't 1 for %s grid!", inqs->axisSym, gridNamePtr(gridInqType(gridID))); + + int ncvarid = ncgrid[gridIndex].ncIDs[inqs->dimIdx]; + if (ncvarid == CDI_UNDEFID) + { + int dimNcID = streamptr->basetime.ncvarid; + int fileID = streamptr->fileID; + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + cdf_redef(fileID); + switchNCMode = true; + streamptr->ncmode = 1; + } + + char axisname[CDI_MAX_NAME]; + int axistype = (inqs->axisSym == 'X') ? CDI_XAXIS : CDI_YAXIS; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, axistype, CDI_KEY_NAME, axisname, &length); + cdf_def_var(fileID, axisname, xtype, 1, &dimNcID, &ncvarid); + cdfPutGridStdAtts(fileID, ncvarid, gridID, inqs->axisSym); + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + } + + ncgrid[gridIndex].gridID = gridID; + // var ID for trajectory !!! + ncgrid[gridIndex].ncIDs[inqs->dimIdx] = ncvarid; +} + +static void +cdfDefTrajLon(stream_t *streamptr, int gridID, int gridIndex) +{ + cdfDefTrajLatLon(streamptr, gridID, gridIndex, &gridInqsX); +} + +static void +cdfDefTrajLat(stream_t *streamptr, int gridID, int gridIndex) +{ + cdfDefTrajLatLon(streamptr, gridID, gridIndex, &gridInqsY); +} + +static int +checkDimName(int fileID, size_t dimlen, char *dimname) +{ + // check whether the dimenion name is already defined with the same length + unsigned iz = 0; + int dimid = CDI_UNDEFID; + char name[CDI_MAX_NAME]; + + size_t len = strlen(dimname); + memcpy(name, dimname, len + 1); + + do + { + if (iz) sprintf(name + len, "_%u", iz + 1); + + int dimid0; + int status = nc_inq_dimid(fileID, name, &dimid0); + if (status != NC_NOERR) break; + size_t dimlen0; + cdf_inq_dimlen(fileID, dimid0, &dimlen0); + if (dimlen0 == dimlen) + { + dimid = dimid0; + break; + } + iz++; + } + while (iz <= 99); + + if (iz) sprintf(dimname + len, "_%u", iz + 1); + + return dimid; +} + +static void +checkGridName(char *axisname, int fileID) +{ + int ncdimid; + char axisname2[CDI_MAX_NAME]; + + // check that the name is not already defined + unsigned iz = 0; + + size_t axisnameLen = strlen(axisname); + memcpy(axisname2, axisname, axisnameLen + 1); + + do + { + if (iz) sprintf(axisname2 + axisnameLen, "_%u", iz + 1); + + if (nc_inq_varid(fileID, axisname2, &ncdimid) != NC_NOERR) break; + + ++iz; + } + while (iz <= 99); + + if (iz) sprintf(axisname + axisnameLen, "_%u", iz + 1); +} + +static int +checkZaxisName(char *axisname, int fileID, int vlistID, int zaxisID, int nzaxis) +{ + char axisname2[CDI_MAX_NAME]; + + // check that the name is not already defined + unsigned iz = 0; + + size_t axisnameLen = strlen(axisname); + memcpy(axisname2, axisname, axisnameLen + 1); + do + { + if (iz) sprintf(axisname2 + axisnameLen, "_%u", iz + 1); + + int ncdimid; + int status = nc_inq_varid(fileID, axisname2, &ncdimid); + if (status != NC_NOERR) + { + if (iz) + { + // check that the name does not exist for other zaxes + for (int index = 0; index < nzaxis; index++) + { + int zaxisID0 = vlistZaxis(vlistID, index); + if (zaxisID != zaxisID0) + { + const char *axisname0 = zaxisInqNamePtr(zaxisID0); + if (str_is_equal(axisname0, axisname2)) goto nextSuffix; + } + } + } + break; + } + nextSuffix: + ++iz; + } + while (iz <= 99); + + if (iz) sprintf(axisname + axisnameLen, "_%u", iz + 1); + + return (int) iz; +} + +struct cdfPostDefPutVar +{ + int fileID, ncvarid; + union + { + const void *array; + int int1; + } values; +}; + +static void +cdfDelayedPutVarDouble(void *data) +{ + struct cdfPostDefPutVar *put = (struct cdfPostDefPutVar *) data; + cdf_put_var_double(put->fileID, put->ncvarid, (const double *) put->values.array); +} + +static void +cdfDelayedPutVarInt1(void *data) +{ + struct cdfPostDefPutVar *put = (struct cdfPostDefPutVar *) data; + cdf_put_var_int(put->fileID, put->ncvarid, &put->values.int1); +} + +void +cdfDelayedPutVarDeepCleanup(void *data) +{ + struct cdfPostDefPutVar *what = (struct cdfPostDefPutVar *) data; + Free((void *) what->values.array); + Free(what); +} + +static void +cdfPostDefActionApply(size_t numActions, struct cdfPostDefAction *actions) +{ + for (size_t i = 0; i < numActions; ++i) actions[i].action(actions[i].data); +} + +static void +cdfPostDefActionListDelete(struct cdfPostDefActionList *list) +{ + struct cdfPostDefAction *actions = list->actions; + for (size_t i = 0, len = list->len; i < len; ++i) + { + void (*cleanup)(void *) = actions[i].cleanup; + void *data = actions[i].data; + if (cleanup == (void (*)(void *))(void (*)(void)) memFree) + Free(data); + else + cleanup(data); + } + Free(list); +} + +struct cdfPostDefActionList * +cdfPostDefActionAdd(struct cdfPostDefActionList *list, struct cdfPostDefAction addendum) +{ + size_t appendPos = list ? list->len : 0; + if (!list || list->size == list->len) + { + enum + { + initialListSize = 1 + }; + size_t newSize = list ? (list->size * 2) : initialListSize, newLen = list ? list->len + 1 : 1, + newAllocSize = sizeof(struct cdfPostDefActionList) + newSize * sizeof(struct cdfPostDefAction); + list = (struct cdfPostDefActionList *) Realloc(list, newAllocSize); + list->size = newSize; + list->len = newLen; + } + else + ++(list->len); + list->actions[appendPos] = addendum; + return list; +} + +static struct cdfPostDefActionList * +cdfPostDefActionConcat(struct cdfPostDefActionList *listA, const struct cdfPostDefActionList *listB) +{ + size_t appendPos = listA ? listA->len : 0, appendLen = listB ? listB->len : 0; + if (appendLen) + { + size_t newLen = appendPos + appendLen; + if (!listA || listA->size < newLen) + { + enum + { + initialListSize = 1 + }; + size_t newSize = listA ? listA->size : initialListSize; + while (newSize < newLen) newSize *= 2; + size_t newAllocSize = sizeof(struct cdfPostDefActionList) + newSize * sizeof(struct cdfPostDefAction); + listA = (struct cdfPostDefActionList *) Realloc(listA, newAllocSize); + listA->size = newSize; + listA->len = newLen; + } + else + listA->len = newLen; + struct cdfPostDefAction *restrict actionsA = listA->actions; + const struct cdfPostDefAction *restrict actionsB = listB->actions; + for (size_t i = 0; i < appendLen; ++i) actionsA[appendPos + i] = actionsB[i]; + } + return listA; +} + +void +cdfPostDefActionAddPutVal(struct cdfPostDefActionList **list_, int fileID, int ncvarid, const double *values, + void (*cleanup)(void *)) +{ + struct cdfPostDefPutVar *delayedPutVals = (struct cdfPostDefPutVar *) Malloc(sizeof(*delayedPutVals)); + delayedPutVals->values.array = values; + delayedPutVals->fileID = fileID; + delayedPutVals->ncvarid = ncvarid; + *list_ = cdfPostDefActionAdd( + *list_, (struct cdfPostDefAction){ .data = (void *) delayedPutVals, .action = cdfDelayedPutVarDouble, .cleanup = cleanup }); +} + +static inline void +cdfPostDefActionAddPut1Int(struct cdfPostDefActionList **list_, int fileID, int ncvarid, int iVal, void (*cleanup)(void *)) +{ + struct cdfPostDefPutVar *delayedPutVals = (struct cdfPostDefPutVar *) Malloc(sizeof(*delayedPutVals)); + delayedPutVals->values.int1 = iVal; + delayedPutVals->fileID = fileID; + delayedPutVals->ncvarid = ncvarid; + *list_ = cdfPostDefActionAdd( + *list_, (struct cdfPostDefAction){ .data = (void *) delayedPutVals, .action = cdfDelayedPutVarInt1, .cleanup = cleanup }); +} + +static void +cdfGridCompress(int fileID, int ncvarid, size_t gridsize, int filetype, int comptype, size_t *chunks) +{ +#ifdef HAVE_NETCDF4 + if (gridsize >= 32 && comptype == CDI_COMPRESS_ZIP + && (filetype == CDI_FILETYPE_NC4 || filetype == CDI_FILETYPE_NC4C || filetype == CDI_FILETYPE_NCZARR)) + { + cdf_def_var_chunking(fileID, ncvarid, NC_CHUNKED, chunks); + cdfDefVarDeflate(fileID, ncvarid, 1); + } +#endif +} + +static struct cdfPostDefActionList * +cdfDefAxisCommon(stream_t *streamptr, int gridID, int gridIndex, int ndims, bool addVarToGrid, + const struct cdfDefGridAxisInqs *gridAxisInq, int axisKey, char axisLetter, + void (*finishCyclicBounds)(double *pbounds, size_t dimlen, const double *pvals)) +{ + int dimID = CDI_UNDEFID; + size_t dimlen = gridAxisInq->axisSize(gridID); + nc_type xtype = grid_inq_xtype(gridID); + + ncgrid_t *ncgrid = streamptr->ncgrid; + + bool hasVals = gridInqPropPresence(gridID, gridAxisInq->valsQueryKey); + char dimname[CDI_MAX_NAME + 3]; + dimname[0] = 0; + int length = sizeof(dimname); + if (ndims && hasVals) cdiInqKeyString(gridID, axisKey, CDI_KEY_DIMNAME, dimname, &length); + + for (int index = 0; index < gridIndex; ++index) + { + int gridID0 = ncgrid[index].gridID; + assert(gridID0 != CDI_UNDEFID); + int gridtype0 = gridInqType(gridID0); + if (gridtype0 == GRID_GAUSSIAN || gridtype0 == GRID_LONLAT || gridtype0 == GRID_PROJECTION || gridtype0 == GRID_GENERIC) + { + size_t dimlen0 = gridAxisInq->axisSize(gridID0); + char dimname0[CDI_MAX_NAME]; + dimname0[0] = 0; + length = sizeof(dimname0); + if (dimname[0]) cdiInqKeyString(gridID0, axisKey, CDI_KEY_DIMNAME, dimname0, &length); + bool lname = dimname0[0] ? str_is_equal(dimname, dimname0) : true; + if (dimlen == dimlen0 && lname) + { + double (*inqVal)(int gridID, SizeType index) = gridAxisInq->axisVal; + if (IS_EQUAL(inqVal(gridID0, 0), inqVal(gridID, 0)) + && IS_EQUAL(inqVal(gridID0, dimlen - 1), inqVal(gridID, dimlen - 1))) + { + dimID = ncgrid[index].ncIDs[(axisLetter == 'X') ? CDF_DIMID_X : CDF_DIMID_Y]; + break; + } + } + } + } + + struct cdfPostDefActionList *delayed = NULL; + if (dimID == CDI_UNDEFID) + { + int ncvarid = CDI_UNDEFID; + char axisname[CDI_MAX_NAME]; + length = CDI_MAX_NAME; + cdiInqKeyString(gridID, axisKey, CDI_KEY_NAME, axisname, &length); + int fileID = streamptr->fileID; + if (axisname[0] == 0) Error("axis name undefined!"); + + checkGridName(axisname, fileID); + size_t axisnameLen = strlen(axisname); + + bool switchNCMode = streamptr->ncmode == 2 && (hasVals || ndims); + if (switchNCMode) + { + cdf_redef(fileID); + streamptr->ncmode = 1; + } + + if (ndims) + { + if (dimname[0] == 0) strcpy(dimname, axisname); + dimID = checkDimName(fileID, dimlen, dimname); + + if (dimID == CDI_UNDEFID) cdf_def_dim(fileID, dimname, dimlen, &dimID); + } + + if (hasVals) + { + cdf_def_var(fileID, axisname, xtype, ndims, &dimID, &ncvarid); + + int chunkSize = 0; + int chunkType = CDI_CHUNK_GRID; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_CHUNKTYPE, &chunkType); + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_CHUNKSIZE, &chunkSize); + if (chunkSize > 0) chunkType = CDI_CHUNK_AUTO; + + if (chunkType == CDI_CHUNK_GRID && dimlen > ChunkSizeLim) chunkType = CDI_CHUNK_LINES; + + size_t chunk = calc_chunksize_x(chunkType, chunkSize, dimlen, true); + cdfGridCompress(fileID, ncvarid, dimlen, streamptr->filetype, streamptr->comptype, &chunk); + + cdfPutGridStdAtts(fileID, ncvarid, gridID, axisLetter); + { + char axisStr[2] = { axisLetter, '\0' }; + cdf_put_att_text(fileID, ncvarid, "axis", 1, axisStr); + } + cdfFuncPtrPostDefActionGridProp mycdfPostDefActionGridProp + = (cdfFuncPtrPostDefActionGridProp) namespaceSwitchGet(NSSWITCH_CDF_POSTDEFACTION_GRID_PROP).func; + mycdfPostDefActionGridProp(streamptr, gridID, ncvarid, gridAxisInq->valsQueryKey, &delayed); + + bool genBounds = false, hasBounds = gridInqPropPresence(gridID, gridAxisInq->bndsQueryKey); + bool grid_is_cyclic = gridIsCircular(gridID) > 0; + double *restrict pbounds; + size_t nvertex = gridInqNvertex(gridID); + if (CDI_CMOR_Mode && grid_is_cyclic && !hasBounds) + { + const double *pvals = gridAxisInq->axisValsPtr(gridID); + genBounds = true; + nvertex = 2; + pbounds = (double *) Malloc(2 * dimlen * sizeof(double)); + for (size_t i = 0; i < dimlen - 1; ++i) + { + pbounds[i * 2 + 1] = (pvals[i] + pvals[i + 1]) * 0.5; + pbounds[i * 2 + 2] = (pvals[i] + pvals[i + 1]) * 0.5; + } + finishCyclicBounds(pbounds, dimlen, pvals); + } + else + pbounds = (double *) gridAxisInq->axisBoundsPtr(gridID); + + int nvdimID = CDI_UNDEFID; + if (pbounds) + { + if (nc_inq_dimid(fileID, bndsName, &nvdimID) != NC_NOERR) cdf_def_dim(fileID, bndsName, nvertex, &nvdimID); + } + if ((hasBounds || genBounds) && nvdimID != CDI_UNDEFID) + { + char boundsname[CDI_MAX_NAME]; + memcpy(boundsname, axisname, axisnameLen); + boundsname[axisnameLen] = '_'; + memcpy(boundsname + axisnameLen + 1, bndsName, sizeof(bndsName)); + int dimIDs[2] = { dimID, nvdimID }; + int ncbvarid; + cdf_def_var(fileID, boundsname, xtype, 2, dimIDs, &ncbvarid); + cdf_put_att_text(fileID, ncvarid, "bounds", axisnameLen + sizeof(bndsName), boundsname); + cdfPostDefActionAddPutVal(&delayed, fileID, ncbvarid, pbounds, + genBounds ? cdfDelayedPutVarDeepCleanup : (void (*)(void *))(void (*)(void)) memFree); + } + } + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + if (ndims == 0 || addVarToGrid) ncgrid[gridIndex].ncIDs[(axisLetter == 'X') ? CDF_VARID_X : CDF_VARID_Y] = ncvarid; + } + + ncgrid[gridIndex].gridID = gridID; + ncgrid[gridIndex].ncIDs[(axisLetter == 'X') ? CDF_DIMID_X : CDF_DIMID_Y] = dimID; + return delayed; +} + +static void +finishCyclicXBounds(double *pbounds, size_t dimlen, const double *pvals) +{ + pbounds[0] = (pvals[0] + pvals[dimlen - 1] - 360) * 0.5; + pbounds[2 * dimlen - 1] = (pvals[dimlen - 1] + pvals[0] + 360) * 0.5; +} + +static void +finishCyclicYBounds(double *pbounds, size_t dimlen, const double *pvals) +{ + pbounds[0] = copysign(90.0, pvals[0]); + pbounds[2 * dimlen - 1] = copysign(90.0, pvals[dimlen - 1]); +} + +static struct cdfPostDefActionList * +cdfDefXaxis(stream_t *streamptr, int gridID, int gridIndex, int ndims, bool addVarToGrid) +{ + return cdfDefAxisCommon(streamptr, gridID, gridIndex, ndims, addVarToGrid, &gridInqsX, CDI_XAXIS, 'X', finishCyclicXBounds); +} + +static struct cdfPostDefActionList * +cdfDefYaxis(stream_t *streamptr, int gridID, int gridIndex, int ndims, bool addVarToGrid) +{ + return cdfDefAxisCommon(streamptr, gridID, gridIndex, ndims, addVarToGrid, &gridInqsY, CDI_YAXIS, 'Y', finishCyclicYBounds); +} + +static void +cdfDefGridReference(stream_t *streamptr, int gridID) +{ + int fileID = streamptr->fileID; + + int number = 0; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, &number); + if (number > 0) cdf_put_att_int(fileID, NC_GLOBAL, "number_of_grid_used", NC_INT, 1, &number); + + grid_t *gridptr = grid_to_pointer(gridID); + const char *gridfile = cdiInqVarKeyStringPtr(&gridptr->keys, CDI_KEY_REFERENCEURI); + if (gridfile && gridfile[0] != 0) cdf_put_att_text(fileID, NC_GLOBAL, "grid_file_uri", strlen(gridfile), gridfile); +} + +static void +cdfDefGridUUID(stream_t *streamptr, int gridID) +{ + unsigned char uuid[CDI_UUID_SIZE] = { 0 }; + int length = CDI_UUID_SIZE; + cdiInqKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuid, &length); + if (!cdiUUIDIsNull(uuid)) + { + char uuidStr[uuidNumHexChars + 1] = { 0 }; + if (cdiUUID2Str(uuid, uuidStr) == uuidNumHexChars) + { + int fileID = streamptr->fileID; + // if (streamptr->ncmode == 2) cdf_redef(fileID); + cdf_put_att_text(fileID, NC_GLOBAL, "uuidOfHGrid", uuidNumHexChars, uuidStr); + // if (streamptr->ncmode == 2 cdf_enddef(fileID, streamptr->self); + } + } +} + +void +cdfPostDefActionGridProp(stream_t *streamptr, int gridID, int ncvarid, enum gridPropInq gridProp, + struct cdfPostDefActionList **delayed) +{ + const void *valsPtr = NULL; + switch (gridProp) + { + case GRID_PROP_MASK: + case GRID_PROP_MASK_GME: Error("unsupported key: %d", (int) gridProp); break; + case GRID_PROP_XVALS: valsPtr = gridInqXvalsPtr(gridID); break; + case GRID_PROP_YVALS: valsPtr = gridInqYvalsPtr(gridID); break; + case GRID_PROP_AREA: valsPtr = gridInqAreaPtr(gridID); break; + case GRID_PROP_XBOUNDS: valsPtr = gridInqXboundsPtr(gridID); break; + case GRID_PROP_YBOUNDS: valsPtr = gridInqYboundsPtr(gridID); break; + } + cdfPostDefActionAddPutVal(delayed, streamptr->fileID, ncvarid, (const double *) valsPtr, + (void (*)(void *))(void (*)(void)) memFree); +} + +static int +cdfDefIrregularGridAxisSetup(stream_t *streamptr, int gridID, nc_type xtype, int varID, size_t dimlens, int ndims, int dimIDs[], + size_t *chunks, const struct cdfDefGridAxisInqs *inqs, struct cdfPostDefActionList **delayed) +{ + int ncvarid = CDI_UNDEFID; + int fileID = streamptr->fileID; + if (gridInqPropPresence(gridID, inqs->valsQueryKey)) + { + char axisname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, varID, CDI_KEY_NAME, axisname, &length); + checkGridName(axisname, fileID); + cdf_def_var(fileID, axisname, xtype, ndims - 1, dimIDs, &ncvarid); + cdfGridCompress(fileID, ncvarid, dimlens, streamptr->filetype, streamptr->comptype, chunks); + + cdfPutGridStdAtts(fileID, ncvarid, gridID, inqs->axisSym); + cdfFuncPtrPostDefActionGridProp mycdfPostDefActionGridProp + = (cdfFuncPtrPostDefActionGridProp) namespaceSwitchGet(NSSWITCH_CDF_POSTDEFACTION_GRID_PROP).func; + mycdfPostDefActionGridProp(streamptr, gridID, ncvarid, inqs->valsQueryKey, delayed); + + // attribute for Panoply + if (!CDI_CMOR_Mode && ndims == 3) cdf_put_att_text(fileID, ncvarid, "_CoordinateAxisType", 3, inqs->axisPanoplyName); + + if (gridInqPropPresence(gridID, inqs->bndsQueryKey) && dimIDs[ndims - 1] != CDI_UNDEFID) + { + size_t axisnameLen = strlen(axisname); + axisname[axisnameLen] = '_'; + memcpy(axisname + axisnameLen + 1, bndsName, sizeof(bndsName)); + int ncbvarid; + cdf_def_var(fileID, axisname, xtype, ndims, dimIDs, &ncbvarid); + cdfGridCompress(fileID, ncbvarid, dimlens, streamptr->filetype, streamptr->comptype, chunks); + + cdf_put_att_text(fileID, ncvarid, "bounds", axisnameLen + sizeof(bndsName), axisname); + mycdfPostDefActionGridProp(streamptr, gridID, ncbvarid, inqs->bndsQueryKey, delayed); + } + } + return ncvarid; +} + +struct cdfDefIrregularGridCommonIDs +{ + int xdimID, ydimID, ncxvarid, ncyvarid, ncavarid; + struct cdfPostDefActionList *delayed; +}; + +static struct cdfDefIrregularGridCommonIDs +cdfDefIrregularGridCommon(stream_t *streamptr, int gridID, size_t xsize, size_t ysize, int ndims, const char *xdimname_default, + size_t nvertex, const char *vdimname_default, bool setVdimname) +{ + nc_type xtype = grid_inq_xtype(gridID); + int xdimID = CDI_UNDEFID; + int ydimID = CDI_UNDEFID; + int fileID = streamptr->fileID; + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + cdf_redef(fileID); + streamptr->ncmode = 1; + } + + { + char xdimname[CDI_MAX_NAME + 3]; + int length = sizeof(xdimname); + cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_DIMNAME, xdimname, &length); + if (xdimname[0] == 0) strcpy(xdimname, xdimname_default); + xdimID = checkDimName(fileID, xsize, xdimname); + if (xdimID == CDI_UNDEFID) cdf_def_dim(fileID, xdimname, xsize, &xdimID); + } + + if (ndims == 3) + { + char ydimname[CDI_MAX_NAME + 3]; + int length = sizeof(ydimname); + cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_DIMNAME, ydimname, &length); + if (ydimname[0] == 0) + { + ydimname[0] = 'y'; + ydimname[1] = 0; + } + ydimID = checkDimName(fileID, ysize, ydimname); + if (ydimID == CDI_UNDEFID) cdf_def_dim(fileID, ydimname, ysize, &ydimID); + } + + int nvdimID = CDI_UNDEFID; + int dimIDs[3]; + dimIDs[ndims - 1] = CDI_UNDEFID; + if (setVdimname) + { + char vdimname[CDI_MAX_NAME + 3]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_VDIMNAME, vdimname, &length); + if (vdimname[0] == 0) strcpy(vdimname, vdimname_default); + nvdimID = dimIDs[ndims - 1] = checkDimName(fileID, nvertex, vdimname); + if (nvdimID == CDI_UNDEFID) + { + cdf_def_dim(fileID, vdimname, nvertex, dimIDs + ndims - 1); + nvdimID = dimIDs[ndims - 1]; + } + } + + size_t gridsize = xsize * ysize; + size_t chunks[3] = { 1, 1, 1 }; + int chunkSize = 0; + int chunkType = CDI_CHUNK_GRID; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_CHUNKTYPE, &chunkType); + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_CHUNKSIZE, &chunkSize); + if (chunkSize > 0 && ydimID == CDI_UNDEFID) chunkType = CDI_CHUNK_AUTO; + + if (chunkType == CDI_CHUNK_GRID && gridsize > ChunkSizeLim) chunkType = CDI_CHUNK_LINES; + + if (ndims == 3) + { + chunks[0] = calc_chunksize_y(chunkType, gridsize, xsize, ysize); + chunks[1] = calc_chunksize_x(chunkType, chunkSize, xsize, (ydimID == CDI_UNDEFID)); + dimIDs[0] = ydimID; + dimIDs[1] = xdimID; + } + else // ndims == 2 + { + chunks[0] = calc_chunksize_x(chunkType, chunkSize, xsize, (ydimID == CDI_UNDEFID)); + dimIDs[0] = xdimID; + cdfDefGridReference(streamptr, gridID); + cdfDefGridUUID(streamptr, gridID); + } + + struct cdfPostDefActionList *delayed = NULL; + int ncxvarid + = cdfDefIrregularGridAxisSetup(streamptr, gridID, xtype, CDI_XAXIS, gridsize, ndims, dimIDs, chunks, &gridInqsX, &delayed); + int ncyvarid + = cdfDefIrregularGridAxisSetup(streamptr, gridID, xtype, CDI_YAXIS, gridsize, ndims, dimIDs, chunks, &gridInqsY, &delayed); + + int ncavarid = CDI_UNDEFID; + if (gridInqPropPresence(gridID, GRID_PROP_AREA)) + { + static const char yaxisname_[] = "cell_area"; + static const char units[] = "m2"; + static const char longname[] = "area of grid cell"; + static const char stdname[] = "cell_area"; + + cdf_def_var(fileID, yaxisname_, xtype, ndims - 1, dimIDs, &ncavarid); + + cdf_put_att_text(fileID, ncavarid, "standard_name", sizeof(stdname) - 1, stdname); + cdf_put_att_text(fileID, ncavarid, "long_name", sizeof(longname) - 1, longname); + cdf_put_att_text(fileID, ncavarid, "units", sizeof(units) - 1, units); + cdfFuncPtrPostDefActionGridProp mycdfPostDefActionGridProp + = (cdfFuncPtrPostDefActionGridProp) namespaceSwitchGet(NSSWITCH_CDF_POSTDEFACTION_GRID_PROP).func; + mycdfPostDefActionGridProp(streamptr, gridID, ncavarid, GRID_PROP_AREA, &delayed); + } + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + return (struct cdfDefIrregularGridCommonIDs){ + .xdimID = xdimID, .ydimID = ydimID, .ncxvarid = ncxvarid, .ncyvarid = ncyvarid, .ncavarid = ncavarid, .delayed = delayed + }; +} + +static struct cdfPostDefActionList * +cdfDefCurvilinear(stream_t *streamptr, int gridID, int gridIndex) +{ + ncgrid_t *ncgrid = streamptr->ncgrid; + + size_t dimlen = gridInqSize(gridID); + size_t xdimlen = gridInqXsize(gridID); + size_t ydimlen = gridInqYsize(gridID); + + int xdimID = CDI_UNDEFID, ydimID = CDI_UNDEFID; + int ncxvarid = CDI_UNDEFID, ncyvarid = CDI_UNDEFID, ncavarid = CDI_UNDEFID; + + size_t ofs = 0; + do + { + struct idSearch search = cdfSearchIDBySize(ofs, (size_t) gridIndex, ncgrid, CDF_DIMID_X, GRID_CURVILINEAR, (int) dimlen, + gridInqType, gridInqSize); + size_t index = search.foundIdx; + if (index != SIZE_MAX) + { + int gridID0 = ncgrid[index].gridID; + if (IS_EQUAL(gridInqXval(gridID0, 0), gridInqXval(gridID, 0)) + && IS_EQUAL(gridInqXval(gridID0, dimlen - 1), gridInqXval(gridID, dimlen - 1)) + && IS_EQUAL(gridInqYval(gridID0, 0), gridInqYval(gridID, 0)) + && IS_EQUAL(gridInqYval(gridID0, dimlen - 1), gridInqYval(gridID, dimlen - 1))) + { + xdimID = ncgrid[index].ncIDs[CDF_DIMID_X]; + ydimID = ncgrid[index].ncIDs[CDF_DIMID_Y]; + ncxvarid = ncgrid[index].ncIDs[CDF_VARID_X]; + ncyvarid = ncgrid[index].ncIDs[CDF_VARID_Y]; + break; + } + ofs = search.foundIdx; + if (ofs < (size_t) gridIndex) continue; + } + } + while (false); + + struct cdfPostDefActionList *delayed = NULL; + if (xdimID == CDI_UNDEFID || ydimID == CDI_UNDEFID) + { + struct cdfDefIrregularGridCommonIDs createdIDs = cdfDefIrregularGridCommon( + streamptr, gridID, xdimlen, ydimlen, 3, "x", 4, "nv4", + gridInqPropPresence(gridID, GRID_PROP_XBOUNDS) || gridInqPropPresence(gridID, GRID_PROP_YBOUNDS)); + xdimID = createdIDs.xdimID; + ydimID = createdIDs.ydimID; + ncxvarid = createdIDs.ncxvarid; + ncyvarid = createdIDs.ncyvarid; + ncavarid = createdIDs.ncavarid; + delayed = createdIDs.delayed; + } + + ncgrid[gridIndex].gridID = gridID; + ncgrid[gridIndex].ncIDs[CDF_DIMID_X] = xdimID; + ncgrid[gridIndex].ncIDs[CDF_DIMID_Y] = ydimID; + ncgrid[gridIndex].ncIDs[CDF_VARID_X] = ncxvarid; + ncgrid[gridIndex].ncIDs[CDF_VARID_Y] = ncyvarid; + ncgrid[gridIndex].ncIDs[CDF_VARID_A] = ncavarid; + return delayed; +} + +static struct cdfPostDefActionList * +cdfDefUnstructured(stream_t *streamptr, int gridID, int gridIndex) +{ + ncgrid_t *ncgrid = streamptr->ncgrid; + + size_t dimlen = gridInqSize(gridID); + + int dimID = CDI_UNDEFID; + int ncxvarid = CDI_UNDEFID, ncyvarid = CDI_UNDEFID, ncavarid = CDI_UNDEFID; + + size_t ofs = 0; + do + { + struct idSearch search = cdfSearchIDBySize(ofs, (size_t) gridIndex, ncgrid, CDF_DIMID_X, GRID_UNSTRUCTURED, (int) dimlen, + gridInqType, gridInqSize); + size_t index = search.foundIdx; + if (index != SIZE_MAX) + { + int gridID0 = ncgrid[index].gridID; + if (gridInqNvertex(gridID0) == gridInqNvertex(gridID) && IS_EQUAL(gridInqXval(gridID0, 0), gridInqXval(gridID, 0)) + && IS_EQUAL(gridInqXval(gridID0, dimlen - 1), gridInqXval(gridID, dimlen - 1)) + && IS_EQUAL(gridInqYval(gridID0, 0), gridInqYval(gridID, 0)) + && IS_EQUAL(gridInqYval(gridID0, dimlen - 1), gridInqYval(gridID, dimlen - 1))) + { + dimID = ncgrid[index].ncIDs[CDF_DIMID_X]; + ncxvarid = ncgrid[index].ncIDs[CDF_VARID_X]; + ncyvarid = ncgrid[index].ncIDs[CDF_VARID_Y]; + ncavarid = ncgrid[index].ncIDs[CDF_VARID_A]; + break; + } + ofs = search.foundIdx; + if (ofs < (size_t) gridIndex) continue; + } + } + while (false); + + struct cdfPostDefActionList *delayed = NULL; + if (dimID == CDI_UNDEFID) + { + size_t nvertex = (size_t) gridInqNvertex(gridID); + struct cdfDefIrregularGridCommonIDs createdIDs + = cdfDefIrregularGridCommon(streamptr, gridID, dimlen, 1, 2, "ncells", nvertex, "vertices", nvertex > 0); + dimID = createdIDs.xdimID; + ncxvarid = createdIDs.ncxvarid; + ncyvarid = createdIDs.ncyvarid; + ncavarid = createdIDs.ncavarid; + delayed = createdIDs.delayed; + } + + ncgrid[gridIndex].gridID = gridID; + ncgrid[gridIndex].ncIDs[CDF_DIMID_X] = dimID; + ncgrid[gridIndex].ncIDs[CDF_VARID_X] = ncxvarid; + ncgrid[gridIndex].ncIDs[CDF_VARID_Y] = ncyvarid; + ncgrid[gridIndex].ncIDs[CDF_VARID_A] = ncavarid; + return delayed; +} + +struct attTxtTab +{ + const char *txt; + size_t txtLen; +}; + +struct attTxtTab2 +{ + const char *attName, *attVal; + size_t valLen; +}; + +static struct cdfPostDefActionList * +cdf_def_vct_echam(stream_t *streamptr, int zaxisID) +{ + int type = zaxisInqType(zaxisID); + + int ilev; + struct cdfPostDefActionList *delayed = NULL; + if ((type == ZAXIS_HYBRID || type == ZAXIS_HYBRID_HALF) && (ilev = zaxisInqVctSize(zaxisID) / 2) != 0) + { + int mlev = ilev - 1; + + if (streamptr->vct.ilev > 0) + { + if (streamptr->vct.ilev != ilev) Error("More than one VCT for each file unsupported!"); + return delayed; + } + + int fileID = streamptr->fileID; + + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + int ncdimid = -1, ncdimid2 = -1; + int hyaiid, hybiid, hyamid = -1, hybmid = -1; + + cdf_def_dim(fileID, "nhyi", (size_t) ilev, &ncdimid2); + cdf_def_var(fileID, "hyai", NC_DOUBLE, 1, &ncdimid2, &hyaiid); + cdf_def_var(fileID, "hybi", NC_DOUBLE, 1, &ncdimid2, &hybiid); + if (mlev > 0) + { + cdf_def_dim(fileID, "nhym", (size_t) mlev, &ncdimid); + cdf_def_var(fileID, "hyam", NC_DOUBLE, 1, &ncdimid, &hyamid); + cdf_def_var(fileID, "hybm", NC_DOUBLE, 1, &ncdimid, &hybmid); + } + + streamptr->vct.ilev = ilev; + streamptr->vct.mlev = mlev; + streamptr->vct.mlevID = ncdimid; + streamptr->vct.ilevID = ncdimid2; + + { + static const char lname_n[] = "long_name", units_n[] = "units", lname_v_ai[] = "hybrid A coefficient at layer interfaces", + units_v_ai[] = "Pa", lname_v_bi[] = "hybrid B coefficient at layer interfaces", units_v_bi[] = "1"; + static const struct attTxtTab2 tab[] = { + { lname_n, lname_v_ai, sizeof(lname_v_ai) - 1 }, + { units_n, units_v_ai, sizeof(units_v_ai) - 1 }, + { lname_n, lname_v_bi, sizeof(lname_v_bi) - 1 }, + { units_n, units_v_bi, sizeof(units_v_bi) - 1 }, + }; + enum + { + tabLen = sizeof(tab) / sizeof(tab[0]) + }; + int ids[tabLen] = { hyaiid, hyaiid, hybiid, hybiid }; + for (size_t i = 0; i < tabLen; ++i) cdf_put_att_text(fileID, ids[i], tab[i].attName, tab[i].valLen, tab[i].attVal); + } + + { + static const char lname_n[] = "long_name", units_n[] = "units", lname_v_am[] = "hybrid A coefficient at layer midpoints", + units_v_am[] = "Pa", lname_v_bm[] = "hybrid B coefficient at layer midpoints", units_v_bm[] = "1"; + static const struct attTxtTab2 tab[] = { + { lname_n, lname_v_am, sizeof(lname_v_am) - 1 }, + { units_n, units_v_am, sizeof(units_v_am) - 1 }, + { lname_n, lname_v_bm, sizeof(lname_v_bm) - 1 }, + { units_n, units_v_bm, sizeof(units_v_bm) - 1 }, + }; + enum + { + tabLen = sizeof(tab) / sizeof(tab[0]) + }; + int ids[tabLen] = { hyamid, hyamid, hybmid, hybmid }; + for (size_t i = 0; i < tabLen; ++i) cdf_put_att_text(fileID, ids[i], tab[i].attName, tab[i].valLen, tab[i].attVal); + } + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + const double *vctptr = zaxisInqVctPtr(zaxisID); + + cdfPostDefActionAddPutVal(&delayed, fileID, hyaiid, vctptr, (void (*)(void *))(void (*)(void)) memFree); + cdfPostDefActionAddPutVal(&delayed, fileID, hybiid, vctptr + ilev, (void (*)(void *))(void (*)(void)) memFree); + { + double *restrict amidVal = (double *) Malloc((size_t) mlev * sizeof(*amidVal)); + for (size_t i = 0; i < (size_t) mlev; ++i) amidVal[i] = (vctptr[i] + vctptr[i + 1]) * 0.5; + cdfPostDefActionAddPutVal(&delayed, fileID, hyamid, amidVal, cdfDelayedPutVarDeepCleanup); + } + { + double *restrict bmidVal = (double *) Malloc((size_t) mlev * sizeof(*bmidVal)); + for (size_t i = 0; i < (size_t) mlev; ++i) bmidVal[i] = (vctptr[(size_t) ilev + i] + vctptr[(size_t) ilev + i + 1]) * 0.5; + cdfPostDefActionAddPutVal(&delayed, fileID, hybmid, bmidVal, cdfDelayedPutVarDeepCleanup); + } + } + return delayed; +} + +static struct cdfPostDefActionList * +cdf_def_vct_cf(stream_t *streamptr, int zaxisID, int nclevID, int ncbndsID, int p0status, double p0value) +{ + int type = zaxisInqType(zaxisID); + + struct cdfPostDefActionList *delayed = NULL; + int ilev; + if ((type == ZAXIS_HYBRID || type == ZAXIS_HYBRID_HALF) && (ilev = zaxisInqVctSize(zaxisID) / 2) != 0) + { + int mlev = ilev - 1; + + if (streamptr->vct.ilev > 0) + { + if (streamptr->vct.ilev != ilev) Error("more than one VCT for each file unsupported!"); + return delayed; + } + + int fileID = streamptr->fileID; + + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + cdf_redef(fileID); + streamptr->ncmode = 1; + } + + int dimIDs[2] = { nclevID, ncbndsID }; + + streamptr->vct.mlev = mlev; + streamptr->vct.ilev = ilev; + streamptr->vct.mlevID = nclevID; + streamptr->vct.ilevID = nclevID; + + int hyamid, hybmid; + cdf_def_var(fileID, (p0status == 0) ? "a" : "ap", NC_DOUBLE, 1, dimIDs, &hyamid); + cdf_def_var(fileID, "b", NC_DOUBLE, 1, dimIDs, &hybmid); + + { + static const char anametab[][10] = { "long_name", "units" }; + static const char lname_v_a[] = "vertical coordinate formula term: ap(k)", + lname_v_b[] = "vertical coordinate formula term: b(k)", units_v_a[] = "Pa", units_v_b[] = "1"; + static struct attTxtTab attvtab[][2] = { { { lname_v_a, sizeof(lname_v_a) - 1 }, { units_v_a, sizeof(units_v_a) - 1 } }, + { { lname_v_b, sizeof(lname_v_b) - 1 }, { units_v_b, sizeof(units_v_b) - 1 } } }; + int termid[] = { hyamid, hybmid }; + enum + { + numTerms = sizeof(termid) / sizeof(termid[0]), + numAtts = sizeof(anametab) / sizeof(anametab[0]), + }; + for (size_t termIdx = 0; termIdx < numTerms; ++termIdx) + for (size_t attIdx = 0; attIdx < numAtts; ++attIdx) + cdf_put_att_text(fileID, termid[termIdx], anametab[attIdx], attvtab[termIdx][attIdx].txtLen, + attvtab[termIdx][attIdx].txt); + } + double *restrict vctptr = (double *) zaxisInqVctPtr(zaxisID); + if (p0status == 0 && IS_NOT_EQUAL(p0value, 0)) + { + double *restrict temp = (double *) Malloc((size_t) ilev * sizeof(*temp)); + for (size_t i = 0; i < (size_t) ilev; ++i) temp[i] = vctptr[i] / p0value; + vctptr = temp; + } + + { + double *restrict mlevValA = (double *) Malloc((size_t) mlev * sizeof(*mlevValA)); + for (size_t i = 0; i < (size_t) mlev; ++i) mlevValA[i] = (vctptr[i] + vctptr[i + 1]) * 0.5; + cdfPostDefActionAddPutVal(&delayed, fileID, hyamid, mlevValA, cdfDelayedPutVarDeepCleanup); + } + { + double *restrict mlevValB = (double *) Malloc((size_t) mlev * sizeof(*mlevValB)); + for (size_t i = 0; i < (size_t) mlev; ++i) mlevValB[i] = (vctptr[(size_t) ilev + i] + vctptr[(size_t) ilev + i + 1]) * 0.5; + cdfPostDefActionAddPutVal(&delayed, fileID, hybmid, mlevValB, cdfDelayedPutVarDeepCleanup); + } + + if (ncbndsID != -1) + { + int hyaiid, hybiid; + cdf_def_var(fileID, (p0status == 0) ? "a_bnds" : "ap_bnds", NC_DOUBLE, 2, dimIDs, &hyaiid); + cdf_def_var(fileID, "b_bnds", NC_DOUBLE, 2, dimIDs, &hybiid); + static const char anametab[][10] = { "long_name", "units" }; + static const char lname_v_a[] = "vertical coordinate formula term: ap(k+1/2)", + lname_v_b[] = "vertical coordinate formula term: b(k+1/2)", units_v_a[] = "Pa", units_v_b[] = "1"; + static struct attTxtTab attvtab[][2] = { { { lname_v_a, sizeof(lname_v_a) - 1 }, { units_v_a, sizeof(units_v_a) - 1 } }, + { { lname_v_b, sizeof(lname_v_b) - 1 }, { units_v_b, sizeof(units_v_b) - 1 } } }; + int termid[] = { hyaiid, hybiid }; + enum + { + numTerms = sizeof(termid) / sizeof(termid[0]), + numAtts = sizeof(anametab) / sizeof(anametab[0]), + }; + for (size_t termIdx = 0; termIdx < numTerms; ++termIdx) + for (size_t attIdx = 0; attIdx < numAtts; ++attIdx) + cdf_put_att_text(fileID, termid[termIdx], anametab[attIdx], attvtab[termIdx][attIdx].txtLen, + attvtab[termIdx][attIdx].txt); + + { + double *restrict ilevValA = (double *) Malloc((size_t) mlev * 2 * sizeof(*ilevValA)); + for (size_t i = 0; i < (size_t) mlev; ++i) + { + ilevValA[2 * i] = vctptr[i]; + ilevValA[2 * i + 1] = vctptr[i + 1]; + } + cdfPostDefActionAddPutVal(&delayed, fileID, hyaiid, ilevValA, cdfDelayedPutVarDeepCleanup); + } + { + double *restrict ilevValB = (double *) Malloc((size_t) mlev * 2 * sizeof(*ilevValB)); + for (size_t i = 0; i < (size_t) mlev; ++i) + { + ilevValB[2 * i] = vctptr[(size_t) ilev + i]; + ilevValB[2 * i + 1] = vctptr[(size_t) ilev + i + 1]; + } + cdfPostDefActionAddPutVal(&delayed, fileID, hybiid, ilevValB, cdfDelayedPutVarDeepCleanup); + } + } + if (p0status == 0 && IS_NOT_EQUAL(p0value, 0)) Free(vctptr); + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + } + return delayed; +} + +static struct cdfPostDefActionList * +cdf_def_zaxis_hybrid_echam(stream_t *streamptr, int type, int *ncvaridp, int zaxisID, int zaxisindex, int xtype, size_t dimlen, + int *dimID, char *axisname) +{ + int fileID = streamptr->fileID; + struct cdfPostDefActionList *delayed = NULL; + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + cdf_def_dim(fileID, axisname, dimlen, dimID); + cdf_def_var(fileID, axisname, (nc_type) xtype, 1, dimID, ncvaridp); + int ncvarid = *ncvaridp; + + { + static const char sname[] = "hybrid_sigma_pressure"; + cdf_put_att_text(fileID, ncvarid, "standard_name", sizeof(sname) - 1, sname); + } + { + static const char *attName[] = { "long_name", "formula", "formula_terms" }; + enum + { + nAtt = sizeof(attName) / sizeof(attName[0]) + }; + static const char lname_m[] = "hybrid level at layer midpoints", formula_m[] = "hyam hybm (mlev=hyam+hybm*aps)", + fterms_m[] = "ap: hyam b: hybm ps: aps", lname_i[] = "hybrid level at layer interfaces", + formula_i[] = "hyai hybi (ilev=hyai+hybi*aps)", fterms_i[] = "ap: hyai b: hybi ps: aps"; + static const struct attTxtTab tab[2][nAtt] + = { { { lname_i, sizeof(lname_i) - 1 }, { formula_i, sizeof(formula_i) - 1 }, { fterms_i, sizeof(fterms_i) - 1 } }, + { { lname_m, sizeof(lname_m) - 1 }, { formula_m, sizeof(formula_m) - 1 }, { fterms_m, sizeof(fterms_m) - 1 } } }; + + size_t tabSelect = type == ZAXIS_HYBRID; + for (size_t i = 0; i < nAtt; ++i) + cdf_put_att_text(fileID, ncvarid, attName[i], tab[tabSelect][i].txtLen, tab[tabSelect][i].txt); + } + + { + static const char units[] = "level"; + cdf_put_att_text(fileID, ncvarid, "units", sizeof(units) - 1, units); + } + { + static const char direction[] = "down"; + cdf_put_att_text(fileID, ncvarid, "positive", sizeof(direction) - 1, direction); + } + + if (zaxisInqLevels(zaxisID, NULL)) + cdfPostDefActionAddPutVal(&delayed, fileID, ncvarid, zaxisInqLevelsPtr(zaxisID), (void (*)(void *))(void (*)(void)) memFree); + + { + struct cdfPostDefActionList *delayedVct = cdf_def_vct_echam(streamptr, zaxisID); + delayed = cdfPostDefActionConcat(delayed, delayedVct); + Free(delayedVct); + } + + if (*dimID == CDI_UNDEFID) streamptr->zaxisID[zaxisindex] = type == ZAXIS_HYBRID ? streamptr->vct.mlevID : streamptr->vct.ilevID; + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + return delayed; +} + +static struct cdfPostDefActionList * +cdf_def_zaxis_hybrid_cf(stream_t *streamptr, int type, int *ncvaridp, int zaxisID, int zaxisindex, int xtype, size_t dimlen, + int *dimID, char *axisname) +{ + char psname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_PSNAME, psname, &length); + if (psname[0] == 0) strcpy(psname, "ps"); + + int fileID = streamptr->fileID; + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + char p0name[CDI_MAX_NAME]; + p0name[0] = 0; + double p0value = 1; + int p0varid = CDI_UNDEFID; + int p0status = cdiInqKeyFloat(zaxisID, CDI_GLOBAL, CDI_KEY_P0VALUE, &p0value); + if (p0status == CDI_NOERR) + { + length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_P0NAME, p0name, &length); + if (p0name[0] == 0) strcpy(p0name, "p0"); + cdf_def_var(fileID, p0name, NC_DOUBLE, 0, 0, &p0varid); + static const char longname[] = "reference pressure"; + cdf_put_att_text(fileID, p0varid, "long_name", sizeof(longname) - 1, longname); + static const char units[] = "Pa"; + cdf_put_att_text(fileID, p0varid, "units", sizeof(units) - 1, units); + } + + char zname[CDI_MAX_NAME]; + char zlongname[CDI_MAX_NAME]; + char zunits[CDI_MAX_NAME]; + length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, zname, &length); + if (zname[0]) strcpy(axisname, zname); + zlongname[0] = 0; + size_t zlongnameLen; + if (zlongname[0] == 0) + { + static const char default_zlongname[] = "hybrid sigma pressure coordinate"; + memcpy(zlongname, default_zlongname, sizeof(default_zlongname)); + zlongnameLen = sizeof(default_zlongname) - 1; + } + else + zlongnameLen = strlen(zlongname); + length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, zunits, &length); + size_t zunitsLen; + if (zunits[0] == 0) + { + zunits[0] = '1'; + zunits[1] = '\0'; + zunitsLen = 1; + } + else + zunitsLen = strlen(zunits); + + cdf_def_dim(fileID, axisname, dimlen, dimID); + cdf_def_var(fileID, axisname, (nc_type) xtype, 1, dimID, ncvaridp); + int ncvarid = *ncvaridp; + + { + static const char sname[] = "standard_name", lname[] = "long_name", sname_v[] = "atmosphere_hybrid_sigma_pressure_coordinate", + axis[] = "axis", axis_v[] = "Z", direction[] = "positive", direction_v[] = "down", units[] = "units"; + struct attTxtTab2 tab[] = { + { sname, sname_v, sizeof(sname_v) - 1 }, + { axis, axis_v, sizeof(axis_v) - 1 }, + { direction, direction_v, sizeof(direction_v) - 1 }, + { units, zunits, zunitsLen }, + { lname, zlongname, zlongnameLen }, + }; + enum + { + nAtt = sizeof(tab) / sizeof(tab[0]) + }; + for (size_t i = 0; i < nAtt; ++i) cdf_put_att_text(fileID, ncvarid, tab[i].attName, tab[i].valLen, tab[i].attVal); + } + + size_t len = 0; + char txt[CDI_MAX_NAME * 2 + 30]; + if (p0status == 0) + len = (size_t) (snprintf(txt, sizeof(txt), "%s%s %s%s", "a: a b: b p0: ", p0name, "ps: ", psname)); + else + len = (size_t) (snprintf(txt, sizeof(txt), "%s%s", "ap: ap b: b ps: ", psname)); + cdf_put_att_text(fileID, ncvarid, "formula_terms", len, txt); + + int ncbvarid = CDI_UNDEFID; + int nvdimID = CDI_UNDEFID; + + double *buffer = (double *) malloc(2 * dimlen * sizeof(double)); + double *lbounds = buffer; + double *ubounds = buffer + dimlen; + double *restrict levels; + + bool hasLevels = zaxisInqLevels(zaxisID, NULL) != 0; + if (hasLevels) + levels = (double *) zaxisInqLevelsPtr(zaxisID); + else + { + levels = (double *) Malloc(sizeof(*levels) * dimlen); + for (size_t i = 0; i < dimlen; ++i) levels[i] = (double) (i + 1); + } + + if (zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL)) + { + zaxisInqLbounds(zaxisID, lbounds); + zaxisInqUbounds(zaxisID, ubounds); + } + else + { + for (size_t i = 0; i < dimlen; ++i) lbounds[i] = levels[i]; + for (size_t i = 0; i < dimlen - 1; ++i) ubounds[i] = levels[i + 1]; + ubounds[dimlen - 1] = levels[dimlen - 1] + 1; + } + + // if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) ) + { + size_t nvertex = 2; + if (dimlen > 1 && nc_inq_dimid(fileID, bndsName, &nvdimID) != NC_NOERR) cdf_def_dim(fileID, bndsName, nvertex, &nvdimID); + + if (nvdimID != CDI_UNDEFID) + { + size_t axisnameLen = strlen(axisname); + axisname[axisnameLen] = '_'; + memcpy(axisname + axisnameLen + 1, bndsName, sizeof(bndsName)); + axisnameLen += sizeof(bndsName); + int dimIDs[2] = { *dimID, nvdimID }; + cdf_def_var(fileID, axisname, (nc_type) xtype, 2, dimIDs, &ncbvarid); + cdf_put_att_text(fileID, ncvarid, "bounds", axisnameLen, axisname); + size_t formulatermsLen; + if (p0status == 0) + formulatermsLen = (size_t) (sprintf(txt, "%s%s %s%s", "a: a_bnds b: b_bnds p0: ", p0name, "ps: ", psname)); + else + formulatermsLen = (size_t) (sprintf(txt, "%s%s", "ap: ap_bnds b: b_bnds ps: ", psname)); + { + static const char sname[] = "standard_name", sname_v[] = "atmosphere_hybrid_sigma_pressure_coordinate", + formulaterms[] = "formula_terms", units[] = "units"; + struct attTxtTab2 tab[] = { + { sname, sname_v, sizeof(sname_v) - 1 }, + { units, zunits, zunitsLen }, + { formulaterms, txt, formulatermsLen }, + }; + enum + { + nAtt = sizeof(tab) / sizeof(tab[0]) + }; + for (size_t i = 0; i < nAtt; ++i) cdf_put_att_text(fileID, ncbvarid, tab[i].attName, tab[i].valLen, tab[i].attVal); + } + } + } + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + if (p0varid != CDI_UNDEFID) cdf_put_var_double(fileID, p0varid, &p0value); + + struct cdfPostDefActionList *delayed = NULL; + cdfPostDefActionAddPutVal(&delayed, fileID, ncvarid, levels, + hasLevels ? (void (*)(void *))(void (*)(void)) memFree : cdfDelayedPutVarDeepCleanup); + + if (ncbvarid != CDI_UNDEFID) + { + double *restrict zbounds = (double *) Malloc(2 * dimlen * sizeof(*zbounds)); + for (size_t i = 0; i < dimlen; ++i) + { + zbounds[2 * i] = lbounds[i]; + zbounds[2 * i + 1] = ubounds[i]; + } + cdfPostDefActionAddPutVal(&delayed, fileID, ncbvarid, zbounds, cdfDelayedPutVarDeepCleanup); + } + + { + struct cdfPostDefActionList *delayedVct = cdf_def_vct_cf(streamptr, zaxisID, *dimID, nvdimID, p0status, p0value); + delayed = cdfPostDefActionConcat(delayed, delayedVct); + Free(delayedVct); + } + + if (*dimID == CDI_UNDEFID) streamptr->zaxisID[zaxisindex] = type == ZAXIS_HYBRID ? streamptr->vct.mlevID : streamptr->vct.ilevID; + + free(buffer); + return delayed; +} + +static struct cdfPostDefActionList * +cdf_def_zaxis_hybrid(stream_t *streamptr, int type, int *ncvarid, int zaxisID, int zaxisindex, int xtype, size_t dimlen, int *dimID, + char *axisname) +{ + struct cdfPostDefActionList *(*def_zaxis_hybrid_delegate)(stream_t * streamptr, int type, int *ncvarid, int zaxisID, + int zaxisindex, int xtype, size_t dimlen, int *dimID, char *axisname) + = ((!CDI_CMOR_Mode && CDI_Convention == CDI_CONVENTION_ECHAM) || type == ZAXIS_HYBRID_HALF) ? cdf_def_zaxis_hybrid_echam + : cdf_def_zaxis_hybrid_cf; + return def_zaxis_hybrid_delegate(streamptr, type, ncvarid, zaxisID, zaxisindex, xtype, dimlen, dimID, axisname); +} + +static void +cdfDefZaxisUUID(stream_t *streamptr, int zaxisID) +{ + unsigned char uuid[CDI_UUID_SIZE] = { 0 }; + int length = CDI_UUID_SIZE; + cdiInqKeyBytes(zaxisID, CDI_GLOBAL, CDI_KEY_UUID, uuid, &length); + if (!cdiUUIDIsNull(uuid)) + { + char uuidStr[uuidNumHexChars + 1] = { 0 }; + if (cdiUUID2Str(uuid, uuidStr) == uuidNumHexChars) + { + int fileID = streamptr->fileID; + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + cdf_put_att_text(fileID, NC_GLOBAL, "uuidOfVGrid", uuidNumHexChars, uuidStr); + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + } + } +} + +#ifndef USE_MPI +static void +cdfDefZaxisChar(stream_t *streamptr, int zaxisID, char *axisname, int *dimID, size_t dimlen, int zaxisindex) +{ + int fileID = streamptr->fileID; + int ncvarID = CDI_UNDEFID; + if (streamptr->ncmode == 2) cdf_redef(fileID); + + // Check StrlenID + char strlen[8] = "strlen\0"; + size_t clen = (size_t) zaxisInqCLen(zaxisID); + if (clen == 0) + Error("Maximal string length value is 0.\nA given character axis requires a dimension to save the maximal string length."); + int strlenID = CDI_UNDEFID; + strlenID = checkDimName(fileID, clen, strlen); + + if (strlenID == CDI_UNDEFID) cdf_def_dim(fileID, strlen, clen, &strlenID); + + // Check 'areatype'dimID + char dimname[CDI_MAX_NAME + 3]; + int length = sizeof(dimname); + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_DIMNAME, dimname, &length); + *dimID = checkDimName(fileID, dimlen, dimname); + if (dimlen <= 0) Error("No strings delivered for a character axis."); + if (dimname[0] == 0) + { + memcpy(dimname, "area_type", 10); + dimname[10] = 0; + } + + if (*dimID == CDI_UNDEFID) cdf_def_dim(fileID, dimname, dimlen, dimID); + + int dimIDs[2]; + dimIDs[0] = *dimID; + dimIDs[1] = strlenID; + + // Get Stringvalues + char **cvals = zaxisInqCValsPtr(zaxisID); + + if (cvals) + { + // Define variable and its attributes + cdf_def_var(fileID, axisname, NC_CHAR, 2, dimIDs, &ncvarID); + + cdfPutGridStdAtts(fileID, ncvarID, zaxisID, 'Z'); + cdf_put_att_text(fileID, ncvarID, "axis", 1, "Z"); + cdfDefineAttributes(zaxisID, CDI_GLOBAL, fileID, ncvarID); + + streamptr->nczvarID[zaxisindex] = ncvarID; + cdf_enddef(fileID, streamptr->self); + + // Write Stringvalues + size_t start[2], count[2]; + start[1] = 0; + count[0] = 1; + count[1] = clen; + for (size_t i = 0; i < dimlen; i++) + { + start[0] = i; + nc_put_vara_text(fileID, ncvarID, start, count, cvals[i]); + } + } + + streamptr->ncmode = 2; +} +#endif + +static int +zaxis_inq_xtype(int zaxisID) +{ + int datatype = CDI_UNDEFID; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); + int xtype = NC_DOUBLE; + // clang-format off + if (datatype == CDI_DATATYPE_FLT32) xtype = NC_FLOAT; + else if (datatype == CDI_DATATYPE_INT32) xtype = NC_INT; + else if (datatype == CDI_DATATYPE_INT16) xtype = NC_SHORT; + // clang-format on + return xtype; +} + +static struct cdfPostDefActionList * +cdfDefZaxis(stream_t *streamptr, int zaxisID) +{ + // char zaxisname0[CDI_MAX_NAME]; + int ncvarid = CDI_UNDEFID, ncbvarid = CDI_UNDEFID; + int xtype = zaxis_inq_xtype(zaxisID); + + size_t dimlen = (size_t) zaxisInqSize(zaxisID); + int type = zaxisInqType(zaxisID); + + int ndims = 1; + struct cdfPostDefActionList *delayed = NULL; + + if (dimlen == 1) + { + bool isScalar = zaxisInqScalar(zaxisID) > 0; + if (!isScalar && CDI_CMOR_Mode) + { + isScalar = true; + zaxisDefScalar(zaxisID); + } + + if (isScalar) ndims = 0; + if (CDI_Reduce_Dim) return delayed; + + switch (type) + { + case ZAXIS_SURFACE: + case ZAXIS_CLOUD_BASE: + case ZAXIS_CLOUD_TOP: + case ZAXIS_ISOTHERM_ZERO: + case ZAXIS_TROPOPAUSE: + case ZAXIS_TOA: + case ZAXIS_SEA_BOTTOM: + case ZAXIS_ATMOSPHERE: + case ZAXIS_MEANSEA: + case ZAXIS_LAKE_BOTTOM: + case ZAXIS_SEDIMENT_BOTTOM: + case ZAXIS_SEDIMENT_BOTTOM_TA: + case ZAXIS_SEDIMENT_BOTTOM_TW: + case ZAXIS_MIX_LAYER: return delayed; + } + } + + int vlistID = streamptr->vlistID; + char axisname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, axisname, &length); + int zaxisindex = vlistZaxisIndex(vlistID, zaxisID); + int nzaxis = vlistNzaxis(vlistID); + int fileID = streamptr->fileID; + + checkZaxisName(axisname, fileID, vlistID, zaxisID, nzaxis); + + char dimname[CDI_MAX_NAME + 3]; + dimname[0] = 0; + if (dimname[0] == 0) strcpy(dimname, axisname); + + if (type == ZAXIS_REFERENCE) cdfDefZaxisUUID(streamptr, zaxisID); + + int dimID; + if (type == ZAXIS_HYBRID || type == ZAXIS_HYBRID_HALF) + { + delayed = cdf_def_zaxis_hybrid(streamptr, type, &ncvarid, zaxisID, zaxisindex, xtype, dimlen, &dimID, axisname); + + int natts; + cdiInqNatts(zaxisID, CDI_GLOBAL, &natts); + cdfDefineAttributes(zaxisID, CDI_GLOBAL, fileID, ncvarid); + } +#ifndef USE_MPI + else if (type == ZAXIS_CHAR) + cdfDefZaxisChar(streamptr, zaxisID, axisname, &dimID, dimlen, zaxisindex); +#endif + else + { + dimID = checkDimName(fileID, dimlen, dimname); + + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + if (ndims && dimID == CDI_UNDEFID) cdf_def_dim(fileID, dimname, dimlen, &dimID); + + if (zaxisInqLevels(zaxisID, NULL)) + { + cdf_def_var(fileID, axisname, (nc_type) xtype, ndims, &dimID, &ncvarid); + + cdfPutGridStdAtts(fileID, ncvarid, zaxisID, 'Z'); + + { + int positive = zaxisInqPositive(zaxisID); + static const char positive_up[] = "up", positive_down[] = "down"; + static const struct attTxtTab tab[2] = { + { positive_up, sizeof(positive_up) - 1 }, + { positive_down, sizeof(positive_down) - 1 }, + }; + if (positive == POSITIVE_UP || positive == POSITIVE_DOWN) + { + size_t select = (positive == POSITIVE_DOWN); + cdf_put_att_text(fileID, ncvarid, "positive", tab[select].txtLen, tab[select].txt); + } + } + cdf_put_att_text(fileID, ncvarid, "axis", 1, "Z"); + cdfPostDefActionAddPutVal(&delayed, fileID, ncvarid, zaxisInqLevelsPtr(zaxisID), + (void (*)(void *))(void (*)(void)) memFree); + + if (zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL)) + { + int nvdimID = CDI_UNDEFID; + size_t nvertex = 2; + if (nc_inq_dimid(fileID, bndsName, &nvdimID) != NC_NOERR) cdf_def_dim(fileID, bndsName, nvertex, &nvdimID); + + if (nvdimID != CDI_UNDEFID) + { + { + size_t axisnameLen = strlen(axisname); + axisname[axisnameLen] = '_'; + memcpy(axisname + axisnameLen + 1, bndsName, sizeof(bndsName)); + int dimIDs[2]; + dimIDs[0] = dimID; + dimIDs[ndims] = nvdimID; + cdf_def_var(fileID, axisname, (nc_type) xtype, ndims + 1, dimIDs, &ncbvarid); + cdf_put_att_text(fileID, ncvarid, "bounds", axisnameLen + sizeof(bndsName), axisname); + } + { + double *restrict zbounds = (double *) Malloc(4 * dimlen * sizeof(*zbounds)), + *restrict lbounds = zbounds + 2 * dimlen, *restrict ubounds = zbounds + 3 * dimlen; + zaxisInqLbounds(zaxisID, lbounds); + zaxisInqUbounds(zaxisID, ubounds); + for (size_t i = 0; i < dimlen; ++i) + { + zbounds[2 * i] = lbounds[i]; + zbounds[2 * i + 1] = ubounds[i]; + } + zbounds = (double *) Realloc(zbounds, 2 * dimlen * sizeof(*zbounds)); + cdfPostDefActionAddPutVal(&delayed, fileID, ncbvarid, zbounds, cdfDelayedPutVarDeepCleanup); + } + } + } + cdfDefineAttributes(zaxisID, CDI_GLOBAL, fileID, ncvarid); + } + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + if (zaxisInqLevels(zaxisID, NULL) && ndims == 0) streamptr->nczvarID[zaxisindex] = ncvarid; + } + + if (dimID != CDI_UNDEFID) streamptr->zaxisID[zaxisindex] = dimID; + return delayed; +} + +static struct cdfPostDefActionList * +cdf_def_mapping(stream_t *streamptr, int gridID) +{ + struct cdfPostDefActionList *delayed = NULL; + + int natts; + cdiInqNatts(gridID, CDI_GLOBAL, &natts); + if (natts == 0) return delayed; + + int datatype = -1; + int status = cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARTYPE, &datatype); + nc_type gmapvartype = (status == CDI_NOERR) ? (nc_type) datatype : NC_INT; + char gmapvarname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARNAME, gmapvarname, &length); + if (!gmapvarname[0]) strcpy(gmapvarname, "crs"); + + int fileID = streamptr->fileID; + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + int ncvarid; + int ncerrcode = nc_def_var(fileID, gmapvarname, gmapvartype, 0, NULL, &ncvarid); + if (ncerrcode == NC_NOERR) cdfDefineAttributes(gridID, CDI_GLOBAL, fileID, ncvarid); + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + if (ncerrcode == NC_NOERR && !xtypeIsText(gmapvartype)) + { + cdfPostDefActionAddPut1Int(&delayed, fileID, ncvarid, 1, (void (*)(void *))(void (*)(void)) memFree); + } + return delayed; +} + +static void +cdfDefCharacter(stream_t *streamptr, int gridID, int gridIndex, int cdiAxisID, int strlen) +{ + if (streamptr->ncgrid[gridIndex].ncIDs[CDF_DIMID_X] != CDI_UNDEFID) return; + + bool isXaxis = (cdiAxisID == CDI_XAXIS); + + size_t dimlen = isXaxis ? gridInqXsize(gridID) : gridInqYsize(gridID); + ncgrid_t *ncgrid = streamptr->ncgrid; + + // Check for all grids up to gridIndex whether it already is defined + + for (int index = 0; index < gridIndex; index++) + { + int gridID0 = ncgrid[index].gridID; + int gridtype0 = gridInqType(gridID0); + if (gridtype0 == GRID_CHARXY) + { + if (gridInqXIsc(gridID0) == strlen && (size_t) gridInqXsize(gridID0) == dimlen) + return; + else if (gridInqYIsc(gridID0) == strlen && (size_t) gridInqYsize(gridID0) == dimlen) + return; + } + } + + int fileID = streamptr->fileID; + + if (streamptr->ncmode == 2) cdf_redef(fileID); + + // Define Dims + + char dimname[CDI_MAX_NAME + 3]; + int length = sizeof(dimname); + cdiInqKeyString(gridID, cdiAxisID, CDI_KEY_DIMNAME, dimname, &length); + if (dimname[0] == 0) + { + memcpy(dimname, "region", 7); + dimname[6] = 0; + } + int dimID = checkDimName(fileID, dimlen, dimname); + if (dimID == CDI_UNDEFID) cdf_def_dim(fileID, dimname, dimlen, &dimID); + + // Define strlength dim + + strcpy(dimname, "strlen"); + int strlenID = checkDimName(fileID, strlen, dimname); + if (strlenID == CDI_UNDEFID) cdf_def_dim(fileID, dimname, strlen, &strlenID); + + // Define Variable + + int dimIDs[2]; + dimIDs[0] = dimID; + dimIDs[1] = strlenID; + + char axisname[CDI_MAX_NAME]; + char **cvals = (char **) Malloc(dimlen * sizeof(char *)); + for (size_t i = 0; i < dimlen; i++) cvals[i] = (char *) Malloc(strlen * sizeof(char)); + int ncaxisid; + length = CDI_MAX_NAME; + cdiInqKeyString(gridID, cdiAxisID, CDI_KEY_NAME, axisname, &length); + gridInqXCvals(gridID, cvals); + + int status = nc_inq_varid(fileID, axisname, &ncaxisid); + if (status == NC_NOERR) return; + + cdf_def_var(fileID, axisname, NC_CHAR, 2, dimIDs, &ncaxisid); + cdfPutGridStdAtts(fileID, ncaxisid, gridID, isXaxis ? 'X' : 'Y'); + + cdf_enddef(fileID, streamptr->self); + + // Write Var + + size_t start[2], count[2]; + start[1] = 0; + count[0] = 1; + count[1] = strlen; + for (size_t i = 0; i < dimlen; i++) + { + start[0] = i; + status = nc_put_vara_text(fileID, ncaxisid, start, count, cvals[i]); + } + + ncgrid[gridIndex].gridID = gridID; + ncgrid[gridIndex].ncIDs[isXaxis ? CDF_DIMID_X : CDF_DIMID_Y] = dimID; + ncgrid[gridIndex].ncIDs[isXaxis ? CDF_VARID_X : CDF_VARID_Y] = ncaxisid; + + streamptr->ncmode = 2; +} + +static void +cdfDefRgrid(stream_t *streamptr, int gridID, int gridIndex) +{ + ncgrid_t *ncgrid = streamptr->ncgrid; + + ncgrid[gridIndex].gridID = gridID; + + { + size_t dimlen = gridInqSize(gridID); + + struct idSearch search = cdfSearchIDBySize(0, (size_t) gridIndex, ncgrid, CDF_DIMID_X, GRID_GAUSSIAN_REDUCED, (int) dimlen, + gridInqType, gridInqSize); + int iz = search.numNonMatching; + int dimID = search.foundID; + + if (dimID == CDI_UNDEFID) + { + int fileID = streamptr->fileID; + + char axisname[16] = "rgridX"; + if (iz == 0) + axisname[5] = '\0'; + else + sprintf(&axisname[5], "%1d", iz + 1); + + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + cdf_def_dim(fileID, axisname, dimlen, &dimID); + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + } + + ncgrid[gridIndex].ncIDs[CDF_DIMID_X] = dimID; + } + + { + size_t dimlen = gridInqYsize(gridID); + + struct idSearch search = cdfSearchIDBySize(0, (size_t) gridIndex, ncgrid, CDF_DIMID_RP, GRID_GAUSSIAN_REDUCED, (int) dimlen, + gridInqType, gridInqSize); + int iz = search.numNonMatching; + int dimID = search.foundID; + + if (dimID == CDI_UNDEFID) + { + int fileID = streamptr->fileID; + + char axisname[32] = "reduced_pointsX"; + if (iz == 0) + axisname[14] = '\0'; + else + sprintf(&axisname[14], "%1d", iz + 1); + + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + cdf_def_dim(fileID, axisname, dimlen, &dimID); + + int ncvarid = CDI_UNDEFID; + + int ndims = 1; + nc_type xtype = NC_INT; + cdf_def_var(fileID, axisname, xtype, ndims, &dimID, &ncvarid); + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + int *reducedPoints = (int *) Malloc(dimlen * sizeof(int)); + gridInqReducedPoints(gridID, reducedPoints); + cdf_put_var_int(fileID, ncvarid, reducedPoints); + Free(reducedPoints); + + ncgrid[gridIndex].ncIDs[CDF_VARID_RP] = ncvarid; + } + + ncgrid[gridIndex].ncIDs[CDF_DIMID_RP] = dimID; + } +} + +static void +cdf_define_generic_dim(stream_t *streamptr, int gridID, int gridIndex) +{ + ncgrid_t *ncgrid = streamptr->ncgrid; + int dimID = CDI_UNDEFID; + + size_t dimlen = gridInqSize(gridID); + + if (gridInqYsize(gridID) == 0) + { + struct idSearch search + = cdfSearchIDBySize(0, (size_t) gridIndex, ncgrid, CDF_DIMID_X, GRID_GENERIC, (int) dimlen, gridInqType, gridInqSize); + dimID = search.foundID; + } + + if (gridInqXsize(gridID) == 0) + { + struct idSearch search + = cdfSearchIDBySize(0, (size_t) gridIndex, ncgrid, CDF_DIMID_Y, GRID_GENERIC, (int) dimlen, gridInqType, gridInqSize); + dimID = search.foundID; + } + + if (dimID == CDI_UNDEFID) + { + int fileID = streamptr->fileID; + char dimname[CDI_MAX_NAME]; + int length = sizeof(dimname); + cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_DIMNAME, dimname, &length); + if (dimname[0] == 0) strcpy(dimname, "gsize"); + + dimID = checkDimName(fileID, dimlen, dimname); + + if (dimID == CDI_UNDEFID) + { + bool switchNCMode = streamptr->ncmode == 2; + if (switchNCMode) + { + streamptr->ncmode = 1; + cdf_redef(fileID); + } + + cdf_def_dim(fileID, dimname, dimlen, &dimID); + + if (switchNCMode) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + } + } + + ncgrid[gridIndex].gridID = gridID; + ncgrid[gridIndex].ncIDs[CDF_DIMID_X] = dimID; +} + +static struct cdfPostDefActionList * +cdf_define_grid(stream_t *streamptr, int gridID, int gridIndex) +{ + struct cdfPostDefActionList *delayed = NULL; + + if (streamptr->ncgrid[gridIndex].ncIDs[CDF_DIMID_X] != CDI_UNDEFID) return delayed; + + int gridtype = gridInqType(gridID); + size_t size = gridInqSize(gridID); + + if (CDI_Debug) Message("gridtype = %d size = %zu", gridtype, size); + + if (CDI_Reduce_Dim && size == 1) // no grid information + { + streamptr->ncgrid[gridIndex].gridID = gridID; + return delayed; + } + + if (gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION) + { + int ndims = !(gridtype == GRID_LONLAT && size == 1 && !gridInqHasDims(gridID)); + size_t xsize = gridInqXsize(gridID); + size_t ysize = gridInqYsize(gridID); + + if (xsize) + { + struct cdfPostDefActionList *xdelayed = cdfDefXaxis(streamptr, gridID, gridIndex, ndims, false); + delayed = cdfPostDefActionConcat(delayed, xdelayed); + Free(xdelayed); + } + if (ysize) + { + struct cdfPostDefActionList *ydelayed = cdfDefYaxis(streamptr, gridID, gridIndex, ndims, false); + delayed = cdfPostDefActionConcat(delayed, ydelayed); + Free(ydelayed); + } + + if (ndims == 1 && xsize == 0 && ysize == 0 && gridtype == GRID_PROJECTION) + cdf_define_generic_dim(streamptr, gridID, gridIndex); + + struct cdfPostDefActionList *mdelayed = cdf_def_mapping(streamptr, gridID); + delayed = cdfPostDefActionConcat(delayed, mdelayed); + Free(mdelayed); + } + else if (gridtype == GRID_GENERIC) + { + if (size == 1 && gridInqXsize(gridID) == 0 && gridInqYsize(gridID) == 0) + { + // no grid information + streamptr->ncgrid[gridIndex].gridID = gridID; + } + else + { + size_t xsize = gridInqXsize(gridID); + size_t ysize = gridInqYsize(gridID); + + if (xsize > 0) + { + struct cdfPostDefActionList *xdelayed = cdfDefXaxis(streamptr, gridID, gridIndex, 1, false); + delayed = cdfPostDefActionConcat(delayed, xdelayed); + Free(xdelayed); + } + if (ysize > 0) + { + struct cdfPostDefActionList *ydelayed = cdfDefYaxis(streamptr, gridID, gridIndex, 1, false); + delayed = cdfPostDefActionConcat(delayed, ydelayed); + Free(ydelayed); + } + + if (xsize == 0 && ysize == 0) cdf_define_generic_dim(streamptr, gridID, gridIndex); + } + } + else if (gridtype == GRID_CURVILINEAR) + { + delayed = cdfDefCurvilinear(streamptr, gridID, gridIndex); + } + else if (gridtype == GRID_UNSTRUCTURED) + { + delayed = cdfDefUnstructured(streamptr, gridID, gridIndex); + } + else if (gridtype == GRID_GAUSSIAN_REDUCED) + { + cdfDefRgrid(streamptr, gridID, gridIndex); + if (gridInqYsize(gridID)) cdfDefYaxis(streamptr, gridID, gridIndex, 1, true); + } + else if (gridtype == GRID_SPECTRAL) + { + cdfDefComplex(streamptr, gridID, gridIndex); + cdfDefSP(streamptr, gridID, gridIndex); + } + else if (gridtype == GRID_FOURIER) + { + cdfDefComplex(streamptr, gridID, gridIndex); + cdfDefFC(streamptr, gridID, gridIndex); + } + else if (gridtype == GRID_TRAJECTORY) + { + cdfDefTrajLon(streamptr, gridID, gridIndex); + cdfDefTrajLat(streamptr, gridID, gridIndex); + } + else if (gridtype == GRID_CHARXY) + { + int strlen = 0; + if ((strlen = gridInqXIsc(gridID))) + cdfDefCharacter(streamptr, gridID, gridIndex, CDI_XAXIS, strlen); + else if (gridInqXsize(gridID)) + cdfDefXaxis(streamptr, gridID, gridIndex, 1, false); + + if ((strlen = gridInqYIsc(gridID))) + cdfDefCharacter(streamptr, gridID, gridIndex, CDI_YAXIS, strlen); + else if (gridInqYsize(gridID)) + cdfDefYaxis(streamptr, gridID, gridIndex, 1, false); + } + else + { + Error("Unsupported grid type: %s", gridNamePtr(gridtype)); + } + return delayed; +} + +void +cdfDefCoordinateVars(stream_t *streamptr) +{ + int vlistID = streamptr->vlistID; + if (vlistID == CDI_UNDEFID) Error("Internal problem! vlist undefined for streamptr %p", streamptr); + + if (vlistHasTime(vlistID)) cdfDefTime(streamptr); + + int ngrids = vlistNgrids(vlistID); + if (2 * ngrids > MAX_GRIDS_PS) Error("Internal problem! Too many grids per stream (max=%d)\n", MAX_GRIDS_PS); + + struct cdfPostDefActionList *delayed = NULL; + + ncgrid_t *restrict ncgrid = streamptr->ncgrid; + for (int index = 0; index < 2 * ngrids; ++index) + { + ncgrid[index].gridID = CDI_UNDEFID; + for (size_t i = 0; i < CDF_SIZE_ncIDs; ++i) ncgrid[index].ncIDs[i] = CDI_UNDEFID; + } + + for (int index = 0; index < ngrids; ++index) + { + int gridID = vlistGrid(vlistID, index); + struct cdfPostDefActionList *griddelayed = cdf_define_grid(streamptr, gridID, index); + delayed = cdfPostDefActionConcat(delayed, griddelayed); + Free(griddelayed); + } + { + int index = ngrids - 1; + for (int i = 0; i < ngrids; ++i) + { + int gridID = vlistGrid(vlistID, i); + int projID = gridInqProj(gridID); + if (projID != CDI_UNDEFID) + { + struct cdfPostDefActionList *griddelayed = cdf_define_grid(streamptr, projID, ++index); + delayed = cdfPostDefActionConcat(delayed, griddelayed); + Free(griddelayed); + } + } + } + + int nzaxis = vlistNzaxis(vlistID); + for (int index = 0; index < nzaxis; ++index) + { + int zaxisID = vlistZaxis(vlistID, index); + if (streamptr->zaxisID[index] == CDI_UNDEFID) + { + struct cdfPostDefActionList *zaxisdelayed = cdfDefZaxis(streamptr, zaxisID); + delayed = cdfPostDefActionConcat(delayed, zaxisdelayed); + Free(zaxisdelayed); + } + } + + if (streamptr->ncmode != 2) + { + cdf_enddef(streamptr->fileID, streamptr->self); + streamptr->ncmode = 2; + } + + int nvars = vlistNvars(vlistID); + for (int varID = 0; varID < nvars; varID++) cdfDefVar(streamptr, varID); + + cdfEndDef(streamptr); + if (delayed) + { + cdfPostDefActionApply(delayed->len, delayed->actions); + cdfPostDefActionListDelete(delayed); + } +} + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBNETCDF + +#include <stdio.h> +#include <string.h> + + +static int +cdfDefTimeBounds(int fileID, int nctimevarid, int nctimedimid, const char *taxis_name, taxis_t *taxis) +{ + int dims[2]; + + dims[0] = nctimedimid; + + static const char bndsName[] = "bnds"; + if (nc_inq_dimid(fileID, bndsName, &dims[1]) != NC_NOERR) cdf_def_dim(fileID, bndsName, 2, &dims[1]); + + const char *bndsAttName, *bndsAttVal; + size_t bndsAttValLen; + char tmpstr[CDI_MAX_NAME]; + if (taxis->climatology) + { + static const char climatology_bndsName[] = "climatology_bnds", climatology_bndsAttName[] = "climatology"; + bndsAttName = climatology_bndsAttName; + bndsAttValLen = sizeof(climatology_bndsName) - 1; + bndsAttVal = climatology_bndsName; + } + else + { + size_t taxisnameLen = strlen(taxis_name); + memcpy(tmpstr, taxis_name, taxisnameLen); + tmpstr[taxisnameLen] = '_'; + memcpy(tmpstr + taxisnameLen + 1, bndsName, sizeof(bndsName)); + size_t tmpstrLen = taxisnameLen + sizeof(bndsName); + static const char generic_bndsAttName[] = "bounds"; + bndsAttName = generic_bndsAttName; + bndsAttValLen = tmpstrLen; + bndsAttVal = tmpstr; + } + + int time_bndsid = -1; + cdf_def_var(fileID, bndsAttVal, NC_DOUBLE, 2, dims, &time_bndsid); + cdf_put_att_text(fileID, nctimevarid, bndsAttName, bndsAttValLen, bndsAttVal); + + return time_bndsid; +} + +static const char * +cdfGetTimeUnits(taxis_t *taxis) +{ + const char *unitstr; + if (taxis->units && taxis->units[0]) + { + unitstr = taxis->units; + } + else + { + if (taxis->type == TAXIS_ABSOLUTE) + { + static const char *const unitstrfmt[3] = { "year as %Y.%f", "month as %Y%m.%f", "day as %Y%m%d.%f" }; + size_t fmtidx = (taxis->unit == TUNIT_YEAR ? 0 : (taxis->unit == TUNIT_MONTH ? 1 : 2)); + unitstr = unitstrfmt[fmtidx]; + } + else + { + const int year = taxis->rDateTime.date.year; + const int month = taxis->rDateTime.date.month; + const int day = taxis->rDateTime.date.day; + const int hour = taxis->rDateTime.time.hour; + const int minute = taxis->rDateTime.time.minute; + const int second = taxis->rDateTime.time.second; + + int timeunit = (taxis->unit != -1) ? taxis->unit : TUNIT_HOUR; + if (timeunit == TUNIT_QUARTER) + timeunit = TUNIT_MINUTE; + else if (timeunit == TUNIT_30MINUTES) + timeunit = TUNIT_MINUTE; + else if (timeunit == TUNIT_3HOURS || timeunit == TUNIT_6HOURS || timeunit == TUNIT_12HOURS) + timeunit = TUNIT_HOUR; + + char *unitstr_ = ptaxisAllocUnits(taxis, CDF_MAX_TIME_UNIT_STR); + sprintf(unitstr_, "%s since %d-%d-%d %02d:%02d:%02d", tunitNamePtr(timeunit), year, month, day, hour, minute, second); + unitstr = unitstr_; + } + } + return unitstr; +} + +static const char * +cdfGetForecastTimeUnits(int timeunit) +{ + if (timeunit == -1) + timeunit = TUNIT_HOUR; + else if (timeunit == TUNIT_QUARTER) + timeunit = TUNIT_MINUTE; + else if (timeunit == TUNIT_30MINUTES) + timeunit = TUNIT_MINUTE; + else if (timeunit == TUNIT_3HOURS || timeunit == TUNIT_6HOURS || timeunit == TUNIT_12HOURS) + timeunit = TUNIT_HOUR; + + return tunitNamePtr(timeunit); +} + +static void +cdfDefCalendar(int fileID, int ncvarid, int calendar) +{ + static const struct + { + int calCode; + const char *calStr; + } calTab[] = { + { CALENDAR_STANDARD, "standard" }, { CALENDAR_GREGORIAN, "gregorian" }, { CALENDAR_PROLEPTIC, "proleptic_gregorian" }, + { CALENDAR_NONE, "none" }, { CALENDAR_360DAYS, "360_day" }, { CALENDAR_365DAYS, "365_day" }, + { CALENDAR_366DAYS, "366_day" }, + }; + enum + { + calTabSize = sizeof calTab / sizeof calTab[0] + }; + + for (size_t i = 0; i < calTabSize; ++i) + if (calTab[i].calCode == calendar) + { + const char *calstr = calTab[i].calStr; + size_t len = strlen(calstr); + cdf_put_att_text(fileID, ncvarid, "calendar", len, calstr); + break; + } +} + +void +cdfDefTime(stream_t *streamptr) +{ + static const char defaultTimeAxisName[] = "time"; + + if (streamptr->basetime.ncvarid != CDI_UNDEFID) return; + + const int fileID = streamptr->fileID; + + if (streamptr->ncmode == 0) streamptr->ncmode = 1; + if (streamptr->ncmode == 2) cdf_redef(fileID); + + taxis_t *taxis = taxisPtr(vlistInqTaxis(streamptr->vlistID)); + + const char *taxisName = (taxis->name && taxis->name[0]) ? taxis->name : defaultTimeAxisName; + + size_t timeDimLen = NC_UNLIMITED; + if (streamptr->filetype == CDI_FILETYPE_NCZARR) + { + if (streamptr->maxSteps == CDI_UNDEFID) + fprintf(stderr, "Max. number of timesteps undefined for NCZarr!\n"); + else + timeDimLen = streamptr->maxSteps; + } + + int timeDimId; + cdf_def_dim(fileID, taxisName, timeDimLen, &timeDimId); + streamptr->basetime.ncdimid = timeDimId; + + const int datatype = taxis->datatype; + const nc_type xtype = (datatype == CDI_DATATYPE_INT32) ? NC_INT : ((datatype == CDI_DATATYPE_FLT32) ? NC_FLOAT : NC_DOUBLE); + + int timeVarId; + cdf_def_var(fileID, taxisName, xtype, 1, &timeDimId, &timeVarId); + streamptr->basetime.ncvarid = timeVarId; + +#ifdef HAVE_NETCDF4 + if (timeDimLen == NC_UNLIMITED && (streamptr->filetype == CDI_FILETYPE_NC4 || streamptr->filetype == CDI_FILETYPE_NC4C)) + { + static const size_t chunk = 512; + cdf_def_var_chunking(fileID, timeVarId, NC_CHUNKED, &chunk); + } +#endif + + static const char timeStr[] = "time"; + cdf_put_att_text(fileID, timeVarId, "standard_name", sizeof(timeStr) - 1, timeStr); + + if (taxis->longname && taxis->longname[0]) + cdf_put_att_text(fileID, timeVarId, "long_name", strlen(taxis->longname), taxis->longname); + + if (taxis->hasBounds) streamptr->basetime.ncvarboundsid = cdfDefTimeBounds(fileID, timeVarId, timeDimId, taxisName, taxis); + + char unitsStr_[CDF_MAX_TIME_UNIT_STR]; + const char *unitsStr; + size_t unitsStrLen; + if (taxis->units && taxis->units[0]) + { + unitsStr = taxis->units; + unitsStrLen = strlen(taxis->units); + } + else + { + /* define bogus value since at this time, streamDefTimestep has + * not been called yet + * but since taxis->units is not set, it clearly will not + * exceed the size of unitstr_, i.e. when defining the units + * attribute to this value, a later redefinition will not + * cause a recreation of on-disk data + */ + for (size_t i = 0; i < CDF_MAX_TIME_UNIT_STR; ++i) unitsStr_[i] = 'a'; + unitsStr_[CDF_MAX_TIME_UNIT_STR - 1] = '\0'; + unitsStr = unitsStr_; + unitsStrLen = CDF_MAX_TIME_UNIT_STR - 1; + } + cdf_put_att_text(fileID, timeVarId, "units", unitsStrLen, unitsStr); + + if (taxis->calendar != -1) cdfDefCalendar(fileID, timeVarId, taxis->calendar); + + if (taxis->type == TAXIS_FORECAST) + { + int leadtimeid; + cdf_def_var(fileID, "leadtime", xtype, 1, &timeDimId, &leadtimeid); + streamptr->basetime.leadtimeid = leadtimeid; + + static const char stdName[] = "forecast_period"; + cdf_put_att_text(fileID, leadtimeid, "standard_name", sizeof(stdName) - 1, stdName); + + static const char longName[] = "Time elapsed since the start of the forecast"; + cdf_put_att_text(fileID, leadtimeid, "long_name", sizeof(longName) - 1, longName); + + unitsStr = cdfGetForecastTimeUnits(taxis->fc_unit); + size_t len = strlen(unitsStr); + if (len) cdf_put_att_text(fileID, leadtimeid, "units", len, unitsStr); + } + + cdf_put_att_text(fileID, timeVarId, "axis", 1, "T"); + + if (streamptr->ncmode == 2) cdf_enddef(fileID, streamptr->self); +} + +void +cdfDefTimestep(stream_t *streamptr, int tsID, size_t valCount) +{ + const int time_varid = streamptr->basetime.ncvarid; + if (time_varid != CDI_UNDEFID && tsID == 0) + { + taxis_t *taxis = taxisPtr(vlistInqTaxis(streamptr->vlistID)); + const int fileID = streamptr->fileID; + const char *unitstr = cdfGetTimeUnits(taxis); + const size_t len = strlen(unitstr); + if (len) cdf_put_att_text(fileID, time_varid, "units", len, unitstr); + } + + const int fileID = streamptr->fileID; + + if (CDI_Debug) Message("streamID = %d, fileID = %d, tsID = %d", streamptr->self, fileID, tsID); + + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + if (streamptr->ncmode == 1) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + if (streamptr->accessmode == 0) + { + cdfEndDef(streamptr); + } + + const size_t start[2] = { [0] = (size_t) tsID, [1] = 0 }, count[2] = { [0] = valCount, [1] = 2 * valCount }; + + double timeValue[2] = { cdi_encode_timeval(taxis->vDateTime, &streamptr->tsteps[0].taxis) }; + if (CDI_Debug) Message("tsID = %d timeValue = %f", tsID, timeValue); + + int ncvarid = streamptr->basetime.ncvarid; + cdf_put_vara_double(fileID, ncvarid, start, count, timeValue); + + if (taxis->hasBounds) + { + ncvarid = streamptr->basetime.ncvarboundsid; + if (ncvarid == CDI_UNDEFID) Error("Call to taxisWithBounds() missing!"); + + timeValue[0] = cdi_encode_timeval(taxis->vDateTime_lb, &streamptr->tsteps[0].taxis); + timeValue[1] = cdi_encode_timeval(taxis->vDateTime_ub, &streamptr->tsteps[0].taxis); + cdf_put_vara_double(fileID, ncvarid, start, count, timeValue); + } + + ncvarid = streamptr->basetime.leadtimeid; + if (taxis->type == TAXIS_FORECAST && ncvarid != CDI_UNDEFID) + cdf_put_vara_double(fileID, ncvarid, start, count, &taxis->fc_period); +} + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#if HAVE_CONFIG_H +#endif + +#include <limits.h> +#include <stdio.h> + + +#ifdef HAVE_LIBCGRIBEX + + +typedef struct +{ + int sec0[2]; + int sec1[1024]; + size_t sec2len; + int *sec2; + int sec3[2]; + int sec4[512]; + double fsec2[512]; + double fsec3[2]; +} cgribexrec_t; + +typedef struct +{ + int param; + int level1; + int level2; + int ltype; + int tsteptype; +} compvar_t; + +typedef struct +{ + void *gribbuffer; + size_t gribbuffersize; + unsigned char *pds; + unsigned char *gds; + unsigned char *bms; + unsigned char *bds; +} cgribex_handle; + +static void +fill_intarr(int *iarr, int val, int n) +{ + for (int i = 0; i < n; ++i) iarr[i] = val; +} + +static void +cgribexInit(cgribexrec_t *cgribexp) +{ + cgribexp->sec2len = 4096; + cgribexp->sec2 = (int *) Malloc(cgribexp->sec2len * sizeof(int)); +} + +void * +cgribexNew() +{ + cgribexrec_t *cgribexp = (cgribexrec_t *) Malloc(sizeof(cgribexrec_t)); + cgribexInit(cgribexp); + return (void *) cgribexp; +} + +void +cgribexDelete(void *cgribex) +{ + cgribexrec_t *cgribexp = (cgribexrec_t *) cgribex; + if (cgribexp) + { + if (cgribexp->sec2) Free(cgribexp->sec2); + Free(cgribexp); + } +} + +#ifdef __cplusplus +extern "C" +{ +#endif + int grib1Sections(unsigned char *gribbuffer, long gribbufsize, unsigned char **pdsp, unsigned char **gdsp, unsigned char **bmsp, + unsigned char **bdsp, long *gribrecsize); +#ifdef __cplusplus +} +#endif + +static size_t +cgribexSection2Length(void *gribbuffer, size_t gribbuffersize) +{ + long sec2len = 0; + + if (gribbuffersize && gribbuffer) + { + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + long gribrecsize; + int status = grib1Sections((unsigned char *) gribbuffer, (long) gribbuffersize, &pds, &gds, &bms, &bds, &gribrecsize); + if (status >= 0 && gds != NULL) sec2len = (unsigned) ((gds[0] << 16) + (gds[1] << 8) + (gds[3])); + } + + return sec2len; +} + +void * +cgribex_handle_new_from_meassage(void *gribbuffer, size_t gribbuffersize) +{ + cgribex_handle *gh = (cgribex_handle *) Malloc(sizeof(cgribex_handle)); + gh->gribbuffer = NULL; + gh->gribbuffersize = 0; + gh->pds = NULL; + + if (gribbuffersize && gribbuffer) + { + unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL; + long gribrecsize; + int status = grib1Sections((unsigned char *) gribbuffer, (long) gribbuffersize, &pds, &gds, &bms, &bds, &gribrecsize); + if (status >= 0) + { + gh->gribbuffer = gribbuffer; + gh->gribbuffersize = gribbuffersize; + gh->pds = pds; + gh->gds = gds; + gh->bms = bms; + gh->bds = bds; + } + } + + return (void *) gh; +} + +void +cgribex_handle_delete(void *gh) +{ + if (gh) Free(gh); +} + +static int +cgribexGetGridType(int *isec2) +{ + int gridtype = GRID_GENERIC; + + // clang-format off + switch (ISEC2_GridType) + { + case GRIB1_GTYPE_LATLON: { gridtype = GRID_LONLAT; break; } + case GRIB1_GTYPE_LATLON_ROT: { gridtype = GRID_PROJECTION; break; } + case GRIB1_GTYPE_LCC: { gridtype = CDI_PROJ_LCC; break; } + case GRIB1_GTYPE_GAUSSIAN: { gridtype = ISEC2_Reduced ? GRID_GAUSSIAN_REDUCED : GRID_GAUSSIAN; break; } + case GRIB1_GTYPE_SPECTRAL: { gridtype = GRID_SPECTRAL; break; } + case GRIB1_GTYPE_GME: { gridtype = GRID_GME; break; } + } + // clang-format on + + return gridtype; +} + +static bool +cgribexGetIsRotated(int *isec2) +{ + return (ISEC2_GridType == GRIB1_GTYPE_LATLON_ROT); +} + +static bool +cgribexGetZaxisHasBounds(int grb_ltype) +{ + // clang-format off + switch (grb_ltype) + { + case GRIB1_LTYPE_SIGMA_LAYER: + case GRIB1_LTYPE_HYBRID_LAYER: + case GRIB1_LTYPE_LANDDEPTH_LAYER: return true; + } + // clang-format on + + return false; +} + +static int +cgribexGetTimeUnit(int *isec1) +{ + int timeunit = TUNIT_HOUR; + static bool lprint = true; + + // clang-format off + switch ( ISEC1_TimeUnit ) + { + case ISEC1_TABLE4_MINUTE: timeunit = TUNIT_MINUTE; break; + case ISEC1_TABLE4_QUARTER: timeunit = TUNIT_QUARTER; break; + case ISEC1_TABLE4_30MINUTES: timeunit = TUNIT_30MINUTES; break; + case ISEC1_TABLE4_HOUR: timeunit = TUNIT_HOUR; break; + case ISEC1_TABLE4_3HOURS: timeunit = TUNIT_3HOURS; break; + case ISEC1_TABLE4_6HOURS: timeunit = TUNIT_6HOURS; break; + case ISEC1_TABLE4_12HOURS: timeunit = TUNIT_12HOURS; break; + case ISEC1_TABLE4_DAY: timeunit = TUNIT_DAY; break; + default: + if (lprint) + { + Warning("GRIB time unit %d unsupported!", ISEC1_TimeUnit); + lprint = false; + } + break; + } + // clang-format on + + return timeunit; +} + +static bool +cgribexTimeIsFC(int *isec1) +{ + bool isFC = (ISEC1_TimeRange == 10 && ISEC1_TimePeriod1 == 0 && ISEC1_TimePeriod2 == 0) ? false : true; + return isFC; +} + +static int +cgribexGetTsteptype(int timerange) +{ + static bool lprint = true; + + // clang-format off + int tsteptype = TSTEP_INSTANT; + switch ( timerange ) + { + case 0: tsteptype = TSTEP_INSTANT; break; + case 1: tsteptype = TSTEP_INSTANT2; break; + case 2: tsteptype = TSTEP_RANGE; break; + case 3: tsteptype = TSTEP_AVG; break; + case 4: tsteptype = TSTEP_ACCUM; break; + case 5: tsteptype = TSTEP_DIFF; break; + case 10: tsteptype = TSTEP_INSTANT3; break; + default: + if (lprint) + { + Warning("Time range indicator %d unsupported, set to 0!", timerange); + lprint = false; + } + break; + } + // clang-format on + + return tsteptype; +} + +static bool +cgribexGetGridRegular(int *isec2, int *isec4, grid_t *grid, int gridtype, bool compyinc) +{ + const bool ijDirectionIncrementGiven = gribbyte_get_bit(ISEC2_ResFlag, 1); + const bool uvRelativeToGrid = gribbyte_get_bit(ISEC2_ResFlag, 5); + + const size_t nvalues = (size_t) ISEC4_NumValues; + const size_t nlon = (size_t) ISEC2_NumLon; + const size_t nlat = (size_t) ISEC2_NumLat; + if (nvalues != nlon * nlat) Error("numberOfPoints (%zu) and gridSize (%zu) differ!", nvalues, nlon * nlat); + + grid->size = nvalues; + grid->x.size = nlon; + grid->y.size = nlat; + + if (gridtype == GRID_GAUSSIAN) grid->np = ISEC2_NumPar; + grid->x.inc = 0; + grid->y.inc = 0; + grid->x.flag = 0; + // if ( ISEC2_FirstLon != 0 || ISEC2_LastLon != 0 ) + { + if (grid->x.size > 1) + { + bool recompinc = true; + + if (ISEC2_LastLon < ISEC2_FirstLon) + { + if (ISEC2_FirstLon >= 180000) + ISEC2_FirstLon -= 360000; + else + ISEC2_LastLon += 360000; + } + + if (ijDirectionIncrementGiven && ISEC2_LonIncr > 0) + { + if (labs(ISEC2_LastLon - (ISEC2_FirstLon + ISEC2_LonIncr * ((long) grid->x.size - 1))) <= 2) + { + recompinc = false; + grid->x.inc = ISEC2_LonIncr * 0.001; + } + } + + // recompute xinc if necessary + if (recompinc) grid->x.inc = (ISEC2_LastLon - ISEC2_FirstLon) * 0.001 / (grid->x.size - 1); + + // correct xinc if necessary + if (ISEC2_FirstLon == 0 && ISEC2_LastLon > 354000 && ISEC2_LastLon < 360000) + { + double xinc = 360. / grid->x.size; + if (fabs(grid->x.inc - xinc) > 0.0) + { + grid->x.inc = xinc; + if (CDI_Debug) Message("set xinc to %g", grid->x.inc); + } + } + } + grid->x.first = ISEC2_FirstLon * 0.001; + grid->x.last = ISEC2_LastLon * 0.001; + grid->x.flag = 2; + } + grid->y.flag = 0; + // if ( ISEC2_FirstLat != 0 || ISEC2_LastLat != 0 ) + { + if (grid->y.size > 1 && compyinc) + { + bool recompinc = true; + if (ijDirectionIncrementGiven && ISEC2_LatIncr > 0) + { + if (labs(ISEC2_LastLat - (ISEC2_FirstLat + ISEC2_LatIncr * ((long) grid->y.size - 1))) <= 2) + { + recompinc = false; + grid->y.inc = ISEC2_LatIncr * 0.001; + } + } + + // recompute yinc if necessary + if (recompinc) grid->y.inc = (ISEC2_LastLat - ISEC2_FirstLat) * 0.001 / (grid->y.size - 1); + } + grid->y.first = ISEC2_FirstLat * 0.001; + grid->y.last = ISEC2_LastLat * 0.001; + grid->y.flag = 2; + } + + return uvRelativeToGrid; +} + +static bool +cgribexGetGridReduced(int *isec2, int *isec4, grid_t *grid) +{ + const bool ijDirectionIncrementGiven = gribbyte_get_bit(ISEC2_ResFlag, 1); + const bool uvRelativeToGrid = gribbyte_get_bit(ISEC2_ResFlag, 5); + grid->np = ISEC2_NumPar; + grid->size = (size_t) ISEC4_NumValues; + grid->reducedPoints = ISEC2_ReducedPointsPtr; + grid->reducedPointsSize = (size_t) ISEC2_NumLat; + grid->y.size = (size_t) ISEC2_NumLat; + grid->x.inc = 0; + grid->y.inc = 0; + grid->x.flag = 0; + // if ( ISEC2_FirstLon != 0 || ISEC2_LastLon != 0 ) + { + if (ISEC2_LastLon < ISEC2_FirstLon) + { + if (ISEC2_FirstLon >= 180000) + ISEC2_FirstLon -= 360000; + else + ISEC2_LastLon += 360000; + } + + grid->x.first = ISEC2_FirstLon * 0.001; + grid->x.last = ISEC2_LastLon * 0.001; + grid->x.flag = 2; + } + grid->y.flag = 0; + // if ( ISEC2_FirstLat != 0 || ISEC2_LastLat != 0 ) + { + if (grid->y.size > 1) + { + if (ijDirectionIncrementGiven && ISEC2_LatIncr > 0) + grid->y.inc = ISEC2_LatIncr * 0.001; + else + grid->y.inc = (ISEC2_LastLat - ISEC2_FirstLat) * 0.001 / (grid->y.size - 1); + } + grid->y.first = ISEC2_FirstLat * 0.001; + grid->y.last = ISEC2_LastLat * 0.001; + grid->y.flag = 2; + } + + return uvRelativeToGrid; +} + +static bool +cgribexGetGridLCC(int *isec2, int *isec4, grid_t *grid) +{ + const bool uvRelativeToGrid = gribbyte_get_bit(ISEC2_ResFlag, 5); + + const size_t nvalues = (size_t) ISEC4_NumValues; + const size_t nlon = (size_t) ISEC2_NumLon; + const size_t nlat = (size_t) ISEC2_NumLat; + if (nvalues != nlon * nlat) Error("numberOfPoints (%zu) and gridSize (%zu) differ!", nvalues, nlon * nlat); + + grid->size = nvalues; + grid->x.size = nlon; + grid->y.size = nlat; + + grid->x.first = 0; + grid->x.last = 0; + grid->x.inc = ISEC2_Lambert_dx; + grid->y.first = 0; + grid->y.last = 0; + grid->y.inc = ISEC2_Lambert_dy; + grid->x.flag = 2; + grid->y.flag = 2; + + return uvRelativeToGrid; +} + +static bool +cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, int iret) +{ + bool uvRelativeToGrid = false; + bool compyinc = true; + int gridtype = cgribexGetGridType(isec2); + int projtype = (gridtype == GRID_PROJECTION && cgribexGetIsRotated(isec2)) ? CDI_PROJ_RLL : CDI_UNDEFID; + if (gridtype == CDI_PROJ_LCC) + { + projtype = gridtype; + gridtype = GRID_PROJECTION; + } + + if (streamptr->unreduced && gridtype == GRID_GAUSSIAN_REDUCED && iret != -801) + { + int nlon = 0; + for (int ilat = 0; ilat < ISEC2_NumLat; ++ilat) + if (ISEC2_ReducedPoints(ilat) > nlon) nlon = ISEC2_ReducedPoints(ilat); + gridtype = GRID_GAUSSIAN; + ISEC2_NumLon = nlon; + ISEC4_NumValues = nlon * ISEC2_NumLat; + compyinc = false; + } + + grid_init(grid); + cdiGridTypeInit(grid, gridtype, 0); + + if (gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN || projtype == CDI_PROJ_RLL) + { + uvRelativeToGrid = cgribexGetGridRegular(isec2, isec4, grid, gridtype, compyinc); + } + else if (gridtype == GRID_GAUSSIAN_REDUCED) + { + uvRelativeToGrid = cgribexGetGridReduced(isec2, isec4, grid); + } + else if (projtype == CDI_PROJ_LCC) + { + uvRelativeToGrid = cgribexGetGridLCC(isec2, isec4, grid); + } + else if (gridtype == GRID_SPECTRAL) + { + grid->size = (size_t) ISEC4_NumValues; + grid->trunc = ISEC2_PentaJ; + grid->lcomplex = (ISEC2_RepMode == 2) ? 1 : 0; + } + else if (gridtype == GRID_GME) + { + grid->size = (size_t) ISEC4_NumValues; + grid->gme.nd = ISEC2_GME_ND; + grid->gme.ni = ISEC2_GME_NI; + grid->gme.ni2 = ISEC2_GME_NI2; + grid->gme.ni3 = ISEC2_GME_NI3; + } + else if (gridtype == GRID_GENERIC) + { + grid->size = (size_t) ISEC4_NumValues; + grid->x.size = 0; + grid->y.size = 0; + } + else + { + Error("Unsupported grid type: %s", gridNamePtr(gridtype)); + } + + grid->type = gridtype; + grid->projtype = projtype; + + return uvRelativeToGrid; +} + +static void +cgribexGetLevel(int *isec1, int *leveltype, int *level1, int *level2) +{ + *leveltype = ISEC1_LevelType; + *level1 = ISEC1_Level1; + *level2 = ISEC1_Level2; + if (*leveltype == GRIB1_LTYPE_ISOBARIC) + *level1 *= 100; + else if (*leveltype == GRIB1_LTYPE_99 || *leveltype == GRIB1_LTYPE_ISOBARIC_PA) + *leveltype = GRIB1_LTYPE_ISOBARIC; +} + +static void +cgribexDefProjLCC(int *isec2, int gridID) +{ + struct CDI_GridProjParams gpp; + gridProjParamsInit(&gpp); + + const bool earthIsOblate = gribbyte_get_bit(ISEC2_ResFlag, 2); + if (earthIsOblate) + { + gpp.a = 6378160.0; + gpp.b = 6356775.0; + gpp.rf = 297.0; + } + else + { + gpp.a = 6367470.0; + } + + gpp.xval_0 = ISEC2_FirstLon * 0.001; + gpp.yval_0 = ISEC2_FirstLat * 0.001; + gpp.lon_0 = ISEC2_Lambert_Lov * 0.001; + gpp.lat_1 = ISEC2_Lambert_LatS1 * 0.001; + gpp.lat_2 = ISEC2_Lambert_LatS2 * 0.001; + const bool lsouth = gribbyte_get_bit(ISEC2_Lambert_ProjFlag, 1); + if (lsouth) + { + gpp.lat_1 = -gpp.lat_1; + gpp.lat_2 = -gpp.lat_2; + } + + gpp.lat_0 = gpp.lat_2; + + if (proj_lonlat_to_lcc_func) + { + double x_0 = gpp.xval_0, y_0 = gpp.yval_0; + proj_lonlat_to_lcc_func(gpp, (size_t) 1, &x_0, &y_0); + if (IS_NOT_EQUAL(x_0, gpp.mv) && IS_NOT_EQUAL(y_0, gpp.mv)) + { + gpp.x_0 = -x_0; + gpp.y_0 = -y_0; + } + } + + gridDefParamsLCC(gridID, gpp); +} + +static void +cgribexAddRecord(stream_t *streamptr, cgribexrec_t *cgribexp, int param, size_t recsize, off_t position, int comptype, int lmv, + int iret) +{ + int *isec1 = cgribexp->sec1; + int *isec2 = cgribexp->sec2; + int *isec4 = cgribexp->sec4; + double *fsec2 = cgribexp->fsec2; + double *fsec3 = cgribexp->fsec3; + + int datatype = (ISEC4_NumBits > 0 && ISEC4_NumBits <= 32) ? ISEC4_NumBits : CDI_DATATYPE_PACK; + if (datatype > 32) datatype = CDI_DATATYPE_PACK32; + if (datatype < 0) datatype = CDI_DATATYPE_PACK; + + const int vlistID = streamptr->vlistID; + const int tsID = streamptr->curTsID; + const int recID = recordNewEntry(streamptr, tsID); + record_t *record = &streamptr->tsteps[tsID].records[recID]; + + const int tsteptype = cgribexGetTsteptype(ISEC1_TimeRange); + + int leveltype, level1, level2; + cgribexGetLevel(isec1, &leveltype, &level1, &level2); + + // fprintf(stderr, "param %d %d %d %d\n", param, level1, level2, leveltype); + + record->size = recsize; + record->position = position; + record->param = param; + record->ilevel = level1; + record->ilevel2 = level2; + record->ltype = leveltype; + record->tsteptype = (short) tsteptype; + + grid_t *gridptr = (grid_t *) Malloc(sizeof(*gridptr)); + const bool uvRelativeToGrid = cgribexGetGrid(streamptr, isec2, isec4, gridptr, iret); + + struct addIfNewRes gridAdded = cdiVlistAddGridIfNew(vlistID, gridptr, 0); + int gridID = gridAdded.Id; + if (gridAdded.isNew) + { + if (gridptr->reducedPointsSize) + { + const size_t reducedPointsSize = (size_t) gridptr->reducedPointsSize; + int *reducedPoints = gridptr->reducedPoints; + gridptr->reducedPoints = (int *) Malloc(reducedPointsSize * sizeof(int)); + memcpy(gridptr->reducedPoints, reducedPoints, reducedPointsSize * sizeof(int)); + } + else if (gridptr->projtype == CDI_PROJ_RLL) + { + const double xpole = ISEC2_LonSP * 0.001 - 180; + const double ypole = -ISEC2_LatSP * 0.001; + const double angle = -FSEC2_RotAngle; + gridDefParamRLL(gridID, xpole, ypole, angle); + } + else if (gridptr->projtype == CDI_PROJ_LCC) + { + cgribexDefProjLCC(isec2, gridID); + } + } + else + { + grid_free(gridptr); + Free(gridptr); + } + + const int zaxistype = grib1ltypeToZaxisType(leveltype); + if (zaxistype == ZAXIS_HYBRID || zaxistype == ZAXIS_HYBRID_HALF) + { + const size_t vctsize = (size_t) ISEC2_NumVCP; + double *vctptr = &fsec2[10]; + varDefVCT(vctsize, vctptr); + } + + const bool lbounds = cgribexGetZaxisHasBounds(leveltype); + + int varID = 0, levelID = 0; + varAddRecord(recID, param, gridID, zaxistype, lbounds, level1, level2, 0, 0, datatype, &varID, &levelID, tsteptype, leveltype, -1, + NULL, NULL, NULL, NULL); + + record->varID = (short) varID; + record->levelID = levelID; + + varDefCompType(varID, comptype); + + if (uvRelativeToGrid) varDefKeyInt(varID, CDI_KEY_UVRELATIVETOGRID, 1); + + if (ISEC1_LocalFLag) + { + if (ISEC1_CenterID == 78 && isec1[36] == 253) // DWD local extension + { + varDefKeyInt(varID, CDI_KEY_TYPEOFENSEMBLEFORECAST, isec1[52]); + varDefKeyInt(varID, CDI_KEY_NUMBEROFFORECASTSINENSEMBLE, isec1[53]); + varDefKeyInt(varID, CDI_KEY_PERTURBATIONNUMBER, isec1[54]); + } + else if (ISEC1_CenterID == 252 && isec1[36] == 1) // MPIM local extension + { + varDefKeyInt(varID, CDI_KEY_TYPEOFENSEMBLEFORECAST, isec1[37]); + varDefKeyInt(varID, CDI_KEY_NUMBEROFFORECASTSINENSEMBLE, isec1[39]); + varDefKeyInt(varID, CDI_KEY_PERTURBATIONNUMBER, isec1[38]); + } + } + + if (lmv) varDefMissval(varID, FSEC3_MissVal); + + if (varInqInst(varID) == CDI_UNDEFID) + { + const int center = ISEC1_CenterID; + const int subcenter = ISEC1_SubCenterID; + int instID = institutInq(center, subcenter, NULL, NULL); + if (instID == CDI_UNDEFID) instID = institutDef(center, subcenter, NULL, NULL); + varDefInst(varID, instID); + } + + if (varInqModel(varID) == CDI_UNDEFID) + { + int modelID = modelInq(varInqInst(varID), ISEC1_ModelID, NULL); + if (modelID == CDI_UNDEFID) modelID = modelDef(varInqInst(varID), ISEC1_ModelID, NULL); + varDefModel(varID, modelID); + } + + if (varInqTable(varID) == CDI_UNDEFID) + { + int tableID = tableInq(varInqModel(varID), ISEC1_CodeTable, NULL); + if (tableID == CDI_UNDEFID) tableID = tableDef(varInqModel(varID), ISEC1_CodeTable, NULL); + varDefTable(varID, tableID); + } + + streamptr->tsteps[tsID].nallrecs++; + streamptr->nrecs++; +} + +static void +MCH_get_undef(int *isec1, double *undef_pds, double *undef_eps) +{ + /* 2010-01-13: Oliver Fuhrer */ + if (ISEC1_CenterID == 215) + { + if (isec1[34] != 0 && isec1[34] != 255) + { + if (isec1[34] & 2) + { + *undef_pds = ((isec1[34] & 1) ? -0.99 : +0.99) * pow(10.0, -isec1[35]); + *undef_eps = pow(10.0, -isec1[35] - 1); + } + else + { + *undef_pds = ((isec1[34] & 1) ? -0.99 : +0.99) * pow(10.0, +isec1[35]); + *undef_eps = pow(10.0, isec1[35] - 1); + } + } + } +} + +static void +cgribexDecodeHeader(cgribexrec_t *cgribexp, int *gribbuffer, int recsize, int *lmv, int *iret) +{ + int *isec0 = cgribexp->sec0; + int *isec1 = cgribexp->sec1; + int *isec2 = cgribexp->sec2; + int *isec3 = cgribexp->sec3; + int *isec4 = cgribexp->sec4; + double *fsec2 = cgribexp->fsec2; + double *fsec3 = cgribexp->fsec3; + + int ipunp = 0, iword = 0; + + fill_intarr(isec1, 0, 256); + fill_intarr(isec2, 0, 32); + + double *fsec4 = NULL; + gribExDP(isec0, isec1, isec2, fsec2, isec3, fsec3, isec4, fsec4, ipunp, (int *) gribbuffer, recsize, &iword, "J", iret); + + if (!(ISEC1_Sec2Or3Flag & 128)) isec2[0] = -1; // default generic grid + + *lmv = 0; + + if (ISEC1_CenterID == 215 && (isec1[34] != 0 && isec1[34] != 255)) + { + double undef_pds, undef_eps; + MCH_get_undef(isec1, &undef_pds, &undef_eps); + FSEC3_MissVal = undef_pds; + *lmv = 1; + } +} + +static compvar_t +cgribexVarSet(int param, int level1, int level2, int leveltype, int trange) +{ + int tsteptype = cgribexGetTsteptype(trange); + + compvar_t compVar; + compVar.param = param; + compVar.level1 = level1; + compVar.level2 = level2; + compVar.ltype = leveltype; + compVar.tsteptype = tsteptype; + + return compVar; +} + +static inline int +cgribexVarCompare(compvar_t compVar, record_t record, int flag) +{ + bool vinst = compVar.tsteptype == TSTEP_INSTANT || compVar.tsteptype == TSTEP_INSTANT2 || compVar.tsteptype == TSTEP_INSTANT3; + bool rinst = record.tsteptype == TSTEP_INSTANT || record.tsteptype == TSTEP_INSTANT2 || record.tsteptype == TSTEP_INSTANT3; + int tstepDiff = (!((flag == 0) & (vinst && rinst))) & (compVar.tsteptype != record.tsteptype); + int rstatus = (compVar.param != record.param) | (compVar.level1 != record.ilevel) | (compVar.level2 != record.ilevel2) + | (compVar.ltype != record.ltype) | tstepDiff; + return rstatus; +} + +#define gribWarning(text, nrecs, timestep, paramstr, level1, level2) \ + Warning("Record %2d (id=%s lev1=%d lev2=%d) timestep %d: %s", nrecs, paramstr, level1, level2, timestep, text) + +static void +cgribexSkipRecords(const int fileID) +{ + int nskip = CDI_Skip_Records; + while (nskip-- > 0) + { + const size_t recsize = gribGetSize(fileID); + if (recsize == 0) Error("Skipping of %d records failed!", CDI_Skip_Records); + + const off_t recpos = fileGetPos(fileID); + fileSetPos(fileID, recpos, SEEK_CUR); + } +} + +static CdiDateTime +cgribexDateTimeX(int *isec1, CdiDateTime *sDateTime) +{ + int vdate = 0, sdate = 0, vtime = 0, stime = 0; + gribDateTimeX(isec1, &vdate, &vtime, &sdate, &stime); + + sDateTime->date = cdiDate_set(sdate); + sDateTime->time = cdiTime_set(stime); + + return cdiDateTime_set(vdate, vtime); +} + +int +cgribexScanTimestep1(stream_t *streamptr) +{ + CdiDateTime vDateTime0; + cdiDateTime_init(&vDateTime0); + int lmv = 0, iret = 0; + off_t recpos = 0; + void *gribbuffer = NULL; + size_t buffersize = 0; + int leveltype = 0, level1 = 0, level2 = 0; + unsigned recID; + int nrecsScanned = 0; + bool warn_time = true; + bool warn_numavg = true; + bool fcast = false; + char paramstr[32]; + + streamptr->curTsID = 0; + + cgribexrec_t *cgribexp = (cgribexrec_t *) streamptr->record->objectp; + + const int tsID = tstepsNewEntry(streamptr); + if (tsID != 0) Error("Internal problem! tstepsNewEntry returns %d", tsID); + + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + const int fileID = streamptr->fileID; + + if (CDI_Skip_Records) cgribexSkipRecords(fileID); + + unsigned nrecs = 0; + while (true) + { + const size_t recsize = gribGetSize(fileID); + recpos = fileGetPos(fileID); + + if (recsize == 0) + { + if (nrecs == 0) Error("No GRIB records found!"); + streamptr->ntsteps = 1; + break; + } + + ensureBufferSize(recsize, &buffersize, &gribbuffer); + + size_t readsize = recsize; + // Search for next 'GRIB', read the following record, and position file offset after it. + if (gribRead(fileID, gribbuffer, &readsize)) break; + + const int comptype = grbDecompress(recsize, &buffersize, &gribbuffer); + + const size_t sec2len = cgribexSection2Length(gribbuffer, buffersize); + if (sec2len > cgribexp->sec2len) + { + cgribexp->sec2len = sec2len; + cgribexp->sec2 = (int *) Realloc(cgribexp->sec2, sec2len * sizeof(int)); + } + + int *isec1 = cgribexp->sec1; + + nrecsScanned++; + cgribexDecodeHeader(cgribexp, (int *) gribbuffer, (int) recsize, &lmv, &iret); + + const int param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255); + cdiParamToString(param, paramstr, sizeof(paramstr)); + + cgribexGetLevel(isec1, &leveltype, &level1, &level2); + + CdiDateTime sDateTime; + const CdiDateTime vDateTime = cgribexDateTimeX(isec1, &sDateTime); + + if (nrecs == 0) + { + vDateTime0 = vDateTime; + fcast = cgribexTimeIsFC(isec1); + taxis->unit = cgribexGetTimeUnit(isec1); + taxis->rDateTime = cdiDateTime_set(gribRefDate(isec1), gribRefTime(isec1)); + taxis->sDateTime = sDateTime; + taxis->vDateTime = vDateTime; + } + else + { + if (cdiDateTime_isLT(sDateTime, taxis->sDateTime)) taxis->sDateTime = sDateTime; + + compvar_t compVar = cgribexVarSet(param, level1, level2, leveltype, ISEC1_TimeRange); + record_t *records = streamptr->tsteps[tsID].records; + for (recID = 0; recID < nrecs; recID++) + { + if (cgribexVarCompare(compVar, records[recID], 0) == 0) break; + } + + if (CDI_Inventory_Mode == 1) + { + if (recID < nrecs) break; + if (warn_time) + if (cdiDateTime_isNE(vDateTime, vDateTime0)) + { + gribWarning("Inconsistent verification time!", nrecsScanned, tsID + 1, paramstr, level1, level2); + warn_time = false; + } + } + else + { + if (cdiDateTime_isNE(vDateTime, vDateTime0)) break; + + if (recID < nrecs) + { + gribWarning("Parameter already exist, skipped!", nrecsScanned, tsID + 1, paramstr, level1, level2); + continue; + } + } + } + + if (ISEC1_AvgNum) + { + if (taxis->numavg && warn_numavg && (taxis->numavg != ISEC1_AvgNum)) + { + Warning("Changing numavg from %d to %d not supported!", taxis->numavg, ISEC1_AvgNum); + warn_numavg = false; + } + else + { + taxis->numavg = ISEC1_AvgNum; + } + } + + nrecs++; + + if (CDI_Debug) + Message("Read record %2d (id=%s lev1=%d lev2=%d) %s", nrecsScanned, paramstr, level1, level2, + CdiDateTime_string(vDateTime)); + + cgribexAddRecord(streamptr, cgribexp, param, recsize, recpos, comptype, lmv, iret); + } + + streamptr->rtsteps = 1; + + if (nrecs == 0) return CDI_EUFSTRUCT; + + cdi_generate_vars(streamptr); + + taxis->type = fcast ? TAXIS_RELATIVE : TAXIS_ABSOLUTE; + const int taxisID = taxisCreate(taxis->type); + + const int vlistID = streamptr->vlistID; + vlistDefTaxis(vlistID, taxisID); + + streamScanResizeRecords1(streamptr); + + streamptr->record->buffer = gribbuffer; + streamptr->record->buffersize = buffersize; + + streamScanTsFixNtsteps(streamptr, recpos); + streamScanTimeConstAdjust(streamptr, taxis); + + return 0; +} + +int +cgribexScanTimestep2(stream_t *streamptr) +{ + CdiDateTime vDateTime0; + cdiDateTime_init(&vDateTime0); + int lmv = 0, iret = 0; + off_t recpos = 0; + int leveltype = 0, level1 = 0, level2 = 0; + int recID = 0; + bool warn_numavg = true; + char paramstr[32]; + + streamptr->curTsID = 1; + + cgribexrec_t *cgribexp = (cgribexrec_t *) streamptr->record->objectp; + int *isec1 = cgribexp->sec1; + int *isec2 = cgribexp->sec2; + + const int fileID = streamptr->fileID; + const int vlistID = streamptr->vlistID; + + void *gribbuffer = streamptr->record->buffer; + size_t buffersize = streamptr->record->buffersize; + + int tsID = streamptr->rtsteps; + if (tsID != 1) Error("Internal problem! unexpected timestep %d", tsID + 1); + + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + const int nrecords = streamScanInitRecords2(streamptr); + + int nrecsScanned = nrecords; + int rindex = 0; + while (true) + { + if (rindex > nrecords) break; + + const size_t recsize = gribGetSize(fileID); + recpos = fileGetPos(fileID); + if (recsize == 0) + { + streamptr->ntsteps = 2; + break; + } + + ensureBufferSize(recsize, &buffersize, &gribbuffer); + + size_t readsize = recsize; + if (gribRead(fileID, gribbuffer, &readsize)) break; + + grbDecompress(recsize, &buffersize, &gribbuffer); + + nrecsScanned++; + cgribexDecodeHeader(cgribexp, (int *) gribbuffer, (int) recsize, &lmv, &iret); + + const int param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255); + cdiParamToString(param, paramstr, sizeof(paramstr)); + + cgribexGetLevel(isec1, &leveltype, &level1, &level2); + + CdiDateTime sDateTime; + const CdiDateTime vDateTime = cgribexDateTimeX(isec1, &sDateTime); + + if (rindex == 0) + { + vDateTime0 = vDateTime; + const int taxisID = vlistInqTaxis(vlistID); + if (taxisInqType(taxisID) == TAXIS_RELATIVE) + { + taxis->type = TAXIS_RELATIVE; + taxis->rDateTime = cdiDateTime_set(gribRefDate(isec1), gribRefTime(isec1)); + } + else + { + taxis->type = TAXIS_ABSOLUTE; + } + taxis->unit = cgribexGetTimeUnit(isec1); + taxis->vDateTime = vDateTime; + taxis->sDateTime = sDateTime; + } + else + { + if (cdiDateTime_isLT(sDateTime, taxis->sDateTime)) taxis->sDateTime = sDateTime; + } + + const int tsteptype = cgribexGetTsteptype(ISEC1_TimeRange); + + if (ISEC1_AvgNum) + { + if (taxis->numavg && warn_numavg && (taxis->numavg != ISEC1_AvgNum)) + warn_numavg = false; + else + taxis->numavg = ISEC1_AvgNum; + } + + compvar_t compVar = cgribexVarSet(param, level1, level2, leveltype, ISEC1_TimeRange); + + for (recID = 0; recID < nrecords; recID++) + { + if (cgribexVarCompare(compVar, records[recID], 0) == 0) break; + } + + if (recID == nrecords) + { + gribWarning("Parameter not defined at timestep 1!", nrecsScanned, tsID + 1, paramstr, level1, level2); + return CDI_EUFSTRUCT; + } + + if (CDI_Inventory_Mode == 1) + { + if (records[recID].used) + { + break; + } + else + { + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + } + } + else + { + if (records[recID].used) + { + if (cdiDateTime_isNE(vDateTime, vDateTime0)) break; + + gribWarning("Parameter already exist, skipped!", nrecsScanned, tsID + 1, paramstr, level1, level2); + continue; + } + else + { + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + } + } + + if (CDI_Debug) + Message("Read record %2d (id=%s lev1=%d lev2=%d) %s", nrecsScanned, paramstr, level1, level2, + CdiDateTime_string(vDateTime)); + + if (cgribexVarCompare(compVar, streamptr->tsteps[tsID].records[recID], 0) != 0) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, level1); + return CDI_EUFSTRUCT; + } + + records[recID].position = recpos; + records[recID].size = recsize; + + const int varID = records[recID].varID; + const int gridID = vlistInqVarGrid(vlistID, varID); + if (gridInqSize(gridID) == 1 && gridInqType(gridID) == GRID_LONLAT) + { + if (IS_NOT_EQUAL(gridInqXval(gridID, 0), ISEC2_FirstLon * 0.001) + || IS_NOT_EQUAL(gridInqYval(gridID, 0), ISEC2_FirstLat * 0.001)) + gridChangeType(gridID, GRID_TRAJECTORY); + } + + if (tsteptype != TSTEP_INSTANT2 && tsteptype != vlistInqVarTsteptype(vlistID, varID)) + vlistDefVarTsteptype(vlistID, varID, tsteptype); + + rindex++; + } + + int nrecs = 0; + for (recID = 0; recID < nrecords; recID++) + { + if (records[recID].used) + nrecs++; + else + vlistDefVarTimetype(vlistID, records[recID].varID, TIME_CONSTANT); + } + streamptr->tsteps[tsID].nrecs = nrecs; + + streamptr->rtsteps = 2; + + streamScanTsFixNtsteps(streamptr, recpos); + + streamptr->record->buffer = gribbuffer; + streamptr->record->buffersize = buffersize; + + return 0; +} + +int +cgribexScanTimestep(stream_t *streamptr) +{ + CdiDateTime vDateTime0; + cdiDateTime_init(&vDateTime0); + int lmv = 0, iret = 0; + off_t recpos = 0; + int leveltype = 0, level1 = 0, level2 = 0; + int vrecID, recID = 0; + bool warn_numavg = true; + int nrecs = 0; + char paramstr[32]; + + cgribexrec_t *cgribexp = (cgribexrec_t *) streamptr->record->objectp; + int *isec1 = cgribexp->sec1; + + int tsID = streamptr->rtsteps; + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + if (streamptr->tsteps[tsID].recordSize == 0) + { + void *gribbuffer = streamptr->record->buffer; + size_t buffersize = streamptr->record->buffersize; + + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + nrecs = streamScanInitRecords(streamptr, tsID); + + const int fileID = streamptr->fileID; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + int nrecsScanned = streamptr->tsteps[0].nallrecs + streamptr->tsteps[1].nrecs * (tsID - 1); + int rindex = 0; + while (true) + { + if (rindex > nrecs) break; + + const size_t recsize = gribGetSize(fileID); + recpos = fileGetPos(fileID); + if (recsize == 0) + { + streamptr->ntsteps = streamptr->rtsteps + 1; + break; + } + + ensureBufferSize(recsize, &buffersize, &gribbuffer); + + size_t readsize = recsize; + if (gribRead(fileID, gribbuffer, &readsize)) + { + Warning("Inconsistent timestep %d (GRIB record %d/%d)!", tsID + 1, rindex + 1, streamptr->tsteps[tsID].recordSize); + break; + } + + grbDecompress(recsize, &buffersize, &gribbuffer); + + nrecsScanned++; + cgribexDecodeHeader(cgribexp, (int *) gribbuffer, (int) recsize, &lmv, &iret); + + const int param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255); + cdiParamToString(param, paramstr, sizeof(paramstr)); + + cgribexGetLevel(isec1, &leveltype, &level1, &level2); + + CdiDateTime sDateTime; + const CdiDateTime vDateTime = cgribexDateTimeX(isec1, &sDateTime); + + if (rindex == nrecs) break; + + if (rindex == 0) + { + vDateTime0 = vDateTime; + const int vlistID = streamptr->vlistID; + const int taxisID = vlistInqTaxis(vlistID); + if (taxisInqType(taxisID) == TAXIS_RELATIVE) + { + taxis->type = TAXIS_RELATIVE; + taxis->rDateTime = cdiDateTime_set(gribRefDate(isec1), gribRefTime(isec1)); + } + else + { + taxis->type = TAXIS_ABSOLUTE; + } + taxis->unit = cgribexGetTimeUnit(isec1); + taxis->vDateTime = vDateTime; + taxis->sDateTime = sDateTime; + } + else + { + if (cdiDateTime_isLT(sDateTime, taxis->sDateTime)) taxis->sDateTime = sDateTime; + } + + if (ISEC1_AvgNum) + { + if (taxis->numavg && warn_numavg && (taxis->numavg != ISEC1_AvgNum)) + warn_numavg = false; + else + taxis->numavg = ISEC1_AvgNum; + } + + compvar_t compVar = cgribexVarSet(param, level1, level2, leveltype, ISEC1_TimeRange); + + for (vrecID = 0; vrecID < nrecs; vrecID++) + { + recID = streamptr->tsteps[1].recIDs[vrecID]; + if (cgribexVarCompare(compVar, records[recID], 0) == 0) break; + } + + if (vrecID == nrecs) + { + gribWarning("Parameter not defined at timestep 1!", nrecsScanned, tsID + 1, paramstr, level1, level2); + + if (CDI_Inventory_Mode == 1) + return CDI_EUFSTRUCT; + else + continue; + } + + if (CDI_Inventory_Mode == 1) + { + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + } + else + { + if (records[recID].used) + { + char paramstr_[32]; + cdiParamToString(param, paramstr_, sizeof(paramstr_)); + + if (cdiDateTime_isNE(vDateTime, vDateTime0)) break; + + if (CDI_Debug) + gribWarning("Parameter already exist, skipped!", nrecsScanned, tsID + 1, paramstr_, level1, level2); + + continue; + } + else + { + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + } + } + + if (CDI_Debug) + Message("Read record %2d (id=%s lev1=%d lev2=%d) %s", nrecsScanned, paramstr, level1, level2, + CdiDateTime_string(vDateTime)); + + if (cgribexVarCompare(compVar, records[recID], 0) != 0) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, level1); + Error("Invalid, unsupported or inconsistent record structure"); + } + + records[recID].position = recpos; + records[recID].size = recsize; + + rindex++; + } + + for (vrecID = 0; vrecID < nrecs; vrecID++) + { + recID = streamptr->tsteps[tsID].recIDs[vrecID]; + if (!records[recID].used) break; + } + + if (vrecID < nrecs) + { + cdiParamToString(records[recID].param, paramstr, sizeof(paramstr)); + gribWarning("Parameter not found!", nrecsScanned, tsID + 1, paramstr, records[recID].ilevel, records[recID].ilevel2); + return CDI_EUFSTRUCT; + } + + streamptr->rtsteps++; + + if (streamptr->ntsteps != streamptr->rtsteps) + { + tsID = tstepsNewEntry(streamptr); + if (tsID != streamptr->rtsteps) Error("Internal error. tsID = %d", tsID); + + streamptr->tsteps[tsID - 1].next = true; + streamptr->tsteps[tsID].position = recpos; + } + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + streamptr->tsteps[tsID].position = recpos; + + streamptr->record->buffer = gribbuffer; + streamptr->record->buffersize = buffersize; + } + + if (nrecs > 0 && nrecs < streamptr->tsteps[tsID].nrecs) + { + Warning("Incomplete timestep. Stop scanning at timestep %d.", tsID); + streamptr->ntsteps = tsID; + } + + return streamptr->ntsteps; +} + +#ifdef gribWarning +#undef gribWarning +#endif + +int +cgribexDecode(int memtype, void *cgribex, void *gribbuffer, size_t gribsize, void *data, size_t datasize, int unreduced, + size_t *nmiss, double missval) +{ + int status = 0; + + bool lalloc = cgribex == NULL; + cgribexrec_t *cgribexp = (cgribexrec_t *) (lalloc ? cgribexNew() : cgribex); + + int *isec0 = cgribexp->sec0; + int *isec1 = cgribexp->sec1; + int *isec2 = cgribexp->sec2; + int *isec3 = cgribexp->sec3; + int *isec4 = cgribexp->sec4; + double *fsec2 = cgribexp->fsec2; + double *fsec3 = cgribexp->fsec3; + float fsec2f[sizeof(cgribexp->fsec2) / sizeof(double)]; + float fsec3f[sizeof(cgribexp->fsec3) / sizeof(double)]; + + char hoper[2]; + strcpy(hoper, unreduced ? "R" : "D"); + + FSEC3_MissVal = missval; + + int iret = 0, iword = 0; + if (memtype == MEMTYPE_FLOAT) + gribExSP(isec0, isec1, isec2, fsec2f, isec3, fsec3f, isec4, (float *) data, (int) datasize, (int *) gribbuffer, (int) gribsize, + &iword, hoper, &iret); + else + gribExDP(isec0, isec1, isec2, fsec2, isec3, fsec3, isec4, (double *) data, (int) datasize, (int *) gribbuffer, (int) gribsize, + &iword, hoper, &iret); + + *nmiss = (ISEC1_Sec2Or3Flag & 64) ? ISEC4_NumValues - ISEC4_NumNonMissValues : 0; + + if (ISEC1_CenterID == 215 && (isec1[34] != 0 && isec1[34] != 255)) + { + double undef_pds, undef_eps; + MCH_get_undef(isec1, &undef_pds, &undef_eps); + + *nmiss = 0; + if (memtype == MEMTYPE_FLOAT) + { + float *restrict dataf = (float *) data; + for (size_t i = 0; i < datasize; i++) + if ((fabs(dataf[i] - undef_pds) < undef_eps) || IS_EQUAL(dataf[i], FSEC3_MissVal)) + { + dataf[i] = (float) missval; + (*nmiss)++; + } + } + else + { + double *restrict datad = (double *) data; + for (size_t i = 0; i < datasize; i++) + if ((fabs(datad[i] - undef_pds) < undef_eps) || IS_EQUAL(datad[i], FSEC3_MissVal)) + { + datad[i] = missval; + (*nmiss)++; + } + } + } + + if (lalloc) cgribexDelete(cgribexp); + + return status; +} + +static void +cgribexDefInstitut(int *isec1, int vlistID, int varID) +{ + int instID = (vlistInqInstitut(vlistID) != CDI_UNDEFID) ? vlistInqInstitut(vlistID) : vlistInqVarInstitut(vlistID, varID); + if (instID != CDI_UNDEFID) + { + ISEC1_CenterID = institutInqCenter(instID); + ISEC1_SubCenterID = institutInqSubcenter(instID); + } +} + +static void +cgribexDefModel(int *isec1, int vlistID, int varID) +{ + int modelID = (vlistInqModel(vlistID) != CDI_UNDEFID) ? vlistInqModel(vlistID) : vlistInqVarModel(vlistID, varID); + if (modelID != CDI_UNDEFID) ISEC1_ModelID = modelInqGribID(modelID); +} + +static void +cgribexDefParam(int *isec1, int param) +{ + int pdis, pcat, pnum; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + if (pnum < 0) pnum = -pnum; + + static bool lwarn_pdis = true; + if (pdis != 255 && lwarn_pdis) + { + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat); + lwarn_pdis = false; + } + + static bool lwarn_pnum = true; + if (pnum > 255 && lwarn_pnum) + { + Warning("Parameter number %d out of range (1-255), set to %d!", pnum, pnum % 256); + lwarn_pnum = false; + pnum = pnum % 256; + } + + ISEC1_CodeTable = pcat; + ISEC1_Parameter = pnum; +} + +static int +cgribexDefTimerange(int tsteptype, int factor, int calendar, CdiDateTime rDateTime, CdiDateTime vDateTime, CdiDateTime sDateTime, + int *pip1, int *pip2) +{ + JulianDate julianDate1 = julianDate_encode(calendar, rDateTime); + JulianDate julianDate2 = julianDate_encode(calendar, vDateTime); + const JulianDate julianDate = julianDate_sub(julianDate2, julianDate1); + + int timerange = -1; + int ip1 = 0, ip2 = 0; + if (!(int) (fmod(julianDate_to_seconds(julianDate), factor))) + { + const int ip = (int) lround(julianDate_to_seconds(julianDate) / factor); + if ((ip > 255) && (tsteptype == TSTEP_INSTANT)) tsteptype = TSTEP_INSTANT3; + + int ipx = 0; + if (!cdiDateTime_isNull(sDateTime) + && (tsteptype == TSTEP_RANGE || tsteptype == TSTEP_AVG || tsteptype == TSTEP_ACCUM || tsteptype == TSTEP_DIFF)) + { + julianDate2 = julianDate_encode(calendar, sDateTime); + ipx = (int) lround(julianDate_to_seconds(julianDate_sub(julianDate2, julianDate1)) / factor); + } + + // clang-format off + switch (tsteptype) + { + case TSTEP_INSTANT: timerange = 0; ip1 = ip; ip2 = 0; break; + case TSTEP_INSTANT2: timerange = 1; ip1 = 0; ip2 = 0; break; + case TSTEP_RANGE: timerange = 2; ip1 = 0; ip2 = ip; break; + case TSTEP_AVG: timerange = 3; ip1 = 0; ip2 = ip; break; + case TSTEP_ACCUM: timerange = 4; ip1 = ipx; ip2 = ip; break; + case TSTEP_DIFF: timerange = 5; ip1 = 0; ip2 = ip; break; + case TSTEP_INSTANT3: + default: timerange = 10; ip1 = ip/256; ip2 = ip%256; break; + } + // clang-format on + } + + *pip1 = ip1; + *pip2 = ip2; + + return timerange; +} + +static int +cgribexDefDateTime(int *isec1, int timeunit, CdiDateTime dt) +{ + int year, month, day, hour, minute, second, ms; + cdiDate_decode(dt.date, &year, &month, &day); + cdiTime_decode(dt.time, &hour, &minute, &second, &ms); + + int century = year / 100; + + ISEC1_Year = year - century * 100; + + if (year < 0) + { + century = -century; + ISEC1_Year = -ISEC1_Year; + } + + if (ISEC1_Year == 0) + { + century -= 1; + ISEC1_Year = 100; + } + + century += 1; + if (year < 0) century = -century; + + ISEC1_Month = month; + ISEC1_Day = day; + ISEC1_Hour = hour; + ISEC1_Minute = minute; + + ISEC1_Century = century; + + int factor = 1; + // clang-format off + switch (timeunit) + { + case TUNIT_MINUTE: factor = 60; ISEC1_TimeUnit = ISEC1_TABLE4_MINUTE; break; + case TUNIT_QUARTER: factor = 900; ISEC1_TimeUnit = ISEC1_TABLE4_QUARTER; break; + case TUNIT_30MINUTES: factor = 1800; ISEC1_TimeUnit = ISEC1_TABLE4_30MINUTES; break; + case TUNIT_HOUR: factor = 3600; ISEC1_TimeUnit = ISEC1_TABLE4_HOUR; break; + case TUNIT_3HOURS: factor = 10800; ISEC1_TimeUnit = ISEC1_TABLE4_3HOURS; break; + case TUNIT_6HOURS: factor = 21600; ISEC1_TimeUnit = ISEC1_TABLE4_6HOURS; break; + case TUNIT_12HOURS: factor = 43200; ISEC1_TimeUnit = ISEC1_TABLE4_12HOURS; break; + case TUNIT_DAY: factor = 86400; ISEC1_TimeUnit = ISEC1_TABLE4_DAY; break; + default: factor = 3600; ISEC1_TimeUnit = ISEC1_TABLE4_HOUR; break; + } + // clang-format on + + return factor; +} + +static void +cgribexDefTime(int *isec1, CdiDateTime vDateTime, int tsteptype, int numavg, int taxisID) +{ + int timetype = TAXIS_ABSOLUTE; + int timeunit = TUNIT_HOUR; + + if (taxisID != -1) + { + timetype = taxisInqType(taxisID); + timeunit = taxisInqTunit(taxisID); + } + + if (timetype == TAXIS_RELATIVE) + { + const int calendar = taxisInqCalendar(taxisID); + + CdiDateTime rDateTime = taxisInqRdatetime(taxisID); + if (cdiDateTime_isLT(vDateTime, rDateTime)) rDateTime = vDateTime; + + CdiDateTime sDateTime = taxisInqSdatetime(taxisID); + + int factor = cgribexDefDateTime(isec1, timeunit, rDateTime); + int ip1 = 0, ip2 = 0; + int timerange = cgribexDefTimerange(tsteptype, factor, calendar, rDateTime, vDateTime, sDateTime, &ip1, &ip2); + + if (ip2 > 0xFF && timeunit < TUNIT_YEAR) + { + timeunit++; + factor = cgribexDefDateTime(isec1, timeunit, rDateTime); + timerange = cgribexDefTimerange(tsteptype, factor, calendar, rDateTime, vDateTime, sDateTime, &ip1, &ip2); + } + + if (timerange == -1 || timerange == 1 || timerange == 3) timetype = TAXIS_ABSOLUTE; + /* + else if ( timerange == 10 ) + { + if ( ip1 < 0 || ip1 > 0xFFFF ) timetype = TAXIS_ABSOLUTE; + if ( ip2 < 0 || ip2 > 0xFFFF ) timetype = TAXIS_ABSOLUTE; + } + */ + else + { + if (ip1 < 0 || ip1 > 0xFF) timetype = TAXIS_ABSOLUTE; + if (ip2 < 0 || ip2 > 0xFF) timetype = TAXIS_ABSOLUTE; + } + /* + static bool lwarn = true; + if ( lwarn && timetype == TAXIS_ABSOLUTE ) + { + lwarn = false; + Warning("Can't store forecast time %d %d relative to %d %d, converted to absolute time!", vdate, vtime, rdate, rtime); + } + */ + ISEC1_TimeRange = timerange; + ISEC1_TimePeriod1 = ip1; + ISEC1_TimePeriod2 = ip2; + } + + if (timetype == TAXIS_ABSOLUTE) + { + (void) cgribexDefDateTime(isec1, timeunit, vDateTime); + + /* + if ( numavg > 0 ) + ISEC1_TimeRange = 0; + else + */ + if (ISEC1_TimeRange != 3) ISEC1_TimeRange = 10; + + ISEC1_TimePeriod1 = 0; + ISEC1_TimePeriod2 = 0; + } + + ISEC1_AvgNum = numavg; + ISEC1_AvgMiss = 0; + ISEC1_DecScaleFactor = 0; +} + +static void +cgribexDefGridRegular(int *isec2, double *fsec2, int gridID, int gridtype, bool gridIsRotated, bool gridIsCurvilinear, + int uvRelativeToGrid) +{ + if (gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED) + ISEC2_GridType = GRIB1_GTYPE_GAUSSIAN; + else if (gridtype == GRID_LONLAT && gridIsRotated) + ISEC2_GridType = GRIB1_GTYPE_LATLON_ROT; + else + ISEC2_GridType = GRIB1_GTYPE_LATLON; + + double xfirst = 0.0, xlast = 0.0, xinc = 0.0; + double yfirst = 0.0, ylast = 0.0, yinc = 0.0; + + int nlon = (int) gridInqXsize(gridID); + int nlat = (int) gridInqYsize(gridID); + + if (gridtype == GRID_GAUSSIAN_REDUCED) + { + ISEC2_Reduced = true; + if (nlon == 2) + { + xfirst = gridInqXval(gridID, 0); + xlast = gridInqXval(gridID, 1); + } + else + { + xlast = 360.0 - 360.0 / (nlat * 2); + } + + nlon = 0; + gridInqReducedPoints(gridID, ISEC2_ReducedPointsPtr); + } + else + { + if (nlon == 0) + nlon = 1; + else + { + xfirst = gridInqXval(gridID, 0); + xlast = gridInqXval(gridID, (gridIsCurvilinear ? nlon * nlat : nlon) - 1); + xinc = fabs(gridInqXinc(gridID)); + } + } + + if (nlat == 0) + nlat = 1; + else + { + yfirst = gridInqYval(gridID, 0); + ylast = gridInqYval(gridID, (gridIsCurvilinear ? nlon * nlat : nlat) - 1); + yinc = fabs(gridInqYinc(gridID)); + } + + ISEC2_NumLon = nlon; + ISEC2_NumLat = nlat; + ISEC2_FirstLat = (int) lround(yfirst * 1000); + ISEC2_LastLat = (int) lround(ylast * 1000); + ISEC2_FirstLon = (int) lround(xfirst * 1000); + ISEC2_LastLon = (int) lround(xlast * 1000); + // gribapi gridType detector doesn't like lonIncr for Gaussian reduced longitides + if (gridtype != GRID_GAUSSIAN_REDUCED) ISEC2_LonIncr = (int) lround(xinc * 1000); + + if (gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED) + { + int np = gridInqNP(gridID); + if (np == 0) np = nlat / 2; + ISEC2_NumPar = np; + } + else + { + ISEC2_LatIncr = (int) lround(yinc * 1000); + } + + if (ISEC2_NumLon > 1 && ISEC2_NumLat == 1) + if (ISEC2_LonIncr != 0 && ISEC2_LatIncr == 0) ISEC2_LatIncr = ISEC2_LonIncr; + + if (ISEC2_NumLon == 1 && ISEC2_NumLat > 1) + if (ISEC2_LonIncr == 0 && ISEC2_LatIncr != 0) ISEC2_LonIncr = ISEC2_LatIncr; + + ISEC2_ResFlag = 0; + if (ISEC2_LatIncr && ISEC2_LonIncr) gribbyte_set_bit(&ISEC2_ResFlag, 1); + if (uvRelativeToGrid > 0) gribbyte_set_bit(&ISEC2_ResFlag, 5); + + if (gridIsRotated) + { + double xpole = 0, ypole = 0, angle = 0; + gridInqParamRLL(gridID, &xpole, &ypole, &angle); + + ISEC2_LatSP = -(int) lround(ypole * 1000); + ISEC2_LonSP = (int) lround((xpole + 180) * 1000); + if (fabs(angle) > 0) angle = -angle; + FSEC2_RotAngle = angle; + } + + ISEC2_ScanFlag = 0; + if (ISEC2_LastLon < ISEC2_FirstLon) gribbyte_set_bit(&ISEC2_ScanFlag, 1); // East -> West + if (ISEC2_LastLat > ISEC2_FirstLat) gribbyte_set_bit(&ISEC2_ScanFlag, 2); // South -> North +} + +static void +cgribexDefGridLambert(int *isec2, int gridID, int uvRelativeToGrid) +{ + const int xsize = (int) gridInqXsize(gridID); + const int ysize = (int) gridInqYsize(gridID); + + struct CDI_GridProjParams gpp; + gridInqParamsLCC(gridID, &gpp); + if (IS_EQUAL(gpp.x_0, gpp.mv) && IS_EQUAL(gpp.y_0, gpp.mv) && (IS_EQUAL(gpp.xval_0, gpp.mv) || IS_EQUAL(gpp.yval_0, gpp.mv))) + { + gpp.x_0 = gridInqXval(gridID, 0); + gpp.y_0 = gridInqYval(gridID, 0); + } + gridVerifyProjParamsLCC(&gpp); + + const bool lsouth = (gpp.lat_1 < 0); + if (lsouth) + { + gpp.lat_1 = -gpp.lat_2; + gpp.lat_2 = -gpp.lat_2; + } + + double xinc = gridInqXinc(gridID); + double yinc = gridInqYinc(gridID); + if (IS_EQUAL(xinc, 0.0)) xinc = gridInqXincInMeter(gridID); + if (IS_EQUAL(yinc, 0.0)) yinc = gridInqYincInMeter(gridID); + + ISEC2_GridType = GRIB1_GTYPE_LCC; + ISEC2_NumLon = xsize; + ISEC2_NumLat = ysize; + ISEC2_FirstLon = (int) lround(gpp.xval_0 * 1000); + ISEC2_FirstLat = (int) lround(gpp.yval_0 * 1000); + ISEC2_Lambert_Lov = (int) lround(gpp.lon_0 * 1000); + ISEC2_Lambert_LatS1 = (int) lround(gpp.lat_1 * 1000); + ISEC2_Lambert_LatS2 = (int) lround(gpp.lat_2 * 1000); + ISEC2_Lambert_dx = (int) lround(xinc); + ISEC2_Lambert_dy = (int) lround(yinc); + ISEC2_Lambert_LatSP = 0; + ISEC2_Lambert_LonSP = 0; + ISEC2_Lambert_ProjFlag = 0; + if (lsouth) gribbyte_set_bit(&ISEC2_Lambert_ProjFlag, 1); + + const bool earthIsOblate = (IS_EQUAL(gpp.a, 6378160.0) && IS_EQUAL(gpp.rf, 297.0)); + ISEC2_ResFlag = 0; + if (ISEC2_Lambert_dx && ISEC2_Lambert_dy) gribbyte_set_bit(&ISEC2_ResFlag, 1); + if (earthIsOblate) gribbyte_set_bit(&ISEC2_ResFlag, 2); + if (uvRelativeToGrid > 0) gribbyte_set_bit(&ISEC2_ResFlag, 5); + + ISEC2_ScanFlag = 0; + gribbyte_set_bit(&ISEC2_ScanFlag, 2); // South -> North +} + +static void +cgribexDefGridSpectal(int *isec2, int *isec4, int gridID) +{ + ISEC2_GridType = GRIB1_GTYPE_SPECTRAL; + ISEC2_PentaJ = gridInqTrunc(gridID); + ISEC2_PentaK = ISEC2_PentaJ; + ISEC2_PentaM = ISEC2_PentaJ; + ISEC2_RepType = 1; + isec4[2] = 128; + if (gridInqComplexPacking(gridID) && ISEC2_PentaJ >= 21) + { + ISEC2_RepMode = 2; + isec4[3] = 64; + isec4[16] = 0; + isec4[17] = 20; + isec4[18] = 20; + isec4[19] = 20; + } + else + { + ISEC2_RepMode = 1; + isec4[3] = 0; + } +} + +static void +cgribexDefGridGME(int *isec2, int gridID) +{ + ISEC2_GridType = GRIB1_GTYPE_GME; + int nd = 0, ni = 0, ni2 = 0, ni3 = 0; + gridInqParamGME(gridID, &nd, &ni, &ni2, &ni3); + ISEC2_GME_ND = nd; + ISEC2_GME_NI = ni; + ISEC2_GME_NI2 = ni2; + ISEC2_GME_NI3 = ni3; + ISEC2_GME_AFlag = 0; + ISEC2_GME_LatPP = 90000; + ISEC2_GME_LonPP = 0; + ISEC2_GME_LonMPL = 0; + ISEC2_GME_BFlag = 0; +} + +static void +cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridID, int uvRelativeToGrid) +{ + fill_intarr(isec2, 0, 16); + ISEC1_Sec2Or3Flag = 128; + ISEC1_GridDefinition = 255; + ISEC2_Reduced = false; + ISEC2_ScanFlag = 0; + + const int gridsize = (int) gridInqSize(gridID); + bool gridIsRotated = false; + bool gridIsCurvilinear = false; + const int gridtype = grbGetGridtype(&gridID, gridsize, &gridIsRotated, &gridIsCurvilinear); + + switch (gridtype) + { + case GRID_LONLAT: + case GRID_GAUSSIAN: + case GRID_GAUSSIAN_REDUCED: + case GRID_TRAJECTORY: + { + cgribexDefGridRegular(isec2, fsec2, gridID, gridtype, gridIsRotated, gridIsCurvilinear, uvRelativeToGrid); + break; + } + case CDI_PROJ_LCC: + { + cgribexDefGridLambert(isec2, gridID, uvRelativeToGrid); + break; + } + case GRID_SPECTRAL: + { + cgribexDefGridSpectal(isec2, isec4, gridID); + break; + } + case GRID_GME: + { + cgribexDefGridGME(isec2, gridID); + break; + } + case GRID_GENERIC: + { + ISEC1_Sec2Or3Flag = 0; + break; + } + default: + { + static bool lwarn = true; + ISEC1_Sec2Or3Flag = 0; + if (lwarn) Warning("CGRIBEX library doesn't support %s grids, grid information will be lost!", gridNamePtr(gridtype)); + lwarn = false; + break; + } + } +} + +static int +level2int(double level) +{ + return (int) round(level); +} + +static void +isec1DefLevel(int *isec1, int leveltype, int level1, int level2) +{ + ISEC1_LevelType = leveltype; + ISEC1_Level1 = level1; + ISEC1_Level2 = level2; +} + +static void +cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int levelID) +{ + int zaxistype = zaxisInqType(zaxisID); + int ltype = 0; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, <ype); + + const bool hasBounds = (zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL)); + double level = zaxisInqLevels(zaxisID, NULL) ? zaxisInqLevel(zaxisID, levelID) : levelID + 1; + const double dlevel1 = hasBounds ? zaxisInqLbound(zaxisID, levelID) : level; + const double dlevel2 = hasBounds ? zaxisInqUbound(zaxisID, levelID) : 0.0; + + if (zaxistype == ZAXIS_GENERIC && ltype == 0) + { + Warning("Changed zaxis type from %s to %s", zaxisNamePtr(zaxistype), zaxisNamePtr(ZAXIS_PRESSURE)); + zaxistype = ZAXIS_PRESSURE; + zaxisChangeType(zaxisID, zaxistype); + cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, "Pa"); + } + + ISEC2_NumVCP = 0; + + int grib_ltype = zaxisTypeToGrib1ltype(zaxistype); + + switch (zaxistype) + { + case ZAXIS_SURFACE: + case ZAXIS_MEANSEA: + case ZAXIS_ALTITUDE: + case ZAXIS_DEPTH_BELOW_SEA: + case ZAXIS_ISENTROPIC: + { + isec1DefLevel(isec1, grib_ltype, level2int(level), 0); + break; + } + case ZAXIS_CLOUD_BASE: + case ZAXIS_CLOUD_TOP: + case ZAXIS_ISOTHERM_ZERO: + case ZAXIS_TROPOPAUSE: + case ZAXIS_TOA: + case ZAXIS_SEA_BOTTOM: + case ZAXIS_ATMOSPHERE: + { + isec1DefLevel(isec1, grib_ltype, 0, 0); + break; + } + case ZAXIS_HYBRID: + case ZAXIS_HYBRID_HALF: + { + grib_ltype = hasBounds ? GRIB1_LTYPE_HYBRID_LAYER : GRIB1_LTYPE_HYBRID; + isec1DefLevel(isec1, grib_ltype, level2int(dlevel1), level2int(dlevel2)); + + int vctsize = zaxisInqVctSize(zaxisID); + if (vctsize > 255) + { + static bool lwarning_vct = true; + ISEC2_NumVCP = 0; + if (lwarning_vct) + { + Warning("VCT size of %d is too large (maximum is 255). Set to 0!", vctsize); + lwarning_vct = false; + } + } + else + { + ISEC2_NumVCP = vctsize; + zaxisInqVct(zaxisID, &fsec2[10]); + } + break; + } + case ZAXIS_PRESSURE: + { + if (level < 0) Warning("Pressure level of %f Pa is below zero!", level); + + if (!zaxis_units_is_Pa(zaxisID)) level *= 100.0; + + double dum; + if (level < 32768 && (level < 100 || modf(level / 100, &dum) > 0)) + grib_ltype = GRIB1_LTYPE_ISOBARIC_PA; + else + level = level / 100; + + isec1DefLevel(isec1, grib_ltype, level2int(level), 0); + break; + } + case ZAXIS_HEIGHT: + { + double sf = zaxis_units_to_meter(zaxisID); + isec1DefLevel(isec1, grib_ltype, level2int(level * sf), 0); + break; + } + case ZAXIS_SIGMA: + { + grib_ltype = hasBounds ? GRIB1_LTYPE_SIGMA_LAYER : GRIB1_LTYPE_SIGMA; + isec1DefLevel(isec1, grib_ltype, level2int(dlevel1), level2int(dlevel2)); + break; + } + case ZAXIS_DEPTH_BELOW_LAND: + { + grib_ltype = hasBounds ? GRIB1_LTYPE_LANDDEPTH_LAYER : GRIB1_LTYPE_LANDDEPTH; + double sf = zaxis_units_to_centimeter(zaxisID); + isec1DefLevel(isec1, grib_ltype, level2int(sf * dlevel1), level2int(sf * dlevel2)); + break; + } + case ZAXIS_GENERIC: + { + isec1DefLevel(isec1, ltype, level2int(level), 0); + break; + } + default: + { + Error("Unsupported zaxis type: %s", zaxisNamePtr(zaxistype)); + break; + } + } +} + +static void +cgribexDefaultSec0(int *isec0) +{ + ISEC0_GRIB_Len = 0; + ISEC0_GRIB_Version = 0; +} + +static void +cgribexDefaultSec1(int *isec1) +{ + ISEC1_CenterID = 0; + ISEC1_SubCenterID = 0; + ISEC1_LocalFLag = 0; +} + +static void +cgribexDefaultSec4(int *isec4) +{ + for (int i = 2; i <= 10; ++i) isec4[i] = 0; +} + +static void +cgribexDefEnsembleVar(int *isec1, int vlistID, int varID) +{ + // For Ensemble info + + // Put1Byte(isec1[36]); // MPIM local GRIB use definition identifier (extension identifier) + // Put1Byte(isec1[37]); // type of ensemble forecast + // Put2Byte(isec1[38]); // individual ensemble member + // Put2Byte(isec1[39]); // number of forecasts in ensemble + + int perturbationNumber, numberOfForecastsInEnsemble, typeOfEnsembleForecast; + const int r1 = cdiInqKeyInt(vlistID, varID, CDI_KEY_PERTURBATIONNUMBER, &perturbationNumber); + const int r2 = cdiInqKeyInt(vlistID, varID, CDI_KEY_NUMBEROFFORECASTSINENSEMBLE, &numberOfForecastsInEnsemble); + const int r3 = cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFENSEMBLEFORECAST, &typeOfEnsembleForecast); + + if (r1 == 0 && r2 == 0 && r3 == 0) + { + if (ISEC1_CenterID == 252) + { + ISEC1_LocalFLag = 1; + isec1[36] = 1; + isec1[37] = typeOfEnsembleForecast; + isec1[38] = perturbationNumber; + isec1[39] = numberOfForecastsInEnsemble; + } + } +} + +size_t +cgribexEncode(int memtype, int varID, int levelID, int vlistID, int gridID, int zaxisID, CdiDateTime vDateTime, int tsteptype, + int numavg, size_t datasize, const void *data, size_t nmiss, void *gribbuffer, size_t gribbuffersize) +{ + cgribexrec_t *cgribexp = (cgribexrec_t *) cgribexNew(); + + const size_t sec2len = 1024 + 2 * gridInqYsize(gridID); // Gaussian reduced grid + if (sec2len > cgribexp->sec2len) + { + cgribexp->sec2len = sec2len; + cgribexp->sec2 = (int *) Realloc(cgribexp->sec2, sec2len * sizeof(int)); + } + + int *isec0 = cgribexp->sec0; + int *isec1 = cgribexp->sec1; + int *isec2 = cgribexp->sec2; + int *isec3 = cgribexp->sec3; + int *isec4 = cgribexp->sec4; + double *fsec2 = cgribexp->fsec2; + double *fsec3 = cgribexp->fsec3; + float fsec2f[sizeof(cgribexp->fsec2) / sizeof(double)]; + float fsec3f[sizeof(cgribexp->fsec3) / sizeof(double)]; + + fill_intarr(isec1, 0, 256); + fsec2[0] = 0; + fsec2[1] = 0; + fsec2f[0] = 0; + fsec2f[1] = 0; + + const int gribsize = (int) (gribbuffersize / sizeof(int)); + const int param = vlistInqVarParam(vlistID, varID); + + cgribexDefaultSec0(isec0); + cgribexDefaultSec1(isec1); + cgribexDefaultSec4(isec4); + + cgribexDefInstitut(isec1, vlistID, varID); + cgribexDefModel(isec1, vlistID, varID); + + const int datatype = vlistInqVarDatatype(vlistID, varID); + + int uvRelativeToGrid = -1; + cdiInqKeyInt(vlistID, varID, CDI_KEY_UVRELATIVETOGRID, &uvRelativeToGrid); + + cgribexDefParam(isec1, param); + cgribexDefTime(isec1, vDateTime, tsteptype, numavg, vlistInqTaxis(vlistID)); + cgribexDefGrid(isec1, isec2, fsec2, isec4, gridID, uvRelativeToGrid); + cgribexDefLevel(isec1, isec2, fsec2, zaxisID, levelID); + + cgribexDefEnsembleVar(isec1, vlistID, varID); + + cdi_check_gridsize_int_limit("GRIB1", datasize); + + ISEC4_NumValues = (int) datasize; + ISEC4_NumBits = grbBitsPerValue(datatype); + + if (nmiss > 0) + { + FSEC3_MissVal = vlistInqVarMissval(vlistID, varID); + ISEC1_Sec2Or3Flag |= 64; + } + + if (isec4[2] == 128 && isec4[3] == 64) + { + if (memtype == MEMTYPE_FLOAT) + isec4[16] = (int) (1000 * calculate_pfactor_float((const float *) data, ISEC2_PentaJ, isec4[17])); + else + isec4[16] = (int) (1000 * calculate_pfactor_double((const double *) data, ISEC2_PentaJ, isec4[17])); + if (isec4[16] < -10000) isec4[16] = -10000; + if (isec4[16] > 10000) isec4[16] = 10000; + } + // printf("isec4[16] %d\n", isec4[16]); + + if (memtype == MEMTYPE_FLOAT) + { + int numVCP = (ISEC2_NumVCP > 0) ? ISEC2_NumVCP : 0; + for (int i = 0; i < numVCP; ++i) fsec2f[10 + i] = (float) fsec2[10 + i]; + fsec3f[1] = (float) fsec3[1]; + } + + int iret = 0, iword = 0; + if (memtype == MEMTYPE_FLOAT) + gribExSP(isec0, isec1, isec2, fsec2f, isec3, fsec3f, isec4, (float *) data, (int) datasize, (int *) gribbuffer, gribsize, + &iword, "C", &iret); + else + gribExDP(isec0, isec1, isec2, fsec2, isec3, fsec3, isec4, (double *) data, (int) datasize, (int *) gribbuffer, gribsize, &iword, + "C", &iret); + + cgribexDelete(cgribexp); + + if (iret) Error("Problem during GRIB encode (errno = %d)!", iret); + + const size_t nbytes = (size_t) iword * sizeof(int); + return nbytes; +} + +void +cgribexChangeParameterIdentification(void *gh, int code, int ltype, int lev) +{ + if (!gh) return; + + unsigned char *pds = ((cgribex_handle *) gh)->pds; + if (!pds) return; + + pds[8] = (unsigned char) code; + pds[9] = (unsigned char) ltype; + pds[10] = (unsigned char) lev; +} + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + + + +#ifdef HAVE_LIBEXTRA + +static int +extInqDatatype(int prec, int number) +{ + if (number == 2) + return (prec == EXSE_DOUBLE_PRECISION) ? CDI_DATATYPE_CPX64 : CDI_DATATYPE_CPX32; + else + return (prec == EXSE_DOUBLE_PRECISION) ? CDI_DATATYPE_FLT64 : CDI_DATATYPE_FLT32; +} + +static void +extDefDatatype(int datatype, int *prec, int *number) +{ + if (datatype != CDI_DATATYPE_FLT32 && datatype != CDI_DATATYPE_FLT64 && datatype != CDI_DATATYPE_CPX32 + && datatype != CDI_DATATYPE_CPX64) + datatype = CDI_DATATYPE_FLT32; + + *number = (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) ? 2 : 1; + + *prec = (datatype == CDI_DATATYPE_FLT64 || datatype == CDI_DATATYPE_CPX64) ? EXSE_DOUBLE_PRECISION : EXSE_SINGLE_PRECISION; +} + +/* not used +int extInqRecord(stream_t *streamptr, int *varID, int *levelID) +{ + int status; + int fileID; + int icode, ilevel; + int zaxisID = -1; + int header[4]; + int vlistID; + void *extp = streamptr->record->objectp; + + vlistID = streamptr->vlistID; + fileID = streamptr->fileID; + + *varID = -1; + *levelID = -1; + + status = extRead(fileID, extp); + if ( status != 0 ) return 0; + + extInqHeader(extp, header); + + icode = header[1]; + ilevel = header[2]; + + *varID = vlistInqVarID(vlistID, icode); + + if ( *varID == CDI_UNDEFID ) Error("Code %d undefined", icode); + + zaxisID = vlistInqVarZaxis(vlistID, *varID); + + *levelID = zaxisInqLevelID(zaxisID, (double) ilevel); + + return 1; +} +*/ + +static void +ext_read_recordSP(stream_t *streamptr, float *data, size_t *nmiss) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + int varID = streamptr->tsteps[tsID].records[recID].varID; + off_t recpos = streamptr->tsteps[tsID].records[recID].position; + + fileSetPos(fileID, recpos, SEEK_SET); + + void *extp = streamptr->record->objectp; + if (extRead(fileID, extp) < 0) Error("Failed to read EXTRA record"); + + int header[4]; + extInqHeader(extp, header); + extInqDataSP(extp, data); + + double missval = vlistInqVarMissval(vlistID, varID); + size_t size = gridInqSize(vlistInqVarGrid(vlistID, varID)); + + if (vlistInqVarNumber(vlistID, varID) == CDI_REAL) + *nmiss = get_num_missvalsSP(size, data, missval); + else + *nmiss = get_cplx_num_missvalsSP(size, data, missval); + + streamptr->numvals += size; +} + +static void +ext_read_recordDP(stream_t *streamptr, double *data, size_t *nmiss) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + int varID = streamptr->tsteps[tsID].records[recID].varID; + off_t recpos = streamptr->tsteps[tsID].records[recID].position; + + fileSetPos(fileID, recpos, SEEK_SET); + + void *extp = streamptr->record->objectp; + if (extRead(fileID, extp) < 0) Error("Failed to read EXTRA record"); + + int header[4]; + extInqHeader(extp, header); + extInqDataDP(extp, data); + + double missval = vlistInqVarMissval(vlistID, varID); + size_t size = gridInqSize(vlistInqVarGrid(vlistID, varID)); + + if (vlistInqVarNumber(vlistID, varID) == CDI_REAL) + *nmiss = get_num_missvalsDP(size, data, missval); + else + *nmiss = get_cplx_num_missvalsDP(size, data, missval); + + streamptr->numvals += size; +} + +void +ext_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss) +{ + if (memtype == MEMTYPE_DOUBLE) + ext_read_recordDP(streamptr, (double *) data, nmiss); + else + ext_read_recordSP(streamptr, (float *) data, nmiss); +} + +void +extCopyRecord(stream_t *streamptr2, stream_t *streamptr1) +{ + streamFCopyRecord(streamptr2, streamptr1, "EXTRA"); +} + +void +extDefRecord(stream_t *streamptr) +{ + Record *record = streamptr->record; + + int pdis, pcat, pnum; + cdiDecodeParam(record->param, &pnum, &pcat, &pdis); + + int header[4]; + header[0] = record->vdate; + header[1] = pnum; + header[2] = record->ilevel; + int gridID = record->gridID; + cdi_check_gridsize_int_limit("EXTRA", gridInqSize(gridID)); + header[3] = (int) gridInqSize(gridID); + + extrec_t *extp = (extrec_t *) record->objectp; + extDefDatatype(record->prec, &extp->prec, &extp->number); + extDefHeader(extp, header); +} + +static void +ext_write_recordSP(stream_t *streamptr, const float *data) +{ + void *extp = streamptr->record->objectp; + extDefDataSP(extp, data); + extWrite(streamptr->fileID, extp); +} + +static void +ext_write_recordDP(stream_t *streamptr, const double *data) +{ + void *extp = streamptr->record->objectp; + extDefDataDP(extp, data); + extWrite(streamptr->fileID, extp); +} + +void +ext_write_record(stream_t *streamptr, int memtype, const void *data) +{ + if (memtype == MEMTYPE_DOUBLE) + ext_write_recordDP(streamptr, (const double *) data); + else + ext_write_recordSP(streamptr, (const float *) data); +} + +static void +extAddRecord(stream_t *streamptr, int param, int level, size_t xysize, size_t recsize, off_t position, int prec, int number) +{ + int vlistID = streamptr->vlistID; + int tsID = streamptr->curTsID; + int recID = recordNewEntry(streamptr, tsID); + record_t *record = &streamptr->tsteps[tsID].records[recID]; + + record->size = recsize; + record->position = position; + record->param = param; + record->ilevel = level; + + grid_t *grid = (grid_t *) Malloc(sizeof(*grid)); + grid_init(grid); + cdiGridTypeInit(grid, GRID_GENERIC, xysize); + grid->x.size = xysize; + grid->y.size = 0; + struct addIfNewRes gridAdded = cdiVlistAddGridIfNew(vlistID, grid, 0); + int gridID = gridAdded.Id; + if (!gridAdded.isNew) + { + grid_free(grid); + Free(grid); + } + + int leveltype = ZAXIS_GENERIC; + int datatype = extInqDatatype(prec, number); + + int varID, levelID = 0; + varAddRecord(recID, param, gridID, leveltype, 0, level, 0, 0, 0, datatype, &varID, &levelID, TSTEP_INSTANT, 0, -1, NULL, NULL, + NULL, NULL); + + record->varID = (short) varID; + record->levelID = levelID; + + streamptr->tsteps[tsID].nallrecs++; + streamptr->nrecs++; + + if (CDI_Debug) Message("varID = %d gridID = %d levelID = %d", varID, gridID, levelID); +} + +static void +extScanTimestep1(stream_t *streamptr) +{ + CdiDateTime datetime0; + cdiDateTime_init(&datetime0); + int header[4]; + off_t recpos = 0; + extrec_t *extp = (extrec_t *) streamptr->record->objectp; + + streamptr->curTsID = 0; + + int tsID = tstepsNewEntry(streamptr); + if (tsID != 0) Error("Internal problem! tstepsNewEntry returns %d", tsID); + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + int fileID = streamptr->fileID; + + int nrecs = 0; + while (true) + { + recpos = fileGetPos(fileID); + if (extRead(fileID, extp) != 0) + { + streamptr->ntsteps = 1; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + extInqHeader(extp, header); + + int vdate = header[0]; + int vtime = 0; + int rcode = header[1]; + int rlevel = header[2]; + int rxysize = header[3]; + int param = cdiEncodeParam(rcode, 255, 255); + CdiDateTime datetime = cdiDateTime_set(vdate, vtime); + + if (nrecs == 0) + { + datetime0 = datetime; + taxis->vDateTime = datetime; + } + else + { + record_t *records = streamptr->tsteps[tsID].records; + for (int recID = 0; recID < nrecs; recID++) + if (param == records[recID].param && rlevel == records[recID].ilevel) goto tstepScanLoopFinished; + + if (cdiDateTime_isNE(datetime, datetime0)) Warning("Inconsistent verification time for code %d level %d", rcode, rlevel); + } + + nrecs++; + + if (CDI_Debug) Message("%4d%8d%4d%8d%8d%6d", nrecs, (int) recpos, rcode, rlevel, vdate, vtime); + + extAddRecord(streamptr, param, rlevel, rxysize, recsize, recpos, extp->prec, extp->number); + } + +tstepScanLoopFinished: + streamptr->rtsteps = 1; + + cdi_generate_vars(streamptr); + + int taxisID = taxisCreate(TAXIS_ABSOLUTE); + taxis->type = TAXIS_ABSOLUTE; + taxis->rDateTime = taxis->vDateTime; + + int vlistID = streamptr->vlistID; + vlistDefTaxis(vlistID, taxisID); + + vlist_check_contents(vlistID); + + streamScanResizeRecords1(streamptr); + + streamScanTsFixNtsteps(streamptr, recpos); + streamScanTimeConstAdjust(streamptr, taxis); +} + +static int +extScanTimestep2(stream_t *streamptr) +{ + int header[4]; + off_t recpos = 0; + void *extp = streamptr->record->objectp; + + streamptr->curTsID = 1; + + int fileID = streamptr->fileID; + int vlistID = streamptr->vlistID; + + int tsID = streamptr->rtsteps; + if (tsID != 1) Error("Internal problem! unexpected timestep %d", tsID + 1); + + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + int nrecords = streamScanInitRecords2(streamptr); + + for (int rindex = 0; rindex <= nrecords; rindex++) + { + recpos = fileGetPos(fileID); + if (extRead(fileID, extp) != 0) + { + streamptr->ntsteps = 2; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + extInqHeader(extp, header); + + int vdate = header[0]; + int vtime = 0; + int rcode = header[1]; + int rlevel = header[2]; + int param = cdiEncodeParam(rcode, 255, 255); + + if (rindex == 0) + { + taxis->type = TAXIS_ABSOLUTE; + taxis->vDateTime = cdiDateTime_set(vdate, vtime); + } + + bool nextstep = false; + int recID; + for (recID = 0; recID < nrecords; recID++) + { + if (param == records[recID].param && rlevel == records[recID].ilevel) + { + if (records[recID].used) + { + nextstep = true; + } + else + { + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + } + break; + } + } + if (recID == nrecords) + { + Warning("Code %d level %d not found at timestep %d", rcode, rlevel, tsID + 1); + return CDI_EUFSTRUCT; + } + + if (nextstep) break; + + if (CDI_Debug) Message("%4d%8d%4d%8d%8d%6d", rindex + 1, (int) recpos, rcode, rlevel, vdate, vtime); + + if (param != records[recID].param || rlevel != records[recID].ilevel) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, rlevel); + return CDI_EUFSTRUCT; + } + + records[recID].position = recpos; + records[recID].size = recsize; + } + + int nrecs = 0; + for (int recID = 0; recID < nrecords; recID++) + { + if (records[recID].used) + nrecs++; + else + vlistDefVarTimetype(vlistID, records[recID].varID, TIME_CONSTANT); + } + streamptr->tsteps[tsID].nrecs = nrecs; + + streamptr->rtsteps = 2; + + streamScanTsFixNtsteps(streamptr, recpos); + + return 0; +} + +int +extInqContents(stream_t *streamptr) +{ + streamptr->curTsID = 0; + + extScanTimestep1(streamptr); + + int status = (streamptr->ntsteps == -1) ? extScanTimestep2(streamptr) : 0; + + fileSetPos(streamptr->fileID, 0, SEEK_SET); + + return status; +} + +static long +extScanTimestep(stream_t *streamptr) +{ + int header[4]; + off_t recpos = 0; + int nrecs = 0; + void *extp = streamptr->record->objectp; + + int tsID = streamptr->rtsteps; + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + if (streamptr->tsteps[tsID].recordSize == 0) + { + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + nrecs = streamScanInitRecords(streamptr, tsID); + + int fileID = streamptr->fileID; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + for (int rindex = 0; rindex <= nrecs; rindex++) + { + recpos = fileGetPos(fileID); + if (extRead(fileID, extp) != 0) + { + streamptr->ntsteps = streamptr->rtsteps + 1; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + extInqHeader(extp, header); + + int vdate = header[0]; + int vtime = 0; + int rcode = header[1]; + int rlevel = header[2]; + int param = cdiEncodeParam(rcode, 255, 255); + + // if ( rindex == nrecs ) break; gcc-4.5 internal compiler error + if (rindex == nrecs) continue; + int recID = streamptr->tsteps[tsID].recIDs[rindex]; + + if (rindex == 0) + { + taxis->type = TAXIS_ABSOLUTE; + taxis->vDateTime = cdiDateTime_set(vdate, vtime); + } + + if (param != records[recID].param || rlevel != records[recID].ilevel) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, rlevel); + Error("Invalid, unsupported or inconsistent record structure!"); + } + + records[recID].position = recpos; + records[recID].size = recsize; + + if (CDI_Debug) Message("%4d%8d%4d%8d%8d%6d", rindex, (int) recpos, rcode, rlevel, vdate, vtime); + } + + streamptr->rtsteps++; + + if (streamptr->ntsteps != streamptr->rtsteps) + { + tsID = tstepsNewEntry(streamptr); + if (tsID != streamptr->rtsteps) Error("Internal error. tsID = %d", tsID); + + streamptr->tsteps[tsID - 1].next = true; + streamptr->tsteps[tsID].position = recpos; + } + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + streamptr->tsteps[tsID].position = recpos; + } + + if (nrecs > 0 && nrecs < streamptr->tsteps[tsID].nrecs) + { + Warning("Incomplete timestep. Stop scanning at timestep %d.", tsID); + streamptr->ntsteps = tsID; + } + + return streamptr->ntsteps; +} + +int +extInqTimestep(stream_t *streamptr, int tsID) +{ + if (tsID == 0 && streamptr->rtsteps == 0) Error("Call to cdiInqContents missing!"); + + if (CDI_Debug) Message("tsID = %d rtsteps = %d", tsID, streamptr->rtsteps); + + long ntsteps = CDI_UNDEFID; + while ((tsID + 1) > streamptr->rtsteps && ntsteps == CDI_UNDEFID) ntsteps = extScanTimestep(streamptr); + + int nrecs = 0; + if (!(tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID)) + { + streamptr->curTsID = tsID; + nrecs = streamptr->tsteps[tsID].nrecs; + } + + return nrecs; +} + +void +extReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID); + + void *extp = streamptr->record->objectp; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + double missval = vlistInqVarMissval(vlistID, varID); + size_t gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID)); + int tsid = streamptr->curTsID; + + off_t currentfilepos = fileGetPos(fileID); + + int recID = streamptr->vars[varID].recordTable[0].recordID[levID]; + off_t recpos = streamptr->tsteps[tsid].records[recID].position; + fileSetPos(fileID, recpos, SEEK_SET); + extRead(fileID, extp); + int header[4]; + extInqHeader(extp, header); + extInqDataDP(extp, data); + + fileSetPos(fileID, currentfilepos, SEEK_SET); + + if (vlistInqVarNumber(vlistID, varID) == CDI_REAL) + *nmiss = get_num_missvalsDP(gridsize, data, missval); + else + *nmiss = get_cplx_num_missvalsDP(gridsize, data, missval); +} + +void +extReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + size_t gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID)); + size_t nlevs = (size_t) streamptr->vars[varID].recordTable[0].nlevs; + + for (size_t levID = 0; levID < nlevs; levID++) extReadVarSliceDP(streamptr, varID, (int) levID, &data[levID * gridsize], nmiss); +} + +void +extWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double *data) +{ + if (CDI_Debug) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID); + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + CdiDateTime vDateTime = streamptr->tsteps[tsID].taxis.vDateTime; + + int pdis, pcat, pnum; + cdiDecodeParam(vlistInqVarParam(vlistID, varID), &pnum, &pcat, &pdis); + + int header[4]; + header[0] = (int) cdiDate_get(vDateTime.date); + header[1] = pnum; + header[2] = (int) lround(zaxisInqLevel(vlistInqVarZaxis(vlistID, varID), levID)); + int gridID = vlistInqVarGrid(vlistID, varID); + cdi_check_gridsize_int_limit("EXTRA", gridInqSize(gridID)); + header[3] = (int) gridInqSize(gridID); + + extrec_t *extp = (extrec_t *) streamptr->record->objectp; + extDefDatatype(vlistInqVarDatatype(vlistID, varID), &extp->prec, &extp->number); + extDefHeader(extp, header); + + extDefDataDP(extp, data); + extWrite(fileID, extp); +} + +void +extWriteVarDP(stream_t *streamptr, int varID, const double *data) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + size_t gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID)); + size_t nlevs = (size_t) zaxisInqSize(vlistInqVarZaxis(vlistID, varID)); + + for (size_t levID = 0; levID < nlevs; levID++) extWriteVarSliceDP(streamptr, varID, (int) levID, &data[levID * gridsize]); +} + +#endif /* HAVE_LIBEXTRA */ + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef STREAM_GRIBAPI_H +#define STREAM_GRIBAPI_H + +#ifdef HAVE_LIBGRIB_API + + +int fdbScanTimesteps(stream_t *streamptr); + +int gribapiScanTimestep1(stream_t *streamptr); +int gribapiScanTimestep2(stream_t *streamptr); +int gribapiScanTimestep(stream_t *streamptr); + +int gribapiDecode(void *gribbuffer, size_t gribsize, void *data, size_t datasize, int unreduced, size_t *nmiss, double missval); + +size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisID, CdiDateTime vDateTime, int tsteptype, int numavg, + size_t datasize, const void *data, size_t nmiss, void **gribbuffer, size_t *gribbuffersize, int ljpeg, + void *gribContainer); + +int gribapiGetScanningMode(grib_handle *gh); +void gribapiSetScanningMode(grib_handle *gh, int scanningMode); + +void gribapiChangeParameterIdentification(grib_handle *gh, int code, int ltype, int lev); + +#endif + +#endif /* STREAM_GRIBAPI_H */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + + +int cdiDebugExt = 0; // Debug level for the KNMI extensions +#ifdef HIRLAM_EXTENSIONS +// *** RELATED to GRIB only *** +int cdiGribUseTimeRangeIndicator = 0; // normaly cdo looks in grib for attribute called "stepType" + // but NWP models such as Harmonie 37h1.2, use "timeRangeIndicator" + // where: 0: for instanteneous fields; 4: for accumulated fields +#endif // HIRLAM_EXTENSIONS + +double +zaxis_units_to_centimeter(int zaxisID) +{ + char units[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units, &length); + + double sf = 100.0; // default: meter + // clang-format off + if (units[1] == 'm' && !units[2]) + { + if (units[0] == 'm') sf = 0.1; + else if (units[0] == 'c') sf = 1; + else if (units[0] == 'd') sf = 10; + } + // clang-format on + + return sf; +} + +double +zaxis_units_to_meter(int zaxisID) +{ + char units[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units, &length); + + double sf = 1.0; // default: meter + // clang-format off + if (units[1] == 'm' && !units[2]) + { + if (units[0] == 'm') sf /= 1000.0; + else if (units[0] == 'c') sf /= 100.0; + else if (units[0] == 'd') sf /= 10.0; + else if (units[0] == 'k') sf *= 1000.0; + } + // clang-format on + + return sf; +} + +bool +zaxis_units_is_Pa(int zaxisID) +{ + char units[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units, &length); + + return (units[0] && (units[0] == 'P') && (units[1] == 'a')); +} + +void +ensureBufferSize(size_t requiredSize, size_t *curSize, void **buffer) +{ + if (*curSize < requiredSize) + { + *curSize = requiredSize; + *buffer = Realloc(*buffer, *curSize); + } +} + +int +grbDecompress(size_t recsize, size_t *buffersize, void **gribbuffer) +{ + int comptype = CDI_COMPRESS_NONE; + + size_t unzipsize; + if (gribGetZip(recsize, (unsigned char *) *gribbuffer, &unzipsize) > 0) + { + comptype = CDI_COMPRESS_SZIP; + unzipsize += 100; /* need 0 to 1 bytes for rounding of bds */ + ensureBufferSize(unzipsize, buffersize, gribbuffer); + } + + return comptype; +} + +// Regarding operation to change parameter identification: +// change if cdiGribChangeParameterID.active +struct cdiGribParamChange cdiGribChangeParameterID; + +// Used only for CDO module Selmulti +void +streamGrbChangeParameterIdentification(int code, int ltype, int lev) +{ + // NOTE this is a "PROXY" function for gribapiChangeParameterIdentification(); + // This just sets the globals. There are probably better solutions to this. + // The parameter change is done by function gribapiChangeParameterIdentification() in stream_gribapi.c + // Setting this control variable to true will cause calling fnc. gribapiChangeParameterIdentification later. + // After grib attributes have been changed this variable goes to false. + cdiGribChangeParameterID.active = true; + cdiGribChangeParameterID.code = code; + cdiGribChangeParameterID.ltype = ltype; + cdiGribChangeParameterID.lev = lev; +} + +struct cdiGribScanModeChange cdiGribDataScanningMode; + +void +streamGrbDefDataScanningMode(int scanmode) +{ + cdiGribDataScanningMode.active = true; + cdiGribDataScanningMode.value = scanmode; +} + +enum +{ + MapKey = 0, + MapValue = 1 +}; + +static const int grib1ltypeMap[][2] = { + // clang-format off + { GRIB1_LTYPE_SURFACE, ZAXIS_SURFACE }, + { GRIB1_LTYPE_CLOUD_BASE, ZAXIS_CLOUD_BASE }, + { GRIB1_LTYPE_CLOUD_TOP, ZAXIS_CLOUD_TOP }, + { GRIB1_LTYPE_ISOTHERM0, ZAXIS_ISOTHERM_ZERO }, + { GRIB1_LTYPE_TROPOPAUSE, ZAXIS_TROPOPAUSE }, + { GRIB1_LTYPE_TOA, ZAXIS_TOA }, + { GRIB1_LTYPE_SEA_BOTTOM, ZAXIS_SEA_BOTTOM }, + { GRIB1_LTYPE_ATMOSPHERE, ZAXIS_ATMOSPHERE }, + { GRIB1_LTYPE_ISOBARIC, ZAXIS_PRESSURE }, + { GRIB1_LTYPE_99, ZAXIS_PRESSURE }, + { GRIB1_LTYPE_ISOBARIC_PA, ZAXIS_PRESSURE }, + { GRIB1_LTYPE_MEANSEA, ZAXIS_MEANSEA }, + { GRIB1_LTYPE_ALTITUDE, ZAXIS_ALTITUDE }, + { GRIB1_LTYPE_HEIGHT, ZAXIS_HEIGHT }, + { GRIB1_LTYPE_SIGMA, ZAXIS_SIGMA }, + { GRIB1_LTYPE_SIGMA_LAYER, ZAXIS_SIGMA }, + { GRIB1_LTYPE_HYBRID, ZAXIS_HYBRID }, + { GRIB1_LTYPE_HYBRID_LAYER, ZAXIS_HYBRID }, + { GRIB1_LTYPE_LANDDEPTH, ZAXIS_DEPTH_BELOW_LAND }, + { GRIB1_LTYPE_LANDDEPTH_LAYER, ZAXIS_DEPTH_BELOW_LAND }, + { GRIB1_LTYPE_ISENTROPIC, ZAXIS_ISENTROPIC }, + { GRIB1_LTYPE_SEADEPTH, ZAXIS_DEPTH_BELOW_SEA }, + { GRIB1_LTYPE_LAKE_BOTTOM, ZAXIS_LAKE_BOTTOM }, + { GRIB1_LTYPE_SEDIMENT_BOTTOM, ZAXIS_SEDIMENT_BOTTOM }, + { GRIB1_LTYPE_SEDIMENT_BOTTOM_TA, ZAXIS_SEDIMENT_BOTTOM_TA }, + { GRIB1_LTYPE_SEDIMENT_BOTTOM_TW, ZAXIS_SEDIMENT_BOTTOM_TW }, + { GRIB1_LTYPE_MIX_LAYER, ZAXIS_MIX_LAYER }, + // clang-format on +}; + +static const size_t grib1ltypeMapSize = sizeof(grib1ltypeMap) / (2 * sizeof(int)); + +static const int grib2ltypeMap[][2] = { + // clang-format off + { GRIB2_LTYPE_SURFACE, ZAXIS_SURFACE }, + { GRIB2_LTYPE_CLOUD_BASE, ZAXIS_CLOUD_BASE }, + { GRIB2_LTYPE_CLOUD_TOP, ZAXIS_CLOUD_TOP }, + { GRIB2_LTYPE_ISOTHERM0, ZAXIS_ISOTHERM_ZERO }, + { GRIB2_LTYPE_TROPOPAUSE, ZAXIS_TROPOPAUSE }, + { GRIB2_LTYPE_TOA, ZAXIS_TOA }, + { GRIB2_LTYPE_SEA_BOTTOM, ZAXIS_SEA_BOTTOM }, + { GRIB2_LTYPE_ATMOSPHERE, ZAXIS_ATMOSPHERE }, + { GRIB2_LTYPE_ISOBARIC, ZAXIS_PRESSURE }, + { GRIB2_LTYPE_MEANSEA, ZAXIS_MEANSEA }, + { GRIB2_LTYPE_ALTITUDE, ZAXIS_ALTITUDE }, + { GRIB2_LTYPE_HEIGHT, ZAXIS_HEIGHT }, + { GRIB2_LTYPE_SIGMA, ZAXIS_SIGMA }, + { GRIB2_LTYPE_HYBRID, ZAXIS_HYBRID }, + { GRIB2_LTYPE_HYBRID, ZAXIS_HYBRID_HALF }, + { GRIB2_LTYPE_LANDDEPTH, ZAXIS_DEPTH_BELOW_LAND }, + { GRIB2_LTYPE_ISENTROPIC, ZAXIS_ISENTROPIC }, + { GRIB2_LTYPE_SEADEPTH, ZAXIS_DEPTH_BELOW_SEA }, + { GRIB2_LTYPE_LAKE_BOTTOM, ZAXIS_LAKE_BOTTOM }, + { GRIB2_LTYPE_SEDIMENT_BOTTOM, ZAXIS_SEDIMENT_BOTTOM }, + { GRIB2_LTYPE_SEDIMENT_BOTTOM_TA, ZAXIS_SEDIMENT_BOTTOM_TA }, + { GRIB2_LTYPE_SEDIMENT_BOTTOM_TW, ZAXIS_SEDIMENT_BOTTOM_TW }, + { GRIB2_LTYPE_MIX_LAYER, ZAXIS_MIX_LAYER }, + { GRIB2_LTYPE_SNOW, ZAXIS_SNOW }, + { GRIB2_LTYPE_REFERENCE, ZAXIS_REFERENCE }, + // clang-format on +}; + +static const size_t grib2ltypeMapSize = sizeof(grib2ltypeMap) / (2 * sizeof(int)); + +static int +getInt2IntMap(int searchKey, bool keyValue, size_t mapSize, const int gribltypeMap[][2], int defaultValue) +{ + for (size_t i = 0; i < mapSize; ++i) + if (gribltypeMap[i][keyValue] == searchKey) return gribltypeMap[i][!keyValue]; + + return defaultValue; +} + +int +grib1ltypeToZaxisType(int grib_ltype) +{ + return getInt2IntMap(grib_ltype, MapKey, grib1ltypeMapSize, grib1ltypeMap, ZAXIS_GENERIC); +} + +int +zaxisTypeToGrib1ltype(int zaxistype) +{ + return getInt2IntMap(zaxistype, MapValue, grib1ltypeMapSize, grib1ltypeMap, -1); +} + +int +grib2ltypeToZaxisType(int grib_ltype) +{ + return getInt2IntMap(grib_ltype, MapKey, grib2ltypeMapSize, grib2ltypeMap, ZAXIS_GENERIC); +} + +int +zaxisTypeToGrib2ltype(int zaxistype) +{ + return getInt2IntMap(zaxistype, MapValue, grib2ltypeMapSize, grib2ltypeMap, -1); +} + +int +grbBitsPerValue(int datatype) +{ + int bitsPerValue = 16; + + if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) Error("CDI/GRIB library does not support complex numbers!"); + + if (datatype != CDI_UNDEFID) + { + if (datatype > 0 && datatype <= 32) + bitsPerValue = datatype; + else if (datatype == CDI_DATATYPE_FLT64) + bitsPerValue = 24; + else + bitsPerValue = 16; + } + + return bitsPerValue; +} + +/* +int grbInqRecord(stream_t * streamptr, int *varID, int *levelID) +{ + int status; + + status = cgribexInqRecord(streamptr, varID, levelID); + + return (status); +} +*/ + +void +grbDefRecord(stream_t *streamptr) +{ + UNUSED(streamptr); +} + +static int +grbScanTimestep1(stream_t *streamptr) +{ + int status = CDI_EUFTYPE; + +#ifdef HAVE_LIBCGRIBEX + const int filetype = streamptr->filetype; + + if (filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1) + status = cgribexScanTimestep1(streamptr); + else +#endif +#ifdef HAVE_LIBGRIB_API + status = gribapiScanTimestep1(streamptr); +#else + Error("GRIB_API support unavailable!"); +#endif + + return status; +} + +static int +grbScanTimestep2(stream_t *streamptr) +{ + int status = CDI_EUFTYPE; + +#ifdef HAVE_LIBCGRIBEX + const int filetype = streamptr->filetype; + + if (filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1) + status = cgribexScanTimestep2(streamptr); + else +#endif +#ifdef HAVE_LIBGRIB_API + status = gribapiScanTimestep2(streamptr); +#else + Error("GRIB_API support unavailable!"); +#endif + + return status; +} + +static int +grbScanTimestep(stream_t *streamptr) +{ + int status = CDI_EUFTYPE; + +#ifdef HAVE_LIBCGRIBEX + const int filetype = streamptr->filetype; + + if (filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1) + status = cgribexScanTimestep(streamptr); + else +#endif +#ifdef HAVE_LIBGRIB_API + status = gribapiScanTimestep(streamptr); +#else + Error("GRIB_API support unavailable!"); +#endif + + return status; +} + +#ifdef HAVE_LIBGRIB +int +grbInqContents(stream_t *streamptr) +{ + streamptr->curTsID = 0; + + int status = grbScanTimestep1(streamptr); + if (status == 0 && streamptr->ntsteps == -1) status = grbScanTimestep2(streamptr); + + const int fileID = streamptr->fileID; + fileSetPos(fileID, 0, SEEK_SET); + + return status; +} + +int +fdbInqContents(stream_t *streamptr) +{ + streamptr->curTsID = 0; +#ifdef HAVE_LIBGRIB_API + int status = fdbScanTimesteps(streamptr); + return status; +#else + return -1; +#endif +} +#endif + +int +fdbInqTimestep(stream_t *streamptr, int tsID) +{ + if (tsID == 0 && streamptr->rtsteps == 0) Error("Call to cdiInqContents missing!"); + + if (CDI_Debug) Message("tsid = %d rtsteps = %d", tsID, streamptr->rtsteps); + + int nrecs; + if (tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID) + { + nrecs = 0; + } + else + { + streamptr->curTsID = tsID; + nrecs = streamptr->tsteps[tsID].nrecs; + } + + return nrecs; +} + +int +grbInqTimestep(stream_t *streamptr, int tsID) +{ + if (tsID == 0 && streamptr->rtsteps == 0) Error("Call to cdiInqContents missing!"); + + if (CDI_Debug) Message("tsid = %d rtsteps = %d", tsID, streamptr->rtsteps); + + int ntsteps = CDI_UNDEFID; + while ((tsID + 1) > streamptr->rtsteps && ntsteps == CDI_UNDEFID) + { + ntsteps = grbScanTimestep(streamptr); + if (ntsteps == CDI_EUFSTRUCT) + { + streamptr->ntsteps = streamptr->rtsteps; + break; + } + } + + int nrecs; + if (tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID) + { + nrecs = 0; + } + else + { + streamptr->curTsID = tsID; + nrecs = streamptr->tsteps[tsID].nrecs; + } + + return nrecs; +} + +// used in CDO!!! +void +streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignum) +{ + stream_t *streamptr = stream_to_pointer(streamID); + + int filetype = streamptr->filetype; + + if (filetype == CDI_FILETYPE_GRB) + { + int tsID = streamptr->curTsID; + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + off_t recpos = streamptr->tsteps[tsID].records[recID].position; + int zip = streamptr->tsteps[tsID].records[recID].zip; + + void *gribbuffer = streamptr->record->buffer; + size_t gribbuffersize = streamptr->record->buffersize; + + if (zip > 0) + Error("Compressed GRIB records unsupported!"); + else + grib_info_for_grads(recpos, (long) gribbuffersize, (unsigned char *) gribbuffer, intnum, fltnum, bignum); + } +} + +int +grbGetGridtype(int *gridID, size_t gridsize, bool *gridIsRotated, bool *gridIsCurvilinear) +{ + int gridtype = gridInqType(*gridID); + + if (gridtype == GRID_GENERIC) + { + int xsize = (int) gridInqXsize(*gridID); + int ysize = (int) gridInqYsize(*gridID); + + if ((ysize == 32 || ysize == 48 || ysize == 64 || ysize == 96 || ysize == 160 || ysize == 192 || ysize == 240 || ysize == 320 + || ysize == 384 || ysize == 480 || ysize == 768) + && (xsize == 2 * ysize || xsize == 1)) + { + gridtype = GRID_GAUSSIAN; + } + else if (gridsize == 1) + { + gridtype = GRID_LONLAT; + } + else if (gridInqXvals(*gridID, NULL) && gridInqYvals(*gridID, NULL)) + { + gridtype = GRID_LONLAT; + } + } + else if (gridtype == GRID_CURVILINEAR) + { + int projID = gridInqProj(*gridID); + if (projID != CDI_UNDEFID && gridInqType(projID) == GRID_PROJECTION) + { + *gridID = projID; + gridtype = GRID_PROJECTION; + } + else + { + static bool lwarning = true; + if (lwarning && gridsize > 1) + { + lwarning = false; + Warning("Curvilinear grid is unsupported in GRIB format! Created wrong Grid Description Section!"); + } + *gridIsCurvilinear = true; + gridtype = GRID_LONLAT; + } + } + + if (gridtype == GRID_PROJECTION) + { + int projtype = gridInqProjType(*gridID); + if (projtype == CDI_PROJ_RLL) + { + gridtype = GRID_LONLAT; + *gridIsRotated = true; + } + else if (projtype == CDI_PROJ_LCC) + { + gridtype = CDI_PROJ_LCC; + } + else if (projtype == CDI_PROJ_STERE) + { + gridtype = CDI_PROJ_STERE; + } + } + + return gridtype; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef _SUBTYPE_H +#define _SUBTYPE_H + +enum +{ + /* subtype attributes wrt. TILES */ + SUBTYPE_ATT_TILEINDEX = 0, + SUBTYPE_ATT_TOTALNO_OF_TILEATTR_PAIRS = 1, + SUBTYPE_ATT_TILE_CLASSIFICATION = 2, + SUBTYPE_ATT_NUMBER_OF_TILES = 3, + SUBTYPE_ATT_NUMBER_OF_ATTR = 4, + SUBTYPE_ATT_TILEATTRIBUTE = 5, + /* No. of different constants in the enumeration + "subtype_attributes" */ + nSubtypeAttributes +}; + +/* Literal constants corresponding to the different constants of the + enumeration "subtype_attributes". */ +extern const char *const cdiSubtypeAttributeName[]; + +/* Data type specifying an attribute of a subtype (for example an + attribute of a set of TILES) or an attribute of a subtype entry + (for example an attribute of a single TILE). This data type is part + of a linked list. */ +struct subtype_attr_t +{ + int key, val; /* key/value pair */ + struct subtype_attr_t *next; /* next element in linked list */ +}; + +/* Data type specifying a single entry of a subtype, for example a + single TILE in a set of TILES. */ +struct subtype_entry_t +{ + int self; /* list entry index (0,...,nentries-1) */ + struct subtype_entry_t *next; /* next node in linked list */ + + /* linked list with attributes for this subtype entry, ordered by its key values*/ + struct subtype_attr_t *atts; +}; + +/* Data type specifying a variable subtype, for example a list of + TILES. This can be interpreted as an additional axis like the + vertical axis. */ +typedef struct +{ + int self; /* resource handler ID */ + int subtype; /* subtype kind: TILES, ... */ + int nentries; /* counter: total no. of entries in list */ + + /* currently active subtype, e.g. GRIB2 tile index (for example for + stream/vlist accesses): */ + int active_subtype_index; + struct subtype_entry_t globals; /* global attributes */ + + /* list of subtype entries, e.g. the list of tiles, ordered by entry->self. */ + struct subtype_entry_t *entries; +} subtype_t; + +/* prototypes: allocation and destruction */ +void subtypeAllocate(subtype_t **subtype_ptr2, int subtype); +int subtypePush(subtype_t *subtype_ptr); +void subtypeDestroyPtr(void *ptr); +void subtypeDuplicate(subtype_t *subtype_ptr, subtype_t **dst); +struct subtype_entry_t *subtypeEntryInsert(subtype_t *head); + +/* prototypes: accessing global attributes */ +void subtypePrint(int subtypeID); +void subtypePrintPtr(subtype_t *subtype_ptr); +void subtypeDefGlobalDataP(subtype_t *subtype_ptr, int key, int val); +void subtypeDefGlobalData(int subtypeID, int key, int val); +int subtypeGetGlobalData(int subtypeID, int key); +int subtypeGetGlobalDataP(subtype_t *subtype_ptr, int key); +int subtypeComparePtr(int s1_ID, subtype_t *s2); + +/* prototypes: accessing subtype entries */ +void subtypeDefEntryDataP(struct subtype_entry_t *subtype_entry_ptr, int key, int val); + +/* prototypes: tile implementations */ +void tilesetInsertP(subtype_t *s1, subtype_t *s2); + +/* Construct a new subtype for a tile set. If a corresponding subtype + * already exists, then we return this subtype ID instead. */ +int vlistDefTileSubtype(int vlistID, subtype_t *tiles); + +/* Insert a trivial one-tile-subtype */ +int vlistInsertTrivialTileSubtype(int vlistID); + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBGRIB_API + + + +#include <grib_api.h> + +extern int CDI_Inventory_Mode; + +static const var_tile_t dummy_tiles = { 0, -1, -1, -1, -1, -1 }; + +typedef struct +{ + int param; + int level1; + int level2; + int ltype; + int tsteptype; + size_t gridsize; + char name[32]; + VarScanKeys scanKeys; + var_tile_t tiles; +} compvar2_t; + +static int +gribapiGetZaxisType(long editionNumber, int grib_ltype) +{ + return (editionNumber <= 1) ? grib1ltypeToZaxisType(grib_ltype) : grib2ltypeToZaxisType(grib_ltype); +} + +static int +getTimeunits(long unitsOfTime) +{ + switch (unitsOfTime) + { + case 13: return TUNIT_SECOND; + case 0: return TUNIT_MINUTE; + case 1: return TUNIT_HOUR; + case 10: return TUNIT_3HOURS; + case 11: return TUNIT_6HOURS; + case 12: return TUNIT_12HOURS; + case 2: return TUNIT_DAY; + } + + return TUNIT_HOUR; +} + +static double +timeunit_factor(int tu1, int tu2) +{ + if (tu2 == TUNIT_HOUR) + { + switch (tu1) + { + case TUNIT_SECOND: return 3600; + case TUNIT_MINUTE: return 60; + case TUNIT_HOUR: return 1; + case TUNIT_3HOURS: return 1. / 3; + case TUNIT_6HOURS: return 1. / 6; + case TUNIT_12HOURS: return 1. / 12; + case TUNIT_DAY: return 1. / 24; + } + } + + return 1; +} + +static int +gribapiGetTimeUnits(grib_handle *gh) +{ + long unitsOfTime = -1; + grib_get_long(gh, "indicatorOfUnitOfTimeRange", &unitsOfTime); + + GRIB_CHECK(my_grib_set_long(gh, "stepUnits", unitsOfTime), 0); + + return getTimeunits(unitsOfTime); +} + +static void +gribapiGetSteps(grib_handle *gh, int timeunits, int *startStep, int *endStep) +{ + long unitsOfTime; + int status = grib_get_long(gh, "stepUnits", &unitsOfTime); + int timeunits2 = (status == 0) ? getTimeunits(unitsOfTime) : timeunits; + // timeunits2 = gribapiGetTimeUnits(gh); + + long lpar; + status = grib_get_long(gh, "forecastTime", &lpar); + if (status == 0) + *startStep = (int) lpar; + else + { + status = grib_get_long(gh, "startStep", &lpar); + if (status == 0) *startStep = (int) (((double) lpar * timeunit_factor(timeunits, timeunits2)) + 0.5); + } + + *endStep = *startStep; + status = grib_get_long(gh, "endStep", &lpar); + if (status == 0) *endStep = (int) (((double) lpar * timeunit_factor(timeunits, timeunits2)) + 0.5); + // printf("%d %d %d %d %d %g\n", *startStep, *endStep, lpar, timeunits, timeunits2, timeunit_factor(timeunits, timeunits2)); +} + +static CdiDateTime +gribapiGetDataDateTime(grib_handle *gh) +{ + long date; + GRIB_CHECK(grib_get_long(gh, "dataDate", &date), 0); + + long hour, minute, second; + GRIB_CHECK(grib_get_long(gh, "hour", &hour), 0); + GRIB_CHECK(grib_get_long(gh, "minute", &minute), 0); + GRIB_CHECK(grib_get_long(gh, "second", &second), 0); + + CdiDateTime dt; + dt.date = cdiDate_set(date); + dt.time.hour = hour; + dt.time.minute = minute; + dt.time.second = second; + dt.time.ms = 0; + + return dt; +} + +static void +gribapiSetDataDateTime(grib_handle *gh, CdiDateTime dataDateTime) +{ + long dataDate = (long) cdiDate_get(dataDateTime.date); + GRIB_CHECK(my_grib_set_long(gh, "dataDate", (long) dataDate), 0); + + int hour, minute, second, ms; + cdiTime_decode(dataDateTime.time, &hour, &minute, &second, &ms); + GRIB_CHECK(my_grib_set_long(gh, "hour", hour), 0); + GRIB_CHECK(my_grib_set_long(gh, "minute", minute), 0); + GRIB_CHECK(my_grib_set_long(gh, "second", second), 0); +} + +static int +gribapiGetTimeUnitFactor(int timeUnits) +{ + static bool lprint = true; + switch (timeUnits) + { + case TUNIT_SECOND: return 1; + case TUNIT_MINUTE: return 60; + case TUNIT_HOUR: return 3600; + case TUNIT_3HOURS: return 10800; + case TUNIT_6HOURS: return 21600; + case TUNIT_12HOURS: return 43200; + case TUNIT_DAY: return 86400; + default: + if (lprint) + { + Warning("Time unit %d unsupported", timeUnits); + lprint = false; + } + } + + return 0; +} + +static CdiDateTime +gribapiGetValidityDateTime(grib_handle *gh, CdiDateTime *sDateTime) +{ + CdiDateTime vDateTime; + cdiDateTime_init(sDateTime); + + long sigofrtime = 3; + if (gribEditionNumber(gh) > 1) + GRIB_CHECK(grib_get_long(gh, "significanceOfReferenceTime", &sigofrtime), 0); + else + GRIB_CHECK(grib_get_long(gh, "timeRangeIndicator", &sigofrtime), 0); + + if (sigofrtime + == 3) // XXX: This looks like a bug to me, because timeRangeIndicator == 3 does not seem to have the same meaning as + // significanceOfReferenceTime == 3. I would recommend replacing this condition with `if(!gribapiTimeIsFC())`. + { + vDateTime = gribapiGetDataDateTime(gh); + } + else + { + CdiDateTime rDateTime = gribapiGetDataDateTime(gh); + + int timeUnits = gribapiGetTimeUnits(gh); + int startStep = 0, endStep = 0; + gribapiGetSteps(gh, timeUnits, &startStep, &endStep); + + if (rDateTime.date.day > 0) + { + extern int CGRIBEX_grib_calendar; + JulianDate julianDate = julianDate_encode(CGRIBEX_grib_calendar, rDateTime); + + int64_t timeUnitFactor = gribapiGetTimeUnitFactor(timeUnits); + + // if (startStep > 0) + { + JulianDate julianDate2 = julianDate_add_seconds(julianDate, timeUnitFactor * startStep); + *sDateTime = julianDate_decode(CGRIBEX_grib_calendar, julianDate2); + } + + rDateTime = julianDate_decode(CGRIBEX_grib_calendar, julianDate_add_seconds(julianDate, timeUnitFactor * endStep)); + } + + vDateTime = rDateTime; + } + + return vDateTime; +} + +static void +grib1GetLevel(grib_handle *gh, int *leveltype, int *lbounds, int *level1, int *level2) +{ + *leveltype = 0; + *lbounds = 0; + *level1 = 0; + *level2 = 0; + + long lpar; + if (!grib_get_long(gh, "indicatorOfTypeOfLevel", &lpar)) // 1 byte + { + *leveltype = (int) lpar; + + switch (*leveltype) + { + case GRIB1_LTYPE_SIGMA_LAYER: + case GRIB1_LTYPE_HYBRID_LAYER: + case GRIB1_LTYPE_LANDDEPTH_LAYER: + { + *lbounds = 1; + break; + } + } + + if (*lbounds) + { + GRIB_CHECK(grib_get_long(gh, "topLevel", &lpar), 0); // 1 byte + if (lpar == GRIB_MISSING_LONG) lpar = 0; + *level1 = (int) lpar; + GRIB_CHECK(grib_get_long(gh, "bottomLevel", &lpar), 0); // 1 byte + if (lpar == GRIB_MISSING_LONG) lpar = 0; + *level2 = (int) lpar; + } + else + { + double dlevel; + GRIB_CHECK(grib_get_double(gh, "level", &dlevel), 0); // 2 byte + if (*leveltype == GRIB1_LTYPE_ISOBARIC) dlevel *= 100; + if (dlevel < -2.e9 || dlevel > 2.e9) dlevel = 0; + if (*leveltype == GRIB1_LTYPE_99 || *leveltype == GRIB1_LTYPE_ISOBARIC_PA) *leveltype = GRIB1_LTYPE_ISOBARIC; + + *level1 = (int) dlevel; + *level2 = 0; + } + } +} + +static double +grib2ScaleFactor(long factor) +{ + switch (factor) + { + case GRIB_MISSING_LONG: return 1; + case -9: return 1000000000; + case -8: return 100000000; + case -7: return 10000000; + case -6: return 1000000; + case -5: return 100000; + case -4: return 10000; + case -3: return 1000; + case -2: return 100; + case -1: return 10; + case 0: return 1; + case 1: return 0.1; + case 2: return 0.01; + case 3: return 0.001; + case 4: return 0.0001; + case 5: return 0.00001; + case 6: return 0.000001; + case 7: return 0.0000001; + case 8: return 0.00000001; + case 9: return 0.000000001; + default: return 0; + } +} + +static int +calcLevel(int level_sf, long factor, long level) +{ + double result = 0; + if (level != GRIB_MISSING_LONG) result = (double) level * grib2ScaleFactor(factor); + if (level_sf) result *= level_sf; + return (int) result; +} + +static void +grib2GetLevel(grib_handle *gh, int *leveltype1, int *leveltype2, int *lbounds, int *level1, int *level2, int *level_sf, + int *level_unit) +{ + *leveltype1 = 0; + *leveltype2 = -1; + *lbounds = 0; + *level1 = 0; + *level2 = 0; + *level_sf = 0; + *level_unit = 0; + + long lpar; + int status = grib_get_long(gh, "typeOfFirstFixedSurface", &lpar); // 1 byte + if (status == 0) + { + *leveltype1 = (int) lpar; + + status = grib_get_long(gh, "typeOfSecondFixedSurface", &lpar); // 1 byte + /* FIXME: assert(lpar >= INT_MIN && lpar <= INT_MAX) */ + if (status == 0) *leveltype2 = (int) lpar; + + if (*leveltype1 != 255 && *leveltype2 != 255 && *leveltype2 > 0) *lbounds = 1; + switch (*leveltype1) + { + case GRIB2_LTYPE_REFERENCE: + if (*leveltype2 == 1) *lbounds = 0; + break; + case GRIB2_LTYPE_LANDDEPTH: + *level_sf = 1000; + *level_unit = CDI_UNIT_M; + break; + case GRIB2_LTYPE_ISOBARIC: + *level_sf = 1000; + *level_unit = CDI_UNIT_PA; + break; + case GRIB2_LTYPE_SIGMA: + *level_sf = 1000; + *level_unit = 0; + break; + } + + long factor, llevel; + GRIB_CHECK(grib_get_long(gh, "scaleFactorOfFirstFixedSurface", &factor), 0); // 1 byte + GRIB_CHECK(grib_get_long(gh, "scaledValueOfFirstFixedSurface", &llevel), 0); // 4 byte + *level1 = calcLevel(*level_sf, factor, llevel); + + if (*lbounds) + { + GRIB_CHECK(grib_get_long(gh, "scaleFactorOfSecondFixedSurface", &factor), 0); // 1 byte + GRIB_CHECK(grib_get_long(gh, "scaledValueOfSecondFixedSurface", &llevel), 0); // 4 byte + *level2 = calcLevel(*level_sf, factor, llevel); + } + } +} + +static void +gribGetLevel(grib_handle *gh, int *leveltype1, int *leveltype2, int *lbounds, int *level1, int *level2, int *level_sf, + int *level_unit, var_tile_t *tiles) +{ + if (gribEditionNumber(gh) <= 1) + { + grib1GetLevel(gh, leveltype1, lbounds, level1, level2); + *leveltype2 = -1; + *level_sf = 0; + *level_unit = 0; + } + else + { + grib2GetLevel(gh, leveltype1, leveltype2, lbounds, level1, level2, level_sf, level_unit); + + // read in tiles attributes (if there are any) + tiles->tileindex = (int) gribGetLongDefault(gh, cdiSubtypeAttributeName[SUBTYPE_ATT_TILEINDEX], 0); + tiles->totalno_of_tileattr_pairs + = (int) gribGetLongDefault(gh, cdiSubtypeAttributeName[SUBTYPE_ATT_TOTALNO_OF_TILEATTR_PAIRS], -1); + tiles->tileClassification = (int) gribGetLongDefault(gh, cdiSubtypeAttributeName[SUBTYPE_ATT_TILE_CLASSIFICATION], -1); + tiles->numberOfTiles = (int) gribGetLongDefault(gh, cdiSubtypeAttributeName[SUBTYPE_ATT_NUMBER_OF_TILES], -1); + tiles->numberOfAttributes = (int) gribGetLongDefault(gh, cdiSubtypeAttributeName[SUBTYPE_ATT_NUMBER_OF_ATTR], -1); + tiles->attribute = (int) gribGetLongDefault(gh, cdiSubtypeAttributeName[SUBTYPE_ATT_TILEATTRIBUTE], -1); + } +} + +static void +gribapiGetString(grib_handle *gh, const char *key, char *string, size_t length) +{ + string[0] = 0; + + int ret = grib_get_string(gh, key, string, &length); + if (ret != 0) + { + fprintf(stderr, "grib_get_string(gh, \"%s\", ...) failed!\n", key); + GRIB_CHECK(ret, 0); + } + // clang-format off + if (length == 8 && memcmp(string, "unknown", length) == 0) string[0] = 0; + else if (length == 2 && memcmp(string, "~", length) == 0) string[0] = 0; + // clang-format on +} + +static void +param_to_name(int param, char *name) +{ + int pdis, pcat, pnum; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + if (pdis == 255) + { + sprintf(name, "code%d", pnum); + } + else + { + sprintf(name, "param%d.%d.%d", pnum, pcat, pdis); + } +} + +static int +gribapiGetEnsembleInfo(grib_handle *gh, long *typeOfEnsembleForecast, long *numberOfForecastsInEnsemble, long *perturbationNumber) +{ + int status = 0; + if (grib_get_long(gh, "typeOfEnsembleForecast", typeOfEnsembleForecast) == 0) + { + GRIB_CHECK(grib_get_long(gh, "numberOfForecastsInEnsemble", numberOfForecastsInEnsemble), 0); + GRIB_CHECK(grib_get_long(gh, "perturbationNumber", perturbationNumber), 0); + if (*perturbationNumber > 0) status = 1; + } + + if (status == 0) + { + *typeOfEnsembleForecast = 0; + *perturbationNumber = 0; + *numberOfForecastsInEnsemble = 0; + } + + return status; +} + +static VarScanKeys +gribapiGetScanKeys(grib_handle *gh) +{ + VarScanKeys scanKeys; + varScanKeysInit(&scanKeys); + + long typeOfEnsembleForecast = 0, numberOfForecastsInEnsemble = 0, perturbationNumber = 0; + gribapiGetEnsembleInfo(gh, &typeOfEnsembleForecast, &numberOfForecastsInEnsemble, &perturbationNumber); + scanKeys.perturbationNumber = (short) perturbationNumber; + + long typeOfGeneratingProcess = 0; + if (grib_get_long(gh, "typeOfGeneratingProcess", &typeOfGeneratingProcess) == 0) + scanKeys.typeOfGeneratingProcess = (short) typeOfGeneratingProcess; + + return scanKeys; +} + +static void +gribapiGetNameKeys(grib_handle *gh, int varID) +{ + char string[CDI_MAX_NAME]; + + size_t vlen = CDI_MAX_NAME; + gribapiGetString(gh, "name", string, vlen); // longname + if (string[0]) varDefKeyString(varID, CDI_KEY_LONGNAME, string); + + gribapiGetString(gh, "units", string, vlen); + if (string[0]) varDefKeyString(varID, CDI_KEY_UNITS, string); + + string[0] = 0; + int status = grib_get_string(gh, "cfName", string, &vlen); + if (status != 0 || vlen <= 1 || strncmp(string, "unknown", 7) == 0) string[0] = 0; + if (string[0]) varDefKeyString(varID, CDI_KEY_STDNAME, string); +} + +static void +gribapiGetKeys(grib_handle *gh, int varID) +{ + long tablesVersion = 0; + if (grib_get_long(gh, "tablesVersion", &tablesVersion) == 0) varDefKeyInt(varID, CDI_KEY_TABLESVERSION, (int) tablesVersion); + + long localTablesVersion = 0; + if (grib_get_long(gh, "localTablesVersion", &localTablesVersion) == 0) + varDefKeyInt(varID, CDI_KEY_LOCALTABLESVERSION, (int) localTablesVersion); + + long typeOfGeneratingProcess = 0; + if (grib_get_long(gh, "typeOfGeneratingProcess", &typeOfGeneratingProcess) == 0) + varDefKeyInt(varID, CDI_KEY_TYPEOFGENERATINGPROCESS, (int) typeOfGeneratingProcess); + + long productDefinitionTemplate = 0; + if (grib_get_long(gh, "productDefinitionTemplateNumber", &productDefinitionTemplate) == 0) + varDefKeyInt(varID, CDI_KEY_PRODUCTDEFINITIONTEMPLATE, (int) productDefinitionTemplate); + + long typeOfProcessedData = 0; + if (grib_get_long(gh, "typeOfProcessedData", &typeOfProcessedData) == 0) + varDefKeyInt(varID, CDI_KEY_TYPEOFPROCESSEDDATA, (int) typeOfProcessedData); + + long shapeOfTheEarth = 0; + if (grib_get_long(gh, "shapeOfTheEarth", &shapeOfTheEarth) == 0) + varDefKeyInt(varID, CDI_KEY_SHAPEOFTHEEARTH, (int) shapeOfTheEarth); + + long backgroundProcess = 0; + if (grib_get_long(gh, "backgroundProcess", &backgroundProcess) == 0) + varDefKeyInt(varID, CDI_KEY_BACKGROUNDPROCESS, (int) backgroundProcess); + + long typeOfTimeIncrement = 0; + if (grib_get_long(gh, "typeOfTimeIncrement", &typeOfTimeIncrement) == 0) + varDefKeyInt(varID, CDI_KEY_TYPEOFTIMEINCREMENT, (int) typeOfTimeIncrement); + /* + long constituentType = 0; + if ( grib_get_long(gh, "constituentType", &constituentType) == 0 ) + varDefKeyInt(varID, CDI_KEY_CONSTITUENTTYPE, (int) constituentType); + */ + + /* + Get the ensemble Info from the grib-2 Tables and update the intermediate datastructure. + Further update to the "vlist" is handled in the same way as for GRIB-1 by "cdi_generate_vars" + */ + long typeOfEnsembleForecast = 0, numberOfForecastsInEnsemble = 0, perturbationNumber = 0; + gribapiGetEnsembleInfo(gh, &typeOfEnsembleForecast, &numberOfForecastsInEnsemble, &perturbationNumber); + if (perturbationNumber > 0) + { + varDefKeyInt(varID, CDI_KEY_TYPEOFENSEMBLEFORECAST, (int) typeOfEnsembleForecast); + varDefKeyInt(varID, CDI_KEY_NUMBEROFFORECASTSINENSEMBLE, (int) numberOfForecastsInEnsemble); + varDefKeyInt(varID, CDI_KEY_PERTURBATIONNUMBER, (int) perturbationNumber); + } + + long section2Length = 0; + int status = grib_get_long(gh, "section2Length", §ion2Length); + if (status == 0 && section2Length > 0) + { + long grib2LocalSectionNumber; + long mpimType, mpimClass, mpimUser; + status = grib_get_long(gh, "grib2LocalSectionNumber", &grib2LocalSectionNumber); + if (status == 0) + { + size_t section2PaddingLength = 0; + status = grib_get_size(gh, "section2Padding", §ion2PaddingLength); + if (status == 0 && section2PaddingLength > 0) + { + varDefKeyInt(varID, CDI_KEY_GRIB2LOCALSECTIONNUMBER, (int) grib2LocalSectionNumber); + varDefKeyInt(varID, CDI_KEY_SECTION2PADDINGLENGTH, (int) section2PaddingLength); + unsigned char *section2Padding = (unsigned char *) Malloc(section2PaddingLength); + grib_get_bytes(gh, "section2Padding", section2Padding, §ion2PaddingLength); + varDefKeyBytes(varID, CDI_KEY_SECTION2PADDING, section2Padding, (int) section2PaddingLength); + Free(section2Padding); + } + else if (grib_get_long(gh, "mpimType", &mpimType) == 0 && grib_get_long(gh, "mpimClass", &mpimClass) == 0 + && grib_get_long(gh, "mpimUser", &mpimUser) == 0) + { + varDefKeyInt(varID, CDI_KEY_MPIMTYPE, mpimType); + varDefKeyInt(varID, CDI_KEY_MPIMCLASS, mpimClass); + varDefKeyInt(varID, CDI_KEY_MPIMUSER, mpimUser); + + size_t revNumLen = 20; + unsigned char revNumber[revNumLen]; + if (grib_get_bytes(gh, "revNumber", revNumber, &revNumLen) == 0) + varDefKeyBytes(varID, CDI_KEY_REVNUMBER, revNumber, (int) revNumLen); + + long revStatus; + grib_get_long(gh, "revStatus", &revStatus); + varDefKeyInt(varID, CDI_KEY_REVSTATUS, revStatus); + } + } + } +} + +static void +gribapiDefProjRLL(grib_handle *gh, int gridID) +{ + double xpole = 0, ypole = 0, angle = 0; + grib_get_double(gh, "latitudeOfSouthernPoleInDegrees", &ypole); + grib_get_double(gh, "longitudeOfSouthernPoleInDegrees", &xpole); + grib_get_double(gh, "angleOfRotation", &angle); + xpole -= 180; + if (fabs(ypole) > 0) ypole = -ypole; // change from south to north pole + if (fabs(angle) > 0) angle = -angle; + + gridDefParamRLL(gridID, xpole, ypole, angle); +} + +static void +shapeOfTheEarthToRadius(long shapeOfTheEarth, double *a, double *b, double *rf) +{ + // clang-format off + switch (shapeOfTheEarth) + { + case 2: *a = 6378160.0; *b = 6356775.0; *rf = 297.0; break; + case 4: *a = 6378137.0; *b = 6356752.314; *rf = 298.257222101; break; + case 6: *a = 6371229.0; break; + case 8: *a = 6371200.0; break; + case 0: *a = 6367470.0; break; + default: *a = 6367470.0; + } + // clang-format on +} + +static void +gribapiDefProjLCC(grib_handle *gh, int gridID) +{ + struct CDI_GridProjParams gpp; + gridProjParamsInit(&gpp); + + long shapeOfTheEarth; + grib_get_long(gh, "shapeOfTheEarth", &shapeOfTheEarth); + shapeOfTheEarthToRadius(shapeOfTheEarth, &gpp.a, &gpp.b, &gpp.rf); + + long projflag = 0; + grib_get_double(gh, "longitudeOfFirstGridPointInDegrees", &gpp.xval_0); + grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &gpp.yval_0); + grib_get_double(gh, "LoVInDegrees", &gpp.lon_0); + grib_get_double(gh, "Latin1InDegrees", &gpp.lat_1); + grib_get_double(gh, "Latin2InDegrees", &gpp.lat_2); + grib_get_long(gh, "projectionCentreFlag", &projflag); + bool lsouth = gribbyte_get_bit((int) projflag, 1); + if (lsouth) + { + gpp.lat_1 = -gpp.lat_1; + gpp.lat_2 = -gpp.lat_2; + } + + gpp.lat_0 = gpp.lat_2; + + if (proj_lonlat_to_lcc_func) + { + double x_0 = gpp.xval_0, y_0 = gpp.yval_0; + proj_lonlat_to_lcc_func(gpp, (size_t) 1, &x_0, &y_0); + if (IS_NOT_EQUAL(x_0, gpp.mv) && IS_NOT_EQUAL(y_0, gpp.mv)) + { + gpp.x_0 = -x_0; + gpp.y_0 = -y_0; + } + } + + gridDefParamsLCC(gridID, gpp); +} + +static void +gribapiDefProjSTERE(grib_handle *gh, int gridID) +{ + struct CDI_GridProjParams gpp; + gridProjParamsInit(&gpp); + + long shapeOfTheEarth; + grib_get_long(gh, "shapeOfTheEarth", &shapeOfTheEarth); + shapeOfTheEarthToRadius(shapeOfTheEarth, &gpp.a, &gpp.b, &gpp.rf); + + grib_get_double(gh, "longitudeOfFirstGridPointInDegrees", &gpp.xval_0); + grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &gpp.yval_0); + grib_get_double(gh, "LaDInDegrees", &gpp.lat_1); + grib_get_double(gh, "orientationOfTheGridInDegrees", &gpp.lon_0); + + long southPoleOnProjectionPlane; + grib_get_long(gh, "southPoleOnProjectionPlane", &southPoleOnProjectionPlane); + gpp.lat_0 = southPoleOnProjectionPlane ? -90.0 : 90.0; + + if (proj_lonlat_to_stere_func) + { + double x_0 = gpp.xval_0, y_0 = gpp.yval_0; + proj_lonlat_to_stere_func(gpp, (size_t) 1, &x_0, &y_0); + if (IS_NOT_EQUAL(x_0, gpp.mv) && IS_NOT_EQUAL(y_0, gpp.mv)) + { + gpp.x_0 = -x_0; + gpp.y_0 = -y_0; + } + } + + gridDefParamsSTERE(gridID, gpp); +} + +static void +gribapiAddRecord(stream_t *streamptr, int param, grib_handle *gh, size_t recsize, off_t position, int datatype, int comptype, + const char *varname, int leveltype1, int leveltype2, int lbounds, int level1, int level2, int level_sf, + int level_unit, VarScanKeys *scanKeys, const var_tile_t *tiles, bool lread_additional_keys, void *fdbItem) +{ + int vlistID = streamptr->vlistID; + int tsID = streamptr->curTsID; + int recID = recordNewEntry(streamptr, tsID); + record_t *record = &streamptr->tsteps[tsID].records[recID]; + + int tsteptype = gribapiGetTsteptype(gh); + + // fprintf(stderr, "param %d %d %d %d\n", param, level1, level2, leveltype1); + + record->size = recsize; + record->position = position; + record->param = param; + record->ilevel = level1; + record->ilevel2 = level2; + record->ltype = leveltype1; + record->tsteptype = (short) tsteptype; + record->gridsize = gribapiGetGridsize(gh); + record->scanKeys = *scanKeys; + record->tiles = tiles ? *tiles : dummy_tiles; +#ifdef HAVE_LIBFDB5 + record->fdbItem = fdbItem; +#endif + + strncpy(record->varname, varname, sizeof(record->varname) - 1); + record->varname[sizeof(record->varname) - 1] = 0; + + streamptr->tsteps[tsID].nallrecs++; + streamptr->nrecs++; + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + CdiQuery *query = streamptr->query; + if (query && cdiQueryName(query, varname) < 0) + { + record->used = false; + return; + } + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + grid_t *grid = (grid_t *) Malloc(sizeof(*grid)); + bool uvRelativeToGrid = gribapiGetGrid(gh, grid); + + struct addIfNewRes gridAdded = cdiVlistAddGridIfNew(vlistID, grid, 0); + int gridID = gridAdded.Id; + // clang-format off + if (!gridAdded.isNew) + { + grid_free(grid); + Free(grid); + } + else if (grid->projtype == CDI_PROJ_RLL) gribapiDefProjRLL(gh, gridID); + else if (grid->projtype == CDI_PROJ_LCC) gribapiDefProjLCC(gh, gridID); + else if (grid->projtype == CDI_PROJ_STERE) gribapiDefProjSTERE(gh, gridID); + // clang-format on + + int zaxistype = gribapiGetZaxisType(gribEditionNumber(gh), leveltype1); + + switch (zaxistype) + { + case ZAXIS_HYBRID: + case ZAXIS_HYBRID_HALF: + { + long lpar; + GRIB_CHECK(grib_get_long(gh, "NV", &lpar), 0); + /* FIXME: assert(lpar >= 0) */ + size_t vctsize = (size_t) lpar; + if (vctsize > 0) + { + double *vctptr = (double *) Malloc(vctsize * sizeof(double)); + size_t dummy = vctsize; + GRIB_CHECK(grib_get_double_array(gh, "pv", vctptr, &dummy), 0); + varDefVCT(vctsize, vctptr); + Free(vctptr); + } + break; + } + case ZAXIS_REFERENCE: + { + unsigned char uuid[CDI_UUID_SIZE]; + long lpar; + GRIB_CHECK(grib_get_long(gh, "NV", &lpar), 0); + if (lpar != 6) fprintf(stderr, "Warning ...\n"); + GRIB_CHECK(grib_get_long(gh, "nlev", &lpar), 0); + int nhlev = (int) lpar; + GRIB_CHECK(grib_get_long(gh, "numberOfVGridUsed", &lpar), 0); + int nvgrid = (int) lpar; + size_t len = (size_t) CDI_UUID_SIZE; + memset(uuid, 0, CDI_UUID_SIZE); + GRIB_CHECK(grib_get_bytes(gh, "uuidOfVGrid", uuid, &len), 0); + varDefZAxisReference(nhlev, nvgrid, uuid); + break; + } + } + + // if ( datatype > 32 ) datatype = CDI_DATATYPE_PACK32; + if (datatype < 0) datatype = CDI_DATATYPE_PACK; + + // add the previously read record data to the (intermediate) list of records + int tile_index = 0; + int varID = 0, levelID = 0; + varAddRecord(recID, param, gridID, zaxistype, lbounds, level1, level2, level_sf, level_unit, datatype, &varID, &levelID, + tsteptype, leveltype1, leveltype2, varname, scanKeys, tiles, &tile_index); + + record->varID = (short) varID; + record->levelID = levelID; + + varDefCompType(varID, comptype); + + if (uvRelativeToGrid) varDefKeyInt(varID, CDI_KEY_UVRELATIVETOGRID, 1); + + if (varname[0]) gribapiGetNameKeys(gh, varID); + gribapiGetKeys(gh, varID); + + if (lread_additional_keys) + { + long lval; + double dval; + for (int i = 0; i < cdiNAdditionalGRIBKeys; i++) + { + // note: if the key is not defined, we do not throw an error! + if (grib_get_long(gh, cdiAdditionalGRIBKeys[i], &lval) == 0) + varDefOptGribInt(varID, tile_index, lval, cdiAdditionalGRIBKeys[i]); + if (grib_get_double(gh, cdiAdditionalGRIBKeys[i], &dval) == 0) + varDefOptGribDbl(varID, tile_index, dval, cdiAdditionalGRIBKeys[i]); + } + } + + if (varInqInst(varID) == CDI_UNDEFID) + { + long center, subcenter; + GRIB_CHECK(grib_get_long(gh, "centre", ¢er), 0); + GRIB_CHECK(grib_get_long(gh, "subCentre", &subcenter), 0); + int instID = institutInq((int) center, (int) subcenter, NULL, NULL); + if (instID == CDI_UNDEFID) instID = institutDef((int) center, (int) subcenter, NULL, NULL); + varDefInst(varID, instID); + } + + if (varInqModel(varID) == CDI_UNDEFID) + { + long processID; + if (grib_get_long(gh, "generatingProcessIdentifier", &processID) == 0) + { + /* FIXME: assert(processID >= INT_MIN && processID <= INT_MAX) */ + int modelID = modelInq(varInqInst(varID), (int) processID, NULL); + if (modelID == CDI_UNDEFID) modelID = modelDef(varInqInst(varID), (int) processID, NULL); + varDefModel(varID, modelID); + } + } + + if (varInqTable(varID) == CDI_UNDEFID) + { + int pdis, pcat, pnum; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + + if (pdis == 255) + { + int tabnum = pcat; + int tableID = tableInq(varInqModel(varID), tabnum, NULL); + if (tableID == CDI_UNDEFID) tableID = tableDef(varInqModel(varID), tabnum, NULL); + varDefTable(varID, tableID); + } + } + + if (CDI_Debug) + Message("varID = %d param = %d zaxistype = %d gridID = %d levelID = %d", varID, param, zaxistype, gridID, levelID); +} + +static compvar2_t +gribapiVarSet(int param, int level1, int level2, int leveltype, int tsteptype, size_t gridsize, char *name, VarScanKeys scanKeys, + var_tile_t tiles_data) +{ + compvar2_t compVar; + memset(&compVar, 0, sizeof(compvar2_t)); + size_t maxlen = sizeof(compVar.name); + size_t len = strlen(name); + if (len > maxlen) len = maxlen; + + compVar.param = param; + compVar.level1 = level1; + compVar.level2 = level2; + compVar.ltype = leveltype; + compVar.tsteptype = tsteptype; + compVar.gridsize = gridsize; + // memset(compVar.name, 0, maxlen); + memcpy(compVar.name, name, len); + compVar.scanKeys = scanKeys; + compVar.tiles = tiles_data; + + return compVar; +} + +static int +gribapiVarCompare(compvar2_t compVar, record_t record, int flag) +{ + compvar2_t compVar0; + memset(&compVar0, 0, sizeof(compvar2_t)); + compVar0.param = record.param; + compVar0.level1 = record.ilevel; + compVar0.level2 = record.ilevel2; + compVar0.ltype = record.ltype; + compVar0.tsteptype = record.tsteptype; + compVar0.gridsize = record.gridsize; + memcpy(compVar0.name, record.varname, sizeof(compVar.name)); + + if (flag == 0) + { + if (compVar0.tsteptype == TSTEP_INSTANT && compVar.tsteptype == TSTEP_INSTANT3) compVar0.tsteptype = TSTEP_INSTANT3; + if (compVar0.tsteptype == TSTEP_INSTANT3 && compVar.tsteptype == TSTEP_INSTANT) compVar0.tsteptype = TSTEP_INSTANT; + } + + compVar0.scanKeys = record.scanKeys; + compVar0.tiles = record.tiles; + + // printf("var1: level1=%d level2=%d\n", compVar.level1, compVar.level2); + // printf("var2: level1=%d level2=%d\n", compVar0.level1, compVar0.level2); + + return memcmp(&compVar0, &compVar, sizeof(compvar2_t)); +} + +static grib_handle * +gribapiGetDiskRepresentation(size_t recsize, size_t *buffersize, void **gribbuffer, int *outDatatype, int *outCompressionType) +{ + int gribversion = (int) ((char *) *gribbuffer)[7]; + + if (gribversion <= 1) *outCompressionType = grbDecompress(recsize, buffersize, gribbuffer); + + grib_handle *gh = grib_handle_new_from_message(NULL, *gribbuffer, recsize); + + bool lieee = false; + + if (gribversion > 1) + { + size_t len = 256; + char typeOfPacking[256]; + if (grib_get_string(gh, "packingType", typeOfPacking, &len) == 0) + { + // fprintf(stderr, "packingType %zu %s\n", len, typeOfPacking); + if (strncmp(typeOfPacking, "grid_jpeg", len) == 0) + *outCompressionType = CDI_COMPRESS_JPEG; + else if (strncmp(typeOfPacking, "grid_ccsds", len) == 0) + *outCompressionType = CDI_COMPRESS_AEC; + else if (strncmp(typeOfPacking, "grid_ieee", len) == 0) + lieee = true; + } + } + + if (lieee) + { + long precision; + int status = grib_get_long(gh, "precision", &precision); + *outDatatype = (status == 0 && precision == 1) ? CDI_DATATYPE_FLT32 : CDI_DATATYPE_FLT64; + } + else + { + *outDatatype = CDI_DATATYPE_PACK; + long bitsPerValue; + if (grib_get_long(gh, "bitsPerValue", &bitsPerValue) == 0) + { + if (bitsPerValue > 0 && bitsPerValue <= 32) *outDatatype = (int) bitsPerValue; + } + } + + return gh; +} + +typedef enum +{ + CHECKTIME_OK, + CHECKTIME_SKIP, + CHECKTIME_STOP, + CHECKTIME_INCONSISTENT +} checkTimeResult; + +static checkTimeResult +checkTime(stream_t *streamptr, compvar2_t compVar, CdiDateTime verificationTime, CdiDateTime expectedVTime) +{ + // First determine whether the current record exists already. + int recID = 0; + for (; recID < streamptr->nrecs; recID++) + { + if (gribapiVarCompare(compVar, streamptr->tsteps[0].records[recID], 1) == 0) break; + } + bool recordExists = (recID < streamptr->nrecs); + + // Then we need to know whether the verification time is consistent. + bool consistentTime = cdiDateTime_isEQ(verificationTime, expectedVTime); + + // Finally, we make a decision. + if (CDI_Inventory_Mode == 1) + { + if (recordExists) return CHECKTIME_STOP; + if (!consistentTime) return CHECKTIME_INCONSISTENT; + } + else + { + if (!consistentTime) return CHECKTIME_STOP; + if (recordExists) return CHECKTIME_SKIP; + } + + return CHECKTIME_OK; +} + +#define gribWarning(text, nrecs, timestep, varname, param, level1, level2) \ + do \ + { \ + char paramstr[32]; \ + cdiParamToString(param, paramstr, sizeof(paramstr)); \ + Warning("Record %2d (name=%s id=%s lev1=%d lev2=%d) timestep %d: %s", nrecs, varname, paramstr, level1, level2, timestep, \ + text); \ + } \ + while (0) + +#ifdef HAVE_LIBFDB5 +#endif + +int +fdbScanTimesteps(stream_t *streamptr) +{ +#ifdef HAVE_LIBFDB5 + void *gribbuffer = NULL; + size_t buffersize = 0; + grib_handle *gh = NULL; + + fdb_handle_t *fdbHandle = streamptr->protocolData; + + char **fdbItemList = NULL; + fdb_request_t *request = create_fdb_request(streamptr->filename); + int numItems = fdb_fill_itemlist(fdbHandle, request, &fdbItemList); + fdb_delete_request(request); + if (numItems == 0) Error("FDB request does not find any database entries!"); + if (CDI_Debug) + for (int i = 0; i < numItems; ++i) printf("item[%d] = %s\n", i + 1, fdbItemList[i]); + + KeyValueEntry *keyValueList = (KeyValueEntry *) malloc(numItems * sizeof(KeyValueEntry)); + for (int i = 0; i < numItems; ++i) keyValueList[i].item = NULL; + + RecordInfoEntry *recordInfoList = (RecordInfoEntry *) malloc(numItems * sizeof(RecordInfoEntry)); + for (int i = 0; i < numItems; ++i) record_info_entry_init(&recordInfoList[i]); + + for (int i = 0; i < numItems; ++i) decode_fdbitem(fdbItemList[i], &keyValueList[i]); + if (check_keyvalueList(numItems, keyValueList) != 0) return 1; + for (int i = 0; i < numItems; ++i) decode_keyvalue(&keyValueList[i], &recordInfoList[i]); + + int numRecords = get_num_records(numItems, recordInfoList); + int numTimesteps = numItems / numRecords; + if (CDI_Debug) Message("numRecords=%d numTimesteps=%d", numRecords, numTimesteps); + + for (int i = 0; i < numItems; ++i) + if (keyValueList[i].item) free(keyValueList[i].item); + free(keyValueList); + + if (numRecords == 0) return CDI_EUFSTRUCT; + + int *timestepRecordOffset = (int *) malloc(numTimesteps * sizeof(int)); + for (int i = 0; i < numTimesteps; i++) timestepRecordOffset[i] = i * numRecords; + numTimesteps = remove_duplicate_timesteps(recordInfoList, numRecords, numTimesteps, timestepRecordOffset); + if (CDI_Debug) Message("numRecords=%d numTimesteps=%d", numRecords, numTimesteps); + + CdiDateTime vDateTime0; + cdiDateTime_init(&vDateTime0); + int fcast = 0; + + streamptr->curTsID = 0; + + int tsIDnew = tstepsNewEntry(streamptr); + if (tsIDnew != 0) Error("Internal problem! tstepsNewEntry returns %d", tsIDnew); + + taxis_t *taxis = &streamptr->tsteps[tsIDnew].taxis; + + for (int recID = 0; recID < numRecords; recID++) + { + long recsize = fdb_read_record(fdbHandle, fdbItemList[recID], &buffersize, &gribbuffer); + + int datatype, comptype = 0; + gh = gribapiGetDiskRepresentation(recsize, &buffersize, &gribbuffer, &datatype, &comptype); + + GRIB_CHECK(my_grib_set_double(gh, "missingValue", CDI_Default_Missval), 0); + + int leveltype1 = -1, leveltype2 = -1, lbounds, level_sf, level_unit; + var_tile_t tiles = dummy_tiles; + int level1 = 0, level2 = 0; + gribGetLevel(gh, &leveltype1, &leveltype2, &lbounds, &level1, &level2, &level_sf, &level_unit, &tiles); + + char varname[256]; + gribapiGetString(gh, "shortName", varname, sizeof(varname)); + + int param = gribapiGetParam(gh); + + CdiDateTime sDateTime; + CdiDateTime vDateTime = gribapiGetValidityDateTime(gh, &sDateTime); + + VarScanKeys scanKeys = gribapiGetScanKeys(gh); + + if (recID == 0) + { + vDateTime0 = vDateTime; + taxis->rDateTime = gribapiGetDataDateTime(gh); + fcast = gribapiTimeIsFC(gh); + if (fcast) taxis->unit = gribapiGetTimeUnits(gh); + taxis->fDateTime = taxis->rDateTime; + taxis->sDateTime = sDateTime; + taxis->vDateTime = vDateTime; + } + + if (CDI_Debug) + { + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + Message("%4d name=%s id=%s ltype=%d lev1=%d lev2=%d vDateTime=%s", recID + 1, varname, paramstr, leveltype1, level1, + level2, CdiDateTime_string(vDateTime)); + } + + var_tile_t *ptiles = memcmp(&tiles, &dummy_tiles, sizeof(var_tile_t)) ? &tiles : NULL; + int recpos = 0; + gribapiAddRecord(streamptr, param, gh, recsize, recpos, datatype, comptype, varname, leveltype1, leveltype2, lbounds, level1, + level2, level_sf, level_unit, &scanKeys, ptiles, true, fdbItemList[recID]); + fdbItemList[recID] = NULL; + + grib_handle_delete(gh); + gh = NULL; + } + + if (gh) grib_handle_delete(gh); + + cdi_generate_vars(streamptr); + + taxis->type = fcast ? TAXIS_RELATIVE : TAXIS_ABSOLUTE; + int taxisID = taxisCreate(taxis->type); + + vlistDefTaxis(streamptr->vlistID, taxisID); + + streamScanResizeRecords1(streamptr); + + streamptr->record->buffer = gribbuffer; + streamptr->record->buffersize = buffersize; + + if (numTimesteps == 1) streamptr->ntsteps = 1; + streamScanTimeConstAdjust(streamptr, taxis); + + for (int tsID = 1; tsID < numTimesteps; tsID++) + { + int recordOffset = timestepRecordOffset[tsID]; + int vdate = recordInfoList[recordOffset].date; + int vtime = recordInfoList[recordOffset].time * 100; + // printf("timestep=%d recOffset=%d date=%d time=%d\n", tsID + 1, recordOffset, vdate, vtime); + + int tsIDnext = tstepsNewEntry(streamptr); + if (tsIDnext != tsID) Error("Internal error. tsID = %d", tsID); + + streamptr->tsteps[tsID - 1].next = true; + streamptr->tsteps[tsID].position = 0; + + taxis = &streamptr->tsteps[tsID].taxis; + + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + int nrecs = (tsID == 1) ? streamScanInitRecords2(streamptr) : streamScanInitRecords(streamptr, tsID); + if (nrecs != numRecords) Error("Internal error. nrecs = %d", nrecs); + + taxis->vDateTime = cdiDateTime_set(vdate, vtime); + + int rindex = 0; + for (int recID = 0; recID < numRecords; recID++) + { + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + rindex++; + + records[recID].position = 0; + records[recID].size = 0; + records[recID].fdbItem = fdbItemList[recordOffset + recID]; + fdbItemList[recordOffset + recID] = NULL; + } + + if (tsID == 1) streamptr->tsteps[1].nrecs = numRecords; + } + + streamptr->rtsteps = numTimesteps; + streamptr->ntsteps = numTimesteps; + + for (int i = 0; i < numItems; ++i) + if (fdbItemList[i]) free(fdbItemList[i]); + + if (fdbItemList) free(fdbItemList); + if (recordInfoList) free(recordInfoList); + if (timestepRecordOffset) free(timestepRecordOffset); +#endif + + return 0; +} + +int +gribapiScanTimestep1(stream_t *streamptr) +{ + CdiDateTime vDateTime0; + cdiDateTime_init(&vDateTime0); + off_t recpos = 0; + void *gribbuffer = NULL; + size_t buffersize = 0; + int nrecsScanned = 0; // Only used for debug output. + bool warn_time = true; + int fcast = 0; + grib_handle *gh = NULL; + + streamptr->curTsID = 0; + + int tsID = tstepsNewEntry(streamptr); + if (tsID != 0) Error("Internal problem! tstepsNewEntry returns %d", tsID); + + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + int fileID = streamptr->fileID; + + unsigned nrecs = 0; + while (true) + { + size_t recsize = gribGetSize(fileID); + recpos = fileGetPos(fileID); + + if (recsize == 0) + { + streamptr->ntsteps = 1; + break; + } + + ensureBufferSize(recsize, &buffersize, &gribbuffer); + + size_t readsize = recsize; + // Search for next 'GRIB', read the following record, and position file offset after it. + if (gribRead(fileID, gribbuffer, &readsize)) break; + + nrecsScanned++; + + int datatype, comptype = 0; + gh = gribapiGetDiskRepresentation(recsize, &buffersize, &gribbuffer, &datatype, &comptype); + + GRIB_CHECK(my_grib_set_double(gh, "missingValue", CDI_Default_Missval), 0); + + int leveltype1 = -1, leveltype2 = -1, lbounds, level_sf, level_unit; + var_tile_t tiles = dummy_tiles; + int level1 = 0, level2 = 0; + gribGetLevel(gh, &leveltype1, &leveltype2, &lbounds, &level1, &level2, &level_sf, &level_unit, &tiles); + + char varname[256]; + gribapiGetString(gh, "shortName", varname, sizeof(varname)); + + int param = gribapiGetParam(gh); + + if (!varname[0]) param_to_name(param, varname); + + CdiDateTime sDateTime; + CdiDateTime vDateTime = gribapiGetValidityDateTime(gh, &sDateTime); + + VarScanKeys scanKeys = gribapiGetScanKeys(gh); + + if (nrecs == 0) + { + vDateTime0 = vDateTime; + taxis->rDateTime = gribapiGetDataDateTime(gh); + fcast = gribapiTimeIsFC(gh); + if (fcast) taxis->unit = gribapiGetTimeUnits(gh); + taxis->fDateTime = taxis->rDateTime; + taxis->sDateTime = sDateTime; + taxis->vDateTime = vDateTime; + } + else + { + if (cdiDateTime_isLT(sDateTime, taxis->sDateTime)) taxis->sDateTime = sDateTime; + + int tsteptype = gribapiGetTsteptype(gh); + size_t gridsize = gribapiGetGridsize(gh); + checkTimeResult result = checkTime( + streamptr, gribapiVarSet(param, level1, level2, leveltype1, tsteptype, gridsize, varname, scanKeys, tiles), vDateTime, + vDateTime0); + if (result == CHECKTIME_STOP) + { + nrecsScanned--; + break; + } + else if (result == CHECKTIME_SKIP) + { + gribWarning("Parameter already exist, skipped!", nrecsScanned, tsID + 1, varname, param, level1, level2); + continue; + } + else if (result == CHECKTIME_INCONSISTENT && warn_time) + { + gribWarning("Inconsistent verification time!", nrecsScanned, tsID + 1, varname, param, level1, level2); + warn_time = false; + } + assert(result == CHECKTIME_OK || result == CHECKTIME_INCONSISTENT); + } + + nrecs++; + + if (CDI_Debug) + { + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + Message("%4u %8d name=%s id=%s ltype=%d lev1=%d lev2=%d vDateTime=%s", nrecs, (int) recpos, varname, paramstr, leveltype1, + level1, level2, CdiDateTime_string(vDateTime)); + } + + var_tile_t *ptiles = memcmp(&tiles, &dummy_tiles, sizeof(var_tile_t)) ? &tiles : NULL; + gribapiAddRecord(streamptr, param, gh, recsize, recpos, datatype, comptype, varname, leveltype1, leveltype2, lbounds, level1, + level2, level_sf, level_unit, &scanKeys, ptiles, true, NULL); + + grib_handle_delete(gh); + gh = NULL; + } + + if (gh) grib_handle_delete(gh); + + streamptr->rtsteps = 1; + + if (nrecs == 0) return CDI_EUFSTRUCT; + + if (streamptr->query) + { + int numEntries = cdiQueryNumEntries(streamptr->query); + int numEntriesFound = cdiQueryNumEntriesFound(streamptr->query); + cdiQueryPrintEntriesNotFound(streamptr->query); + if (numEntriesFound == 0 || (CDI_Query_Abort && numEntries != numEntriesFound)) return CDI_EQENF; + } + + cdi_generate_vars(streamptr); + + taxis->type = fcast ? TAXIS_RELATIVE : TAXIS_ABSOLUTE; + int taxisID = taxisCreate(taxis->type); + + int vlistID = streamptr->vlistID; + vlistDefTaxis(vlistID, taxisID); + + streamScanResizeRecords1(streamptr); + + streamptr->record->buffer = gribbuffer; + streamptr->record->buffersize = buffersize; + + streamScanTsFixNtsteps(streamptr, recpos); + streamScanTimeConstAdjust(streamptr, taxis); + + return 0; +} + +int +gribapiScanTimestep2(stream_t *streamptr) +{ + CdiDateTime vDateTime0; + cdiDateTime_init(&vDateTime0); + int rstatus = 0; + off_t recpos = 0; + // int gridID; + int recID; + grib_handle *gh = NULL; + + streamptr->curTsID = 1; + + int fileID = streamptr->fileID; + int vlistID = streamptr->vlistID; + + void *gribbuffer = streamptr->record->buffer; + size_t buffersize = streamptr->record->buffersize; + + int tsID = streamptr->rtsteps; + if (tsID != 1) Error("Internal problem! unexpected timestep %d", tsID + 1); + + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + int nrecords = streamScanInitRecords2(streamptr); + + int nrecsScanned = nrecords; // Only used for debug output + for (int rindex = 0; rindex <= nrecords; ++rindex) + { + size_t recsize = gribGetSize(fileID); + recpos = fileGetPos(fileID); + if (recsize == 0) + { + streamptr->ntsteps = 2; + break; + } + + ensureBufferSize(recsize, &buffersize, &gribbuffer); + + size_t readsize = recsize; + if (gribRead(fileID, gribbuffer, &readsize)) break; + + grbDecompress(recsize, &buffersize, &gribbuffer); + + nrecsScanned++; + gh = grib_handle_new_from_message(NULL, gribbuffer, recsize); + GRIB_CHECK(my_grib_set_double(gh, "missingValue", CDI_Default_Missval), 0); + + int level1 = 0, level2 = 0, leveltype1, leveltype2, lbounds, level_sf, level_unit; + var_tile_t tiles = dummy_tiles; + gribGetLevel(gh, &leveltype1, &leveltype2, &lbounds, &level1, &level2, &level_sf, &level_unit, &tiles); + + char varname[256]; + gribapiGetString(gh, "shortName", varname, sizeof(varname)); + + int param = gribapiGetParam(gh); + + if (!varname[0]) param_to_name(param, varname); + + CdiDateTime sDateTime; + CdiDateTime vDateTime = gribapiGetValidityDateTime(gh, &sDateTime); + + if (rindex == 0) + { + vDateTime0 = vDateTime; + int taxisID = vlistInqTaxis(vlistID); + if (taxisInqType(taxisID) == TAXIS_RELATIVE) + { + taxis->type = TAXIS_RELATIVE; + taxis->unit = gribapiGetTimeUnits(gh); + taxis->rDateTime = gribapiGetDataDateTime(gh); + } + else + { + taxis->type = TAXIS_ABSOLUTE; + } + taxis->fDateTime = taxis->rDateTime; + taxis->vDateTime = vDateTime; + taxis->sDateTime = sDateTime; + } + else + { + if (cdiDateTime_isLT(sDateTime, taxis->sDateTime)) taxis->sDateTime = sDateTime; + } + + VarScanKeys scanKeys = gribapiGetScanKeys(gh); + + int tsteptype = gribapiGetTsteptype(gh); + size_t gridsize = gribapiGetGridsize(gh); + compvar2_t compVar = gribapiVarSet(param, level1, level2, leveltype1, tsteptype, gridsize, varname, scanKeys, tiles); + + for (recID = 0; recID < nrecords; recID++) + if (gribapiVarCompare(compVar, records[recID], 0) == 0) break; + + if (recID == nrecords) + { + if (CDI_Inventory_Mode == 1) + { + gribWarning("Parameter not defined at timestep 1!", nrecsScanned, tsID + 1, varname, param, level1, level2); + return CDI_EUFSTRUCT; + } + else + { + gribWarning("Parameter not defined at timestep 1, skipped!", nrecsScanned, tsID + 1, varname, param, level1, level2); + continue; + } + } + + if (records[recID].used) + { + if (CDI_Inventory_Mode == 1) + break; + else + { + if (cdiDateTime_isNE(vDateTime, vDateTime0)) break; + + gribWarning("Parameter already exist, skipped!", nrecsScanned, tsID + 1, varname, param, level1, level2); + continue; + } + } + + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + + if (CDI_Debug) + { + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + Message("%4d %8lld name=%s id=%s ltype=%d lev1=%d lev2=%d vDateTime=%s", nrecsScanned, (long long) recpos, varname, + paramstr, leveltype1, level1, level2, CdiDateTime_string(vDateTime)); + } + + if (gribapiVarCompare(compVar, records[recID], 0) != 0) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, level1); + return CDI_EUFSTRUCT; + } + + records[recID].position = recpos; + records[recID].size = recsize; + + int varID = records[recID].varID; + + if (tsteptype != vlistInqVarTsteptype(vlistID, varID)) vlistDefVarTsteptype(vlistID, varID, tsteptype); + + grib_handle_delete(gh); + gh = NULL; + } + + if (gh) grib_handle_delete(gh); + + int nrecs = 0; + for (recID = 0; recID < nrecords; recID++) + { + if (records[recID].used) + nrecs++; + else + vlistDefVarTimetype(vlistID, records[recID].varID, TIME_CONSTANT); + } + streamptr->tsteps[tsID].nrecs = nrecs; + + streamptr->rtsteps = 2; + + streamScanTsFixNtsteps(streamptr, recpos); + + streamptr->record->buffer = gribbuffer; + streamptr->record->buffersize = buffersize; + + return rstatus; +} + +int +gribapiScanTimestep(stream_t *streamptr) +{ + int vrecID, recID = -1; + int nrecs = 0; + int vlistID = streamptr->vlistID; + int tsID = streamptr->rtsteps; + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + if (streamptr->tsteps[tsID].recordSize == 0) + { + void *gribbuffer = streamptr->record->buffer; + size_t buffersize = streamptr->record->buffersize; + + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + nrecs = streamScanInitRecords(streamptr, tsID); + + int fileID = streamptr->fileID; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + int nrecsScanned = streamptr->tsteps[0].nallrecs + streamptr->tsteps[1].nrecs * (tsID - 1); // Only used for debug output. + off_t recpos = 0; + CdiDateTime vDateTime0; + cdiDateTime_init(&vDateTime0); + grib_handle *gh = NULL; + char varname[256]; + for (int rindex = 0; rindex <= nrecs; ++rindex) + { + varname[0] = 0; + size_t recsize = gribGetSize(fileID); + recpos = fileGetPos(fileID); + if (recsize == 0) + { + streamptr->ntsteps = streamptr->rtsteps + 1; + break; + } + + ensureBufferSize(recsize, &buffersize, &gribbuffer); + + size_t readsize = recsize; + if (gribRead(fileID, gribbuffer, &readsize)) + { + Warning("Inconsistent timestep %d (GRIB record %d/%d)!", tsID + 1, rindex + 1, streamptr->tsteps[tsID].recordSize); + break; + } + + grbDecompress(recsize, &buffersize, &gribbuffer); + + nrecsScanned++; + gh = grib_handle_new_from_message(NULL, gribbuffer, recsize); + GRIB_CHECK(my_grib_set_double(gh, "missingValue", CDI_Default_Missval), 0); + + int level1 = 0, level2 = 0, leveltype1, leveltype2 = -1, lbounds, level_sf, level_unit; + var_tile_t tiles = dummy_tiles; + gribGetLevel(gh, &leveltype1, &leveltype2, &lbounds, &level1, &level2, &level_sf, &level_unit, &tiles); + + CdiDateTime sDateTime; + CdiDateTime vDateTime = gribapiGetValidityDateTime(gh, &sDateTime); + + if (rindex == nrecs) break; + + gribapiGetString(gh, "shortName", varname, sizeof(varname)); + + int param = gribapiGetParam(gh); + + if (!varname[0]) param_to_name(param, varname); + + if (rindex == 0) + { + vDateTime0 = vDateTime; + int taxisID = vlistInqTaxis(vlistID); + if (taxisInqType(taxisID) == TAXIS_RELATIVE) + { + taxis->type = TAXIS_RELATIVE; + taxis->unit = gribapiGetTimeUnits(gh); + taxis->rDateTime = gribapiGetDataDateTime(gh); + } + else + { + taxis->type = TAXIS_ABSOLUTE; + } + taxis->fDateTime = taxis->rDateTime; + taxis->vDateTime = vDateTime; + taxis->sDateTime = sDateTime; + } + else + { + if (cdiDateTime_isLT(sDateTime, taxis->sDateTime)) taxis->sDateTime = sDateTime; + } + + VarScanKeys scanKeys = gribapiGetScanKeys(gh); + + int tsteptype = gribapiGetTsteptype(gh); + size_t gridsize = gribapiGetGridsize(gh); + compvar2_t compVar = gribapiVarSet(param, level1, level2, leveltype1, tsteptype, gridsize, varname, scanKeys, tiles); + + for (vrecID = 0; vrecID < nrecs; vrecID++) + { + recID = streamptr->tsteps[1].recIDs[vrecID]; + if (gribapiVarCompare(compVar, records[recID], 0) == 0) break; + } + + if (vrecID == nrecs) + { + if (CDI_Inventory_Mode == 1) + { + gribWarning("Parameter not defined at timestep 1!", nrecsScanned, tsID + 1, varname, param, level1, level2); + return CDI_EUFSTRUCT; + } + else + { + gribWarning("Parameter not defined at timestep 1, skipped!", nrecsScanned, tsID + 1, varname, param, level1, + level2); + continue; + } + } + + if (CDI_Inventory_Mode != 1) + { + if (records[recID].used) + { + if (cdiDateTime_isNE(vDateTime, vDateTime0)) break; + + if (CDI_Debug) + gribWarning("Parameter already exist, skipped!", nrecsScanned, tsID + 1, varname, param, level1, level2); + + continue; + } + } + + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + + if (CDI_Debug) + Message("%4d %8lld %4d %8d %8s", rindex + 1, (long long) recpos, param, level1, CdiDateTime_string(vDateTime)); + + if (gribapiVarCompare(compVar, records[recID], 0) != 0) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, level1); + Error("Invalid, unsupported or inconsistent record structure"); + } + + records[recID].position = recpos; + records[recID].size = recsize; + + if (CDI_Debug) Message("%4d %8lld %4d %8d %s", rindex, (long long) recpos, param, level1, CdiDateTime_string(vDateTime)); + + grib_handle_delete(gh); + gh = NULL; + } + + if (gh) grib_handle_delete(gh); + + for (vrecID = 0; vrecID < nrecs; vrecID++) + { + recID = streamptr->tsteps[tsID].recIDs[vrecID]; + if (!records[recID].used) break; + } + + if (vrecID < nrecs) + { + gribWarning("Parameter not found!", nrecsScanned, tsID + 1, varname, records[recID].param, records[recID].ilevel, + records[recID].ilevel2); + return CDI_EUFSTRUCT; + } + + streamptr->rtsteps++; + + if (streamptr->ntsteps != streamptr->rtsteps) + { + tsID = tstepsNewEntry(streamptr); + if (tsID != streamptr->rtsteps) Error("Internal error. tsID = %d", tsID); + + streamptr->tsteps[tsID - 1].next = true; + streamptr->tsteps[tsID].position = recpos; + } + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + streamptr->tsteps[tsID].position = recpos; + + streamptr->record->buffer = gribbuffer; + streamptr->record->buffersize = buffersize; + } + + if (nrecs > 0 && nrecs < streamptr->tsteps[tsID].nrecs) + { + Warning("Incomplete timestep. Stop scanning at timestep %d.", tsID); + streamptr->ntsteps = tsID; + } + + return streamptr->ntsteps; +} + +#ifdef gribWarning +#undef gribWarning +#endif + +int +gribapiDecode(void *gribbuffer, size_t gribsize, void *data, size_t gridsize, int unreduced, size_t *nmiss, double missval) +{ + int status = 0; + + if (unreduced) + { + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("Conversion of gaussian reduced grids unsupported!"); + } + } + + size_t recsize = (size_t) gribsize; + grib_handle *gh = grib_handle_new_from_message(NULL, gribbuffer, recsize); + GRIB_CHECK(my_grib_set_double(gh, "missingValue", missval), 0); + + // get the size of the values array + size_t datasize; + GRIB_CHECK(grib_get_size(gh, "values", &datasize), 0); + // long numberOfPoints; + // GRIB_CHECK(grib_get_long(gh, "numberOfPoints", &numberOfPoints), 0); + // printf("values_size = %d numberOfPoints = %ld\n", datasize, numberOfPoints); + + if (gridsize != datasize) Error("Internal problem: gridsize(%zu) != datasize(%zu)!", gridsize, datasize); + size_t dummy = datasize; + GRIB_CHECK(grib_get_double_array(gh, "values", (double *) data, &dummy), 0); + + long lpar; + GRIB_CHECK(grib_get_long(gh, "gridDefinitionTemplateNumber", &lpar), 0); + int gridtype = (int) lpar; + + *nmiss = 0; + if (gridtype < 50 || gridtype > 53) + { + GRIB_CHECK(grib_get_long(gh, "numberOfMissing", &lpar), 0); + *nmiss = (int) lpar; + // printf("gridtype %d, nmiss %d\n", gridtype, nmiss); + } + + grib_handle_delete(gh); + + return status; +} + +static void +gribapiDefInstitut(grib_handle *gh, int vlistID, int varID) +{ + int instID = vlistInqInstitut(vlistID); + + if (instID == CDI_UNDEFID) instID = vlistInqVarInstitut(vlistID, varID); + + if (instID != CDI_UNDEFID) + { + long center = institutInqCenter(instID); + long subcenter = institutInqSubcenter(instID); + + long center0, subcenter0; + GRIB_CHECK(grib_get_long(gh, "centre", ¢er0), 0); + GRIB_CHECK(grib_get_long(gh, "subCentre", &subcenter0), 0); + + if (center != center0) GRIB_CHECK(my_grib_set_long(gh, "centre", center), 0); + if (subcenter != subcenter0) GRIB_CHECK(my_grib_set_long(gh, "subCentre", subcenter), 0); + } + + int status; + int centre, subCentre; + status = cdiInqKeyInt(vlistID, CDI_GLOBAL, CDI_KEY_CENTRE, ¢re); + if (status == 0) grib_set_long(gh, "centre", centre); + status = cdiInqKeyInt(vlistID, CDI_GLOBAL, CDI_KEY_SUBCENTRE, &subCentre); + if (status == 0) grib_set_long(gh, "subCentre", subCentre); + + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_CENTRE, ¢re); + if (status == 0) grib_set_long(gh, "centre", centre); + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_SUBCENTRE, &subCentre); + if (status == 0) grib_set_long(gh, "subCentre", subCentre); +} + +static void +gribapiDefModel(grib_handle *gh, int vlistID, int varID) +{ + int modelID = vlistInqModel(vlistID); + if (modelID == CDI_UNDEFID) modelID = vlistInqVarModel(vlistID, varID); + + if (modelID != CDI_UNDEFID) GRIB_CHECK(my_grib_set_long(gh, "generatingProcessIdentifier", modelInqGribID(modelID)), 0); +} + +static void +gribapiDefParam(int editionNumber, grib_handle *gh, int param, const char *name, const char *stdname) +{ + bool ldefined = false; + + int pdis, pcat, pnum; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + + if (pnum < 0) + { + size_t len = strlen(stdname); + if (len) + { + int status = my_grib_set_string(gh, "cfName", stdname, &len); + if (status == 0) + ldefined = true; + else + Warning("grib_api: No match for cfName=%s", stdname); + } + + if (ldefined == false) + { + len = strlen(name); + int status = my_grib_set_string(gh, "shortName", name, &len); + if (status == 0) + ldefined = true; + else + Warning("grib_api: No match for shortName=%s", name); + } + } + + if (ldefined == false) + { + if (pnum < 0) pnum = -pnum; + + if (pnum > 255) + { + static bool lwarn_pnum = true; + if (lwarn_pnum) + { + Warning("Parameter number %d out of range (1-255), set to %d!", pnum, pnum % 256); + lwarn_pnum = false; + } + pnum = pnum % 256; + } + + if (editionNumber <= 1) + { + static bool lwarn_pdis = true; + if (pdis != 255 && lwarn_pdis) + { + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat); + lwarn_pdis = false; + } + + GRIB_CHECK(my_grib_set_long(gh, "table2Version", pcat), 0); + GRIB_CHECK(my_grib_set_long(gh, "indicatorOfParameter", pnum), 0); + } + else + { + GRIB_CHECK(my_grib_set_long(gh, "discipline", pdis), 0); + GRIB_CHECK(my_grib_set_long(gh, "parameterCategory", pcat), 0); + GRIB_CHECK(my_grib_set_long(gh, "parameterNumber", pnum), 0); + } + } + + // printf("param: %d.%d.%d %s\n", pnum, pcat, pdis, name); +} + +static int +getTimeunitFactor(int timeunit) +{ + switch (timeunit) + { + case TUNIT_SECOND: return 1; + case TUNIT_MINUTE: return 60; + case TUNIT_HOUR: return 3600; + case TUNIT_3HOURS: return 10800; + case TUNIT_6HOURS: return 21600; + case TUNIT_12HOURS: return 43200; + case TUNIT_DAY: return 86400; + } + + return 3600; +} + +static int +grib2ProDefTempHasStatisticalDef(int proDefTempNum) +{ + switch (proDefTempNum) + { + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 34: + case 42: + case 43: + case 46: + case 47: + case 61: + case 91: + case 1001: + case 1101: + case 40034: return 1; + } + + return 0; +} + +static int +getUnitsOfTime(int timeunit) +{ + switch (timeunit) + { + case TUNIT_SECOND: return 13; + case TUNIT_MINUTE: return 0; + case TUNIT_HOUR: return 1; + case TUNIT_3HOURS: return 10; + case TUNIT_6HOURS: return 11; + case TUNIT_12HOURS: return 12; + case TUNIT_DAY: return 2; + } + + return 1; +} + +static void +gribapiDefStepUnits(int editionNumber, grib_handle *gh, int timeunit, int proDefTempNum, int gcinit) +{ + if (!gcinit) + { + long unitsOfTime = getUnitsOfTime(timeunit); + + grib_set_long(gh, "stepUnits", unitsOfTime); + if (editionNumber == 1) + { + grib_set_long(gh, "unitOfTimeRange", unitsOfTime); + } + else if (grib2ProDefTempHasStatisticalDef(proDefTempNum)) + { + grib_set_long(gh, "indicatorOfUnitForTimeRange", unitsOfTime); + grib_set_long(gh, "indicatorOfUnitOfTimeRange", unitsOfTime); + } + else + { + // NOTE KNMI: HIRLAM model files LAMH_D11 are in grib1 and do NOT have key indicatorOfUnitForTimeRange + // Watch out for compatibility issues. + grib_set_long(gh, "indicatorOfUnitOfTimeRange", unitsOfTime); + } + } +} + +static int +gribapiDefSteptype(int editionNumber, grib_handle *gh, int productDefinitionTemplate, int typeOfGeneratingProcess, int tsteptype, + int gcinit) +{ + const char *stepType = "instant"; + long proDefTempNum = 0; + + if (tsteptype >= TSTEP_INSTANT && tsteptype <= TSTEP_SUM) + { + stepType = cdiGribAPI_ts_str_map[tsteptype].sname; + proDefTempNum = cdiGribAPI_ts_str_map[tsteptype].productionTemplate; + } + + if (productDefinitionTemplate != -1) + proDefTempNum = productDefinitionTemplate; + else if (typeOfGeneratingProcess == 4) + proDefTempNum = (proDefTempNum == 8) ? 11 : 1; + + if (!gcinit) + { + if (editionNumber > 1) GRIB_CHECK(my_grib_set_long(gh, "productDefinitionTemplateNumber", proDefTempNum), 0); + size_t len = strlen(stepType); + int status = my_grib_set_string(gh, "stepType", stepType, &len); + if (status != 0) GRIB_CHECK(my_grib_set_long(gh, "productDefinitionTemplateNumber", 0), 0); + } + + return (int) proDefTempNum; +} + +static void +gribapiDefDateTimeAbs(int editionNumber, grib_handle *gh, CdiDateTime dateTime, int productDefinitionTemplate, + int typeOfGeneratingProcess, int tsteptype, int gcinit) +{ + (void) gribapiDefSteptype(editionNumber, gh, productDefinitionTemplate, typeOfGeneratingProcess, tsteptype, gcinit); + + if (editionNumber > 1) GRIB_CHECK(my_grib_set_long(gh, "significanceOfReferenceTime", 0), 0); + if (editionNumber > 1) GRIB_CHECK(my_grib_set_long(gh, "stepRange", 0), 0); + + if (cdiDateTime_isNull(dateTime)) dateTime.date = cdiDate_set(10101); + gribapiSetDataDateTime(gh, dateTime); +} + +static int +gribapiDefDateTimeRel(int editionNumber, grib_handle *gh, CdiDateTime fDateTime, CdiDateTime vDateTime, CdiDateTime sDateTime, + int productDefinitionTemplate, int typeOfGeneratingProcess, int tsteptype, int timeunit, int calendar, + int gcinit) +{ + int status = -1; + + JulianDate julianDate1 = julianDate_encode(calendar, fDateTime); + + if (cdiDateTime_isNull(vDateTime)) vDateTime = fDateTime; + + JulianDate julianDate2 = julianDate_encode(calendar, vDateTime); + JulianDate julianDate = julianDate_sub(julianDate2, julianDate1); + + int factor = getTimeunitFactor(timeunit); + + if (!(int) (fmod(julianDate_to_seconds(julianDate), factor))) + { + int proDefTempNum + = gribapiDefSteptype(editionNumber, gh, productDefinitionTemplate, typeOfGeneratingProcess, tsteptype, gcinit); + gribapiDefStepUnits(editionNumber, gh, timeunit, proDefTempNum, gcinit); + + long startStep = 0; + double endStepF = julianDate_to_seconds(julianDate) / factor; + long maxStep = (editionNumber > 1) ? INT_MAX : 65000; + if (endStepF > maxStep) return status; + long endStep = lround(endStepF); + + bool hasStartDate = (tsteptype == TSTEP_RANGE || tsteptype == TSTEP_AVG || tsteptype == TSTEP_ACCUM || tsteptype == TSTEP_DIFF + || tsteptype == TSTEP_MIN || tsteptype == TSTEP_MAX || tsteptype == TSTEP_RMS || tsteptype == TSTEP_SD + || tsteptype == TSTEP_COV || tsteptype == TSTEP_RATIO || tsteptype == TSTEP_SUM); + if (!cdiDateTime_isNull(sDateTime) && hasStartDate) + { + julianDate2 = julianDate_encode(calendar, sDateTime); + startStep = lround(julianDate_to_seconds(julianDate_sub(julianDate2, julianDate1)) / factor); + } + + if (editionNumber > 1) GRIB_CHECK(my_grib_set_long(gh, "significanceOfReferenceTime", 1), 0); + if (editionNumber > 1) GRIB_CHECK(my_grib_set_long(gh, "stepRange", 0), 0); + + if (cdiDateTime_isNull(fDateTime)) fDateTime.date = cdiDate_set(10101); + gribapiSetDataDateTime(gh, fDateTime); + + // printf(">>>>> tsteptype %d startStep %ld endStep %ld\n", tsteptype, startStep, endStep); + + // Product Definition Template Number: defined in GRIB_API file 4.0.table point in time products: + if ((proDefTempNum >= 0 && proDefTempNum <= 7) || proDefTempNum == 55 || proDefTempNum == 40055) // Tile + startStep = endStep; + + if (endStep < startStep) return status; + + if (editionNumber == 1 && (startStep > 255 || endStep > 255)) + { + startStep = 0; + endStep = 0; + } + else + { + status = 0; + } + + if (editionNumber > 1) GRIB_CHECK(my_grib_set_long(gh, "forecastTime", startStep), 0); + // if ( editionNumber == 1 && startStep > 0) GRIB_CHECK(my_grib_set_long(gh, "startStep", startStep), 0); + if (editionNumber == 1) GRIB_CHECK(my_grib_set_long(gh, "startStep", startStep), 0); + GRIB_CHECK(my_grib_set_long(gh, "endStep", endStep), 0); + } + + return status; +} + +static void +gribapiDefTime(int editionNumber, int productDefinitionTemplate, int typeOfGeneratingProcess, grib_handle *gh, + CdiDateTime vDateTime, int tsteptype, int numavg, int taxisID, int gcinit) +{ + UNUSED(numavg); + + int taxistype = (taxisID == -1) ? -1 : taxisInqType(taxisID); + + if (typeOfGeneratingProcess == 196) + { + vDateTime = cdiDateTime_set(10101, 0); + taxistype = TAXIS_ABSOLUTE; + } + + if (taxistype == TAXIS_RELATIVE) + { + int timeunit = taxisInqTunit(taxisID); + int calendar = taxisInqCalendar(taxisID); + + CdiDateTime fDateTime = taxisInqFdatetime(taxisID); + if (cdiDateTime_isNull(fDateTime)) fDateTime = taxisInqRdatetime(taxisID); + if (cdiDateTime_isLT(vDateTime, fDateTime)) fDateTime = vDateTime; + + CdiDateTime sDateTime = taxisInqSdatetime(taxisID); + + int status = gribapiDefDateTimeRel(editionNumber, gh, fDateTime, vDateTime, sDateTime, productDefinitionTemplate, + typeOfGeneratingProcess, tsteptype, timeunit, calendar, gcinit); + if (status != 0) taxistype = TAXIS_ABSOLUTE; + } + + if (taxistype == TAXIS_ABSOLUTE) + gribapiDefDateTimeAbs(editionNumber, gh, vDateTime, productDefinitionTemplate, typeOfGeneratingProcess, tsteptype, gcinit); +} + +static void +gribapiDefGridRegular(grib_handle *gh, int gridID, int gridtype, bool gridIsRotated, bool gridIsCurvilinear, int uvRelativeToGrid) +{ + const char *mesg; + // clang-format off + if (gridtype == GRID_GAUSSIAN) mesg = "regular_gg"; + else if (gridtype == GRID_GAUSSIAN_REDUCED) mesg = "reduced_gg"; + else if (gridIsRotated) mesg = "rotated_ll"; + else mesg = "regular_ll"; + // clang-format on + size_t len = strlen(mesg); + GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0); + + double xfirst = 0.0, xlast = 0.0, xinc = 0.0; + double yfirst = 0.0, ylast = 0.0, yinc = 0.0; + + size_t nlon = gridInqXsize(gridID); + size_t nlat = gridInqYsize(gridID); + + if (gridtype == GRID_GAUSSIAN_REDUCED) + { + xfirst = (nlon == 2) ? gridInqXval(gridID, 0) : 0.0; + xlast = (nlon == 2) ? gridInqXval(gridID, 1) : 360.0 - 360.0 * 0.5 / (double) nlat; + + nlon = 0; + + int *reducedPoints = (int *) Malloc(nlat * sizeof(int)); + long *pl = (long *) Malloc(nlat * sizeof(long)); + gridInqReducedPoints(gridID, reducedPoints); + for (size_t i = 0; i < nlat; ++i) pl[i] = reducedPoints[i]; + + GRIB_CHECK(grib_set_long_array(gh, "pl", pl, nlat), 0); + + Free(pl); + Free(reducedPoints); + } + else + { + if (nlon == 0) + nlon = 1; + else + { + xfirst = gridInqXval(gridID, 0); + xlast = gridInqXval(gridID, (gridIsCurvilinear ? nlon * nlat : nlon) - 1); + xinc = fabs(gridInqXinc(gridID)); + } + } + + if (nlat == 0) + nlat = 1; + else + { + yfirst = gridInqYval(gridID, 0); + ylast = gridInqYval(gridID, (gridIsCurvilinear ? nlon * nlat : nlat) - 1); + yinc = fabs(gridInqYinc(gridID)); + } + + double xfirsto = xfirst; + double xlasto = xlast; + while (xfirsto > 360.0) xfirsto -= 360.0; + while (xlasto > 360.0) xlasto -= 360.0; + + if (gridtype != GRID_GAUSSIAN_REDUCED) GRIB_CHECK(my_grib_set_long(gh, "Ni", nlon), 0); + GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", xfirsto), 0); + GRIB_CHECK(my_grib_set_double(gh, "longitudeOfLastGridPointInDegrees", xlasto), 0); + if (gridtype != GRID_GAUSSIAN_REDUCED) GRIB_CHECK(my_grib_set_double(gh, "iDirectionIncrementInDegrees", xinc), 0); + + GRIB_CHECK(my_grib_set_long(gh, "Nj", (long) nlat), 0); + GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", yfirst), 0); + GRIB_CHECK(my_grib_set_double(gh, "latitudeOfLastGridPointInDegrees", ylast), 0); + + long xscan = xfirst > xlast; + GRIB_CHECK(my_grib_set_long(gh, "iScansNegatively", xscan), 0); + xscan = yfirst < ylast; + GRIB_CHECK(my_grib_set_long(gh, "jScansPositively", xscan), 0); + + if (gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED) + { + int np = gridInqNP(gridID); + if (np == 0) np = nlat / 2; + GRIB_CHECK(my_grib_set_long(gh, "numberOfParallelsBetweenAPoleAndTheEquator", np), 0); + } + else + { + GRIB_CHECK(my_grib_set_double(gh, "jDirectionIncrementInDegrees", yinc), 0); + } + + if (gridIsRotated) + { + double xpole = 0.0, ypole = 0.0, angle = 0.0; + gridInqParamRLL(gridID, &xpole, &ypole, &angle); + + xpole += 180.0; + if (fabs(ypole) > 0.0) ypole = -ypole; // change from north to south pole + if (fabs(angle) > 0.0) angle = -angle; + GRIB_CHECK(my_grib_set_double(gh, "latitudeOfSouthernPoleInDegrees", ypole), 0); + GRIB_CHECK(my_grib_set_double(gh, "longitudeOfSouthernPoleInDegrees", xpole), 0); + GRIB_CHECK(my_grib_set_double(gh, "angleOfRotation", angle), 0); + } + + if (uvRelativeToGrid >= 0) GRIB_CHECK(my_grib_set_long(gh, "uvRelativeToGrid", uvRelativeToGrid), 0); +} + +static long +radiusToShapeOfTheEarth(double radius) +{ + long shapeOfTheEarth = 0; + + // clang-format off + if (IS_EQUAL(radius, 6367470.0)) shapeOfTheEarth = 0; + else if (IS_EQUAL(radius, 6378160.0)) shapeOfTheEarth = 2; + else if (IS_EQUAL(radius, 6371229.0)) shapeOfTheEarth = 6; + else if (IS_EQUAL(radius, 6371200.0)) shapeOfTheEarth = 8; + // clang-format on + + return shapeOfTheEarth; +} + +static void +gribapiDefGridLCC(grib_handle *gh, int editionNumber, int gridID, int uvRelativeToGrid) +{ + long xsize = (long) gridInqXsize(gridID); + long ysize = (long) gridInqYsize(gridID); + + struct CDI_GridProjParams gpp; + gridInqParamsLCC(gridID, &gpp); + if (IS_EQUAL(gpp.x_0, gpp.mv) && IS_EQUAL(gpp.y_0, gpp.mv) && (IS_EQUAL(gpp.xval_0, gpp.mv) || IS_EQUAL(gpp.yval_0, gpp.mv))) + { + gpp.x_0 = gridInqXval(gridID, 0); + gpp.y_0 = gridInqYval(gridID, 0); + } + gridVerifyProjParamsLCC(&gpp); + if (gpp.xval_0 < 0.0) gpp.xval_0 += 360.0; + if (gpp.lon_0 < 0.0) gpp.lon_0 += 360.0; + + bool lsouth = (gpp.lat_1 < 0.0); + if (lsouth) + { + gpp.lat_1 = -gpp.lat_2; + gpp.lat_2 = -gpp.lat_2; + } + int projflag = 0; + if (lsouth) gribbyte_set_bit(&projflag, 1); + + double xinc = gridInqXinc(gridID); + double yinc = gridInqYinc(gridID); + if (IS_EQUAL(xinc, 0.0)) xinc = gridInqXincInMeter(gridID); + if (IS_EQUAL(yinc, 0.0)) yinc = gridInqYincInMeter(gridID); + + static const char mesg[] = "lambert"; + size_t len = sizeof(mesg) - 1; + GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0); + + GRIB_CHECK(my_grib_set_long(gh, "Nx", xsize), 0); + GRIB_CHECK(my_grib_set_long(gh, "Ny", ysize), 0); + GRIB_CHECK(my_grib_set_long(gh, "DxInMetres", lround(fabs(xinc))), 0); + GRIB_CHECK(my_grib_set_long(gh, "DyInMetres", lround(fabs(yinc))), 0); + GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", gpp.xval_0), 0); + GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", gpp.yval_0), 0); + GRIB_CHECK(my_grib_set_double(gh, "LoVInDegrees", gpp.lon_0), 0); + GRIB_CHECK(my_grib_set_double(gh, "Latin1InDegrees", gpp.lat_1), 0); + GRIB_CHECK(my_grib_set_double(gh, "Latin2InDegrees", gpp.lat_2), 0); + GRIB_CHECK(my_grib_set_long(gh, "projectionCentreFlag", projflag), 0); + + long shapeOfTheEarth = radiusToShapeOfTheEarth(gpp.a); + if (shapeOfTheEarth) GRIB_CHECK(my_grib_set_long(gh, "shapeOfTheEarth", shapeOfTheEarth), 0); + + if (uvRelativeToGrid >= 0) GRIB_CHECK(my_grib_set_long(gh, "uvRelativeToGrid", uvRelativeToGrid), 0); + + long earthIsOblate = (IS_EQUAL(gpp.a, 6378160.0) && IS_EQUAL(gpp.rf, 297.0)); + if (earthIsOblate) GRIB_CHECK(my_grib_set_long(gh, "earthIsOblate", earthIsOblate), 0); + + int scanflag = 0; + gribbyte_set_bit(&scanflag, 2); + if (editionNumber <= 1) GRIB_CHECK(my_grib_set_long(gh, "scanningMode", (long) scanflag), 0); +} + +static void +gribapiDefGridSTERE(grib_handle *gh, int gridID) +{ + long xsize = (long) gridInqXsize(gridID); + long ysize = (long) gridInqYsize(gridID); + + struct CDI_GridProjParams gpp; + gridInqParamsSTERE(gridID, &gpp); + gridVerifyProjParamsSTERE(&gpp); + if (gpp.xval_0 < 0.0) gpp.xval_0 += 360.0; + int projflag = 0; + + double xinc = gridInqXinc(gridID); + double yinc = gridInqYinc(gridID); + + static const char mesg[] = "polar_stereographic"; + size_t len = sizeof(mesg) - 1; + GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0); + + GRIB_CHECK(my_grib_set_long(gh, "Nx", xsize), 0); + GRIB_CHECK(my_grib_set_long(gh, "Ny", ysize), 0); + GRIB_CHECK(my_grib_set_long(gh, "DxInMetres", lround(xinc)), 0); + GRIB_CHECK(my_grib_set_long(gh, "DyInMetres", lround(yinc)), 0); + GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", gpp.xval_0), 0); + GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", gpp.yval_0), 0); + GRIB_CHECK(my_grib_set_double(gh, "LaDInDegrees", gpp.lat_1), 0); + GRIB_CHECK(my_grib_set_double(gh, "orientationOfTheGridInDegrees", gpp.lon_0), 0); + long southPoleOnProjectionPlane = IS_EQUAL(gpp.lat_0, -90.0); + GRIB_CHECK(my_grib_set_double(gh, "southPoleOnProjectionPlane", southPoleOnProjectionPlane), 0); + GRIB_CHECK(my_grib_set_long(gh, "projectionCentreFlag", projflag), 0); + + long shapeOfTheEarth = radiusToShapeOfTheEarth(gpp.a); + if (shapeOfTheEarth) GRIB_CHECK(my_grib_set_long(gh, "shapeOfTheEarth", shapeOfTheEarth), 0); + + GRIB_CHECK(my_grib_set_long(gh, "resolutionAndComponentFlags", 8), 0); + GRIB_CHECK(my_grib_set_long(gh, "iScansNegatively", 0), 0); + GRIB_CHECK(my_grib_set_long(gh, "jScansPositively", 1), 0); +} + +static void +gribapiDefGridGME(grib_handle *gh, int gridID, long gridsize) +{ + GRIB_CHECK(my_grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_GME), 0); + + int nd = 0, ni = 0, ni2 = 0, ni3 = 0; + gridInqParamGME(gridID, &nd, &ni, &ni2, &ni3); + GRIB_CHECK(my_grib_set_long(gh, "nd", nd), 0); + GRIB_CHECK(my_grib_set_long(gh, "Ni", ni), 0); + GRIB_CHECK(my_grib_set_long(gh, "n2", ni2), 0); + GRIB_CHECK(my_grib_set_long(gh, "n3", ni3), 0); + GRIB_CHECK(my_grib_set_long(gh, "latitudeOfThePolePoint", 90000000), 0); + GRIB_CHECK(my_grib_set_long(gh, "longitudeOfThePolePoint", 0), 0); + + GRIB_CHECK(my_grib_set_long(gh, "numberOfDataPoints", gridsize), 0); + GRIB_CHECK(my_grib_set_long(gh, "totalNumberOfGridPoints", gridsize), 0); +} + +static void +gribapiDefGridUnstructured(grib_handle *gh, int gridID) +{ + static bool warning = true; + + int status = my_grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_UNSTRUCTURED); + if (status != 0 && warning) + { + warning = false; + Warning("Can't write reference grid!"); + Warning("gridDefinitionTemplateNumber %d not found (grib2/template.3.%d.def)!", GRIB2_GTYPE_UNSTRUCTURED, + GRIB2_GTYPE_UNSTRUCTURED); + } + else + { + int errCount = 0; + int number = 0; + status = cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, &number); + if (status < 0) errCount++; + if (number < 0) number = 0; + GRIB_CHECK(my_grib_set_long(gh, "numberOfGridUsed", number), 0); + + int position = 0; + status = cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, &position); + if (status < 0) errCount++; + if (position < 0) position = 0; + GRIB_CHECK(my_grib_set_long(gh, "numberOfGridInReference", position), 0); + + unsigned char uuid[CDI_UUID_SIZE]; + size_t len = CDI_UUID_SIZE; + memset(uuid, 0, len); + int length = CDI_UUID_SIZE; + status = cdiInqKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuid, &length); + if (status < 0) errCount++; + if (grib_set_bytes(gh, "uuidOfHGrid", uuid, &len) != 0) Warning("Can't write UUID!"); + + if (warning && errCount > 0) + { + warning = false; + Warning("GRIB library doesn't support unstructured grids, grid information will be lost!"); + } + } +} + +static void +gribapiDefGridSpectral(grib_handle *gh, int gridID) +{ + int trunc = gridInqTrunc(gridID); + enum + { + numTruncAtt = 3 + }; + static const char truncAttNames[numTruncAtt][2] = { "J", "K", "M" }; + for (size_t i = 0; i < numTruncAtt; ++i) GRIB_CHECK(my_grib_set_long(gh, truncAttNames[i], trunc), 0); + + if (gridInqComplexPacking(gridID)) + { + static const char truncAttNames2[numTruncAtt][3] = { "JS", "KS", "MS" }; + for (size_t i = 0; i < numTruncAtt; ++i) GRIB_CHECK(my_grib_set_long(gh, truncAttNames2[i], 20), 0); + } +} + +static void +gribapiDefPackingType(grib_handle *gh, bool lieee, bool lspectral, bool lcomplex, int comptype, size_t gridsize) +{ + static const char mesg_spectral_complex[] = "spectral_complex"; + static const char mesg_spectral_simple[] = "spectral_simple"; + static const char mesg_grid_jpeg[] = "grid_jpeg"; + static const char mesg_grid_ccsds[] = "grid_ccsds"; + static const char mesg_ieee[] = "grid_ieee"; + static const char mesg_simple[] = "grid_simple"; + const char *mesg = mesg_simple; + + if (lspectral) + { + mesg = lcomplex ? mesg_spectral_complex : mesg_spectral_simple; + } + else if (comptype == CDI_COMPRESS_JPEG && gridsize > 1) + { + mesg = mesg_grid_jpeg; + } + else if ((comptype == CDI_COMPRESS_SZIP || comptype == CDI_COMPRESS_AEC) && gridsize > 1) + { + mesg = mesg_grid_ccsds; + } + else if (lieee) + { + mesg = mesg_ieee; + } + + size_t len = strlen(mesg); + GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0); +} + +static void +gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype, int datatype, int uvRelativeToGrid) +{ + size_t gridsize = gridInqSize(gridID); + bool gridIsRotated = false; + bool gridIsCurvilinear = false; + int gridtype = grbGetGridtype(&gridID, gridsize, &gridIsRotated, &gridIsCurvilinear); + + bool lieee = (editionNumber == 2 && (datatype == CDI_DATATYPE_FLT32 || datatype == CDI_DATATYPE_FLT64)); + bool lspectral = (gridtype == GRID_SPECTRAL); + bool lcomplex = (lspectral && gridInqComplexPacking(gridID)); + + if (lieee) comptype = 0; + if (lspectral) lieee = false; + + if (lspectral) // gridType needs to be defined before packingType !!! + { + static const char mesg[] = "sh"; + size_t len = sizeof(mesg) - 1; + GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0); + } + + gribapiDefPackingType(gh, lieee, lspectral, lcomplex, comptype, gridsize); + + if (lieee) GRIB_CHECK(my_grib_set_long(gh, "precision", datatype == CDI_DATATYPE_FLT64 ? 2 : 1), 0); + + if (editionNumber == 2) GRIB_CHECK(my_grib_set_long(gh, "numberOfValues", (long) gridsize), 0); + + switch (gridtype) + { + case GRID_LONLAT: + case GRID_GAUSSIAN: + case GRID_GAUSSIAN_REDUCED: + case GRID_TRAJECTORY: + { + gribapiDefGridRegular(gh, gridID, gridtype, gridIsRotated, gridIsCurvilinear, uvRelativeToGrid); + break; + } + case CDI_PROJ_LCC: + { + gribapiDefGridLCC(gh, editionNumber, gridID, uvRelativeToGrid); + break; + } + case CDI_PROJ_STERE: + { + gribapiDefGridSTERE(gh, gridID); + break; + } + case GRID_SPECTRAL: + { + gribapiDefGridSpectral(gh, gridID); + break; + } + case GRID_GME: + { + if (editionNumber <= 1) Error("GME grid can't be stored in GRIB edition %d!", editionNumber); + gribapiDefGridGME(gh, gridID, (long) gridsize); + break; + } + case GRID_UNSTRUCTURED: + { + if (editionNumber <= 1) Error("Unstructured grid can't be stored in GRIB edition %d!", editionNumber); + gribapiDefGridUnstructured(gh, gridID); + break; + } + default: + { + Error("Unsupported grid type: %s", gridNamePtr(gridtype)); + break; + } + } +} + +static void +getLevelFactor(double level, long *factor, long *out_scaled_value) +{ + const double eps = 1.0e-7; + + double scaled_value = level; + long iscaled_value = lround(scaled_value); + + long i; + for (i = 0; (iscaled_value < (4294967295 / 10)) && (fabs(scaled_value - (double) iscaled_value) >= eps) && i < 7; i++) + { + scaled_value *= 10.0; + iscaled_value = lround(scaled_value); + } + + (*factor) = i; + (*out_scaled_value) = iscaled_value; +} + +static void +gribapiDefLevelType(grib_handle *gh, int gcinit, const char *keyname, long leveltype) +{ + bool lset = false; + if ((leveltype == GRIB1_LTYPE_ISOBARIC_PA || leveltype == 99 || leveltype == 100) && gribEditionNumber(gh) == 1) + { + if (gribGetLong(gh, "indicatorOfTypeOfLevel") != leveltype) lset = true; + } + + if (!gcinit || lset) GRIB_CHECK(my_grib_set_long(gh, keyname, leveltype), 0); +} + +static void +grib1DefLevel(grib_handle *gh, int gcinit, long leveltype1, long leveltype2, bool hasBounds, double level, double dlevel1, + double dlevel2) +{ + (void) leveltype2; + gribapiDefLevelType(gh, gcinit, "indicatorOfTypeOfLevel", leveltype1); + + if (hasBounds) + { + GRIB_CHECK(my_grib_set_long(gh, "topLevel", lround(dlevel1)), 0); + GRIB_CHECK(my_grib_set_long(gh, "bottomLevel", lround(dlevel2)), 0); + } + else + { + GRIB_CHECK(my_grib_set_long(gh, "level", lround(level)), 0); + } +} + +static void +grib2DefLevel(grib_handle *gh, int gcinit, long leveltype1, long leveltype2, bool hasBounds, double level, double dlevel1, + double dlevel2) +{ + gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", leveltype1); + if (hasBounds) gribapiDefLevelType(gh, gcinit, "typeOfSecondFixedSurface", leveltype2); + + if (!hasBounds) dlevel1 = level; + + long scaled_level, factor; + getLevelFactor(dlevel1, &factor, &scaled_level); + GRIB_CHECK(my_grib_set_long(gh, "scaleFactorOfFirstFixedSurface", factor), 0); + GRIB_CHECK(my_grib_set_long(gh, "scaledValueOfFirstFixedSurface", scaled_level), 0); + + if (hasBounds) + { + getLevelFactor(dlevel2, &factor, &scaled_level); + GRIB_CHECK(my_grib_set_long(gh, "scaleFactorOfSecondFixedSurface", factor), 0); + GRIB_CHECK(my_grib_set_long(gh, "scaledValueOfSecondFixedSurface", scaled_level), 0); + } +} + +static void +gribapiDefLevel(int editionNumber, grib_handle *gh, int zaxisID, int levelID, int gcinit, int proddef_template_num) +{ + int zaxistype = zaxisInqType(zaxisID); + int ltype = 0, ltype2 = -1; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, <ype); + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFSECONDFIXEDSURFACE, <ype2); + + bool hasBounds = (zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL)); + double level = zaxisInqLevels(zaxisID, NULL) ? zaxisInqLevel(zaxisID, levelID) : levelID + 1; + double dlevel1 = hasBounds ? zaxisInqLbound(zaxisID, levelID) : level; + double dlevel2 = hasBounds ? zaxisInqUbound(zaxisID, levelID) : 0.0; + + if (zaxistype == ZAXIS_GENERIC && ltype == 0) + { + Warning("Changed zaxis type from %s to %s", zaxisNamePtr(zaxistype), zaxisNamePtr(ZAXIS_PRESSURE)); + zaxistype = ZAXIS_PRESSURE; + zaxisChangeType(zaxisID, zaxistype); + cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, "Pa"); + } + + long grib_ltype; + { + int (*ltypeMap)(int grib_ltype) = editionNumber <= 1 ? zaxisTypeToGrib1ltype : zaxisTypeToGrib2ltype; + grib_ltype = ltypeMap(zaxistype); + } + long grib_ltype2 = (ltype != ltype2 && ltype2 != -1) ? ltype2 : grib_ltype; + + void (*defLevel)(grib_handle * gh, int gcinit, long leveltype1, long leveltype2, bool hasBounds, double level, double dlevel1, + double dlevel2) + = editionNumber <= 1 ? grib1DefLevel : grib2DefLevel; + + switch (zaxistype) + { + case ZAXIS_SURFACE: + case ZAXIS_MEANSEA: + case ZAXIS_HEIGHT: + case ZAXIS_ALTITUDE: + case ZAXIS_SIGMA: + case ZAXIS_DEPTH_BELOW_SEA: + case ZAXIS_ISENTROPIC: + { + if (zaxistype == ZAXIS_HEIGHT) + { + double sf = zaxis_units_to_meter(zaxisID); + level *= sf; + dlevel1 *= sf; + dlevel2 *= sf; + } + + /* GRIB2: PRODUCT DEFINITION TEMPLATE NUMBER 32: + + "Analysis or forecast at a horizontal level or in a + horizontal layer at a point in time for simulate + (synthetic) satellite data" + + The key/value pairs that are set in "grib2DefLevel" do not + exist for this template. */ + if (editionNumber <= 1 || proddef_template_num != 32) + defLevel(gh, gcinit, grib_ltype, grib_ltype2, hasBounds, level, dlevel1, dlevel2); + + break; + } + case ZAXIS_CLOUD_BASE: + case ZAXIS_CLOUD_TOP: + case ZAXIS_ISOTHERM_ZERO: + case ZAXIS_TROPOPAUSE: + case ZAXIS_TOA: + case ZAXIS_SEA_BOTTOM: + case ZAXIS_LAKE_BOTTOM: + case ZAXIS_SEDIMENT_BOTTOM: + case ZAXIS_SEDIMENT_BOTTOM_TA: + case ZAXIS_SEDIMENT_BOTTOM_TW: + case ZAXIS_MIX_LAYER: + case ZAXIS_ATMOSPHERE: + { + defLevel(gh, gcinit, grib_ltype, grib_ltype, hasBounds, level, dlevel1, dlevel2); + } + break; + case ZAXIS_HYBRID: + case ZAXIS_HYBRID_HALF: + { + if (editionNumber <= 1) + { + grib_ltype = hasBounds ? GRIB1_LTYPE_HYBRID_LAYER : GRIB1_LTYPE_HYBRID; + } + defLevel(gh, gcinit, grib_ltype, grib_ltype, hasBounds, level, dlevel1, dlevel2); + + if (!gcinit) + { + int vctsize = zaxisInqVctSize(zaxisID); + if (vctsize > 0) + { + GRIB_CHECK(my_grib_set_long(gh, "PVPresent", 1), 0); + GRIB_CHECK(grib_set_double_array(gh, "pv", zaxisInqVctPtr(zaxisID), (size_t) vctsize), 0); + } + } + + break; + } + case ZAXIS_PRESSURE: + { + if (level < 0) Warning("Pressure level of %f Pa is below zero!", level); + + if (!zaxis_units_is_Pa(zaxisID)) + { + level *= 100; + dlevel1 *= 100; + dlevel2 *= 100; + } + + if (editionNumber <= 1) + { + double dum; + if (level < 32768 && (level < 100 || modf(level / 100, &dum) > 0)) + grib_ltype = GRIB1_LTYPE_ISOBARIC_PA; + else + level /= 100; + } + else if (ltype2 == -1) + ltype2 = GRIB2_LTYPE_ISOBARIC; + defLevel(gh, gcinit, grib_ltype, ltype2, hasBounds, level, dlevel1, dlevel2); + + break; + } + case ZAXIS_SNOW: + if (editionNumber <= 1) + ; // not available + else + { + grib2DefLevel(gh, gcinit, grib_ltype, grib_ltype, hasBounds, level, dlevel1, dlevel2); + } + + break; + case ZAXIS_DEPTH_BELOW_LAND: + { + double sf = editionNumber <= 1 ? zaxis_units_to_centimeter(zaxisID) : zaxis_units_to_meter(zaxisID); + grib_ltype = editionNumber <= 1 ? (hasBounds ? GRIB1_LTYPE_LANDDEPTH_LAYER : GRIB1_LTYPE_LANDDEPTH) : grib_ltype; + defLevel(gh, gcinit, grib_ltype, grib_ltype, hasBounds, level * sf, dlevel1 * sf, dlevel2 * sf); + + break; + } + case ZAXIS_REFERENCE: + { + if (!gcinit) GRIB_CHECK(my_grib_set_long(gh, "genVertHeightCoords", 1), 0); + + if (editionNumber <= 1) + ; // not available + else + { + if (hasBounds) + { + gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", grib_ltype); + gribapiDefLevelType(gh, gcinit, "typeOfSecondFixedSurface", grib_ltype2); + GRIB_CHECK(my_grib_set_long(gh, "topLevel", (long) dlevel1), 0); + GRIB_CHECK(my_grib_set_long(gh, "bottomLevel", (long) dlevel2), 0); + } + else + { + grib2DefLevel(gh, gcinit, grib_ltype, grib_ltype2, hasBounds, level, dlevel1, dlevel2); + } + + GRIB_CHECK(my_grib_set_long(gh, "NV", 6), 0); + int number = 0; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NUMBEROFVGRIDUSED, &number); + GRIB_CHECK(my_grib_set_long(gh, "numberOfVGridUsed", number), 0); + int nlev = 0; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NLEV, &nlev); + GRIB_CHECK(my_grib_set_long(gh, "nlev", nlev), 0); + unsigned char uuid[CDI_UUID_SIZE]; + int length = CDI_UUID_SIZE; + memset(uuid, 0, length); + cdiInqKeyBytes(zaxisID, CDI_GLOBAL, CDI_KEY_UUID, uuid, &length); + size_t len = CDI_UUID_SIZE; + if (grib_set_bytes(gh, "uuidOfVGrid", uuid, &len) != 0) Warning("Can't write UUID!"); + } + + break; + } + case ZAXIS_GENERIC: + { + defLevel(gh, gcinit, ltype, ltype, hasBounds, level, dlevel1, dlevel2); + break; + } + default: + { + Error("Unsupported zaxis type: %s", zaxisNamePtr(zaxistype)); + break; + } + } +} + +int +gribapiGetScanningMode(grib_handle *gh) +{ + long iScansNegatively, jScansPositively, jPointsAreConsecutive; + GRIB_CHECK(grib_get_long(gh, "iScansNegatively", &iScansNegatively), 0); + GRIB_CHECK(grib_get_long(gh, "jScansPositively", &jScansPositively), 0); + GRIB_CHECK(grib_get_long(gh, "jPointsAreConsecutive", &jPointsAreConsecutive), 0); + int scanningMode = 128 * (bool) iScansNegatively + 64 * (bool) jScansPositively + 32 * (bool) jPointsAreConsecutive; + if (cdiDebugExt >= 30) + printf("gribapiGetScanningMode(): Scanning mode = %02d (%1d%1d%1d)*32; \n", scanningMode, (int) jPointsAreConsecutive, + (int) jScansPositively, (int) iScansNegatively); + + return scanningMode; +} + +void +gribapiSetScanningMode(grib_handle *gh, int scanningMode) +{ + // 127: reserved for testing; generated test data will be in 64 scanning mode + // if (scanningMode== 127) scanningMode = 64; + + long iScansNegatively = (scanningMode & 128) / 128; + long jScansPositively = (scanningMode & 64) / 64; + long jPointsAreConsecutive = (scanningMode & 32) / 32; + + if (cdiDebugExt >= 30 && gribEditionNumber(gh) <= 1) + { + long paramId, levelTypeId, levelId, uvRelativeToGrid; + GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &uvRelativeToGrid), 0); + GRIB_CHECK(grib_get_long(gh, "indicatorOfParameter", ¶mId), 0); + GRIB_CHECK(grib_get_long(gh, "indicatorOfTypeOfLevel", &levelTypeId), 0); + GRIB_CHECK(grib_get_long(gh, "level", &levelId), 0); + printf("gribapiSetScanningMode(): (param,ltype,level) = (%3d,%3d,%4d); Scanning mode = %02d (%1d%1d%1d)*32; " + "uvRelativeToGrid = %02d\n", + (int) paramId, (int) levelTypeId, (int) levelId, scanningMode, (int) jPointsAreConsecutive, (int) jScansPositively, + (int) iScansNegatively, (int) uvRelativeToGrid); + } + + GRIB_CHECK(my_grib_set_long(gh, "iScansNegatively", iScansNegatively), 0); + GRIB_CHECK(my_grib_set_long(gh, "jScansPositively", jScansPositively), 0); + GRIB_CHECK(my_grib_set_long(gh, "jPointsAreConsecutive", jPointsAreConsecutive), 0); +} + +/* + TABLE 8. SCANNING MODE FLAG + + (GDS Octet 28) + BIT VALUE MEANING + 1 0 Points scan in +i direction + 1 Points scan in -i direction + 2 0 Points scan in -j direction + 1 Points scan in +j direction + 3 0 Adjacent points in i direction are consecutive + (FORTRAN: (I,J)) + 1 Adjacent points in j direction are consecutive + (FORTRAN: (J,I)) + + => Scanning Mode 0 0 0 0 0 0 0 0 (00 dec) +i, -j; i direction consecutive (row-major order West->East & North->South) + => Scanning Mode 0 1 0 0 0 0 0 0 (64 dec) +i, +j; i direction consecutive (row-major order West->East & South->North ) + => Scanning Mode 1 1 0 0 0 0 0 0 (96 dec) +i, +j; j direction consecutive (column-major order South->North & West->East ) + + NOTE: South->North - As if you would plot the data as image on the screen + where [0,0] of the data is the top-left pixel. + + grib2ppm LAMH_D11_201302150000_00000_oro | display ppm:- + ImageMagick (display): [0,0] of an image belongs to the top-left pixel + [DEFAULT] : 64 dec + + iScansNegatively = 0; + jScansPositively = 1; + jPointsAreConsecutive = 0; => Scanning Mode 64 + + cdo selindexbox,1,726,100,550 LAMH_D11_201302150000_00000_oro LAMH_D11_201302150000_00000_oro_cropped + grib2ppm LAMH_D11_201302150000_00000_oro_cropped | /usr/bin/display ppm:- & + # ^^^ this image will be missing the souther parts of data + + grib2ppm LAMH_D11_201302150000_00000_oro | /usr/bin/display ppm:- & + # ^ full domain data +*/ + +#ifdef HIRLAM_EXTENSIONS +static void +verticallyFlipGridDefinitionWhenScanningModeChanged(grib_handle *gh, double yfirst, double ylast, double yinc) +{ + /* + Nj = 550; + latitudeOfFirstGridPointInDegrees = -30.8; + latitudeOfLastGridPointInDegrees = 24.1; + iScansNegatively = 0; + jScansPositively = 0; + jPointsAreConsecutive = 0; + jDirectionIncrementInDegrees = 0.1; + + When switching from scanning mode 0 <=> 64 + yfirst = -30.8 + (550-1)*0.1 + + yfirst = yfirst + (ysize-1) * yinc + yinc = -1.0*yinc + */ + + // long jDim=0; + // GRIB_CHECK(grib_get_long(gh, "Nj", &jDim), 0); + + double latitudeOfFirstGridPointInDegrees; + double latitudeOfLastGridPointInDegrees; + double jDirectionIncrementInDegrees; + + // GRIB_CHECK(grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &latitudeOfFirstGridPointInDegrees), 0); // yfirst + // GRIB_CHECK(grib_get_double(gh, "latitudeOfLastGridPointInDegrees", &latitudeOfLastGridPointInDegrees), 0); // ylast + // GRIB_CHECK(grib_get_double(gh, "jDirectionIncrementInDegrees", &jDirectionIncrementInDegrees), 0); // yinc + + if (cdiDebugExt >= 10) Message(" BEFORE: yfirst = %f; ylast = %f; yinc = %f; ", yfirst, ylast, yinc); + + GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", ylast), 0); + GRIB_CHECK(my_grib_set_double(gh, "latitudeOfLastGridPointInDegrees", yfirst), 0); + // yinc *= -1.0; // don't set yinc here ... + // GRIB_CHECK(my_grib_set_double(gh, "jDirectionIncrementInDegrees", yinc), 0); + + if (cdiDebugExt >= 10) + { + GRIB_CHECK(grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &latitudeOfFirstGridPointInDegrees), 0); // yfirst + GRIB_CHECK(grib_get_double(gh, "latitudeOfLastGridPointInDegrees", &latitudeOfLastGridPointInDegrees), 0); // ylast + GRIB_CHECK(grib_get_double(gh, "jDirectionIncrementInDegrees", &jDirectionIncrementInDegrees), 0); // yinc + Message("CHANGED INTO: yfirst = %f, ylast = %f, yinc = %f", latitudeOfFirstGridPointInDegrees, + latitudeOfLastGridPointInDegrees, jDirectionIncrementInDegrees); + } +} + +static void +convertDataScanningMode(int scanModeIN, int scanModeOUT, double *data, size_t gridsize, size_t iDim, size_t jDim) +{ + size_t idxIN, idxOUT; + + // 127: reserved for testing; it will generate test data in 64 scanning mode + if (scanModeOUT == 127) // fill with testdata ... + { + scanModeOUT = 64; + if (cdiDebugExt >= 30) printf("convertDataScanningMode(): Generating test data in 64 scanning mode..\n"); + for (size_t j = 0; j < jDim; j++) + { + size_t jXiDim = j * iDim; + for (size_t i = 0; i < iDim; i++) + { + idxIN = i + jXiDim; + data[idxIN] = (double) (100.0 * j + i); + } + } + } + + if ((iDim * jDim) != gridsize) + { + if (cdiDebugExt >= 30) + printf("convertDataScanningMode(): ERROR: (iDim*jDim)!= gridsize; (%zu * %zu) != %zu\n", iDim, jDim, gridsize); + return; + } + if (cdiDebugExt >= 30) + printf("convertDataScanningMode(): scanModeIN=%02d => scanModeOUT=%02d ; where: (iDim * jDim == gridsize) (%zu*%zu == %zu)\n", + scanModeIN, scanModeOUT, iDim, jDim, gridsize); + + if (cdiDebugExt >= 100) + { + printf("convertDataScanningMode(): data IN:\n"); + for (size_t j = 0; j < jDim; j++) + { + size_t jXiDim = j * iDim; + for (size_t i = 0; i < iDim; i++) + { + idxIN = i + jXiDim; + printf("%03.0f, ", data[idxIN]); + } + printf("\n"); + } + } + + if (scanModeIN == scanModeOUT) + { + if (cdiDebugExt >= 30) printf("convertDataScanningMode(): INFO: Nothing to do; scanModeIN==scanModeOUT..\n"); + return; + } + + if (0) + { + return; + if (scanModeOUT == 00) + { + if (cdiDebugExt > 0) printf("convertDataScanningMode(): Leave data unchaged BUT set scanModeOUT=00.\n"); + // CHECK: Looks like that GRIB-API provide (no matter what) data in the scannning mode 00, even it is store in the + // gribfile as 64 !! + return; + } + } + double *dataCopy = (double *) Malloc(gridsize * sizeof(double)); + memcpy((void *) dataCopy, (void *) data, gridsize * sizeof(double)); + + if (scanModeIN + == 64) // Scanning Mode (00 dec) +i, -j; i direction consecutive (row-major order West->East & South->North ) + { // Scanning Mode (64 dec) +i, +j; i direction consecutive (row-major order West->East & North->South ) + // Scanning Mode (96 dec) +i, +j; j direction consecutive (column-major order North->South & West->East ) + if (scanModeOUT == 00) + // CHECK: Looks like that GRIB-API provide (no matter what) data in the scannning mode 00, even it is store in the gribfile + // as 64 !! +#define VERTICAL_FLIP +#ifdef VERTICAL_FLIP + { // flip the data vertically .. + idxIN = 0; + idxOUT = (jDim - 1) * iDim; + if (cdiDebugExt >= 30) printf("convertDataScanningMode(): copying rows nr. (%04d : %04zu)\n", 0, jDim - 1); + for (size_t j = 0; j < jDim; j++) + { + memcpy((void *) &data[idxOUT], (void *) &dataCopy[idxIN], iDim * sizeof(double)); + idxIN += iDim; + idxOUT -= iDim; + } + } // end if (scanModeOUT==00)*/ +#endif +#ifdef HORIZONTAL_FLIP + { // flip data horizontally ... + if (1) + { + if (cdiDebugExt >= 30) printf("convertDataScanningMode(): copying columns nr. (%04d : %04d);\n", 0, iDim - 1); + for (size_t i = 0; i < iDim; i++) + { + for (size_t j = 0; j < jDim; j++) + { + size_t jXiDim = j * iDim; + idxIN = i + jXiDim; + // data[idxIN] = (double) (100.0*j +i); // just some testdata .. + idxOUT = iDim - i - 1 + jXiDim; + // printf("[%03d=>%03d] = %f;",idxIN,idxOUT,dataCopy[idxIN]); + data[idxOUT] = dataCopy[idxIN]; + } + } + } + } // end if (scanModeOUT==00) +#endif + + if (scanModeOUT == 96) + { // transpose the data + if (cdiDebugExt >= 30) + printf("convertDataScanningMode(): transpose data rows=>columns nr. (%04d : %04zu) => (%04d : %04zu);\n", 0, iDim - 1, + 0, jDim - 1); + for (size_t j = 0; j < jDim; j++) + { + size_t jXiDim = j * iDim; + for (size_t i = 0; i < iDim; i++) + { + idxIN = i + jXiDim; + idxOUT = j + i * jDim; + // printf("[%03d=>%03d] = %f;",idxIN,idxOUT,dataCopy[idxIN]); + data[idxOUT] = dataCopy[idxIN]; + } + // printf(".\n"); + } + } // end if (scanModeOUT==96) + } // end if (scanModeIN==64) + + if (scanModeIN + == 00) // Scanning Mode (00 dec) +i, -j; i direction consecutive (row-major order West->East & South->North ) + { // Scanning Mode (64 dec) +i, +j; i direction consecutive (row-major order West->East & North->South ) + // Scanning Mode (96 dec) +i, +j; j direction consecutive (column-major order North->South & West->East ) + if (scanModeOUT == 64) + { // flip the data vertically .. + idxIN = 0; + idxOUT = (jDim - 1) * iDim; + for (size_t j = 0; j < jDim; j++) + { + if (cdiDebugExt >= 25) + printf("convertDataScanningMode(): copying row nr. %04zu; [idxIN=%08zu] => [idxOUT=%08zu]\n", j, idxIN, idxOUT); + memcpy((void *) &data[idxOUT], (void *) &dataCopy[idxIN], iDim * sizeof(double)); + idxIN += iDim; + idxOUT -= iDim; + } + } // end if (scanModeOUT==64) + + if (scanModeOUT == 96) + { // transpose the data + size_t jInv; + for (size_t j = 0; j < jDim; j++) + { + if (cdiDebugExt >= 30) printf("convertDataScanningMode(): processing row nr. %04zu;\n", j); + jInv = (jDim - 1) - j; + for (size_t i = 0; i < iDim; i++) data[j + i * jDim] = dataCopy[i + jInv * iDim]; // source data has -j + } + } // end if (scanModeOUT==96) + } // end if (scanModeIN==00) + + if (scanModeIN + == 96) // Scanning Mode (00 dec) +i, -j; i direction consecutive (row-major order West->East & South->North ) + { // Scanning Mode (64 dec) +i, +j; i direction consecutive (row-major order West->East & North->South ) + // Scanning Mode (96 dec) +i, +j; j direction consecutive (column-major order North->South & West->East ) + if (scanModeOUT == 64) + { // transpose the data + for (size_t j = 0; j < jDim; j++) + { + if (cdiDebugExt >= 30) printf("convertDataScanningMode(): processing row nr. %04zu;\n", j); + size_t jXiDim = j * iDim; + for (size_t i = 0; i < iDim; i++) + // data[j + i*jDim] = dataCopy[i + j*iDim]; + data[i + jXiDim] = dataCopy[j + i * jDim]; + } + } // end if (scanModeOUT==64) + + if (scanModeOUT == 00) + { // transpose the data + idxIN = 0; + idxOUT = 0; + size_t jInv; + for (size_t j = 0; j < jDim; j++) + { + if (cdiDebugExt >= 30) printf("convertDataScanningMode(): processing row nr. %04zu;\n", j); + jInv = (jDim - 1) - j; + size_t jXiDim = j * iDim; + for (size_t i = 0; i < iDim; i++) + // data[jInv + iXjDim] = dataCopy[i + jXiDim]; // target data has -j + data[i + jXiDim] = dataCopy[jInv + i * jDim]; // target data has -j + } + } // end if (scanModeOUT==00) + } // end if (scanModeIN==96) + + if (cdiDebugExt >= 100) + { + printf("convertDataScanningMode(): data OUT (new scanning mode):\n"); + for (size_t j = 0; j < jDim; j++) + { + size_t jXiDim = j * iDim; + for (size_t i = 0; i < iDim; i++) + { + idxIN = i + jXiDim; + printf("%03.0f, ", data[idxIN]); + } + printf("\n"); + } + } + + free(dataCopy); +} +#endif // HIRLAM_EXTENSIONS + +static void +gribapiSetExtMode(grib_handle *gh, int gridID, size_t datasize, const void *data) +{ +#ifndef HIRLAM_EXTENSIONS + (void) data; + (void) datasize; +#endif + int gridtype = gridInqType(gridID); + if (gridtype == GRID_PROJECTION) + { + int projtype = gridInqProjType(gridID); + // clang-format off + if (projtype == CDI_PROJ_RLL) gridtype = GRID_LONLAT; + else if (projtype == CDI_PROJ_LCC) gridtype = CDI_PROJ_LCC; + else if (projtype == CDI_PROJ_STERE) gridtype = CDI_PROJ_STERE; + // clang-format on + } + + if (gridtype == GRID_GENERIC || gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED + || gridtype == CDI_PROJ_LCC) + { +#ifdef HIRLAM_EXTENSIONS + int scanModeIN = 0; + cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_SCANNINGMODE, &scanModeIN); + + if (cdiDebugExt >= 100) Message("scanModeIN=%d; gridsize=%zu", scanModeIN, gridInqSize(gridID)); + + if (cdiGribDataScanningMode.active) // allowed modes: <0, 64, 96>; Default is 64 + { + size_t iDim = gridInqXsize(gridID); + size_t jDim = gridInqYsize(gridID); + + double yfirst = gridInqYval(gridID, 0); + double ylast = gridInqYval(gridID, jDim - 1); + double yinc = gridInqYinc(gridID); + + int scanModeOUT = cdiGribDataScanningMode.value; + convertDataScanningMode(scanModeIN, scanModeOUT, (double *) data, datasize, iDim, jDim); + // This will overrule the old scanning mode of the given grid + if (cdiDebugExt >= 10) Message("Set GribDataScanningMode (%d) => (%d)", scanModeIN, cdiGribDataScanningMode.value); + gribapiSetScanningMode(gh, cdiGribDataScanningMode.value); + + if (((scanModeIN == 00) && (cdiGribDataScanningMode.value == 64)) + || ((scanModeIN == 64) && (cdiGribDataScanningMode.value == 00))) + verticallyFlipGridDefinitionWhenScanningModeChanged(gh, yfirst, ylast, yinc); + } + else + { + if (cdiDebugExt >= 100) Message("Set GribDataScanningMode => (%d) based on used grid", scanModeIN); + gribapiSetScanningMode(gh, scanModeIN); + } +#endif + } +} + +// #define GRIBAPIENCODETEST 1 + +size_t +gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisID, CdiDateTime vDateTime, int tsteptype, int numavg, + size_t datasize, const void *data, size_t nmiss, void **gribbuffer, size_t *gribbuffersize, int comptype, + void *gribContainer) +{ + long editionNumber = 2; + + // extern unsigned char _grib_template_GRIB2[]; + cdi_check_gridsize_int_limit("GRIB", datasize); + + int param = vlistInqVarParam(vlistID, varID); + int datatype = vlistInqVarDatatype(vlistID, varID); + int typeOfGeneratingProcess = 0; + cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFGENERATINGPROCESS, &typeOfGeneratingProcess); + int productDefinitionTemplate = -1; + cdiInqKeyInt(vlistID, varID, CDI_KEY_PRODUCTDEFINITIONTEMPLATE, &productDefinitionTemplate); + + int uvRelativeToGrid = -1; + cdiInqKeyInt(vlistID, varID, CDI_KEY_UVRELATIVETOGRID, &uvRelativeToGrid); + +#ifdef GRIBAPIENCODETEST + grib_handle *gh = (grib_handle *) gribHandleNew(editionNumber); +#else + gribContainer_t *gc = (gribContainer_t *) gribContainer; + assert(gc != NULL); + grib_handle *gh = (struct grib_handle *) gc->gribHandle; +#endif + + GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0); + + if (editionNumber == 2) + { + if (!gc->init) + { + int backgroundProcess = 0; + cdiInqKeyInt(vlistID, varID, CDI_KEY_BACKGROUNDPROCESS, &backgroundProcess); + GRIB_CHECK(my_grib_set_long(gh, "typeOfGeneratingProcess", typeOfGeneratingProcess), 0); + GRIB_CHECK(my_grib_set_long(gh, "backgroundProcess", backgroundProcess), 0); + int status, tablesVersion, localTablesVersion; + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_TABLESVERSION, &tablesVersion); + if (status == 0) GRIB_CHECK(my_grib_set_long(gh, "tablesVersion", (long) tablesVersion), 0); + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_LOCALTABLESVERSION, &localTablesVersion); + if (status == 0) GRIB_CHECK(my_grib_set_long(gh, "localTablesVersion", (long) localTablesVersion), 0); + int typeOfProcessedData = 0; + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFPROCESSEDDATA, &typeOfProcessedData); + if (status == 0) GRIB_CHECK(my_grib_set_long(gh, "typeOfProcessedData", (long) typeOfProcessedData), 0); + /* + int constituentType = 0; + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_CONSTITUENTTYPE, &constituentType); + if ( status == 0 ) GRIB_CHECK(my_grib_set_long(gh, "constituentType", (long)constituentType), 0); + */ + } + } + + gribapiDefTime((int) editionNumber, productDefinitionTemplate, typeOfGeneratingProcess, gh, vDateTime, tsteptype, numavg, + vlistInqTaxis(vlistID), gc->init); + + { + int typeOfTimeIncrement = 0; + int status = cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFTIMEINCREMENT, &typeOfTimeIncrement); + if (status == 0) grib_set_long(gh, "typeOfTimeIncrement", (long) typeOfTimeIncrement); + } + + { + int status, perturbationNumber, numberOfForecastsInEnsemble, typeOfEnsembleForecast; + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFENSEMBLEFORECAST, &typeOfEnsembleForecast); + if (status == 0) grib_set_long(gh, "typeOfEnsembleForecast", typeOfEnsembleForecast); + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_NUMBEROFFORECASTSINENSEMBLE, &numberOfForecastsInEnsemble); + if (status == 0) grib_set_long(gh, "numberOfForecastsInEnsemble", numberOfForecastsInEnsemble); + status = cdiInqKeyInt(vlistID, varID, CDI_KEY_PERTURBATIONNUMBER, &perturbationNumber); + if (status == 0) grib_set_long(gh, "perturbationNumber", perturbationNumber); + } + + if (!gc->init) gribapiDefInstitut(gh, vlistID, varID); + if (!gc->init) gribapiDefModel(gh, vlistID, varID); + + if (!gc->init) + { + char name[256], stdname[256]; + vlistInqVarName(vlistID, varID, name); + vlistInqVarStdname(vlistID, varID, stdname); + gribapiDefParam((int) editionNumber, gh, param, name, stdname); + } + + if (!gc->init && editionNumber == 2) + { + int shapeOfTheEarth = 0; + cdiInqKeyInt(vlistID, varID, CDI_KEY_SHAPEOFTHEEARTH, &shapeOfTheEarth); + GRIB_CHECK(my_grib_set_long(gh, "shapeOfTheEarth", (long) shapeOfTheEarth), 0); + + int grib2LocalSectionNumber, section2PaddingLength; + int mpimType, mpimClass, mpimUser; + if (cdiInqKeyInt(vlistID, varID, CDI_KEY_MPIMTYPE, &mpimType) == CDI_NOERR + && cdiInqKeyInt(vlistID, varID, CDI_KEY_MPIMCLASS, &mpimClass) == CDI_NOERR + && cdiInqKeyInt(vlistID, varID, CDI_KEY_MPIMUSER, &mpimUser) == CDI_NOERR) + { + grib_set_long(gh, "grib2LocalSectionPresent", 1); + grib_set_long(gh, "grib2LocalSectionNumber", 1); + grib_set_long(gh, "mpimType", mpimType); + grib_set_long(gh, "mpimClass", mpimClass); + grib_set_long(gh, "mpimUser", mpimUser); + + int revNumLen = 20; + unsigned char revNumber[revNumLen]; + if (cdiInqKeyBytes(vlistID, varID, CDI_KEY_REVNUMBER, revNumber, &revNumLen) == CDI_NOERR) + { + size_t revNumLenS = revNumLen; + grib_set_bytes(gh, "revNumber", revNumber, &revNumLenS); + } + int revStatus; + if (cdiInqKeyInt(vlistID, varID, CDI_KEY_REVSTATUS, &revStatus) == CDI_NOERR) grib_set_long(gh, "revStatus", revStatus); + } + else if (cdiInqKeyInt(vlistID, varID, CDI_KEY_GRIB2LOCALSECTIONNUMBER, &grib2LocalSectionNumber) == CDI_NOERR + && cdiInqKeyInt(vlistID, varID, CDI_KEY_SECTION2PADDINGLENGTH, §ion2PaddingLength) == CDI_NOERR) + { + grib_set_long(gh, "grib2LocalSectionPresent", 1); + grib_set_long(gh, "grib2LocalSectionNumber", grib2LocalSectionNumber); + unsigned char *section2Padding = (unsigned char *) Malloc(section2PaddingLength); + cdiInqKeyBytes(vlistID, varID, CDI_KEY_SECTION2PADDING, section2Padding, §ion2PaddingLength); + size_t len = section2PaddingLength; + // Does not work anymore with ecCodes 2.22.0/2.25.0!!! + // ECCODES ERROR : pack_bytes: Wrong size (10) for section2Padding. It is 0 bytes long + grib_set_bytes(gh, "section2Padding", section2Padding, &len); + Free(section2Padding); + } + } + + // bitsPerValue have to be defined first (complex packing) + GRIB_CHECK(my_grib_set_long(gh, "bitsPerValue", (long) grbBitsPerValue(datatype)), 0); + + if (!gc->init) gribapiDefGrid((int) editionNumber, gh, gridID, comptype, datatype, uvRelativeToGrid); + + gribapiDefLevel((int) editionNumber, gh, zaxisID, levelID, gc->init, productDefinitionTemplate); + + vlist_t *vlistptr = vlist_to_pointer(vlistID); + int zaxisSize = zaxisInqSize(zaxisID); + // if (!gc->init) + { + int ret = 0; + + // NOTE: Optional key/value pairs: Note that we do not distinguish between tiles here! + + for (int i = 0; i < vlistptr->vars[varID].opt_grib_nentries; i++) + { + if (vlistptr->vars[varID].opt_grib_kvpair[i].update) + { + // DR: Fix for multi-level fields (otherwise only the 1st level is correct) + if (zaxisSize == (levelID + 1)) vlistptr->vars[varID].opt_grib_kvpair[i].update = false; + + if (vlistptr->vars[varID].opt_grib_kvpair[i].data_type == t_double) + { + if (CDI_Debug) + Message("key \"%s\" : double value = %g", vlistptr->vars[varID].opt_grib_kvpair[i].keyword, + vlistptr->vars[varID].opt_grib_kvpair[i].dbl_val); + my_grib_set_double(gh, vlistptr->vars[varID].opt_grib_kvpair[i].keyword, + vlistptr->vars[varID].opt_grib_kvpair[i].dbl_val); + GRIB_CHECK(ret, 0); + } + if (vlistptr->vars[varID].opt_grib_kvpair[i].data_type == t_int) + { + if (CDI_Debug) + Message("key \"%s\" : integer value = %d", vlistptr->vars[varID].opt_grib_kvpair[i].keyword, + vlistptr->vars[varID].opt_grib_kvpair[i].int_val); + my_grib_set_long(gh, vlistptr->vars[varID].opt_grib_kvpair[i].keyword, + (long) vlistptr->vars[varID].opt_grib_kvpair[i].int_val); + GRIB_CHECK(ret, 0); + } + } + } + } + + if (nmiss > 0) + { + GRIB_CHECK(my_grib_set_long(gh, "bitmapPresent", 1), 0); + GRIB_CHECK(my_grib_set_double(gh, "missingValue", vlistInqVarMissval(vlistID, varID)), 0); + } + + gribapiSetExtMode(gh, gridID, datasize, data); + + GRIB_CHECK(grib_set_double_array(gh, "values", (const double *) data, datasize), 0); + + if (nmiss) + { + long numberOfMissing = -1; + GRIB_CHECK(grib_get_long(gh, "numberOfMissing", &numberOfMissing), 0); + if (numberOfMissing == 0) GRIB_CHECK(my_grib_set_long(gh, "bitmapPresent", 0), 0); + } + + // get the size of coded message + const void *dummy = NULL; + size_t recsize = 0; + GRIB_CHECK(grib_get_message(gh, &dummy, &recsize), 0); + recsize += 512; // add some space for possible filling + *gribbuffersize = recsize; + *gribbuffer = Malloc(*gribbuffersize); + + if (!gc->init && editionNumber == 2) + { + long pdis; + grib_get_long(gh, "discipline", &pdis); + if (pdis != 255) + { + char cdi_name[CDI_MAX_NAME]; + cdi_name[0] = 0; + vlistInqVarName(vlistID, varID, cdi_name); + char grb_name[256]; + gribapiGetString(gh, "shortName", grb_name, sizeof(grb_name)); + str_to_lower(cdi_name); + str_to_lower(grb_name); + bool checkName = (!grb_name[0] && strncmp(cdi_name, "param", 5) == 0) ? false : true; + if (checkName && ((strlen(cdi_name) != strlen(grb_name)) || !strStartsWith(cdi_name, grb_name))) + Warning("*** GRIB2 shortName does not correspond to chosen variable name: \"%s\" (\"%s\").", + grb_name[0] ? grb_name : "unknown", cdi_name); + } + } + + // get a copy of the coded message + GRIB_CHECK(grib_get_message_copy(gh, *gribbuffer, &recsize), 0); + +#ifdef GRIBAPIENCODETEST + gribHandleDelete(gh); +#endif + + gc->init = true; + + return recsize; +} + +void +gribapiChangeParameterIdentification(grib_handle *gh, int code, int ltype, int level) +{ + // timeRangeIndicator: could be included later + if (gribEditionNumber(gh) <= 1) + { + if (code != -1) GRIB_CHECK(my_grib_set_long(gh, "indicatorOfParameter", code), 0); + if (ltype != -1) GRIB_CHECK(my_grib_set_long(gh, "indicatorOfTypeOfLevel", ltype), 0); + if (level != -1) GRIB_CHECK(my_grib_set_long(gh, "level", level), 0); + } +} + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <float.h> + + + +#ifdef HAVE_LIBIEG + +static int +iegInqDatatype(int prec) +{ + return (prec == EXSE_DOUBLE_PRECISION) ? CDI_DATATYPE_FLT64 : CDI_DATATYPE_FLT32; +} + +static int +iegDefDatatype(int datatype) +{ + if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) Error("CDI/IEG library does not support complex numbers!"); + + if (datatype != CDI_DATATYPE_FLT32 && datatype != CDI_DATATYPE_FLT64) datatype = CDI_DATATYPE_FLT32; + + return (datatype == CDI_DATATYPE_FLT64) ? EXSE_DOUBLE_PRECISION : EXSE_SINGLE_PRECISION; +} + +static void +ieg_read_recordSP(stream_t *streamptr, float *data, size_t *nmiss) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + int varID = streamptr->tsteps[tsID].records[recID].varID; + off_t recpos = streamptr->tsteps[tsID].records[recID].position; + + fileSetPos(fileID, recpos, SEEK_SET); + + void *iegp = streamptr->record->objectp; + if (iegRead(fileID, iegp) < 0) Error("Could not read IEG record!"); + + iegInqDataSP(iegp, data); + + double missval = vlistInqVarMissval(vlistID, varID); + size_t size = gridInqSize(vlistInqVarGrid(vlistID, varID)); + + *nmiss = get_num_missvalsSP(size, data, missval); + + streamptr->numvals += size; +} + +static void +ieg_read_recordDP(stream_t *streamptr, double *data, size_t *nmiss) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + int varID = streamptr->tsteps[tsID].records[recID].varID; + off_t recpos = streamptr->tsteps[tsID].records[recID].position; + + fileSetPos(fileID, recpos, SEEK_SET); + + void *iegp = streamptr->record->objectp; + if (iegRead(fileID, iegp) < 0) Error("Could not read IEG record!"); + + iegInqDataDP(iegp, data); + + double missval = vlistInqVarMissval(vlistID, varID); + size_t size = gridInqSize(vlistInqVarGrid(vlistID, varID)); + + *nmiss = get_num_missvalsDP(size, data, missval); + + streamptr->numvals += size; +} + +void +ieg_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss) +{ + if (memtype == MEMTYPE_DOUBLE) + ieg_read_recordDP(streamptr, (double *) data, nmiss); + else + ieg_read_recordSP(streamptr, (float *) data, nmiss); +} + +static int +iegGetZaxisType(int iegleveltype) +{ + // clang-format off + switch (iegleveltype) + { + case IEG_LTYPE_SURFACE: return ZAXIS_SURFACE; + case IEG_LTYPE_99: + case IEG_LTYPE_ISOBARIC: return ZAXIS_PRESSURE; + case IEG_LTYPE_HEIGHT: return ZAXIS_HEIGHT; + case IEG_LTYPE_ALTITUDE: return ZAXIS_ALTITUDE; + case IEG_LTYPE_HYBRID: + case IEG_LTYPE_HYBRID_LAYER: return ZAXIS_HYBRID; + case IEG_LTYPE_LANDDEPTH: + case IEG_LTYPE_LANDDEPTH_LAYER: return ZAXIS_DEPTH_BELOW_LAND; + case IEG_LTYPE_SEADEPTH: return ZAXIS_DEPTH_BELOW_SEA; + } + // clang-format on + return ZAXIS_GENERIC; +} + +static void +iegDefTime(int *pdb, CdiDateTime datetime, int taxisID) +{ + int timetype = (taxisID != -1) ? taxisInqType(taxisID) : -1; + if (timetype == TAXIS_ABSOLUTE || timetype == TAXIS_RELATIVE) + { + IEG_P_Year(pdb) = datetime.date.year; + IEG_P_Month(pdb) = datetime.date.month; + IEG_P_Day(pdb) = datetime.date.day; + IEG_P_Hour(pdb) = datetime.time.hour; + IEG_P_Minute(pdb) = datetime.time.minute; + + pdb[15] = 1; + pdb[16] = 0; + pdb[17] = 0; + pdb[18] = 10; + pdb[36] = 1; + } + + pdb[5] = 128; +} + +/* find smallest power of 10 in [1000,10000000] that upon multiplication results in fractional part + close to zero for all arguments */ +static double +calc_resfac(double xfirst, double xlast, double xinc, double yfirst, double ylast, double yinc) +{ + double resfac = 1000.0; + enum + { + nPwrOf10 = 5, + nMultTests = 6, + }; + static const double scaleFactors[nPwrOf10] = { 1000, 10000, 100000, 1000000, 10000000 }; + const double vals[nMultTests] = { xfirst, xlast, xinc, yfirst, ylast, yinc }; + + for (size_t j = 0; j < nPwrOf10; ++j) + { + double scaleBy = scaleFactors[j]; + bool fractionalScale = false; + for (size_t i = 0; i < nMultTests; ++i) + { + fractionalScale = fractionalScale || fabs(vals[i] * scaleBy - round(vals[i] * scaleBy)) > FLT_EPSILON; + } + if (!fractionalScale) + { + resfac = scaleBy; + break; + } + } + + return resfac; +} + +static void +iegDefGrid(int *gdb, int gridID) +{ + int projID = gridInqProj(gridID); + if (projID != CDI_UNDEFID && gridInqProjType(projID) == CDI_PROJ_RLL) gridID = projID; + + int gridtype = gridInqType(gridID); + int projtype = CDI_UNDEFID; + if (gridtype == GRID_PROJECTION && gridInqProjType(gridID) == CDI_PROJ_RLL) projtype = CDI_PROJ_RLL; + + size_t xsize = gridInqXsize(gridID); + size_t ysize = gridInqYsize(gridID); + + cdi_check_gridsize_int_limit("IEG", xsize * ysize); + + if (gridtype == GRID_GENERIC) + { + if ((ysize == 32 || ysize == 48 || ysize == 64 || ysize == 96 || ysize == 160) && (xsize == 2 * ysize || xsize == 1)) + { + gridtype = GRID_GAUSSIAN; + gridChangeType(gridID, gridtype); + } + else if ((xsize == 1 && ysize == 1) || (xsize == 0 && ysize == 0)) + { + gridtype = GRID_LONLAT; + gridChangeType(gridID, gridtype); + } + else if (gridInqXvals(gridID, NULL) && gridInqYvals(gridID, NULL)) + { + gridtype = GRID_LONLAT; + gridChangeType(gridID, gridtype); + } + } + else if (gridtype == GRID_CURVILINEAR) + { + gridtype = GRID_LONLAT; + } + + bool lrotated = (projtype == CDI_PROJ_RLL); + + if (gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN || projtype == CDI_PROJ_RLL) + { + double xfirst = 0.0, xlast = 0.0, xinc = 0.0; + double yfirst = 0.0, ylast = 0.0, yinc = 0.0; + + if (xsize == 0) + xsize = 1; + else + { + xfirst = gridInqXval(gridID, 0); + xlast = gridInqXval(gridID, xsize - 1); + xinc = gridInqXinc(gridID); + } + + if (ysize == 0) + ysize = 1; + else + { + yfirst = gridInqYval(gridID, 0); + ylast = gridInqYval(gridID, ysize - 1); + yinc = gridInqYinc(gridID); + } + + if (gridtype == GRID_GAUSSIAN) + IEG_G_GridType(gdb) = 4; + else if (lrotated) + IEG_G_GridType(gdb) = 10; + else + IEG_G_GridType(gdb) = 0; + + double resfac = calc_resfac(xfirst, xlast, xinc, yfirst, ylast, yinc); + int iresfac = (int) resfac; + if (iresfac == 1000) iresfac = 0; + + IEG_G_ResFac(gdb) = iresfac; + + IEG_G_NumLon(gdb) = (int) xsize; + IEG_G_NumLat(gdb) = (int) ysize; + IEG_G_FirstLat(gdb) = (int) lround(yfirst * resfac); + IEG_G_LastLat(gdb) = (int) lround(ylast * resfac); + IEG_G_FirstLon(gdb) = (int) lround(xfirst * resfac); + IEG_G_LastLon(gdb) = (int) lround(xlast * resfac); + IEG_G_LonIncr(gdb) = (int) lround(xinc * resfac); + if (fabs(xinc * resfac - IEG_G_LonIncr(gdb)) > FLT_EPSILON) IEG_G_LonIncr(gdb) = 0; + + if (gridtype == GRID_GAUSSIAN) + IEG_G_LatIncr(gdb) = (int) ysize / 2; + else + { + IEG_G_LatIncr(gdb) = (int) lround(yinc * resfac); + if (fabs(yinc * resfac - IEG_G_LatIncr(gdb)) > FLT_EPSILON) IEG_G_LatIncr(gdb) = 0; + + if (IEG_G_LatIncr(gdb) < 0) IEG_G_LatIncr(gdb) = -IEG_G_LatIncr(gdb); + } + + if (IEG_G_NumLon(gdb) > 1 && IEG_G_NumLat(gdb) == 1) + if (IEG_G_LonIncr(gdb) != 0 && IEG_G_LatIncr(gdb) == 0) IEG_G_LatIncr(gdb) = IEG_G_LonIncr(gdb); + + if (IEG_G_NumLon(gdb) == 1 && IEG_G_NumLat(gdb) > 1) + if (IEG_G_LonIncr(gdb) == 0 && IEG_G_LatIncr(gdb) != 0) IEG_G_LonIncr(gdb) = IEG_G_LatIncr(gdb); + + IEG_G_ResFlag(gdb) = (IEG_G_LatIncr(gdb) == 0 || IEG_G_LonIncr(gdb) == 0) ? 0 : 128; + + if (lrotated) + { + double xpole = 0.0, ypole = 0.0, angle = 0.0; + gridInqParamRLL(gridID, &xpole, &ypole, &angle); + + IEG_G_LatSP(gdb) = -(int) lround(ypole * resfac); + IEG_G_LonSP(gdb) = (int) lround((xpole + 180) * resfac); + IEG_G_Size(gdb) = 42; + } + else + { + IEG_G_Size(gdb) = 32; + } + } + else + { + Error("Unsupported grid type: %s", gridNamePtr(gridtype)); + } + + IEG_G_ScanFlag(gdb) = 64; +} + +static void +pdbDefLevel(int *pdb, int leveltype, int level1, int level2) +{ + IEG_P_LevelType(pdb) = leveltype; + IEG_P_Level1(pdb) = level1; + IEG_P_Level2(pdb) = level2; +} + +static void +iegDefLevel(int *pdb, int *gdb, double *vct, int zaxisID, int levelID) +{ + double level; + + int leveltype = zaxisInqType(zaxisID); + if (leveltype == ZAXIS_GENERIC) + { + Warning("Changed zaxis type from %s to %s", zaxisNamePtr(leveltype), zaxisNamePtr(ZAXIS_PRESSURE)); + leveltype = ZAXIS_PRESSURE; + zaxisChangeType(zaxisID, leveltype); + cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, "Pa"); + } + + // IEG_G_NumVCP(gdb) = 0; + + switch (leveltype) + { + case ZAXIS_SURFACE: + { + pdbDefLevel(pdb, IEG_LTYPE_SURFACE, 0, (int) (zaxisInqLevel(zaxisID, levelID))); + break; + } + case ZAXIS_HYBRID: + { + if (zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL)) + pdbDefLevel(pdb, IEG_LTYPE_HYBRID_LAYER, (int) (zaxisInqLbound(zaxisID, levelID)), + (int) (zaxisInqUbound(zaxisID, levelID))); + else + pdbDefLevel(pdb, IEG_LTYPE_HYBRID, 0, (int) (zaxisInqLevel(zaxisID, levelID))); + + int vctsize = zaxisInqVctSize(zaxisID); + if (vctsize > 100) + { + static bool vct_warning = true; + // IEG_G_NumVCP(gdb) = 0; + if (vct_warning) + { + Warning("VCT size of %d is too large (maximum is 100). Set to 0!", vctsize); + vct_warning = false; + } + } + else + { + IEG_G_Size(gdb) += (vctsize * 4); + memcpy(vct, zaxisInqVctPtr(zaxisID), (size_t) vctsize / 2 * sizeof(double)); + memcpy(vct + 50, zaxisInqVctPtr(zaxisID) + vctsize / 2, (size_t) vctsize / 2 * sizeof(double)); + } + break; + } + case ZAXIS_PRESSURE: + { + level = zaxisInqLevel(zaxisID, levelID); + if (level < 0) Warning("pressure level of %f Pa is below 0.", level); + + char units[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units, &length); + if (memcmp(units, "hPa", 3) == 0 || memcmp(units, "mb", 2) == 0) level = level * 100; + + double dum; + int ilevel = (int) level; + if (level < 32768 && (level < 100 || modf(level / 100, &dum) > 0)) + pdbDefLevel(pdb, IEG_LTYPE_99, 0, ilevel); + else + pdbDefLevel(pdb, IEG_LTYPE_ISOBARIC, 0, ilevel / 100); + + break; + } + case ZAXIS_HEIGHT: + { + level = zaxisInqLevel(zaxisID, levelID); + pdbDefLevel(pdb, IEG_LTYPE_HEIGHT, 0, (int) level); + break; + } + case ZAXIS_ALTITUDE: + { + level = zaxisInqLevel(zaxisID, levelID); + pdbDefLevel(pdb, IEG_LTYPE_ALTITUDE, 0, (int) level); + break; + } + case ZAXIS_DEPTH_BELOW_LAND: + { + if (zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL)) + pdbDefLevel(pdb, IEG_LTYPE_LANDDEPTH_LAYER, (int) (zaxisInqLbound(zaxisID, levelID)), + (int) (zaxisInqUbound(zaxisID, levelID))); + else + pdbDefLevel(pdb, IEG_LTYPE_LANDDEPTH, 0, (int) (zaxisInqLevel(zaxisID, levelID))); + + break; + } + case ZAXIS_DEPTH_BELOW_SEA: + { + level = zaxisInqLevel(zaxisID, levelID); + pdbDefLevel(pdb, IEG_LTYPE_SEADEPTH, 0, (int) level); + break; + } + case ZAXIS_ISENTROPIC: + { + level = zaxisInqLevel(zaxisID, levelID); + pdbDefLevel(pdb, 113, 0, (int) level); + break; + } + default: + { + Error("Unsupported zaxis type: %s", zaxisNamePtr(leveltype)); + break; + } + } +} + +void +iegCopyRecord(stream_t *streamptr2, stream_t *streamptr1) +{ + streamFCopyRecord(streamptr2, streamptr1, "IEG"); +} + +void +iegDefRecord(stream_t *streamptr) +{ + Record *record = streamptr->record; + + int vlistID = streamptr->vlistID; + int byteorder = streamptr->byteorder; + + int varID = record->varID; + int levelID = record->levelID; + int tsID = streamptr->curTsID; + CdiDateTime vDateTime = streamptr->tsteps[tsID].taxis.vDateTime; + + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + + iegrec_t *iegp = (iegrec_t *) record->objectp; + iegInitMem(iegp); + for (int i = 0; i < 37; i++) iegp->ipdb[i] = -1; + + iegp->byteswap = getByteswap(byteorder); + + int param = vlistInqVarParam(vlistID, varID); + int pdis, pcat, pnum; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + IEG_P_Parameter(iegp->ipdb) = pnum; + if (pdis == 255) IEG_P_CodeTable(iegp->ipdb) = pcat; + + iegDefTime(iegp->ipdb, vDateTime, vlistInqTaxis(vlistID)); + iegDefGrid(iegp->igdb, gridID); + iegDefLevel(iegp->ipdb, iegp->igdb, iegp->vct, zaxisID, levelID); + + iegp->dprec = iegDefDatatype(record->prec); +} + +static double +calc_refvalSP(size_t size, const float *data) +{ + float refval = data[0]; + for (size_t i = 1; i < size; ++i) + if (data[i] < refval) refval = data[i]; + return refval; +} + +static double +calc_refvalDP(size_t size, const double *data) +{ + double refval = data[0]; + for (size_t i = 1; i < size; ++i) + if (data[i] < refval) refval = data[i]; + return refval; +} + +static void +ieg_write_recordSP(stream_t *streamptr, const float *data) +{ + Record *record = streamptr->record; + iegrec_t *iegp = (iegrec_t *) record->objectp; + + int fileID = streamptr->fileID; + size_t gridsize = gridInqSize(record->gridID); + + iegp->refval = calc_refvalSP(gridsize, data); + + iegDefDataSP(iegp, data); + iegWrite(fileID, iegp); +} + +static void +ieg_write_recordDP(stream_t *streamptr, const double *data) +{ + Record *record = streamptr->record; + iegrec_t *iegp = (iegrec_t *) record->objectp; + + int fileID = streamptr->fileID; + size_t gridsize = gridInqSize(record->gridID); + + iegp->refval = calc_refvalDP(gridsize, data); + + iegDefDataDP(iegp, data); + iegWrite(fileID, iegp); +} + +void +ieg_write_record(stream_t *streamptr, int memtype, const void *data) +{ + if (memtype == MEMTYPE_DOUBLE) + ieg_write_recordDP(streamptr, (const double *) data); + else + ieg_write_recordSP(streamptr, (const float *) data); +} + +static void +iegAddRecord(stream_t *streamptr, int param, int *pdb, int *gdb, double *vct, size_t recsize, off_t position, int prec) +{ + int vlistID = streamptr->vlistID; + int tsID = streamptr->curTsID; + int recID = recordNewEntry(streamptr, tsID); + record_t *record = &streamptr->tsteps[tsID].records[recID]; + + int level1, level2; + if (IEG_P_LevelType(pdb) == IEG_LTYPE_HYBRID_LAYER) + { + level1 = IEG_P_Level1(pdb); + level2 = IEG_P_Level2(pdb); + } + else + { + level1 = IEG_P_Level2(pdb); + level2 = 0; + if (IEG_P_LevelType(pdb) == 100) level1 *= 100; + } + + record->size = recsize; + record->position = position; + record->param = param; + record->ilevel = level1; + record->ilevel2 = level2; + record->ltype = IEG_P_LevelType(pdb); + + int gridtype = (IEG_G_GridType(gdb) == 0) ? GRID_LONLAT + : (IEG_G_GridType(gdb) == 10) ? GRID_PROJECTION + : (IEG_G_GridType(gdb) == 4) ? GRID_GAUSSIAN + : GRID_GENERIC; + + grid_t *grid = (grid_t *) Malloc(sizeof(*grid)); + grid_init(grid); + cdiGridTypeInit(grid, gridtype, IEG_G_NumLon(gdb) * IEG_G_NumLat(gdb)); + size_t xsize = (size_t) IEG_G_NumLon(gdb); + size_t ysize = (size_t) IEG_G_NumLat(gdb); + grid->x.size = xsize; + grid->y.size = ysize; + grid->x.inc = 0; + grid->y.inc = 0; + grid->x.flag = 0; + + int iresfac = IEG_G_ResFac(gdb); + if (iresfac == 0) iresfac = 1000; + double resfac = 1. / (double) iresfac; + + // if ( IEG_G_FirstLon != 0 || IEG_G_LastLon != 0 ) + { + if (xsize > 1) + { + if (IEG_G_ResFlag(gdb) && IEG_G_LonIncr(gdb) > 0) + grid->x.inc = IEG_G_LonIncr(gdb) * resfac; + else + grid->x.inc = (IEG_G_LastLon(gdb) - IEG_G_FirstLon(gdb)) * resfac / (xsize - 1); + + // correct xinc if necessary + if (IEG_G_FirstLon(gdb) == 0 && IEG_G_LastLon(gdb) > 354000) + { + double xinc = 360. / xsize; + // FIXME: why not use grid->x.inc != xinc as condition? + if (fabs(grid->x.inc - xinc) > 0.0) + { + grid->x.inc = xinc; + if (CDI_Debug) Message("set xinc to %g", grid->x.inc); + } + } + } + grid->x.first = IEG_G_FirstLon(gdb) * resfac; + grid->x.last = IEG_G_LastLon(gdb) * resfac; + grid->x.flag = 2; + } + grid->y.flag = 0; + // if ( IEG_G_FirstLat != 0 || IEG_G_LastLat != 0 ) + { + if (ysize > 1) + { + if (IEG_G_ResFlag(gdb) && IEG_G_LatIncr(gdb) > 0) + grid->y.inc = IEG_G_LatIncr(gdb) * resfac; + else + grid->y.inc = (IEG_G_LastLat(gdb) - IEG_G_FirstLat(gdb)) * resfac / (ysize - 1); + } + grid->y.first = IEG_G_FirstLat(gdb) * resfac; + grid->y.last = IEG_G_LastLat(gdb) * resfac; + grid->y.flag = 2; + } + + double xpole = 0, ypole = 0; + if (IEG_G_GridType(gdb) == 10) + { + xpole = IEG_G_LonSP(gdb) * resfac - 180; + ypole = -IEG_G_LatSP(gdb) * resfac; + grid->projtype = CDI_PROJ_RLL; + } + + struct addIfNewRes gridAdded = cdiVlistAddGridIfNew(vlistID, grid, 0); + int gridID = gridAdded.Id; + if (!gridAdded.isNew) + { + grid_free(grid); + Free(grid); + } + else if (gridtype == GRID_PROJECTION) + gridDefParamRLL(gridID, xpole, ypole, 0); + + int leveltype = iegGetZaxisType(IEG_P_LevelType(pdb)); + if (leveltype == ZAXIS_HYBRID) + { + double tmpvct[100]; + size_t vctsize = (size_t) IEG_G_NumVCP(gdb); + + for (size_t i = 0; i < vctsize / 2; i++) tmpvct[i] = vct[i]; + for (size_t i = 0; i < vctsize / 2; i++) tmpvct[i + vctsize / 2] = vct[i + 50]; + + varDefVCT(vctsize, tmpvct); + } + + int lbounds = IEG_P_LevelType(pdb) == IEG_LTYPE_HYBRID_LAYER ? 1 : 0; + + int datatype = iegInqDatatype(prec); + + int varID, levelID = 0; + varAddRecord(recID, param, gridID, leveltype, lbounds, level1, level2, 0, 0, datatype, &varID, &levelID, TSTEP_INSTANT, 0, -1, + NULL, NULL, NULL, NULL); + + record->varID = (short) varID; + record->levelID = levelID; + + streamptr->tsteps[tsID].nallrecs++; + streamptr->nrecs++; + + if (CDI_Debug) Message("varID = %d gridID = %d levelID = %d", varID, gridID, levelID); +} + +#if 0 +static +void iegCmpRecord(stream_t *streamptr, int tsID, int recID, off_t position, int param, + int level, size_t xsize, size_t ysize) +{ + int varID = 0; + int levelID = 0; + + record_t *record = &streamptr->tsteps[tsID].records[recID]; + + if (param != (*record).param || level != (*record).ilevel) Error("inconsistent timestep"); + + (*record).position = position; + /* + varID = (*record).varID; + levelID = (*record).levelID; + + streamptr->vars[varID].level[levelID] = recID; + + streamptr->tsteps[tsID].nallrecs++; + streamptr->nrecs++; + */ + if (CDI_Debug) Message("varID = %d levelID = %d", varID, levelID); +} +#endif + +static CdiDateTime +iegDateTime(const int *pdb) +{ + int ryear = IEG_P_Year(pdb); + int rmonth = IEG_P_Month(pdb); + int rday = IEG_P_Day(pdb); + + int rhour = IEG_P_Hour(pdb); + int rminute = IEG_P_Minute(pdb); + + if (rminute == -1) rminute = 0; + + CdiDateTime cdiDateTime; + cdiDateTime.date = cdiDate_encode(ryear, rmonth, rday); + cdiDateTime.time = cdiTime_encode(rhour, rminute, 0, 0); + return cdiDateTime; +} + +static void +iegScanTimestep1(stream_t *streamptr) +{ + CdiDateTime datetime0; + cdiDateTime_init(&datetime0); + off_t recpos; + iegrec_t *iegp = (iegrec_t *) streamptr->record->objectp; + + streamptr->curTsID = 0; + + int tsID = tstepsNewEntry(streamptr); + if (tsID != 0) Error("Internal problem! tstepsNewEntry returns %d", tsID); + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + int fileID = streamptr->fileID; + + int nrecs = 0; + while (true) + { + recpos = fileGetPos(fileID); + if (iegRead(fileID, iegp) != 0) + { + streamptr->ntsteps = 1; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + int prec = iegp->dprec; + int rcode = IEG_P_Parameter(iegp->ipdb); + int tabnum = IEG_P_CodeTable(iegp->ipdb); + int param = cdiEncodeParam(rcode, tabnum, 255); + int rlevel = (IEG_P_LevelType(iegp->ipdb) == IEG_LTYPE_HYBRID_LAYER) ? IEG_P_Level1(iegp->ipdb) : IEG_P_Level2(iegp->ipdb); + + if (IEG_P_LevelType(iegp->ipdb) == 100) rlevel *= 100; + + CdiDateTime datetime = iegDateTime(iegp->ipdb); + + if (nrecs == 0) + { + datetime0 = datetime; + taxis->vDateTime = datetime; + } + else + { + record_t *records = streamptr->tsteps[tsID].records; + for (int recID = 0; recID < nrecs; recID++) + if (param == records[recID].param && rlevel == records[recID].ilevel) goto tstepScanLoopFinished; + + if (cdiDateTime_isNE(datetime, datetime0)) Warning("Inconsistent verification time for param %d level %d", param, rlevel); + } + + nrecs++; + + if (CDI_Debug) Message("%4d%8d%4d%8d %s", nrecs, (int) recpos, param, rlevel, CdiDateTime_string(datetime)); + + iegAddRecord(streamptr, param, iegp->ipdb, iegp->igdb, iegp->vct, recsize, recpos, prec); + } + +tstepScanLoopFinished: + streamptr->rtsteps = 1; + + cdi_generate_vars(streamptr); + + int taxisID = taxisCreate(TAXIS_ABSOLUTE); + taxis->type = TAXIS_ABSOLUTE; + taxis->rDateTime = taxis->vDateTime; + + int vlistID = streamptr->vlistID; + vlistDefTaxis(vlistID, taxisID); + + vlist_check_contents(vlistID); + + streamScanResizeRecords1(streamptr); + + streamScanTsFixNtsteps(streamptr, recpos); + streamScanTimeConstAdjust(streamptr, taxis); +} + +static int +iegScanTimestep2(stream_t *streamptr) +{ + off_t recpos = 0; + iegrec_t *iegp = (iegrec_t *) streamptr->record->objectp; + + streamptr->curTsID = 1; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + int tsID = streamptr->rtsteps; + if (tsID != 1) Error("Internal problem! unexpected timestep %d", tsID + 1); + + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + int nrecords = streamScanInitRecords2(streamptr); + + for (int rindex = 0; rindex <= nrecords; rindex++) + { + recpos = fileGetPos(fileID); + if (iegRead(fileID, iegp) != 0) + { + streamptr->ntsteps = 2; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + int rcode = IEG_P_Parameter(iegp->ipdb); + int tabnum = IEG_P_CodeTable(iegp->ipdb); + int param = cdiEncodeParam(rcode, tabnum, 255); + int rlevel = (IEG_P_LevelType(iegp->ipdb) == IEG_LTYPE_HYBRID_LAYER) ? IEG_P_Level1(iegp->ipdb) : IEG_P_Level2(iegp->ipdb); + + if (IEG_P_LevelType(iegp->ipdb) == 100) rlevel *= 100; + + CdiDateTime datetime = iegDateTime(iegp->ipdb); + + if (rindex == 0) + { + taxis->type = TAXIS_ABSOLUTE; + taxis->vDateTime = datetime; + } + + bool nextstep = false; + int recID = 0; + for (recID = 0; recID < nrecords; recID++) + { + if (param == records[recID].param && rlevel == records[recID].ilevel) + { + if (records[recID].used) + { + nextstep = true; + } + else + { + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + } + break; + } + } + if (recID == nrecords) + { + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + Warning("param %s level %d not defined at timestep 1", paramstr, rlevel); + return CDI_EUFSTRUCT; + } + + if (nextstep) break; + + if (CDI_Debug) Message("%4d%8d%4d%8d %s", rindex + 1, (int) recpos, param, rlevel, CdiDateTime_string(datetime)); + + if (param != records[recID].param || rlevel != records[recID].ilevel) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, rlevel); + return CDI_EUFSTRUCT; + } + + records[recID].position = recpos; + records[recID].size = recsize; + } + + int nrecs = 0; + for (int recID = 0; recID < nrecords; recID++) + { + if (records[recID].used) + nrecs++; + else + vlistDefVarTimetype(vlistID, records[recID].varID, TIME_CONSTANT); + } + streamptr->tsteps[tsID].nrecs = nrecs; + + streamptr->rtsteps = 2; + + streamScanTsFixNtsteps(streamptr, recpos); + + return 0; +} + +int +iegInqContents(stream_t *streamptr) +{ + streamptr->curTsID = 0; + + iegScanTimestep1(streamptr); + + int status = (streamptr->ntsteps == -1) ? iegScanTimestep2(streamptr) : 0; + + fileSetPos(streamptr->fileID, 0, SEEK_SET); + + return status; +} + +static long +iegScanTimestep(stream_t *streamptr) +{ + off_t recpos = 0; + iegrec_t *iegp = (iegrec_t *) streamptr->record->objectp; + + if (streamptr->rtsteps == 0) Error("Internal problem! Missing contents."); + + int tsID = streamptr->rtsteps; + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + int nrecs = 0; + if (streamptr->tsteps[tsID].recordSize == 0) + { + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + nrecs = streamScanInitRecords(streamptr, tsID); + + int fileID = streamptr->fileID; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + for (int rindex = 0; rindex <= nrecs; rindex++) + { + recpos = fileGetPos(fileID); + if (iegRead(fileID, iegp) != 0) + { + streamptr->ntsteps = streamptr->rtsteps + 1; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + int rcode = IEG_P_Parameter(iegp->ipdb); + int tabnum = IEG_P_CodeTable(iegp->ipdb); + int param = cdiEncodeParam(rcode, tabnum, 255); + int rlevel + = (IEG_P_LevelType(iegp->ipdb) == IEG_LTYPE_HYBRID_LAYER) ? IEG_P_Level1(iegp->ipdb) : IEG_P_Level2(iegp->ipdb); + + if (IEG_P_LevelType(iegp->ipdb) == 100) rlevel *= 100; + + CdiDateTime datetime = iegDateTime(iegp->ipdb); + + // if ( rindex == nrecs ) break; gcc-4.5 internal compiler error + if (rindex == nrecs) continue; + int recID = streamptr->tsteps[tsID].recIDs[rindex]; + + if (rindex == 0) + { + taxis->type = TAXIS_ABSOLUTE; + taxis->vDateTime = datetime; + } + + if (param != records[recID].param || rlevel != records[recID].ilevel) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, rlevel); + Error("Invalid, unsupported or inconsistent record structure"); + } + + records[recID].position = recpos; + records[recID].size = recsize; + + if (CDI_Debug) Message("%4d%8d%4d%8d %s", rindex, (int) recpos, param, rlevel, CdiDateTime_string(datetime)); + } + + streamptr->rtsteps++; + + if (streamptr->ntsteps != streamptr->rtsteps) + { + tsID = tstepsNewEntry(streamptr); + if (tsID != streamptr->rtsteps) Error("Internal error. tsID = %d", tsID); + + streamptr->tsteps[tsID - 1].next = true; + streamptr->tsteps[tsID].position = recpos; + } + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + streamptr->tsteps[tsID].position = recpos; + } + + if (nrecs > 0 && nrecs < streamptr->tsteps[tsID].nrecs) + { + Warning("Incomplete timestep. Stop scanning at timestep %d.", tsID); + streamptr->ntsteps = tsID; + } + + return streamptr->ntsteps; +} + +int +iegInqTimestep(stream_t *streamptr, int tsID) +{ + if (tsID == 0 && streamptr->rtsteps == 0) Error("Call to cdiInqContents missing!"); + + if (CDI_Debug) Message("tsID = %d rtsteps = %d", tsID, streamptr->rtsteps); + + long ntsteps = CDI_UNDEFID; + while ((tsID + 1) > streamptr->rtsteps && ntsteps == CDI_UNDEFID) ntsteps = iegScanTimestep(streamptr); + + int nrecs = 0; + if (!(tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID)) + { + streamptr->curTsID = tsID; + nrecs = streamptr->tsteps[tsID].nrecs; + } + + return nrecs; +} + +void +iegReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID); + + void *iegp = streamptr->record->objectp; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + double missval = vlistInqVarMissval(vlistID, varID); + size_t gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID)); + int tsid = streamptr->curTsID; + + off_t currentfilepos = fileGetPos(fileID); + + int recID = streamptr->vars[varID].recordTable[0].recordID[levID]; + off_t recpos = streamptr->tsteps[tsid].records[recID].position; + fileSetPos(fileID, recpos, SEEK_SET); + iegRead(fileID, iegp); + iegInqDataDP(iegp, data); + + fileSetPos(fileID, currentfilepos, SEEK_SET); + + *nmiss = get_num_missvalsDP(gridsize, data, missval); +} + +void +iegReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + size_t gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID)); + size_t nlevs = (size_t) streamptr->vars[varID].recordTable[0].nlevs; + + for (size_t levID = 0; levID < nlevs; levID++) iegReadVarSliceDP(streamptr, varID, (int) levID, &data[levID * gridsize], nmiss); +} + +void +iegWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double *data) +{ + if (CDI_Debug) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID); + + iegrec_t *iegp = (iegrec_t *) streamptr->record->objectp; + iegInitMem(iegp); + for (int i = 0; i < 37; i++) iegp->ipdb[i] = -1; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + CdiDateTime vDateTime = streamptr->tsteps[tsID].taxis.vDateTime; + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + + int param = vlistInqVarParam(vlistID, varID); + int pdis, pcat, pnum; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + IEG_P_Parameter(iegp->ipdb) = pnum; + if (pdis == 255) IEG_P_CodeTable(iegp->ipdb) = pcat; + + iegDefTime(iegp->ipdb, vDateTime, vlistInqTaxis(vlistID)); + iegDefGrid(iegp->igdb, gridID); + iegDefLevel(iegp->ipdb, iegp->igdb, iegp->vct, zaxisID, levID); + + iegp->dprec = iegDefDatatype(vlistInqVarDatatype(vlistID, varID)); + + size_t gridsize = gridInqSize(gridID); + iegp->refval = calc_refvalDP(gridsize, data); + + iegDefDataDP(iegp, data); + iegWrite(fileID, iegp); +} + +void +iegWriteVarDP(stream_t *streamptr, int varID, const double *data) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + size_t gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID)); + size_t nlevels = (size_t) zaxisInqSize(vlistInqVarZaxis(vlistID, varID)); + + for (size_t levID = 0; levID < nlevels; levID++) iegWriteVarSliceDP(streamptr, varID, (int) levID, &data[levID * gridsize]); +} + +#endif /* HAVE_LIBIEG */ +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <limits.h> +#include <stdio.h> +#include <string.h> + + + +void +recordInitEntry(record_t *record) +{ + record->position = CDI_UNDEFID; + record->size = 0; + record->gridsize = 0; + record->param = 0; + record->ilevel = CDI_UNDEFID; + record->used = false; + record->tsteptype = CDI_UNDEFID; + record->varID = CDI_UNDEFID; + record->levelID = CDI_UNDEFID; + memset(record->varname, 0, sizeof(record->varname)); + varScanKeysInit(&record->scanKeys); + memset(&record->tiles, 0, sizeof(record->tiles)); +#ifdef HAVE_LIBFDB5 + record->fdbItem = NULL; +#endif +} + +int +recordNewEntry(stream_t *streamptr, int tsID) +{ + int recordSize = streamptr->tsteps[tsID].recordSize; + record_t *records = streamptr->tsteps[tsID].records; + + // Look for a free slot in record. + int recordID = 0; + if (recordSize) + { + while (recordID < recordSize && records[recordID].used != CDI_UNDEFID) ++recordID; + } + else // Create the table the first time through. + { + recordSize = 1; // <<<<---- + records = (record_t *) Malloc(recordSize * sizeof(record_t)); + for (int i = recordID; i < recordSize; i++) records[i].used = CDI_UNDEFID; + } + + // If the table overflows, double its size. + if (recordID == recordSize) + { + // clang-format off + if (recordSize <= INT_MAX / 2) recordSize *= 2; + else if (recordSize < INT_MAX) recordSize = INT_MAX; + else Error("Cannot handle this many records!\n"); + // clang-format on + records = (record_t *) Realloc(records, recordSize * sizeof(record_t)); + + for (int i = recordID; i < recordSize; i++) records[i].used = CDI_UNDEFID; + } + + recordInitEntry(&records[recordID]); + + records[recordID].used = true; + + streamptr->tsteps[tsID].recordSize = recordSize; + streamptr->tsteps[tsID].records = records; + + return recordID; +} + +static void +cdiInitRecord(stream_t *streamptr) +{ + Record *record = (Record *) Malloc(sizeof(Record)); + streamptr->record = record; + + record->param = 0; + record->ilevel = 0; + record->vdate = 0; + record->vtime = 0; + record->gridID = 0; + record->buffer = NULL; + record->buffersize = 0; + record->position = 0; + record->varID = 0; + record->levelID = CDI_UNDEFID; +} + +void +streamInqRecord(int streamID, int *varID, int *levelID) +{ + check_parg(varID); + check_parg(levelID); + + stream_t *streamptr = stream_to_pointer(streamID); + + cdiDefAccesstype(streamID, TYPE_REC); + + if (!streamptr->record) cdiInitRecord(streamptr); + + const int tsID = streamptr->curTsID; + const int rindex = streamptr->tsteps[tsID].curRecID + 1; + + if (rindex >= streamptr->tsteps[tsID].nrecs) Error("record %d not available at timestep %d", rindex + 1, tsID + 1); + + const int recID = streamptr->tsteps[tsID].recIDs[rindex]; + + if (recID == -1 || recID >= streamptr->tsteps[tsID].nallrecs) Error("Internal problem! tsID = %d recID = %d", tsID, recID); + + *varID = streamptr->tsteps[tsID].records[recID].varID; + if (*varID == -1) Error("Internal problem! varID = %d recID = %d", *varID, recID); + + const int lindex = streamptr->tsteps[tsID].records[recID].levelID; + + const int isub = subtypeInqActiveIndex(streamptr->vars[*varID].subtypeID); + *levelID = streamptr->vars[*varID].recordTable[isub].lindex[lindex]; + + if (CDI_Debug) Message("streamID = %d tsID = %d, recID = %d, varID = %d, levelID = %d", streamID, tsID, recID, *varID, *levelID); + + streamptr->curTsID = tsID; + streamptr->tsteps[tsID].curRecID = rindex; +} + +/* +@Function streamDefRecord +@Title Define the next record + +@Prototype void streamDefRecord(int streamID, int varID, int levelID) +@Parameter + @Item streamID Stream ID, from a previous call to @fref{streamOpenWrite}. + @Item varID Variable identifier. + @Item levelID Level identifier. + +@Description +The function streamDefRecord defines the meta-data of the next record. +@EndFunction +*/ +void +streamDefRecord(int streamID, int varID, int levelID) +{ + stream_t *streamptr = stream_to_pointer(streamID); + + int tsID = streamptr->curTsID; + if (tsID == CDI_UNDEFID) + { + tsID++; + streamDefTimestep(streamID, tsID); + } + + if (!streamptr->record) cdiInitRecord(streamptr); + + const int vlistID = streamptr->vlistID; + const int gridID = vlistInqVarGrid(vlistID, varID); + const int zaxisID = vlistInqVarZaxis(vlistID, varID); + const int param = vlistInqVarParam(vlistID, varID); + const int ilevel = (int) lround(zaxisInqLevel(zaxisID, levelID)); + + Record *record = streamptr->record; + record->varID = varID; + record->levelID = levelID; + record->param = param; + record->ilevel = ilevel; + record->vdate = (int) cdiDate_get(streamptr->tsteps[tsID].taxis.vDateTime.date); + record->vtime = cdiTime_get(streamptr->tsteps[tsID].taxis.vDateTime.time); + record->gridID = gridID; + record->prec = vlistInqVarDatatype(vlistID, varID); + + switch (cdiBaseFiletype(streamptr->filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: grbDefRecord(streamptr); break; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: srvDefRecord(streamptr); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: extDefRecord(streamptr); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: iegDefRecord(streamptr); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: + if (streamptr->accessmode == 0) cdfEndDef(streamptr); + cdfDefRecord(streamptr); + break; +#endif + default: Error("%s support not compiled in!", strfiletype(streamptr->filetype)); break; + } +} + +void +streamCopyRecord(int streamID2, int streamID1) +{ + stream_t *streamptr1 = stream_to_pointer(streamID1), *streamptr2 = stream_to_pointer(streamID2); + int filetype1 = streamptr1->filetype, filetype2 = streamptr2->filetype, filetype = CDI_FILETYPE_UNDEF; + + if (cdiBaseFiletype(filetype1) == cdiBaseFiletype(filetype2)) filetype = filetype2; + + if (filetype == CDI_FILETYPE_UNDEF) + Error("Streams have different file types (%s -> %s)!", strfiletype(filetype1), strfiletype(filetype2)); + + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: grbCopyRecord(streamptr2, streamptr1); break; +#endif +#ifdef HAVE_LIBSERVICE + case CDI_FILETYPE_SRV: srvCopyRecord(streamptr2, streamptr1); break; +#endif +#ifdef HAVE_LIBEXTRA + case CDI_FILETYPE_EXT: extCopyRecord(streamptr2, streamptr1); break; +#endif +#ifdef HAVE_LIBIEG + case CDI_FILETYPE_IEG: iegCopyRecord(streamptr2, streamptr1); break; +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: cdfCopyRecord(streamptr2, streamptr1); break; +#endif + default: Error("%s support not compiled in!", strfiletype(filetype)); + } +} + +void +cdi_create_records(stream_t *streamptr, int tsID) +{ + unsigned nrecords, maxrecords; + + tsteps_t *sourceTstep = streamptr->tsteps; + tsteps_t *destTstep = sourceTstep + tsID; + + if (destTstep->records) return; + + const int vlistID = streamptr->vlistID; + + if (tsID == 0) + { + maxrecords = 0; + const int nvars = streamptr->nvars; + for (int varID = 0; varID < nvars; varID++) + for (int isub = 0; isub < streamptr->vars[varID].subtypeSize; isub++) + maxrecords += (unsigned) streamptr->vars[varID].recordTable[isub].nlevs; + } + else + { + maxrecords = (unsigned) sourceTstep->recordSize; + } + + if (tsID == 0) + { + nrecords = maxrecords; + } + else if (tsID == 1) + { + nrecords = 0; + maxrecords = (unsigned) sourceTstep->recordSize; + if (sourceTstep->records) + { + for (size_t recID = 0; recID < maxrecords; recID++) + { + int varID = sourceTstep->records[recID].varID; + nrecords += (varID == CDI_UNDEFID /* varID = CDI_UNDEFID for write mode !!! */ + || vlistInqVarTimetype(vlistID, varID) != TIME_CONSTANT); + // printf("varID nrecords %d %d %d \n", varID, nrecords, vlistInqVarTsteptype(vlistID, varID)); + } + } + else + { + nrecords = maxrecords; + } + } + else + { + nrecords = (unsigned) streamptr->tsteps[1].nallrecs; + } + // printf("tsID, nrecords %d %d\n", tsID, nrecords); + + record_t *records = (maxrecords > 0) ? (record_t *) (Malloc(maxrecords * sizeof(record_t))) : (record_t *) NULL; + + destTstep->records = records; + destTstep->recordSize = (int) maxrecords; + destTstep->nallrecs = (int) nrecords; +#ifdef HAVE_LIBFDB5 + destTstep->records->fdbItem = NULL; +#endif + + if (tsID == 0) + { + for (unsigned recID = 0; recID < maxrecords; recID++) recordInitEntry(&destTstep->records[recID]); + } + else if (sourceTstep->records) + { + memcpy(destTstep->records, sourceTstep->records, (size_t) maxrecords * sizeof(record_t)); + + for (size_t recID = 0; recID < maxrecords; recID++) + { + record_t *curRecord = &sourceTstep->records[recID]; + destTstep->records[recID].used = curRecord->used; + if (curRecord->used != CDI_UNDEFID && curRecord->varID != -1) // curRecord->varID = -1 for write mode !!! + { + if (vlistInqVarTimetype(vlistID, curRecord->varID) != TIME_CONSTANT) + { + destTstep->records[recID].position = CDI_UNDEFID; + destTstep->records[recID].size = 0; + destTstep->records[recID].used = false; + } + } + } + } +} + + +void +streamFCopyRecord(stream_t *streamptr2, stream_t *streamptr1, const char *container_name) +{ + const int fileID1 = streamptr1->fileID; + const int fileID2 = streamptr2->fileID; + + const int tsID = streamptr1->curTsID; + const int vrecID = streamptr1->tsteps[tsID].curRecID; + const int recID = streamptr1->tsteps[tsID].recIDs[vrecID]; + const off_t recpos = streamptr1->tsteps[tsID].records[recID].position; + const size_t recsize = streamptr1->tsteps[tsID].records[recID].size; + + if (fileSetPos(fileID1, recpos, SEEK_SET) != 0) Error("Cannot seek input file for %s record copy!", container_name); + + char *buffer = (char *) Malloc(recsize); + + if (fileRead(fileID1, buffer, recsize) != recsize) Error("Failed to read record from %s file for copying!", container_name); + + if (fileWrite(fileID2, buffer, recsize) != recsize) Error("Failed to write record to %s file when copying!", container_name); + + Free(buffer); +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + + + +#ifdef HAVE_LIBSERVICE + +static int +srvInqDatatype(int prec) +{ + return (prec == EXSE_DOUBLE_PRECISION) ? CDI_DATATYPE_FLT64 : CDI_DATATYPE_FLT32; +} + +static int +srvDefDatatype(int datatype) +{ + if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) + Error("CDI/SERVICE library does not support complex numbers!"); + + if (datatype != CDI_DATATYPE_FLT32 && datatype != CDI_DATATYPE_FLT64) datatype = CDI_DATATYPE_FLT32; + + return (datatype == CDI_DATATYPE_FLT64) ? EXSE_DOUBLE_PRECISION : EXSE_SINGLE_PRECISION; +} + +/* not used +int srvInqRecord(stream_t *streamptr, int *varID, int *levelID) +{ + int status; + int fileID; + int icode, ilevel; + int zaxisID = -1; + int header[8]; + int vlistID; + void *srvp = streamptr->record->objectp; + + vlistID = streamptr->vlistID; + fileID = streamptr->fileID; + + *varID = -1; + *levelID = -1; + + status = srvRead(fileID, srvp); + if ( status != 0 ) return (0); + + srvInqHeader(srvp, header); + + icode = header[0]; + ilevel = header[1]; + + *varID = vlistInqVarID(vlistID, icode); + + if ( *varID == CDI_UNDEFID ) Error("Code %d undefined", icode); + + zaxisID = vlistInqVarZaxis(vlistID, *varID); + + *levelID = zaxisInqLevelID(zaxisID, (double) ilevel); + + return 1; +} +*/ + +static void +srv_read_recordSP(stream_t *streamptr, float *data, size_t *nmiss) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + int varID = streamptr->tsteps[tsID].records[recID].varID; + off_t recpos = streamptr->tsteps[tsID].records[recID].position; + + fileSetPos(fileID, recpos, SEEK_SET); + + void *srvp = streamptr->record->objectp; + if (srvRead(fileID, srvp) < 0) Error("Failed to read record from SRV file"); + + int header[8]; + srvInqHeader(srvp, header); + srvInqDataSP(srvp, data); + + double missval = vlistInqVarMissval(vlistID, varID); + size_t size = gridInqSize(vlistInqVarGrid(vlistID, varID)); + + *nmiss = get_num_missvalsSP(size, data, (float) missval); + + streamptr->numvals += size; +} + +static void +srv_read_recordDP(stream_t *streamptr, double *data, size_t *nmiss) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + int varID = streamptr->tsteps[tsID].records[recID].varID; + off_t recpos = streamptr->tsteps[tsID].records[recID].position; + + fileSetPos(fileID, recpos, SEEK_SET); + + void *srvp = streamptr->record->objectp; + if (srvRead(fileID, srvp) < 0) Error("Failed to read record from SRV file"); + + int header[8]; + srvInqHeader(srvp, header); + srvInqDataDP(srvp, data); + + double missval = vlistInqVarMissval(vlistID, varID); + size_t size = gridInqSize(vlistInqVarGrid(vlistID, varID)); + + *nmiss = get_num_missvalsDP(size, data, missval); + + streamptr->numvals += size; +} + +void +srv_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss) +{ + if (memtype == MEMTYPE_DOUBLE) + srv_read_recordDP(streamptr, (double *) data, nmiss); + else + srv_read_recordSP(streamptr, (float *) data, nmiss); +} + +void +srvCopyRecord(stream_t *streamptr2, stream_t *streamptr1) +{ + streamFCopyRecord(streamptr2, streamptr1, "SRV"); +} + +void +srvDefRecord(stream_t *streamptr) +{ + Record *record = streamptr->record; + + int pdis, pcat, pnum; + cdiDecodeParam(record->param, &pnum, &pcat, &pdis); + + int header[8]; + header[0] = pnum; + header[1] = record->ilevel; + header[2] = record->vdate; + header[3] = record->vtime; + + int gridID = record->gridID; + size_t xsize = gridInqXsize(gridID), ysize = gridInqYsize(gridID); + if (xsize == 0 || ysize == 0) + { + xsize = gridInqSize(gridID); + ysize = 1; + } + if (gridInqType(gridID) == GRID_UNSTRUCTURED) ysize = 1; + if ((size_t) gridInqSize(gridID) != xsize * ysize) Error("Internal problem with gridsize!"); + + cdi_check_gridsize_int_limit("SERVICE", gridInqSize(gridID)); + + header[4] = (int) xsize; + header[5] = (int) ysize; + header[6] = 0; + header[7] = 0; + + srvrec_t *srvp = (srvrec_t *) record->objectp; + srvp->dprec = srvDefDatatype(record->prec); + + srvDefHeader(srvp, header); +} + +static void +srv_write_recordSP(stream_t *streamptr, const float *data) +{ + void *srvp = streamptr->record->objectp; + srvDefDataSP(srvp, data); + srvWrite(streamptr->fileID, srvp); +} + +static void +srv_write_recordDP(stream_t *streamptr, const double *data) +{ + void *srvp = streamptr->record->objectp; + srvDefDataDP(srvp, data); + srvWrite(streamptr->fileID, srvp); +} + +void +srv_write_record(stream_t *streamptr, int memtype, const void *data) +{ + if (memtype == MEMTYPE_DOUBLE) + srv_write_recordDP(streamptr, (const double *) data); + else + srv_write_recordSP(streamptr, (const float *) data); +} + +static void +srv_add_record(stream_t *streamptr, int param, int level, size_t xsize, size_t ysize, size_t recsize, off_t position, int prec) +{ + int vlistID = streamptr->vlistID; + int tsID = streamptr->curTsID; + int recID = recordNewEntry(streamptr, tsID); + record_t *record = &streamptr->tsteps[tsID].records[recID]; + + record->size = recsize; + record->position = position; + record->param = param; + record->ilevel = level; + + grid_t *grid = (grid_t *) Malloc(sizeof(*grid)); + grid_init(grid); + cdiGridTypeInit(grid, GRID_GENERIC, xsize * ysize); + grid->x.size = xsize; + grid->y.size = ysize; + struct addIfNewRes gridAdded = cdiVlistAddGridIfNew(vlistID, grid, 0); + int gridID = gridAdded.Id; + if (!gridAdded.isNew) + { + grid_free(grid); + Free(grid); + } + + int leveltype = ZAXIS_GENERIC; + int datatype = srvInqDatatype(prec); + + int varID, levelID = 0; + varAddRecord(recID, param, gridID, leveltype, 0, level, 0, 0, 0, datatype, &varID, &levelID, TSTEP_INSTANT, 0, -1, NULL, NULL, + NULL, NULL); + + xassert(varID <= SHRT_MAX && levelID <= SHRT_MAX); + record->varID = (short) varID; + record->levelID = levelID; + + streamptr->tsteps[tsID].nallrecs++; + streamptr->nrecs++; + + if (CDI_Debug) Message("varID = %d gridID = %d levelID = %d", varID, gridID, levelID); +} + +static void +srvScanTimestep1(stream_t *streamptr) +{ + CdiDateTime datetime0; + cdiDateTime_init(&datetime0); + off_t recpos; + srvrec_t *srvp = (srvrec_t *) streamptr->record->objectp; + + streamptr->curTsID = 0; + + int tsID = tstepsNewEntry(streamptr); + if (tsID != 0) Error("Internal problem! tstepsNewEntry returns %d", tsID); + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + int fileID = streamptr->fileID; + + int nrecs = 0; + while (true) + { + recpos = fileGetPos(fileID); + if (srvRead(fileID, srvp) != 0) + { + streamptr->ntsteps = 1; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + int header[8]; + srvInqHeader(srvp, header); + + int prec = srvp->dprec; + int rcode = header[0]; + int rlevel = header[1]; + int vdate = header[2]; + int vtime = header[3]; + int rxsize = header[4]; + int rysize = header[5]; + int param = cdiEncodeParam(rcode, 255, 255); + CdiDateTime datetime = cdiDateTime_set(vdate, vtime); + + if (nrecs == 0) + { + datetime0 = datetime; + taxis->vDateTime = datetime; + } + else + { + record_t *records = streamptr->tsteps[tsID].records; + for (int recID = 0; recID < nrecs; recID++) + if (param == records[recID].param && rlevel == records[recID].ilevel) goto tstepScanLoopFinished; + + if (cdiDateTime_isNE(datetime, datetime0)) Warning("Inconsistent verification time for code %d level %d", rcode, rlevel); + } + + nrecs++; + + if (CDI_Debug) Message("%4d%8d%4d%8d%8d%6d", nrecs, (int) recpos, rcode, rlevel, vdate, vtime); + + srv_add_record(streamptr, param, rlevel, rxsize, rysize, recsize, recpos, prec); + } + +tstepScanLoopFinished: + streamptr->rtsteps = 1; + + cdi_generate_vars(streamptr); + + int taxisID = taxisCreate(TAXIS_ABSOLUTE); + taxis->type = TAXIS_ABSOLUTE; + taxis->rDateTime = taxis->vDateTime; + + int vlistID = streamptr->vlistID; + vlistDefTaxis(vlistID, taxisID); + + vlist_check_contents(vlistID); + + streamScanResizeRecords1(streamptr); + + streamScanTsFixNtsteps(streamptr, recpos); + streamScanTimeConstAdjust(streamptr, taxis); +} + +static int +srvScanTimestep2(stream_t *streamptr) +{ + int header[8]; + off_t recpos = 0; + void *srvp = streamptr->record->objectp; + + streamptr->curTsID = 1; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + int tsID = streamptr->rtsteps; + if (tsID != 1) Error("Internal problem! unexpected timestep %d", tsID + 1); + + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + int nrecords = streamScanInitRecords2(streamptr); + + for (int rindex = 0; rindex <= nrecords; rindex++) + { + recpos = fileGetPos(fileID); + if (srvRead(fileID, srvp) != 0) + { + streamptr->ntsteps = 2; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + srvInqHeader(srvp, header); + + int rcode = header[0]; + int rlevel = header[1]; + int vdate = header[2]; + int vtime = header[3]; + int param = cdiEncodeParam(rcode, 255, 255); + + if (rindex == 0) + { + taxis->type = TAXIS_ABSOLUTE; + taxis->vDateTime = cdiDateTime_set(vdate, vtime); + } + + bool nextstep = false; + int recID; + for (recID = 0; recID < nrecords; recID++) + { + if (param == records[recID].param && rlevel == records[recID].ilevel) + { + if (records[recID].used) + { + nextstep = true; + } + else + { + records[recID].used = true; + streamptr->tsteps[tsID].recIDs[rindex] = recID; + } + break; + } + } + if (recID == nrecords) + { + Warning("Code %d level %d not found at timestep %d", rcode, rlevel, tsID + 1); + return CDI_EUFSTRUCT; + } + + if (nextstep) break; + + if (CDI_Debug) Message("%4d%8d%4d%8d%8d%6d", rindex + 1, (int) recpos, rcode, rlevel, vdate, vtime); + + if (param != records[recID].param || rlevel != records[recID].ilevel) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, rlevel); + return CDI_EUFSTRUCT; + } + + records[recID].position = recpos; + records[recID].size = recsize; + } + + int nrecs = 0; + for (int recID = 0; recID < nrecords; recID++) + { + if (records[recID].used) + nrecs++; + else + vlistDefVarTimetype(vlistID, records[recID].varID, TIME_CONSTANT); + } + streamptr->tsteps[tsID].nrecs = nrecs; + + streamptr->rtsteps = 2; + + streamScanTsFixNtsteps(streamptr, recpos); + + return 0; +} + +int +srvInqContents(stream_t *streamptr) +{ + streamptr->curTsID = 0; + + srvScanTimestep1(streamptr); + + int status = (streamptr->ntsteps == -1) ? srvScanTimestep2(streamptr) : 0; + + fileSetPos(streamptr->fileID, 0, SEEK_SET); + + return status; +} + +static long +srvScanTimestep(stream_t *streamptr) +{ + int header[8]; + off_t recpos = 0; + int nrecs = 0; + void *srvp = streamptr->record->objectp; + + int tsID = streamptr->rtsteps; + taxis_t *taxis = &streamptr->tsteps[tsID].taxis; + + if (streamptr->tsteps[tsID].recordSize == 0) + { + cdi_create_records(streamptr, tsID); + record_t *records = streamptr->tsteps[tsID].records; + + nrecs = streamScanInitRecords(streamptr, tsID); + + int fileID = streamptr->fileID; + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + + for (int rindex = 0; rindex <= nrecs; rindex++) + { + recpos = fileGetPos(fileID); + if (srvRead(fileID, srvp) != 0) + { + streamptr->ntsteps = streamptr->rtsteps + 1; + break; + } + + size_t recsize = (size_t) (fileGetPos(fileID) - recpos); + + srvInqHeader(srvp, header); + + int rcode = header[0]; + int rlevel = header[1]; + int vdate = header[2]; + int vtime = header[3]; + int param = cdiEncodeParam(rcode, 255, 255); + + // if ( rindex == nrecs ) break; gcc-4.5 internal compiler error + if (rindex == nrecs) continue; + int recID = streamptr->tsteps[tsID].recIDs[rindex]; + + if (rindex == 0) + { + taxis->type = TAXIS_ABSOLUTE; + taxis->vDateTime = cdiDateTime_set(vdate, vtime); + } + + if (param != records[recID].param || rlevel != records[recID].ilevel) + { + Message("tsID = %d recID = %d param = %3d new %3d level = %3d new %3d", tsID, recID, records[recID].param, param, + records[recID].ilevel, rlevel); + Error("Invalid, unsupported or inconsistent record structure!"); + } + + records[recID].position = recpos; + records[recID].size = recsize; + + if (CDI_Debug) Message("%4d%8d%4d%8d%8d%6d", rindex, (int) recpos, rcode, rlevel, vdate, vtime); + } + + streamptr->rtsteps++; + + if (streamptr->ntsteps != streamptr->rtsteps) + { + tsID = tstepsNewEntry(streamptr); + if (tsID != streamptr->rtsteps) Error("Internal error. tsID = %d", tsID); + + streamptr->tsteps[tsID - 1].next = true; + streamptr->tsteps[tsID].position = recpos; + } + + fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET); + streamptr->tsteps[tsID].position = recpos; + } + + if (nrecs > 0 && nrecs < streamptr->tsteps[tsID].nrecs) + { + Warning("Incomplete timestep. Stop scanning at timestep %d.", tsID); + streamptr->ntsteps = tsID; + } + + return streamptr->ntsteps; +} + +int +srvInqTimestep(stream_t *streamptr, int tsID) +{ + if (tsID == 0 && streamptr->rtsteps == 0) Error("Call to cdiInqContents missing!"); + + if (CDI_Debug) Message("tsID = %d rtsteps = %d", tsID, streamptr->rtsteps); + + long ntsteps = CDI_UNDEFID; + while ((tsID + 1) > streamptr->rtsteps && ntsteps == CDI_UNDEFID) ntsteps = srvScanTimestep(streamptr); + + int nrecs = 0; + if (!(tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID)) + { + streamptr->curTsID = tsID; + nrecs = streamptr->tsteps[tsID].nrecs; + } + + return nrecs; +} + +void +srvReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID); + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsid = streamptr->curTsID; + + off_t currentfilepos = fileGetPos(fileID); + + int recID = streamptr->vars[varID].recordTable[0].recordID[levID]; + off_t recpos = streamptr->tsteps[tsid].records[recID].position; + + fileSetPos(fileID, recpos, SEEK_SET); + + void *srvp = streamptr->record->objectp; + if (srvRead(fileID, srvp) < 0) abort(); + + int header[8]; + srvInqHeader(srvp, header); + srvInqDataDP(srvp, data); + + fileSetPos(fileID, currentfilepos, SEEK_SET); + + double missval = vlistInqVarMissval(vlistID, varID); + size_t size = gridInqSize(vlistInqVarGrid(vlistID, varID)); + + *nmiss = get_num_missvalsDP(size, data, missval); +} + +void +srvReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + size_t gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID)); + size_t nlevs = (size_t) streamptr->vars[varID].recordTable[0].nlevs; + + for (size_t levID = 0; levID < nlevs; levID++) srvReadVarSliceDP(streamptr, varID, (int) levID, &data[levID * gridsize], nmiss); +} + +void +srvWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double *data) +{ + if (CDI_Debug) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID); + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int tsID = streamptr->curTsID; + CdiDateTime vDateTime = streamptr->tsteps[tsID].taxis.vDateTime; + int gridID = vlistInqVarGrid(vlistID, varID); + + int pdis, pcat, pnum; + cdiDecodeParam(vlistInqVarParam(vlistID, varID), &pnum, &pcat, &pdis); + + int header[8]; + header[0] = pnum; + header[1] = (int) lround(zaxisInqLevel(vlistInqVarZaxis(vlistID, varID), levID)); + header[2] = (int) cdiDate_get(vDateTime.date); + header[3] = cdiTime_get(vDateTime.time); + + size_t xsize = gridInqXsize(gridID); + size_t ysize = gridInqYsize(gridID); + if (xsize == 0 || ysize == 0) + { + xsize = gridInqSize(gridID); + ysize = 1; + } + if (gridInqType(gridID) == GRID_UNSTRUCTURED) ysize = 1; + if ((size_t) gridInqSize(gridID) != xsize * ysize) Error("Internal problem with gridsize!"); + + cdi_check_gridsize_int_limit("SERVICE", gridInqSize(gridID)); + + header[4] = xsize; + header[5] = ysize; + header[6] = 0; + header[7] = 0; + + int datatype = vlistInqVarDatatype(vlistID, varID); + + srvrec_t *srvp = (srvrec_t *) streamptr->record->objectp; + srvp->dprec = srvDefDatatype(datatype); + + srvDefHeader(srvp, header); + srvDefDataDP(srvp, data); + srvWrite(fileID, srvp); +} + +void +srvWriteVarDP(stream_t *streamptr, int varID, const double *data) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + size_t gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID)); + size_t nlevs = (size_t) zaxisInqSize(vlistInqVarZaxis(vlistID, varID)); + + for (size_t levID = 0; levID < nlevs; levID++) srvWriteVarSliceDP(streamptr, varID, (int) levID, &data[levID * gridsize]); +} + +#endif /* HAVE_LIBSERVICE */ + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + + +static void +streamvar_init_recordtable(stream_t *streamptr, int varID, int isub) +{ + streamptr->vars[varID].recordTable[isub].nlevs = 0; + streamptr->vars[varID].recordTable[isub].recordID = NULL; + streamptr->vars[varID].recordTable[isub].lindex = NULL; +} + +static void +streamvar_init_entry(stream_t *streamptr, int varID) +{ + streamptr->vars[varID].ncvarid = CDI_UNDEFID; + streamptr->vars[varID].defmiss = false; + + streamptr->vars[varID].subtypeSize = 0; + streamptr->vars[varID].recordTable = NULL; + + streamptr->vars[varID].gridID = CDI_UNDEFID; + streamptr->vars[varID].zaxisID = CDI_UNDEFID; + streamptr->vars[varID].tsteptype = CDI_UNDEFID; + streamptr->vars[varID].subtypeID = CDI_UNDEFID; +} + +static int +streamvar_new_entry(stream_t *streamptr) +{ + int varID = 0; + int streamvarSize = streamptr->varsAllocated; + svarinfo_t *streamvar = streamptr->vars; + /* + Look for a free slot in streamvar. + (Create the table the first time through). + */ + if (!streamvarSize) + { + streamvarSize = 2; + streamvar = (svarinfo_t *) Malloc((size_t) streamvarSize * sizeof(svarinfo_t)); + if (streamvar == NULL) + { + Message("streamvarSize = %d", streamvarSize); + SysError("Allocation of svarinfo_t failed"); + } + + for (int i = 0; i < streamvarSize; i++) streamvar[i].isUsed = false; + } + else + { + while (varID < streamvarSize) + { + if (!streamvar[varID].isUsed) break; + varID++; + } + } + /* + If the table overflows, double its size. + */ + if (varID == streamvarSize) + { + streamvarSize = 2 * streamvarSize; + streamvar = (svarinfo_t *) Realloc(streamvar, (size_t) streamvarSize * sizeof(svarinfo_t)); + if (streamvar == NULL) + { + Message("streamvarSize = %d", streamvarSize); + SysError("Reallocation of svarinfo_t failed"); + } + varID = streamvarSize / 2; + + for (int i = varID; i < streamvarSize; i++) streamvar[i].isUsed = false; + } + + streamptr->varsAllocated = streamvarSize; + streamptr->vars = streamvar; + + streamvar_init_entry(streamptr, varID); + + streamptr->vars[varID].isUsed = true; + + return varID; +} + +static void +allocate_record_table_entry(stream_t *streamptr, int varID, int subID, int nlevs) +{ + int *level = (int *) Malloc((size_t) nlevs * sizeof(int)); + int *lindex = (int *) Malloc((size_t) nlevs * sizeof(int)); + + for (int levID = 0; levID < nlevs; levID++) + { + level[levID] = CDI_UNDEFID; + lindex[levID] = levID; + } + + streamptr->vars[varID].recordTable[subID].nlevs = nlevs; + streamptr->vars[varID].recordTable[subID].recordID = level; + streamptr->vars[varID].recordTable[subID].lindex = lindex; +} + +int +stream_new_var(stream_t *streamptr, int gridID, int zaxisID, int tilesetID) +{ + if (CDI_Debug) Message("gridID = %d zaxisID = %d", gridID, zaxisID); + + int varID = streamvar_new_entry(streamptr); + int nlevs = zaxisInqSize(zaxisID); + + streamptr->nvars++; + + streamptr->vars[varID].gridID = gridID; + streamptr->vars[varID].zaxisID = zaxisID; + + int nsub = 1; + if (tilesetID != CDI_UNDEFID) nsub = subtypeInqSize(tilesetID); /* e.g. no of tiles */ + if (CDI_Debug) Message("varID %d: create %d tiles with %d level(s), zaxisID=%d", varID, nsub, nlevs, zaxisID); + streamptr->vars[varID].recordTable = (sleveltable_t *) Malloc((size_t) nsub * sizeof(sleveltable_t)); + if (streamptr->vars[varID].recordTable == NULL) SysError("Allocation of leveltable failed!"); + streamptr->vars[varID].subtypeSize = nsub; + + for (int isub = 0; isub < nsub; isub++) + { + streamvar_init_recordtable(streamptr, varID, isub); + allocate_record_table_entry(streamptr, varID, isub, nlevs); + if (CDI_Debug) + Message("streamptr->vars[varID].recordTable[isub].recordID[0]=%d", streamptr->vars[varID].recordTable[isub].recordID[0]); + } + + streamptr->vars[varID].subtypeID = tilesetID; + + return varID; +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBGRIB + +#ifdef HAVE_LIBFDB5 +#endif + +#ifdef HAVE_ACROSS +#endif + + +static size_t +grbEncode(int filetype, int memtype, int varID, int levelID, int vlistID, int gridID, int zaxisID, CdiDateTime vDateTime, + int tsteptype, int numavg, size_t datasize, const void *data, size_t nmiss, void **gribbuffer, int comptype, + void *gribContainers) +{ + size_t nbytes = 0; + +#ifdef HAVE_LIBCGRIBEX + if (filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1) + { + size_t gribbuffersize = datasize * 4 + 3000; + *gribbuffer = Malloc(gribbuffersize); + + nbytes = cgribexEncode(memtype, varID, levelID, vlistID, gridID, zaxisID, vDateTime, tsteptype, numavg, datasize, data, nmiss, + *gribbuffer, gribbuffersize); + } + else +#endif +#ifdef HAVE_LIBGRIB_API + { +#ifdef GRIBCONTAINER2D + void *gribContainer = (void *) &((gribContainer_t **) gribContainers)[varID][levelID]; +#else + void *gribContainer = (void *) &((gribContainer_t *) gribContainers)[varID]; +#endif + const void *datap = data; + if (memtype == MEMTYPE_FLOAT) + { + const float *dataf = (const float *) data; + double *datad = (double *) Malloc(datasize * sizeof(double)); + for (size_t i = 0; i < datasize; ++i) datad[i] = (double) dataf[i]; + datap = (const void *) datad; + } + + size_t gribbuffersize; + nbytes = gribapiEncode(varID, levelID, vlistID, gridID, zaxisID, vDateTime, tsteptype, numavg, (long) datasize, datap, nmiss, + gribbuffer, &gribbuffersize, comptype, gribContainer); + + if (memtype == MEMTYPE_FLOAT) Free((void *) datap); + } +#else + { + Error("ecCodes support not compiled in!"); + (void) gribContainers; + (void) comptype; + } +#endif + + return nbytes; +} + +static size_t +grbSzip(int filetype, void *gribbuffer, size_t gribbuffersize) +{ + size_t buffersize = gribbuffersize + 1000; /* compressed record can be greater than source record */ + void *buffer = Malloc(buffersize); + + // memcpy(buffer, gribbuffer, gribbuffersize); + + size_t nbytes = 0; + if (filetype == CDI_FILETYPE_GRB) + { + nbytes = (size_t) gribZip((unsigned char *) gribbuffer, (long) gribbuffersize, (unsigned char *) buffer, (long) buffersize); + } + else + { + static int lszip_warn = 1; + if (lszip_warn) Warning("Szip compression of GRIB2 records not implemented!"); + lszip_warn = 0; + nbytes = gribbuffersize; + } + + Free(buffer); + + return nbytes; +} + +typedef struct +{ + char date[16]; + char time[8]; + char param[8]; + char levtype[8]; + char levelist[8]; +} FDB_Keys; + +void +cdi_fdb_store(void *fdbHandle, const char *filename, void *gribbuffer, size_t nbytes, const FDB_Keys *fdbKeys) +{ +#ifdef HAVE_LIBFDB5 + size_t len = strlen(filename); + if (len == 4) Error("FDB keys missing!"); + + KeyValueEntry keyValue; + keyValue.item = NULL; + decode_fdbitem(filename + 4, &keyValue); + + if (keyValue.numKeys == 0) Error("FDB keys missing!"); + + const char *class = NULL; + const char *stream = NULL; + const char *expver = NULL; + for (int i = 0; i < keyValue.numKeys; i++) + { + // clang-format off + if (str_is_equal(keyValue.keys[i], "class")) class = keyValue.values[i]; + else if (str_is_equal(keyValue.keys[i], "stream")) stream = keyValue.values[i]; + else if (str_is_equal(keyValue.keys[i], "expver")) expver = keyValue.values[i]; + else Error("Unsupported FDB parameter: %s=%s", keyValue.keys[i], keyValue.values[i]); + // clang-format on + } + + if (!class) Error("FDB parameter <class> undefined!"); + if (!stream) Error("FDB parameter <stream> undefined!"); + if (!expver) Error("FDB parameter <expver> undefined!"); + + if (CDI_Debug) + { + printf("{class=%s,expver=%s,stream=%s,date=%s,time=%s,domain=g}", class, expver, stream, fdbKeys->date, fdbKeys->time); + printf("{type=an,levtype=%s}{step=0,", fdbKeys->levtype); + if (fdbKeys->levelist[0]) printf("levelist=%s,", fdbKeys->levelist); + printf("param=%s},length=%zu\n", fdbKeys->param, nbytes); + } + + fdb_key_t *key; + fdb_new_key(&key); + fdb_key_add(key, "class", class); + fdb_key_add(key, "expver", expver); + fdb_key_add(key, "stream", stream); + fdb_key_add(key, "domain", "g"); + fdb_key_add(key, "date", fdbKeys->date); + fdb_key_add(key, "time", fdbKeys->time); + fdb_key_add(key, "type", "an"); + fdb_key_add(key, "levtype", fdbKeys->levtype); + fdb_key_add(key, "step", "0"); + fdb_key_add(key, "param", fdbKeys->param); + if (fdbKeys->levelist[0]) fdb_key_add(key, "levelist", fdbKeys->levelist); + + fdb_archive(fdbHandle, key, gribbuffer, nbytes); + // alternative: write to tmpfile and use C++ code from fdb_write + + fdb_delete_key(key); +#endif +} + +static int +map_grib2_param(int pnum, int pcat, int pdis) +{ + // clang-format off + if (pnum == 8 && pcat == 2 && pdis == 0) return 135; + else if (pnum == 0 && pcat == 0 && pdis == 0) return 130; + else if (pnum == 0 && pcat == 1 && pdis == 0) return 133; + else if (pnum == 83 && pcat == 1 && pdis == 0) return 246; + else if (pnum == 84 && pcat == 1 && pdis == 0) return 247; + else if (pnum == 85 && pcat == 1 && pdis == 0) return 75; + else if (pnum == 86 && pcat == 1 && pdis == 0) return 76; + else if (pnum == 2 && pcat == 2 && pdis == 0) return 131; + else if (pnum == 3 && pcat == 2 && pdis == 0) return 132; + else if (pnum == 25 && pcat == 3 && pdis == 0) return 152; + else if (pnum == 4 && pcat == 3 && pdis == 0) return 129; + // clang-format on + + return -1; +} + +static int +get_fdb_param(int cdiParam) +{ + int pnum, pcat, pdis; + cdiDecodeParam(cdiParam, &pnum, &pcat, &pdis); + if (pnum < 0) pnum = -pnum; + if (pnum > 255) pnum = pnum % 256; + + int fdbParam = (pdis == 255) ? pnum : map_grib2_param(pnum, pcat, pdis); + + return fdbParam; +} + +static void +fillup_gribbuffer(size_t nbytes, unsigned char *gribbuffer) +{ + while (nbytes & 7) gribbuffer[nbytes++] = 0; +} + +void +grbCopyRecord(stream_t *streamptr2, stream_t *streamptr1) +{ + int filetype = streamptr1->filetype; + int fileID1 = streamptr1->fileID; + int fileID2 = streamptr2->fileID; + int tsID = streamptr1->curTsID; + int vrecID = streamptr1->tsteps[tsID].curRecID; + int recID = streamptr1->tsteps[tsID].recIDs[vrecID]; + const record_t *record = &streamptr1->tsteps[tsID].records[recID]; + off_t recpos = record->position; + size_t recsize = record->size; + + void *gribbuffer = NULL; + + if (streamptr1->protocol == CDI_PROTOCOL_FDB) + { +#ifdef HAVE_LIBFDB5 + void *fdbItem = streamptr1->tsteps[tsID].records[recID].fdbItem; + if (!fdbItem) Error("fdbItem not available!"); + + size_t buffersize = 0; + recsize = fdb_read_record(streamptr1->protocolData, fdbItem, &buffersize, &gribbuffer); + + // round up recsize to next multiple of 8 + size_t gribbuffersize = ((recsize + 7U) & ~7U); + + gribbuffer = (unsigned char *) Realloc(gribbuffer, gribbuffersize); +#endif + } + else + { + fileSetPos(fileID1, recpos, SEEK_SET); + + // round up recsize to next multiple of 8 + size_t gribbuffersize = ((recsize + 7U) & ~7U); + + gribbuffer = (unsigned char *) Malloc(gribbuffersize); + + if (fileRead(fileID1, gribbuffer, recsize) != recsize) Error("Could not read GRIB record for copying!"); + } + + size_t nbytes = recsize; + +#ifdef HAVE_LIBCGRIBEX + if (filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1) + { + if (cdiGribChangeParameterID.active) + { + // Even if you are stream-copy records you might need to change a bit of grib-header ! + void *gh = cgribex_handle_new_from_meassage((void *) gribbuffer, recsize); + cgribexChangeParameterIdentification(gh, cdiGribChangeParameterID.code, cdiGribChangeParameterID.ltype, + cdiGribChangeParameterID.lev); + cgribex_handle_delete(gh); + cdiGribChangeParameterID.active = false; // after grib attributes have been changed turn it off again + } + } + else +#endif +#ifdef HAVE_LIBGRIB_API + { + if (cdiGribChangeParameterID.active) + { + // Even if you are stream-copy records you might need to change a bit of grib-header ! + grib_handle *gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize); + gribapiChangeParameterIdentification(gh, cdiGribChangeParameterID.code, cdiGribChangeParameterID.ltype, + cdiGribChangeParameterID.lev); + grib_handle_delete(gh); + cdiGribChangeParameterID.active = false; // after grib attributes have been changed turn it off again + } + } +#else + { + Error("ecCodes support not compiled in!"); + } +#endif + +#ifdef HAVE_LIBGRIB_API +#ifdef HIRLAM_EXTENSIONS + // Even if you are stream-copy records you might need to change a bit of grib-header ! + + if (cdiGribDataScanningMode.active) + // allowed modes: <0, 64, 96>; Default is 64 + // This will overrule the old scanning mode of the given grid + { + grib_handle *gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize); + + int scanModeIN = gribapiGetScanningMode(gh); + + grib_handle_delete(gh); + + if (cdiDebugExt >= 20) + Message("Change GribDataScanningMode => %d (scanModeIN = %d)", cdiGribDataScanningMode.value, scanModeIN); + + if (scanModeIN != cdiGribDataScanningMode.value) + { + size_t nmiss = 0; + + int vlistID = streamptr1->vlistID; + int varID = record->varID; + int levelID = record->levelID; + int gridID = vlistInqVarGrid(vlistID, varID); + + size_t gridsize = gridInqSize(gridID); + if (vlistNumber(vlistID) != CDI_REAL) gridsize *= 2; + double *data = (double *) Malloc(gridsize * sizeof(double)); + + if (cdiDebugExt >= 20) Message(" processing varID %d; levelID %d", varID, levelID); + + grb_write_var_slice(streamptr2, varID, levelID, MEMTYPE_DOUBLE, (const void *) data, nmiss); + + free(data); + } + } +#endif // HIRLAM_EXTENSIONS +#endif + + if (filetype == CDI_FILETYPE_GRB) + { + size_t unzipsize; + int izip = gribGetZip(recsize, (unsigned char *) gribbuffer, &unzipsize); + + if (izip == 0 && (streamptr2->comptype == CDI_COMPRESS_SZIP || streamptr2->comptype == CDI_COMPRESS_AEC)) + nbytes = grbSzip(filetype, gribbuffer, nbytes); + } + + fillup_gribbuffer(nbytes, (unsigned char *) gribbuffer); + + if (streamptr2->protocol == CDI_PROTOCOL_FDB) + { + int vlistID = streamptr1->vlistID; + int varID = record->varID; + int zaxisID = vlistInqVarZaxis(vlistID, varID); + int zaxisType = zaxisInqType(zaxisID); + CdiDateTime vDateTime = streamptr1->tsteps[tsID].taxis.vDateTime; + + FDB_Keys fdbKeys; + snprintf(fdbKeys.date, sizeof(fdbKeys.date), "%d", (int) cdiDate_get(vDateTime.date)); + snprintf(fdbKeys.time, sizeof(fdbKeys.time), "%04d", (short) (cdiTime_get(vDateTime.time) / 100)); + snprintf(fdbKeys.param, sizeof(fdbKeys.param), "%d", get_fdb_param(record->param)); + bool isML = (zaxisType == ZAXIS_HYBRID || zaxisType == ZAXIS_HYBRID_HALF); + snprintf(fdbKeys.levtype, sizeof(fdbKeys.levtype), "%s", isML ? "ml" : "sfc"); + fdbKeys.levelist[0] = 0; + if (isML) snprintf(fdbKeys.levelist, sizeof(fdbKeys.levelist), "%d", isML ? record->ilevel : 0); + +#ifdef HAVE_LIBFDB5 + cdi_fdb_store(streamptr2->protocolData, streamptr2->filename, gribbuffer, nbytes, &fdbKeys); +#endif + } + else + { + size_t nwrite = fileWrite(fileID2, gribbuffer, nbytes); + if (nwrite != nbytes) SysError("Could not write record for copying!"); + } + + Free(gribbuffer); +} + +void +grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, size_t nmiss) +{ + int filetype = streamptr->filetype; + int fileID = streamptr->fileID; + int vlistID = streamptr->vlistID; + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + int tsteptype = vlistInqVarTsteptype(vlistID, varID); + int tsID = streamptr->curTsID; + CdiDateTime vDateTime = streamptr->tsteps[tsID].taxis.vDateTime; + int numavg = (tsteptype == TSTEP_AVG) ? streamptr->tsteps[tsID].taxis.numavg : 0; + int comptype = streamptr->comptype; + + if (CDI_Debug) Message("gridID = %d zaxisID = %d", gridID, zaxisID); + + size_t datasize = gridInqSize(gridID); + + if (comptype != CDI_COMPRESS_JPEG && comptype != CDI_COMPRESS_SZIP && comptype != CDI_COMPRESS_AEC) comptype = CDI_COMPRESS_NONE; + + if (filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 && comptype == CDI_COMPRESS_JPEG) + { + static bool ljpeg_warn = true; + if (ljpeg_warn) Warning("JPEG compression of GRIB1 records not available!"); + ljpeg_warn = false; + } + + void *gribbuffer = NULL; + size_t nbytes = grbEncode(filetype, memtype, varID, levelID, vlistID, gridID, zaxisID, vDateTime, tsteptype, numavg, datasize, + data, nmiss, &gribbuffer, comptype, streamptr->gribContainers); + + if (filetype == CDI_FILETYPE_GRB && (comptype == CDI_COMPRESS_SZIP || comptype == CDI_COMPRESS_AEC)) + nbytes = grbSzip(filetype, gribbuffer, nbytes); + + switch (streamptr->protocol) + { + case CDI_PROTOCOL_ACROSS: + { +#ifdef HAVE_ACROSS + if (across_write_grib_message(streamptr, gribbuffer, nbytes)) SysError("Failed to write GRIB slice!"); +#endif + } + break; + + case CDI_PROTOCOL_FDB: + { +#ifdef HAVE_LIBFDB5 + int zaxisType = zaxisInqType(zaxisID); + double level = zaxisInqLevel(zaxisID, levelID); + + FDB_Keys fdbKeys; + snprintf(fdbKeys.date, sizeof(fdbKeys.date), "%d", (int) cdiDate_get(vDateTime.date)); + snprintf(fdbKeys.time, sizeof(fdbKeys.time), "%04d", (short) (cdiTime_get(vDateTime.time) / 100)); + snprintf(fdbKeys.param, sizeof(fdbKeys.param), "%d", get_fdb_param(vlistInqVarParam(vlistID, varID))); + bool isML = (zaxisType == ZAXIS_HYBRID || zaxisType == ZAXIS_HYBRID_HALF); + snprintf(fdbKeys.levtype, sizeof(fdbKeys.levtype), "%s", isML ? "ml" : "sfc"); + fdbKeys.levelist[0] = 0; + int ilevel = (isML) ? (int) level : 0; + if (isML) snprintf(fdbKeys.levelist, sizeof(fdbKeys.levelist), "%d", isML ? ilevel : 0); + + cdi_fdb_store(streamptr->protocolData, streamptr->filename, gribbuffer, nbytes, &fdbKeys); +#endif + } + break; + + case CDI_PROTOCOL_OTHER: + case CDI_PROTOCOL_FILE: + { + size_t (*myFileWrite)(int fileID, const void *restrict buffer, size_t len) + = (size_t(*)(int, const void *restrict, size_t)) namespaceSwitchGet(NSSWITCH_FILE_WRITE).func; + + size_t nwrite = myFileWrite(fileID, gribbuffer, nbytes); + if (nwrite != nbytes) SysError("Failed to write GRIB slice!"); + } + break; + } + + if (gribbuffer) Free(gribbuffer); +} + +void +grb_write_var(stream_t *streamptr, int varID, int memtype, const void *data, size_t nmiss) +{ + int vlistID = streamptr->vlistID, gridID = vlistInqVarGrid(vlistID, varID), zaxisID = vlistInqVarZaxis(vlistID, varID), + nlevs = zaxisInqSize(zaxisID); + size_t gridsize = gridInqSize(gridID); + double missval = vlistInqVarMissval(vlistID, varID); + + size_t chunkLen = gridsize; + if (memtype == MEMTYPE_FLOAT) + for (int levelID = 0; levelID < nlevs; levelID++) + { + const float *restrict fdata = ((const float *) data) + levelID * gridsize; + + size_t nmiss_slice = 0; + if (nmiss) + for (size_t i = 0; i < chunkLen; ++i) nmiss_slice += DBL_IS_EQUAL(fdata[i], missval); + + grb_write_var_slice(streamptr, varID, levelID, memtype, fdata, nmiss_slice); + } + else + for (int levelID = 0; levelID < nlevs; levelID++) + { + const double *restrict ddata = ((const double *) data) + levelID * gridsize; + + size_t nmiss_slice = 0; + if (nmiss) + for (size_t i = 0; i < chunkLen; ++i) nmiss_slice += DBL_IS_EQUAL(ddata[i], missval); + + grb_write_var_slice(streamptr, varID, levelID, memtype, ddata, nmiss_slice); + } +} + +void +grb_write_record(stream_t *streamptr, int memtype, const void *data, size_t nmiss) +{ + int varID = streamptr->record->varID; + int levelID = streamptr->record->levelID; + grb_write_var_slice(streamptr, varID, levelID, memtype, data, nmiss); +} + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBGRIB + +#ifdef HAVE_LIBFDB5 +#endif + + +static int +grb_decode(int filetype, int memtype, void *cgribexp, void *gribbuffer, size_t gribsize, void *data, size_t datasize, int unreduced, + size_t *nmiss, double missval) +{ + int status = 0; + +#ifdef HAVE_LIBCGRIBEX + if (filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1) + { +#ifdef HAVE_LIBGRIB_API + extern int cdiNAdditionalGRIBKeys; + if (cdiNAdditionalGRIBKeys > 0) Error("CGRIBEX decode does not support reading of additional GRIB keys!"); +#endif + status = cgribexDecode(memtype, cgribexp, gribbuffer, gribsize, data, datasize, unreduced, nmiss, missval); + } + else +#endif +#ifdef HAVE_LIBGRIB_API + { + void *datap = (memtype == MEMTYPE_FLOAT) ? Malloc(datasize * sizeof(double)) : data; + + status = gribapiDecode(gribbuffer, gribsize, datap, datasize, unreduced, nmiss, missval); + + if (memtype == MEMTYPE_FLOAT) + { + float *dataf = (float *) data; + double *datad = (double *) datap; + for (size_t i = 0; i < datasize; ++i) dataf[i] = (float) datad[i]; + Free(datap); + } + } +#else + { + Error("ecCodes support not compiled in!"); + } +#endif + + return status; +} + +// Decompresses the grib data in gribbuffer. +static int +grib1_unzip_record(void *gribbuffer, size_t *gribsize) +{ + int zip = 0; + + size_t igribsize = *gribsize; + size_t ogribsize = *gribsize; + + int izip; + size_t unzipsize; + if ((izip = gribGetZip(igribsize, (unsigned char *) gribbuffer, &unzipsize)) > 0) + { + zip = izip; + if (izip == 128) // szip + { + if (unzipsize < igribsize) + { + fprintf(stderr, "Decompressed size smaller than compressed size (in %zu; out %zu)!\n", igribsize, unzipsize); + return 0; + } + + unzipsize += 100; // need 0 to 1 bytes for rounding of bds + + void *buffer = Malloc(igribsize); + memcpy(buffer, gribbuffer, igribsize); + + ogribsize + = (size_t) gribUnzip((unsigned char *) gribbuffer, (long) unzipsize, (unsigned char *) buffer, (long) igribsize); + + Free(buffer); + + if (ogribsize <= 0) Error("Decompression problem!"); + } + else + { + Error("Decompression for %d not implemented!", izip); + } + } + + *gribsize = ogribsize; + + return zip; +} + +typedef struct DecodeArgs +{ + int recID, tsID, *outZip, filetype, memtype, unreduced; + void *cgribexp, *gribbuffer, *data; + size_t recsize, gridsize, nmiss; + double missval; +} DecodeArgs; + +static int +grb_decode_record(void *untypedArgs) +{ + DecodeArgs *args = (DecodeArgs *) untypedArgs; + *args->outZip = grib1_unzip_record(args->gribbuffer, &args->recsize); + grb_decode(args->filetype, args->memtype, args->cgribexp, args->gribbuffer, args->recsize, args->data, args->gridsize, + args->unreduced, &args->nmiss, args->missval); + return 0; +} + +static DecodeArgs +grb_read_raw_data(stream_t *streamptr, int tsID, int recID, int memtype, void *gribbuffer, void *data, bool resetFilePos) +{ + int vlistID = streamptr->vlistID; + int varID = streamptr->tsteps[tsID].records[recID].varID; + size_t recsize = streamptr->tsteps[tsID].records[recID].size; + + int gridID = vlistInqVarGrid(vlistID, varID); + size_t gridsize = gridInqSize(gridID); + if (CDI_Debug) Message("gridID = %d gridsize = %zu", gridID, gridsize); + + void *cgribexp = (gribbuffer && streamptr->record->objectp) ? streamptr->record->objectp : NULL; + if (!gribbuffer) gribbuffer = Malloc(streamptr->record->buffersize); + if (!data) data = Malloc(gridsize * ((memtype == MEMTYPE_FLOAT) ? sizeof(float) : sizeof(double))); + + if (streamptr->protocol == CDI_PROTOCOL_FDB) + { +#ifdef HAVE_LIBFDB5 + void *fdbItem = streamptr->tsteps[tsID].records[recID].fdbItem; + if (!fdbItem) Error("fdbItem not available!"); + + recsize = fdb_read_record(streamptr->protocolData, fdbItem, &(streamptr->record->buffersize), &gribbuffer); +#endif + } + else + { + if (recsize == 0) Error("Internal problem! Recordsize is zero for record %d at timestep %d", recID + 1, tsID + 1); + + int fileID = streamptr->fileID; + off_t recpos = streamptr->tsteps[tsID].records[recID].position; + off_t currentfilepos = (resetFilePos ? fileGetPos(fileID) : 0); + + fileSetPos(fileID, recpos, SEEK_SET); + if (fileRead(fileID, gribbuffer, recsize) != recsize) Error("Failed to read GRIB record!"); + + if (resetFilePos) fileSetPos(fileID, currentfilepos, SEEK_SET); + if (!resetFilePos) streamptr->numvals += gridsize; + } + + return (DecodeArgs){ + .recID = recID, + .tsID = tsID, + .outZip = &streamptr->tsteps[tsID].records[recID].zip, + .filetype = streamptr->filetype, + .memtype = memtype, + .unreduced = streamptr->unreduced, + .cgribexp = cgribexp, + .gribbuffer = gribbuffer, + .data = data, + .recsize = recsize, + .gridsize = gridsize, + .nmiss = 0, + .missval = vlistInqVarMissval(vlistID, varID), + }; +} + +static size_t +grb_read_and_decode_record(stream_t *streamptr, int recID, int memtype, void *data, bool resetFilePos) +{ + DecodeArgs args = grb_read_raw_data(streamptr, streamptr->curTsID, recID, memtype, streamptr->record->buffer, data, resetFilePos); + grb_decode_record(&args); + return args.nmiss; +} + +typedef struct JobDescriptor +{ + DecodeArgs args; + AsyncJob *job; +} JobDescriptor; + +static void +JobDescriptor_startJob(AsyncManager *jobManager, JobDescriptor *me, stream_t *streamptr, int tsID, int recID, int memtype) +{ + me->args = grb_read_raw_data(streamptr, tsID, recID, memtype, NULL, NULL, false); + me->job = AsyncWorker_requestWork(jobManager, grb_decode_record, &me->args); + if (!me->job) xabort("error while trying to send job to worker thread"); +} + +static void +JobDescriptor_finishJob(AsyncManager *jobManager, JobDescriptor *me, void *data, size_t *nmiss) +{ + if (AsyncWorker_wait(jobManager, me->job)) xabort("error executing job in worker thread"); + memcpy(data, me->args.data, me->args.gridsize * ((me->args.memtype == MEMTYPE_FLOAT) ? sizeof(float) : sizeof(double))); + *nmiss = me->args.nmiss; + + Free(me->args.gribbuffer); + Free(me->args.data); + me->args.recID = -1; // mark as inactive + me->args.tsID = -1; // mark as inactive +} +/* +static long +get_global_recId(stream_t *streamptr, int tsID, int recID) +{ + const tsteps_t *tsteps = streamptr->tsteps; + long globalRecId = recID; + if (tsID > 0) globalRecId += tsteps[0].nrecs; + if (tsID > 1) globalRecId += tsteps[1].nrecs * (tsID - 1); + return globalRecId; +} +*/ +static long +get_max_global_recs(stream_t *streamptr) +{ + long maxGlobalRecs = -1; + long numSteps = streamptr->ntsteps; + if (numSteps > 0) + { + const tsteps_t *tsteps = streamptr->tsteps; + maxGlobalRecs = tsteps[0].nrecs; + if (numSteps > 1) maxGlobalRecs += tsteps[1].nrecs * (numSteps - 1); + } + return maxGlobalRecs; +} + +static void +get_local_step_and_recId(stream_t *streamptr, long globalRecId, int *tsID, int *recID) +{ + int localTsId = 0; + long numSteps = streamptr->ntsteps; + const tsteps_t *tsteps = streamptr->tsteps; + if (numSteps > 0 && globalRecId >= tsteps[0].nrecs) + { + localTsId++; + globalRecId -= tsteps[0].nrecs; + } + while (globalRecId >= tsteps[1].nrecs) + { + localTsId++; + globalRecId -= tsteps[1].nrecs; + } + + *tsID = localTsId; + *recID = globalRecId; +} + +static void +read_next_record(AsyncManager *jobManager, JobDescriptor *jd, stream_t *streamptr, int memtype) +{ + int tsId = -1, recId = -1; + get_local_step_and_recId(streamptr, streamptr->nextGlobalRecId, &tsId, &recId); + int xRecId = streamptr->tsteps[tsId].recIDs[recId]; + JobDescriptor_startJob(jobManager, jd, streamptr, tsId, xRecId, memtype); + streamptr->nextGlobalRecId++; +} + +static void +grb_read_next_record(stream_t *streamptr, int recID, int memtype, void *data, size_t *nmiss) +{ + bool jobFound = false; + + int workerCount = streamptr->numWorker; + if (workerCount > 0) + { + int tsID = streamptr->curTsID; + long maxGlobalRecs = get_max_global_recs(streamptr); + // long globalRecId = get_global_recId(streamptr, streamptr->curTsID, recID); + if (maxGlobalRecs == -1) xabort("Internal error: number of timesteps missing!"); + + if (workerCount > maxGlobalRecs) workerCount = maxGlobalRecs; + + AsyncManager *jobManager = (AsyncManager *) streamptr->jobManager; + JobDescriptor *jobs = (JobDescriptor *) streamptr->jobs; + + // if this is the first call, init and start worker threads + + if (!jobs) + { + jobs = (JobDescriptor *) malloc(workerCount * sizeof(*jobs)); + streamptr->jobs = jobs; + for (int i = 0; i < workerCount; i++) jobs[i].args.recID = -1; + for (int i = 0; i < workerCount; i++) jobs[i].args.tsID = -1; + if (AsyncWorker_init(&jobManager, workerCount)) xabort("error while trying to start worker threads"); + streamptr->jobManager = jobManager; + + // Start as many new jobs as possible. + for (int i = 0; streamptr->nextGlobalRecId < maxGlobalRecs && i < workerCount; i++) + { + JobDescriptor *jd = &jobs[i]; + if (jd->args.recID < 0 && jd->args.tsID < 0) read_next_record(jobManager, jd, streamptr, memtype); + } + } + + // search for a job descriptor with the given tsID and recID, and use its results if it exists + for (int i = 0; !jobFound && i < workerCount; i++) + { + JobDescriptor *jd = &jobs[i]; + if (jd->args.recID == recID && jd->args.tsID == tsID) + { + jobFound = true; + JobDescriptor_finishJob(jobManager, jd, data, nmiss); + if (streamptr->nextGlobalRecId < maxGlobalRecs) read_next_record(jobManager, jd, streamptr, memtype); + } + } + } + + // perform the work synchronously if we didn't start a job for it yet + if (!jobFound) *nmiss = grb_read_and_decode_record(streamptr, recID, memtype, data, false); +} + +void +grb_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss) +{ + int tsID = streamptr->curTsID; + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + + grb_read_next_record(streamptr, recID, memtype, data, nmiss); +} + +void +grb_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, size_t *nmiss) +{ + int isub = subtypeInqActiveIndex(streamptr->vars[varID].subtypeID); + int recID = streamptr->vars[varID].recordTable[isub].recordID[levelID]; + + *nmiss = grb_read_and_decode_record(streamptr, recID, memtype, data, true); +} + +void +grb_read_var(stream_t *streamptr, int varID, int memtype, void *data, size_t *nmiss) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + int gridID = vlistInqVarGrid(vlistID, varID); + size_t gridsize = gridInqSize(gridID); + + off_t currentfilepos = fileGetPos(fileID); + + int isub = subtypeInqActiveIndex(streamptr->vars[varID].subtypeID); + int nlevs = streamptr->vars[varID].recordTable[0].nlevs; + + if (CDI_Debug) Message("nlevs = %d gridID = %d gridsize = %zu", nlevs, gridID, gridsize); + + *nmiss = 0; + for (int levelID = 0; levelID < nlevs; levelID++) + { + int recID = streamptr->vars[varID].recordTable[isub].recordID[levelID]; + size_t offset = levelID * gridsize; + void *datap = (memtype == MEMTYPE_FLOAT) ? (void *) ((float *) data + offset) : (void *) ((double *) data + offset); + + *nmiss += grb_read_and_decode_record(streamptr, recID, memtype, datap, false); + } + + fileSetPos(fileID, currentfilepos, SEEK_SET); +} + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef VLIST_VAR_H +#define VLIST_VAR_H + +#ifdef HAVE_CONFIG_H +#endif + +#ifndef VLIST_H +#endif + +int vlistVarGetPackSize(vlist_t *p, int varID, void *context); +void vlistVarPack(vlist_t *p, int varID, char *buffer, int bufferSize, int *pos, void *context); +void vlistVarUnpack(int vlistID, char *buf, int size, int *position, int, void *context); +int vlistVarCompare(vlist_t *a, int varIDA, vlist_t *b, int varIDB); +void vlistDefVarIOrank(int, int, int); +int vlistInqVarIOrank(int, int); + +void cdiVlistCreateVarLevInfo(vlist_t *vlistptr, int varID); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBNETCDF + + +//#include <netcdf_filter.h> + +void +cdf_def_var_filter(int ncid, int ncvarID, unsigned int id, size_t nparams, const unsigned int *params) +{ +#ifdef HAVE_NETCDF4 + int status; + if ((status = nc_def_var_filter(ncid, ncvarID, id, nparams, params))) + { + Error("nc_def_var_filter failed; %s", nc_strerror(status)); + } +#else + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("filter failed, NetCDF4 not available!"); + } +#endif +} + +void +cdfDefVarDeflate(int ncid, int ncvarID, int compLevel) +{ +#ifdef HAVE_NETCDF4 + // Set chunking, shuffle, and deflate. + int shuffle = (CDI_Shuffle > 0), deflate = 1; + + if (compLevel < 1 || compLevel > 9) compLevel = 1; + + int status; + if ((status = nc_def_var_deflate(ncid, ncvarID, shuffle, deflate, compLevel))) + { + Error("nc_def_var_deflate failed; %s", nc_strerror(status)); + } +#else + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("Deflate compression failed, NetCDF4 not available!"); + } +#endif +} + +void +cdfDefVarSzip(int ncid, int ncvarID, int pixels_per_block) +{ +#ifdef HAVE_NC_DEF_VAR_SZIP + // Set options_mask. + /* + H5_SZIP_ALLOW_K13_OPTION_MASK 1 + H5_SZIP_CHIP_OPTION_MASK 2 + H5_SZIP_EC_OPTION_MASK 4 + H5_SZIP_NN_OPTION_MASK 32 + H5_SZIP_ALL_MASKS (H5_SZIP_CHIP_OPTION_MASK|H5_SZIP_EC_OPTION_MASK|H5_SZIP_NN_OPTION_MASK) + */ + int options_mask = 38; + int status; + if ((status = nc_def_var_szip(ncid, ncvarID, options_mask, pixels_per_block))) + Error("nc_def_var_szip failed; %s", nc_strerror(status)); +#else + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("Szip compression failed, NetCDF4/szlib not available!"); + } +#endif +} + +#ifdef HAVE_NETCDF4 +static nc_type +cdfTypeComplexFloat(stream_t *streamptr) +{ + if (streamptr->nc_complex_float_id == CDI_UNDEFID) + { + typedef struct complex_float + { + float r, i; + } complex_float; + int fileID = streamptr->fileID; + int nc_complex_id; + int status; + status = nc_def_compound(fileID, sizeof(complex_float), "complex_float", &nc_complex_id); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); + status = nc_insert_compound(fileID, nc_complex_id, "r", NC_COMPOUND_OFFSET(complex_float, r), NC_FLOAT); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); + status = nc_insert_compound(fileID, nc_complex_id, "i", NC_COMPOUND_OFFSET(complex_float, i), NC_FLOAT); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); + streamptr->nc_complex_float_id = nc_complex_id; + } + + return (nc_type) streamptr->nc_complex_float_id; +} + +static nc_type +cdfTypeComplexDouble(stream_t *streamptr) +{ + if (streamptr->nc_complex_double_id == CDI_UNDEFID) + { + typedef struct complex_double + { + double r, i; + } complex_double; + int fileID = streamptr->fileID; + int nc_complex_id; + int status; + status = nc_def_compound(fileID, sizeof(complex_double), "complex_double", &nc_complex_id); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); + status = nc_insert_compound(fileID, nc_complex_id, "r", NC_COMPOUND_OFFSET(complex_double, r), NC_DOUBLE); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); + status = nc_insert_compound(fileID, nc_complex_id, "i", NC_COMPOUND_OFFSET(complex_double, i), NC_DOUBLE); + if (status != NC_NOERR) Error("%s", nc_strerror(status)); + streamptr->nc_complex_double_id = nc_complex_id; + } + + return (nc_type) streamptr->nc_complex_double_id; +} +#endif + +nc_type +cdfDefDatatype(int datatype, stream_t *streamptr) +{ + nc_type xtype = NC_FLOAT; + + // clang-format off + if (streamptr->filetype == CDI_FILETYPE_NC4) + { + if (datatype == CDI_DATATYPE_INT8 ) xtype = NC_BYTE; + else if (datatype == CDI_DATATYPE_INT16 ) xtype = NC_SHORT; + else if (datatype == CDI_DATATYPE_INT32 ) xtype = NC_INT; +#ifdef HAVE_NETCDF4 + else if (datatype == CDI_DATATYPE_UINT8 ) xtype = NC_UBYTE; + else if (datatype == CDI_DATATYPE_UINT16) xtype = NC_USHORT; + else if (datatype == CDI_DATATYPE_UINT32) xtype = NC_UINT; + else if (datatype == CDI_DATATYPE_CPX32 ) xtype = cdfTypeComplexFloat(streamptr); + else if (datatype == CDI_DATATYPE_CPX64 ) xtype = cdfTypeComplexDouble(streamptr); +#else + else if (datatype == CDI_DATATYPE_UINT8 ) xtype = NC_SHORT; + else if (datatype == CDI_DATATYPE_UINT16) xtype = NC_INT; + else if (datatype == CDI_DATATYPE_UINT32) xtype = NC_INT; + else if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) + Error("CDI library does not support complex numbers with NetCDF4 classic!"); +#endif + else if (datatype == CDI_DATATYPE_FLT64 ) xtype = NC_DOUBLE; + else if (datatype == CDI_DATATYPE_FLT32 ) xtype = NC_FLOAT; + } + else + { + if (datatype == CDI_DATATYPE_INT8 ) xtype = NC_BYTE; + else if (datatype == CDI_DATATYPE_INT16 ) xtype = NC_SHORT; + else if (datatype == CDI_DATATYPE_INT32 ) xtype = NC_INT; + else if (datatype == CDI_DATATYPE_UINT8 ) xtype = NC_SHORT; + else if (datatype == CDI_DATATYPE_UINT16) xtype = NC_INT; + else if (datatype == CDI_DATATYPE_UINT32) xtype = NC_INT; + else if (datatype == CDI_DATATYPE_FLT64 ) xtype = NC_DOUBLE; + else if (datatype == CDI_DATATYPE_FLT32 ) xtype = NC_FLOAT; + else if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) + Error("CDI library does not support complex numbers with NetCDF classic!"); + } + // clang-format on + + return xtype; +} + +static void +cdfDefVarMissval(stream_t *streamptr, int varID, int dtype, int lcheck) +{ + if (streamptr->vars[varID].defmiss == false) + { + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int ncvarID = streamptr->vars[varID].ncvarid; + double missval = vlistInqVarMissval(vlistID, varID); + + if (lcheck && streamptr->ncmode == 2) cdf_redef(fileID); + + nc_type xtype = cdfDefDatatype(dtype, streamptr); + if (xtype == NC_BYTE && missval > 127 && missval < 256) xtype = NC_INT; + + if (lcheck == 0 || streamptr->ncmode != 2 || streamptr->filetype == CDI_FILETYPE_NC || streamptr->filetype == CDI_FILETYPE_NC2 + || streamptr->filetype == CDI_FILETYPE_NC5) + cdf_put_att_double(fileID, ncvarID, "_FillValue", xtype, 1, &missval); + + cdf_put_att_double(fileID, ncvarID, "missing_value", xtype, 1, &missval); + + if (lcheck && streamptr->ncmode == 2) cdf_enddef(fileID, streamptr->self); + + streamptr->vars[varID].defmiss = true; + } +} + +static void +cdfDefInstituteGlobal(const stream_t *streamptr) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int instID = vlistInqInstitut(vlistID); + + if (instID != CDI_UNDEFID) + { + const char *longname = institutInqLongnamePtr(instID); + if (longname) + { + size_t len = strlen(longname); + if (len > 0) + { + if (streamptr->ncmode == 2) cdf_redef(fileID); + cdf_put_att_text(fileID, NC_GLOBAL, "institution", len, longname); + if (streamptr->ncmode == 2) cdf_enddef(fileID, streamptr->self); + } + } + } +} + +static void +cdfDefSourceGlobal(const stream_t *streamptr) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int modelID = vlistInqModel(vlistID); + + if (modelID != CDI_UNDEFID) + { + const char *longname = modelInqNamePtr(modelID); + if (longname) + { + size_t len = strlen(longname); + if (len > 0) + { + if (streamptr->ncmode == 2) cdf_redef(fileID); + cdf_put_att_text(fileID, NC_GLOBAL, "source", len, longname); + if (streamptr->ncmode == 2) cdf_enddef(fileID, streamptr->self); + } + } + } +} + +static inline void * +resizeBuf(void **buf, size_t *bufSize, size_t reqSize) +{ + if (reqSize > *bufSize) + { + *buf = Realloc(*buf, reqSize); + *bufSize = reqSize; + } + return *buf; +} + +static void +cdfDefineCellMethods(stream_t *streamptr, int cdiID, int varID, int fileID, int ncvarID) +{ + taxis_t *taxis = &streamptr->tsteps[0].taxis; + if (!taxis->hasBounds) return; + + int timeVarId = streamptr->basetime.ncvarid; + char timeVarName[CDI_MAX_NAME]; + cdf_inq_varname(fileID, timeVarId, timeVarName); + + int stepType = vlistInqVarTsteptype(cdiID, varID); + + const char *cellMethod = NULL; + // clang-format off + if (stepType == TSTEP_AVG) cellMethod = "mean"; + else if (stepType == TSTEP_SUM) cellMethod = "sum"; + else if (stepType == TSTEP_RANGE) cellMethod = "range"; + else if (stepType == TSTEP_MIN) cellMethod = "minimum"; + else if (stepType == TSTEP_MAX) cellMethod = "maximum"; + // clang-format on + + if (cellMethod) + { + const char *attname = "cell_methods"; + char atttxt[CDI_MAX_NAME + 10]; + snprintf(atttxt, sizeof(atttxt), "%s: %s", timeVarName, cellMethod); + cdf_put_att_text(fileID, ncvarID, attname, strlen(atttxt), atttxt); + } +} + +void +cdfDefineAttributes(int cdiID, int varID, int fileID, int ncvarID) +{ + int atttype, attlen; + char attname[CDI_MAX_NAME + 1]; + void *attBuf = NULL; + size_t attBufSize = 0; + + int natts; + cdiInqNatts(cdiID, varID, &natts); + + for (int iatt = 0; iatt < natts; ++iatt) + { + cdiInqAtt(cdiID, varID, iatt, attname, &atttype, &attlen); + + // if (attlen == 0) continue; + + if (atttype == CDI_DATATYPE_TXT) + { + size_t attSize = (size_t) attlen * sizeof(char); + char *atttxt = (char *) resizeBuf(&attBuf, &attBufSize, attSize); + cdiInqAttTxt(cdiID, varID, attname, attlen, atttxt); + size_t len = (size_t) attlen; + cdf_put_att_text(fileID, ncvarID, attname, len, atttxt); + } + else if (atttype == CDI_DATATYPE_INT8 || atttype == CDI_DATATYPE_UINT8 || atttype == CDI_DATATYPE_INT16 + || atttype == CDI_DATATYPE_UINT16 || atttype == CDI_DATATYPE_INT32 || atttype == CDI_DATATYPE_UINT32) + { + if (attlen == 0) continue; + size_t attSize = (size_t) attlen * sizeof(int); + int *attint = (int *) resizeBuf(&attBuf, &attBufSize, attSize); + cdiInqAttInt(cdiID, varID, attname, attlen, &attint[0]); + size_t len = (size_t) attlen; + // clang-format off + nc_type xtype = (atttype == CDI_DATATYPE_INT8) ? NC_BYTE : + (atttype == CDI_DATATYPE_INT16) ? NC_SHORT : +#ifdef HAVE_NETCDF4 + (atttype == CDI_DATATYPE_UINT8) ? NC_UBYTE : + (atttype == CDI_DATATYPE_UINT16) ? NC_USHORT : + (atttype == CDI_DATATYPE_UINT32) ? NC_UINT : +#endif + NC_INT; + // clang-format on + cdf_put_att_int(fileID, ncvarID, attname, xtype, len, attint); + } + else if (atttype == CDI_DATATYPE_FLT32 || atttype == CDI_DATATYPE_FLT64) + { + if (attlen == 0) continue; + size_t attSize = (size_t) attlen * sizeof(double); + double *attflt = (double *) resizeBuf(&attBuf, &attBufSize, attSize); + cdiInqAttFlt(cdiID, varID, attname, attlen, attflt); + size_t len = (size_t) attlen; + if (atttype == CDI_DATATYPE_FLT32) + { + float attflt_sp[8]; + float *pattflt_sp = (len > 8) ? (float *) malloc(len * sizeof(float)) : attflt_sp; + for (size_t i = 0; i < len; ++i) pattflt_sp[i] = (float) attflt[i]; + cdf_put_att_float(fileID, ncvarID, attname, NC_FLOAT, len, pattflt_sp); + if (len > 8) free(pattflt_sp); + } + else + cdf_put_att_double(fileID, ncvarID, attname, NC_DOUBLE, len, attflt); + } + } + + if (attBuf) Free(attBuf); +} + +static void +cdfDefineInstituteName(int vlistID, int varID, int fileID, int ncvarID) +{ + int instID = vlistInqVarInstitut(vlistID, varID); + if (instID != CDI_UNDEFID) + { + const char *name = institutInqNamePtr(instID); + if (name) cdf_put_att_text(fileID, ncvarID, "institution", strlen(name), name); + } +} + +static void +cdfDefGlobalAtts(stream_t *streamptr) +{ + if (streamptr->globalatts) return; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + cdfDefSourceGlobal(streamptr); + cdfDefInstituteGlobal(streamptr); + + int natts; + cdiInqNatts(vlistID, CDI_GLOBAL, &natts); + + if (natts > 0 && streamptr->ncmode == 2) cdf_redef(fileID); + + cdfDefineAttributes(vlistID, CDI_GLOBAL, fileID, NC_GLOBAL); + + if (natts > 0 && streamptr->ncmode == 2) cdf_enddef(fileID, streamptr->self); + + streamptr->globalatts = 1; +} + +static void +cdf_get_gmapvarname(int gridID, char *gmapvarname) +{ + int length = CDI_MAX_NAME; + int pgridID = gridID; + cdiInqKeyString(pgridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARNAME, gmapvarname, &length); + + if (!gmapvarname[0]) + { + length = CDI_MAX_NAME; + pgridID = gridInqProj(gridID); + if (pgridID != CDI_UNDEFID) cdiInqKeyString(pgridID, CDI_GLOBAL, CDI_KEY_GRIDMAP_VARNAME, gmapvarname, &length); + } +} + +static int +nc_grid_index(stream_t *streamptr, int gridID) +{ + int index = 0; + int vlistID = streamptr->vlistID; + int ngrids = vlistNgrids(vlistID); + for (index = 0; index < ngrids; ++index) + if (streamptr->ncgrid[index].gridID == gridID) break; + + assert(index < ngrids); + + return index; +} + +// convert NetCDF xtype to pixels_per_block +static int +xtype2ppb(nc_type xtype) +{ + int ppb = 32; + + // clang-format off + if (xtype == NC_BYTE) ppb = 8; + else if (xtype == NC_SHORT) ppb = 16; +#ifdef HAVE_NETCDF4 + else if (xtype == NC_UBYTE) ppb = 8; + else if (xtype == NC_USHORT) ppb = 16; +#endif + // clang-format on + + return ppb; +} + +static void +cdfDefVarFilter(const stream_t *s, int ncvarID) +{ + if (s->filterId != 0) + { + if (s->filetype == CDI_FILETYPE_NC4 || s->filetype == CDI_FILETYPE_NC4C || s->filetype == CDI_FILETYPE_NCZARR) + { + cdf_def_var_filter(s->fileID, ncvarID, s->filterId, s->numParams, s->params); + } + else + { + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("Filter is only available for NetCDF4!"); + } + } + } +} + +static void +cdfDefVarCompression(const stream_t *streamptr, int ncvarID, nc_type xtype) +{ + if (streamptr->comptype == CDI_COMPRESS_ZIP) + { + if (streamptr->filetype == CDI_FILETYPE_NC4 || streamptr->filetype == CDI_FILETYPE_NC4C + || streamptr->filetype == CDI_FILETYPE_NCZARR) + { + cdfDefVarDeflate(streamptr->fileID, ncvarID, streamptr->complevel); + } + else + { + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("Deflate compression is only available for NetCDF4!"); + } + } + } + /* + else if (streamptr->comptype == CDI_COMPRESS_ZSTD) + { + if (streamptr->filetype == CDI_FILETYPE_NC4 || streamptr->filetype == CDI_FILETYPE_NC4C + || streamptr->filetype == CDI_FILETYPE_NCZARR) + { + cdfDefVarZstd(streamptr->fileID, ncvarID, streamptr->complevel); + } + else + { + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("SZIP compression is only available for NetCDF4!"); + } + } + } + */ + else if (streamptr->comptype == CDI_COMPRESS_SZIP) + { + if (streamptr->filetype == CDI_FILETYPE_NC4 || streamptr->filetype == CDI_FILETYPE_NC4C + || streamptr->filetype == CDI_FILETYPE_NCZARR) + { + cdfDefVarSzip(streamptr->fileID, ncvarID, xtype2ppb(xtype)); + } + else + { + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("SZIP compression is only available for NetCDF4!"); + } + } + } +} + +static void +cdfDefVarPacking(const stream_t *streamptr, int ncvarID, nc_type xtype, int vlistID, int varID) +{ + // if ( xtype == NC_BYTE || xtype == NC_SHORT || xtype == NC_INT ) + { + double addoffset = 0.0, scalefactor = 1.0; + bool haveAddoffset = (cdiInqKeyFloat(vlistID, varID, CDI_KEY_ADDOFFSET, &addoffset) == CDI_NOERR); + bool haveScalefactor = (cdiInqKeyFloat(vlistID, varID, CDI_KEY_SCALEFACTOR, &scalefactor) == CDI_NOERR); + + if (haveAddoffset || haveScalefactor) + { + nc_type astype = (xtype == NC_FLOAT) ? NC_FLOAT : NC_DOUBLE; + if ((astype == NC_DOUBLE) && IS_EQUAL(addoffset, (double) ((float) addoffset)) + && IS_EQUAL(scalefactor, (double) ((float) scalefactor))) + { + astype = NC_FLOAT; + } + + cdf_put_att_double(streamptr->fileID, ncvarID, "add_offset", astype, 1, &addoffset); + cdf_put_att_double(streamptr->fileID, ncvarID, "scale_factor", astype, 1, &scalefactor); + } + } +} + +static void +cdfAppendCoordinates(int fileID, int ncvarID, char coordinates[CDI_MAX_NAME]) +{ + if (ncvarID != CDI_UNDEFID) + { + size_t len = strlen(coordinates); + if (len) coordinates[len++] = ' '; + cdf_inq_varname(fileID, ncvarID, coordinates + len); + } +} + +static void +cdfDefineCoordinates(const stream_t *streamptr, int ncvarID, int nczvarID, int gridtype, int gridID, int gridindex, int xid, + int yid, size_t gridsize, char axis[5], size_t iax) +{ + int fileID = streamptr->fileID; + + if (gridtype != GRID_GENERIC && gridtype != GRID_LONLAT && gridtype != GRID_PROJECTION && gridtype != GRID_CURVILINEAR + && gridtype != GRID_CHARXY) + { + size_t len = strlen(gridNamePtr(gridtype)); + if (len > 0) cdf_put_att_text(fileID, ncvarID, "CDI_grid_type", len, gridNamePtr(gridtype)); + } + + char gmapvarname[CDI_MAX_NAME]; + gmapvarname[0] = 0; + cdf_get_gmapvarname(gridID, gmapvarname); + if (gmapvarname[0]) cdf_put_att_text(fileID, ncvarID, "grid_mapping", strlen(gmapvarname), gmapvarname); + + if (gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED) + { + int numLPE = gridInqNP(gridID); + if (numLPE > 0) cdf_put_att_int(fileID, ncvarID, "CDI_grid_num_LPE", NC_INT, 1, &numLPE); + } + + if (gridtype == GRID_GAUSSIAN_REDUCED) + { + int ncyvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_Y]; + if (ncyvarID != CDI_UNDEFID) + { + char name[CDI_MAX_NAME]; + name[0] = 0; + cdf_inq_varname(fileID, ncyvarID, name); + size_t len = strlen(name); + cdf_put_att_text(fileID, ncvarID, "CDI_grid_latitudes", len, name); + } + + int ncrpvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_RP]; + if (ncrpvarID != CDI_UNDEFID) + { + char name[CDI_MAX_NAME]; + name[0] = 0; + cdf_inq_varname(fileID, ncrpvarID, name); + size_t len = strlen(name); + cdf_put_att_text(fileID, ncvarID, "CDI_grid_reduced_points", len, name); + } + } + + // define coordinates attribute + + char coordinates[CDI_MAX_NAME]; + coordinates[0] = 0; + + if (nczvarID != CDI_UNDEFID) cdfAppendCoordinates(fileID, nczvarID, coordinates); + + if (gridtype == GRID_TRAJECTORY) + { + cdf_put_att_text(fileID, ncvarID, "coordinates", 9, "tlon tlat"); + } + else if (gridtype == GRID_LONLAT && xid == CDI_UNDEFID && yid == CDI_UNDEFID && gridsize == 1) + { + int ncxvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_X]; + int ncyvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_Y]; + cdfAppendCoordinates(fileID, ncyvarID, coordinates); + cdfAppendCoordinates(fileID, ncxvarID, coordinates); + } + else if (gridtype == GRID_GAUSSIAN_REDUCED) + { + /* + int ncxvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_X]; + int ncyvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_Y]; + cdfAppendCoordinates(fileID, ncyvarID, coordinates); + cdfAppendCoordinates(fileID, ncxvarID, coordinates); + */ + } + else if (gridtype == GRID_UNSTRUCTURED || gridtype == GRID_CURVILINEAR) + { + int ncxvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_X]; + int ncyvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_Y]; + int ncavarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_A]; + // CMOR order: coordinates = "lat lon" + if (CDI_Coordinates_Lon_Lat) + { + cdfAppendCoordinates(fileID, ncxvarID, coordinates); + cdfAppendCoordinates(fileID, ncyvarID, coordinates); + } + else + { + cdfAppendCoordinates(fileID, ncyvarID, coordinates); + cdfAppendCoordinates(fileID, ncxvarID, coordinates); + } + + if (ncavarID != CDI_UNDEFID) + { + char cellarea[CDI_MAX_NAME] = "area: "; + size_t len = strlen(cellarea); + cdf_inq_varname(fileID, ncavarID, cellarea + len); + len = strlen(cellarea); + cdf_put_att_text(fileID, ncvarID, "cell_measures", len, cellarea); + } + + if (gridtype == GRID_UNSTRUCTURED) + { + int position = gridInqPosition(gridID); + if (position > 0) cdf_put_att_int(fileID, ncvarID, "number_of_grid_in_reference", NC_INT, 1, &position); + } + } + else if (gridtype == GRID_SPECTRAL || gridtype == GRID_FOURIER) + { + axis[iax++] = '-'; + axis[iax++] = '-'; + cdf_put_att_text(fileID, ncvarID, "axis", iax, axis); + int gridTruncation = gridInqTrunc(gridID); + cdf_put_att_int(fileID, ncvarID, "truncation", NC_INT, 1, &gridTruncation); + } + else if (gridtype == GRID_CHARXY) + { + if (gridInqXIsc(gridID)) + { + int ncxvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_X]; + cdfAppendCoordinates(fileID, ncxvarID, coordinates); + } + else if (gridInqYIsc(gridID)) + { + int ncyvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_Y]; + cdfAppendCoordinates(fileID, ncyvarID, coordinates); + } + } + + size_t len = strlen(coordinates); + if (len) cdf_put_att_text(fileID, ncvarID, "coordinates", len, coordinates); +} + +static size_t +calc_chunksize(size_t chunkSizeLim, size_t size) +{ + static const size_t pageSize = 4096; + + if (size <= chunkSizeLim) return size; + + size_t numChunks = (size / chunkSizeLim) + 1; + size_t chunkSize = size / numChunks; + if (chunkSize % pageSize) chunkSize = (chunkSize / pageSize + 1) * pageSize; + + return chunkSize; +} + +static const size_t chunkSizeMax = 65536; +static const size_t chunkSizeLim = 1048576; + +size_t +calc_chunksize_y(int chunkType, size_t gridsize, size_t xsize, size_t ysize) +{ + if (chunkType == CDI_CHUNK_AUTO) + return (gridsize <= chunkSizeMax) ? ysize : chunkSizeMax / xsize; + else + return (chunkType == CDI_CHUNK_LINES) ? 1 : ysize; +} + +size_t +calc_chunksize_x(int chunkType, int chunkSize, size_t xsize, bool yIsUndefined) +{ + if (chunkType == CDI_CHUNK_AUTO && yIsUndefined) + return (chunkSize > 0) ? (size_t) chunkSize : ((xsize <= chunkSizeMax) ? xsize : chunkSizeMax); + else + return calc_chunksize(chunkSizeLim, xsize); +} + +static int +cdfDefineDimsAndChunks(const stream_t *streamptr, int varID, int xid, int yid, int zid, size_t gridsize, const int dimorder[3], + int dims[4], bool useChunks, size_t chunks[4], char axis[5], size_t *piax) +{ + int fileID = streamptr->fileID; + int vlistID = streamptr->vlistID; + + size_t iax = *piax; + int ndims = 0; + + for (int i = 0; i < 4; ++i) chunks[i] = 0; + + size_t xsize = 0, ysize = 0; + if (xid != CDI_UNDEFID) cdf_inq_dimlen(fileID, xid, &xsize); + if (yid != CDI_UNDEFID) cdf_inq_dimlen(fileID, yid, &ysize); + + int timetype = vlistInqVarTimetype(vlistID, varID); + if (vlistHasTime(vlistID) && timetype != TIME_CONSTANT) + { + int tid = streamptr->basetime.ncdimid; + if (tid == CDI_UNDEFID) Error("Internal problem, time undefined!"); + axis[iax++] = 'T'; + chunks[ndims] = 1; + dims[ndims] = tid; + ndims++; + } + + int chunkSize = 0; + int chunkType = CDI_CHUNK_GRID; + cdiInqKeyInt(vlistID, varID, CDI_KEY_CHUNKTYPE, &chunkType); + cdiInqKeyInt(vlistID, varID, CDI_KEY_CHUNKSIZE, &chunkSize); + if (chunkSize > 0 && yid == CDI_UNDEFID) chunkType = CDI_CHUNK_AUTO; + + if (chunkType == CDI_CHUNK_GRID && gridsize > ChunkSizeLim) + { + if (CDI_Debug) fprintf(stderr, "gridsize > %u, changed chunkType to CDI_CHUNK_LINES!\n", ChunkSizeLim); + chunkType = CDI_CHUNK_LINES; + } + + for (int id = 0; id < 3; ++id) + { + if (dimorder[id] == 3 && zid != CDI_UNDEFID) + { + axis[iax++] = 'Z'; + chunks[ndims] = 1; + dims[ndims] = zid; + ndims++; + } + else if (dimorder[id] == 2 && yid != CDI_UNDEFID) + { + chunks[ndims] = calc_chunksize_y(chunkType, gridsize, xsize, ysize); + dims[ndims] = yid; + ndims++; + } + else if (dimorder[id] == 1 && xid != CDI_UNDEFID) + { + chunks[ndims] = calc_chunksize_x(chunkType, chunkSize, xsize, (yid == CDI_UNDEFID)); + dims[ndims] = xid; + ndims++; + } + } + + if (CDI_Debug) + fprintf(stderr, "useChunks %d chunkType %d chunkSize %d chunks %zu %zu %zu %zu\n", useChunks, chunkType, chunkSize, chunks[0], + chunks[1], chunks[2], chunks[3]); + + *piax = iax; + return ndims; +} + +static void +cdfDefineAttrLeveltype(int fileID, int ncvarID, int zaxisID, int zaxistype) +{ + // clang-format off + if ( zaxistype == ZAXIS_CLOUD_BASE || + zaxistype == ZAXIS_CLOUD_TOP || + zaxistype == ZAXIS_ISOTHERM_ZERO || + zaxistype == ZAXIS_TROPOPAUSE || + zaxistype == ZAXIS_TOA || + zaxistype == ZAXIS_SEA_BOTTOM || + zaxistype == ZAXIS_LAKE_BOTTOM || + zaxistype == ZAXIS_SEDIMENT_BOTTOM || + zaxistype == ZAXIS_SEDIMENT_BOTTOM_TA || + zaxistype == ZAXIS_SEDIMENT_BOTTOM_TW || + zaxistype == ZAXIS_MIX_LAYER || + zaxistype == ZAXIS_ATMOSPHERE ) + { + char varname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, varname, &length); + cdf_put_att_text(fileID, ncvarID, "level_type", strlen(varname), varname); + } + // clang-format on +} + +static void +cdfDefineAttrEnsemble(int fileID, int ncvarID, int vlistID, int varID) +{ + int perturbationNumber, numberOfForecastsInEnsemble, typeOfEnsembleForecast; + if (cdiInqKeyInt(vlistID, varID, CDI_KEY_PERTURBATIONNUMBER, &perturbationNumber) == 0) + cdf_put_att_int(fileID, ncvarID, "realization", NC_INT, 1, &perturbationNumber); + if (cdiInqKeyInt(vlistID, varID, CDI_KEY_NUMBEROFFORECASTSINENSEMBLE, &numberOfForecastsInEnsemble) == 0) + cdf_put_att_int(fileID, ncvarID, "ensemble_members", NC_INT, 1, &numberOfForecastsInEnsemble); + if (cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFENSEMBLEFORECAST, &typeOfEnsembleForecast) == 0) + cdf_put_att_int(fileID, ncvarID, "forecast_init_type", NC_INT, 1, &typeOfEnsembleForecast); +} + +static void +cdfCheckVarname(int fileID, char name[CDI_MAX_NAME]) +{ + if (name[0]) + { + int ncvarID; + char varname[CDI_MAX_NAME]; + snprintf(varname, sizeof(varname), "%s", name); + char *varname2 = varname + strlen(varname); + unsigned iz = 0; + + do + { + if (iz) sprintf(varname2, "_%u", iz + 1); + + if (nc_inq_varid(fileID, varname, &ncvarID) != NC_NOERR) break; + + ++iz; + } + while (iz <= 99); + + if (iz > 99) Error("Variable name %s already exsist!", name); + + if (!str_is_equal(name, varname)) + Warning("Changed %s entry of variable name '%s' to '%s'!", (iz == 1) ? "double" : "multiple", name, varname); + + strcpy(name, varname); + } +} + +static void +cdfGenVarname(int fileID, char name[CDI_MAX_NAME], int pnum, int pcat, int *pdis, int *pcode) +{ + char varname[CDI_MAX_NAME]; + + int code = *pcode; + if (code < 0) code = -code; + if (pnum < 0) pnum = -pnum; + + if (*pdis == 255) + snprintf(varname, sizeof(varname), "var%d", code); + else + snprintf(varname, sizeof(varname), "param%d.%d.%d", pnum, pcat, *pdis); + + char *varname2 = varname + strlen(varname); + int ncvarID; + unsigned iz = 0; + + do + { + if (iz) sprintf(varname2, "_%u", iz + 1); + + if (nc_inq_varid(fileID, varname, &ncvarID) != NC_NOERR) break; + + ++iz; + } + while (iz <= 99); + + if (iz > 99) Error("Variable name %s already exsist!", name); + + strcpy(name, varname); + *pcode = 0; + *pdis = 255; +} + +int +cdfDefVar(stream_t *streamptr, int varID) +{ + if (streamptr->vars[varID].ncvarid != CDI_UNDEFID) return streamptr->vars[varID].ncvarid; + + int fileID = streamptr->fileID; + if (CDI_Debug) Message("streamID = %d, fileID = %d, varID = %d", streamptr->self, fileID, varID); + + int vlistID = streamptr->vlistID; + int param = vlistInqVarParam(vlistID, varID); + int code = vlistInqVarCode(vlistID, varID); + int pnum, pcat, pdis; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + + int gridID = vlistInqVarGrid(vlistID, varID); + SizeType gridsize = gridInqSize(gridID); + int gridtype = gridInqType(gridID); + int gridindex = nc_grid_index(streamptr, gridID); + int xid = (gridtype != GRID_TRAJECTORY) ? streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_X] : CDI_UNDEFID; + int yid = (gridtype != GRID_TRAJECTORY && gridtype != GRID_GAUSSIAN_REDUCED) ? streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_Y] + : CDI_UNDEFID; + + int zaxisID = vlistInqVarZaxis(vlistID, varID); + int zaxistype = zaxisInqType(zaxisID); + int zaxisindex = vlistZaxisIndex(vlistID, zaxisID); + int zid = streamptr->zaxisID[zaxisindex]; + + int dimorder[3]; // ZYX/321 and ZXY/312 + vlistInqVarDimorder(vlistID, varID, dimorder); + bool useChunks + = (gridsize >= 32) && ((dimorder[0] == 3) || (dimorder[1] == 3 && dimorder[2] == 1 && gridsize == gridInqXsize(gridID))); + + if (((dimorder[0] > 0) + (dimorder[1] > 0) + (dimorder[2] > 0)) + < ((xid != CDI_UNDEFID) + (yid != CDI_UNDEFID) + (zid != CDI_UNDEFID))) + { + printf("zid=%d yid=%d xid=%d\n", zid, yid, xid); + Error("Internal problem, dimension order missing!"); + } + + size_t iax = 0; + char axis[5]; + int dims[4]; + size_t chunks[4]; + int ndims = cdfDefineDimsAndChunks(streamptr, varID, xid, yid, zid, gridsize, dimorder, dims, useChunks, chunks, axis, &iax); + + char name[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(vlistID, varID, CDI_KEY_NAME, name, &length); + + char longname[CDI_MAX_NAME]; + vlistInqVarLongname(vlistID, varID, longname); + + char units[CDI_MAX_NAME]; + vlistInqVarUnits(vlistID, varID, units); + + char stdname[CDI_MAX_NAME]; + length = CDI_MAX_NAME; + cdiInqKeyString(vlistID, varID, CDI_KEY_STDNAME, stdname, &length); + + int tableID = vlistInqVarTable(vlistID, varID); + if (!name[0]) tableInqEntry(tableID, code, -1, name, longname, units); + if (name[0]) + cdfCheckVarname(fileID, name); + else + cdfGenVarname(fileID, name, pnum, pcat, &pdis, &code); + + int dtype = vlistInqVarDatatype(vlistID, varID); + const nc_type xtype = cdfDefDatatype(dtype, streamptr); + + if (streamptr->ncmode == 2) + { + cdf_redef(fileID); + streamptr->ncmode = 1; + } + + int ncvarID = -1; + cdf_def_var(fileID, name, xtype, ndims, dims, &ncvarID); + +#ifdef HAVE_NETCDF4 +#ifdef NC_QUANTIZE_BITROUND + if (xtype == NC_FLOAT || xtype == NC_DOUBLE) + { + int nsb = vlistInqVarNSB(vlistID, varID); + if (nsb > 0) nc_def_var_quantize(fileID, ncvarID, NC_QUANTIZE_BITROUND, nsb); + // if (nsb > 0) nc_def_var_quantize(fileID, ncvarID, NC_QUANTIZE_GRANULARBR, nsb); + } +#endif + + if (useChunks + && (streamptr->filetype == CDI_FILETYPE_NC4 || streamptr->filetype == CDI_FILETYPE_NC4C + || streamptr->filetype == CDI_FILETYPE_NCZARR)) + cdf_def_var_chunking(fileID, ncvarID, NC_CHUNKED, chunks); +#endif + + if (useChunks) cdfDefVarCompression(streamptr, ncvarID, xtype); + if (useChunks) cdfDefVarFilter(streamptr, ncvarID); + + if (*stdname) cdf_put_att_text(fileID, ncvarID, "standard_name", strlen(stdname), stdname); + if (*longname) cdf_put_att_text(fileID, ncvarID, "long_name", strlen(longname), longname); + if (*units) cdf_put_att_text(fileID, ncvarID, "units", strlen(units), units); + + if (code > 0 && pdis == 255) cdf_put_att_int(fileID, ncvarID, "code", NC_INT, 1, &code); + + if (pdis != 255) + { + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + cdf_put_att_text(fileID, ncvarID, "param", strlen(paramstr), paramstr); + } + + if (tableID != CDI_UNDEFID) + { + int tablenum = tableInqNum(tableID); + if (tablenum > 0) cdf_put_att_int(fileID, ncvarID, "table", NC_INT, 1, &tablenum); + } + + bool zaxisIsScalar = (zid == CDI_UNDEFID) ? (zaxisInqScalar(zaxisID) > 0) : false; + int nczvarID = (zaxisIsScalar || zaxistype == ZAXIS_CHAR) ? streamptr->nczvarID[zaxisindex] : CDI_UNDEFID; + + cdfDefineCoordinates(streamptr, ncvarID, nczvarID, gridtype, gridID, gridindex, xid, yid, gridsize, axis, iax); + + cdfDefVarPacking(streamptr, ncvarID, xtype, vlistID, varID); + + if (dtype == CDI_DATATYPE_UINT8 && xtype == NC_BYTE) + { + int validrange[2] = { 0, 255 }; + cdf_put_att_int(fileID, ncvarID, "valid_range", NC_SHORT, 2, validrange); + cdf_put_att_text(fileID, ncvarID, "_Unsigned", 4, "true"); + } + + streamptr->vars[varID].ncvarid = ncvarID; + + if (vlistInqVarMissvalUsed(vlistID, varID)) cdfDefVarMissval(streamptr, varID, vlistInqVarDatatype(vlistID, varID), 0); + + if (zid == CDI_UNDEFID) cdfDefineAttrLeveltype(fileID, ncvarID, zaxisID, zaxistype); + + cdfDefineAttrEnsemble(fileID, ncvarID, vlistID, varID); + + // Attribute: cell_methods + cdfDefineCellMethods(streamptr, vlistID, varID, fileID, ncvarID); + + // Attributes + cdfDefineAttributes(vlistID, varID, fileID, ncvarID); + + // Institute + if (vlistInqInstitut(vlistID) == CDI_UNDEFID) cdfDefineInstituteName(vlistID, varID, fileID, ncvarID); + + return ncvarID; +} + +void +cdfEndDef(stream_t *streamptr) +{ + cdfDefGlobalAtts(streamptr); + + if (streamptr->accessmode == 0) + { + int fileID = streamptr->fileID; + if (streamptr->ncmode == 2) + { + cdf_redef(fileID); + streamptr->ncmode = 1; + } + + int nvars = streamptr->nvars; + for (int varID = 0; varID < nvars; ++varID) cdfDefVar(streamptr, varID); + + if (streamptr->ncmode != 2) + { + if (CDI_Netcdf_Hdr_Pad == 0UL) + cdf_enddef(fileID, streamptr->self); + else + cdf__enddef(fileID, streamptr->self, CDI_Netcdf_Hdr_Pad); + streamptr->ncmode = 2; + } + + streamptr->accessmode = 1; + } +} + +static void +cdfWriteGridTraj(stream_t *streamptr, int gridID) +{ + int gridindex = nc_grid_index(streamptr, gridID); + int lonID = streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_X]; + int latID = streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_Y]; + size_t index = (size_t) streamptr->curTsID; + + double xlon = gridInqXval(gridID, 0); + double xlat = gridInqYval(gridID, 0); + + cdf_put_var1_double(streamptr->fileID, lonID, &index, &xlon); + cdf_put_var1_double(streamptr->fileID, latID, &index, &xlat); +} + +static void +cdf_write_var_data(int fileID, int vlistID, int varID, int ncvarID, int dtype, size_t nvals, size_t xsize, size_t ysize, + bool swapxy, size_t *start, size_t *count, int memtype, const void *data, size_t nmiss) +{ + const double *pdata_dp = (const double *) data; + double *mdata_dp = NULL; + double *sdata_dp = NULL; + const float *pdata_sp = (const float *) data; + float *mdata_sp = NULL; + float *sdata_sp = NULL; + + /* if ( dtype == CDI_DATATYPE_INT8 || dtype == CDI_DATATYPE_INT16 || dtype == CDI_DATATYPE_INT32 ) */ + { + double missval = vlistInqVarMissval(vlistID, varID); + double addoffset = 0.0, scalefactor = 1.0; + bool haveAddoffset = (cdiInqKeyFloat(vlistID, varID, CDI_KEY_ADDOFFSET, &addoffset) == CDI_NOERR); + bool haveScalefactor = (cdiInqKeyFloat(vlistID, varID, CDI_KEY_SCALEFACTOR, &scalefactor) == CDI_NOERR); + + if (haveAddoffset || haveScalefactor) + { + if (memtype == MEMTYPE_FLOAT) + { + mdata_sp = (float *) Malloc(nvals * sizeof(float)); + memcpy(mdata_sp, pdata_sp, nvals * sizeof(float)); + pdata_sp = mdata_sp; + + if (nmiss > 0) + { + for (size_t i = 0; i < nvals; ++i) + { + double temp = mdata_sp[i]; + if (!DBL_IS_EQUAL(temp, missval)) + { + if (haveAddoffset) temp -= addoffset; + if (haveScalefactor) temp /= scalefactor; + mdata_sp[i] = (float) temp; + } + } + } + else + { + for (size_t i = 0; i < nvals; ++i) + { + double temp = mdata_sp[i]; + if (haveAddoffset) temp -= addoffset; + if (haveScalefactor) temp /= scalefactor; + mdata_sp[i] = (float) temp; + } + } + } + else + { + mdata_dp = (double *) Malloc(nvals * sizeof(double)); + memcpy(mdata_dp, pdata_dp, nvals * sizeof(double)); + pdata_dp = mdata_dp; + + if (nmiss > 0) + { + for (size_t i = 0; i < nvals; ++i) + { + if (!DBL_IS_EQUAL(mdata_dp[i], missval)) + { + if (haveAddoffset) mdata_dp[i] -= addoffset; + if (haveScalefactor) mdata_dp[i] /= scalefactor; + } + } + } + else + { + for (size_t i = 0; i < nvals; ++i) + { + if (haveAddoffset) mdata_dp[i] -= addoffset; + if (haveScalefactor) mdata_dp[i] /= scalefactor; + } + } + } + } + + if (dtype == CDI_DATATYPE_UINT8 || dtype == CDI_DATATYPE_INT8 || dtype == CDI_DATATYPE_INT16 || dtype == CDI_DATATYPE_INT32) + { + if (memtype == MEMTYPE_FLOAT) + { + if (mdata_sp == NULL) + { + mdata_sp = (float *) Malloc(nvals * sizeof(float)); + memcpy(mdata_sp, pdata_sp, nvals * sizeof(float)); + pdata_sp = mdata_sp; + } + + for (size_t i = 0; i < nvals; ++i) mdata_sp[i] = roundf(mdata_sp[i]); + + if (dtype == CDI_DATATYPE_UINT8) + { + nc_type xtype; + cdf_inq_vartype(fileID, ncvarID, &xtype); + if (xtype == NC_BYTE) + { + for (size_t i = 0; i < nvals; ++i) + if (mdata_sp[i] > 127) mdata_sp[i] -= 256; + } + } + } + else + { + if (mdata_dp == NULL) + { + mdata_dp = (double *) Malloc(nvals * sizeof(double)); + memcpy(mdata_dp, pdata_dp, nvals * sizeof(double)); + pdata_dp = mdata_dp; + } + + for (size_t i = 0; i < nvals; ++i) mdata_dp[i] = round(mdata_dp[i]); + + if (dtype == CDI_DATATYPE_UINT8) + { + nc_type xtype; + cdf_inq_vartype(fileID, ncvarID, &xtype); + if (xtype == NC_BYTE) + { + for (size_t i = 0; i < nvals; ++i) + if (mdata_dp[i] > 127) mdata_dp[i] -= 256; + } + } + } + } + + if (CDF_Debug && memtype != MEMTYPE_FLOAT) + { + double fmin = 1.0e200; + double fmax = -1.0e200; + for (size_t i = 0; i < nvals; ++i) + { + if (!DBL_IS_EQUAL(pdata_dp[i], missval)) + { + if (pdata_dp[i] < fmin) fmin = pdata_dp[i]; + if (pdata_dp[i] > fmax) fmax = pdata_dp[i]; + } + } + Message("nvals = %zu, nmiss = %d, missval = %g, minval = %g, maxval = %g", nvals, nmiss, missval, fmin, fmax); + } + } + + if (swapxy) // implemented only for cdf_write_var_slice() + { + size_t gridsize = xsize * ysize; + if (memtype == MEMTYPE_FLOAT) + { + sdata_sp = (float *) Malloc(gridsize * sizeof(float)); + for (size_t j = 0; j < ysize; ++j) + for (size_t i = 0; i < xsize; ++i) sdata_sp[i * ysize + j] = pdata_sp[j * xsize + i]; + pdata_sp = sdata_sp; + } + else + { + sdata_dp = (double *) Malloc(gridsize * sizeof(double)); + for (size_t j = 0; j < ysize; ++j) + for (size_t i = 0; i < xsize; ++i) sdata_dp[i * ysize + j] = pdata_dp[j * xsize + i]; + pdata_dp = sdata_dp; + } + } + + if (dtype == CDI_DATATYPE_CPX32 || dtype == CDI_DATATYPE_CPX64) + { + void *pdata = (memtype == MEMTYPE_FLOAT) ? (void *) pdata_sp : (void *) pdata_dp; + float *cdata_sp = NULL; + double *cdata_dp = NULL; + if (memtype == MEMTYPE_FLOAT && dtype == CDI_DATATYPE_CPX64) + { + cdata_dp = (double *) Malloc(2 * nvals * sizeof(double)); + for (size_t i = 0; i < nvals; ++i) + { + cdata_dp[2 * i] = (double) (pdata_sp[2 * i]); + cdata_dp[2 * i + 1] = (double) (pdata_sp[2 * i + 1]); + } + pdata = cdata_dp; + } + else if (memtype == MEMTYPE_DOUBLE && dtype == CDI_DATATYPE_CPX32) + { + cdata_sp = (float *) Malloc(2 * nvals * sizeof(float)); + for (size_t i = 0; i < nvals; ++i) + { + cdata_sp[2 * i] = (float) (pdata_dp[2 * i]); + cdata_sp[2 * i + 1] = (float) (pdata_dp[2 * i + 1]); + } + pdata = cdata_sp; + } + + cdf_put_vara(fileID, ncvarID, start, count, pdata); + if (cdata_sp) Free(cdata_sp); + if (cdata_dp) Free(cdata_dp); + } + else + { + if (memtype == MEMTYPE_FLOAT) + cdf_put_vara_float(fileID, ncvarID, start, count, pdata_sp); + else + cdf_put_vara_double(fileID, ncvarID, start, count, pdata_dp); + } + + if (mdata_dp) Free(mdata_dp); + if (sdata_dp) Free(sdata_dp); + if (mdata_sp) Free(mdata_sp); + if (sdata_sp) Free(sdata_sp); +} + +static void +cdfGetXYZid(stream_t *streamptr, int gridID, int zaxisID, int *xid, int *yid, int *zid) +{ + *xid = CDI_UNDEFID; + *yid = CDI_UNDEFID; + + int gridtype = gridInqType(gridID); + if (gridtype == GRID_TRAJECTORY) + { + cdfWriteGridTraj(streamptr, gridID); + } + else + { + int gridindex = nc_grid_index(streamptr, gridID); + *xid = streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_X]; + if (gridtype != GRID_GAUSSIAN_REDUCED) *yid = streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_Y]; + } + + int vlistID = streamptr->vlistID; + int zaxisindex = vlistZaxisIndex(vlistID, zaxisID); + *zid = streamptr->zaxisID[zaxisindex]; +} + +static void +cdfDefineStartAndCount(stream_t *streamptr, int varID, int xid, int yid, int zid, size_t start[5], size_t count[5], size_t *xsize, + size_t *ysize) +{ + size_t ndims = 0; + *xsize = 0; + *ysize = 0; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + const long ntsteps = streamptr->ntsteps; + if (CDI_Debug) Message("ntsteps = %ld", ntsteps); + + int timetype = vlistInqVarTimetype(vlistID, varID); + + if (vlistHasTime(vlistID) && timetype != TIME_CONSTANT) + { + start[ndims] = (size_t) ntsteps - 1; + count[ndims] = 1; + ndims++; + } + + if (zid != CDI_UNDEFID) + { + int zaxisID = vlistInqVarZaxis(vlistID, varID); + start[ndims] = 0; + count[ndims] = (size_t) zaxisInqSize(zaxisID); + ndims++; + } + + if (yid != CDI_UNDEFID) + { + start[ndims] = 0; + size_t size; + cdf_inq_dimlen(fileID, yid, &size); + /* count[ndims] = gridInqYsize(gridID); */ + count[ndims] = size; + ndims++; + } + + if (xid != CDI_UNDEFID) + { + start[ndims] = 0; + size_t size; + cdf_inq_dimlen(fileID, xid, &size); + /* count[ndims] = gridInqXsize(gridID); */ + count[ndims] = size; + ndims++; + } + + if (CDI_Debug) + for (size_t idim = 0; idim < ndims; ++idim) Message("dim = %d start = %d count = %d", idim, start[idim], count[idim]); +} + +void +cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data, size_t nmiss) +{ + if (streamptr->accessmode == 0) cdfEndDef(streamptr); + + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + int ncvarID = cdfDefVar(streamptr, varID); + + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + + int xid, yid, zid; + cdfGetXYZid(streamptr, gridID, zaxisID, &xid, &yid, &zid); + + size_t xsize, ysize; + size_t start[5], count[5]; + cdfDefineStartAndCount(streamptr, varID, xid, yid, zid, start, count, &xsize, &ysize); + + if (streamptr->ncmode == 1) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + int dtype = vlistInqVarDatatype(vlistID, varID); + + if (nmiss > 0) cdfDefVarMissval(streamptr, varID, dtype, 1); + + size_t nvals = gridInqSize(gridID) * (size_t) (zaxisInqSize(zaxisID)); + + bool swapxy = false; + cdf_write_var_data(fileID, vlistID, varID, ncvarID, dtype, nvals, xsize, ysize, swapxy, start, count, memtype, data, nmiss); +} + +static void +cdfDefineStartAndCountChunk(stream_t *streamptr, const int rect[][2], int varID, int xid, int yid, int zid, size_t start[5], + size_t count[5], size_t *xsize, size_t *ysize) +{ + size_t ndims = 0; + *xsize = 0; + *ysize = 0; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + const long ntsteps = streamptr->ntsteps; + if (CDI_Debug) Message("ntsteps = %ld", ntsteps); + + int timetype = vlistInqVarTimetype(vlistID, varID); + + if (vlistHasTime(vlistID) && timetype != TIME_CONSTANT) + { + start[ndims] = (size_t) ntsteps - 1; + count[ndims] = 1; + ndims++; + } + + if (zid != CDI_UNDEFID) + { + int zaxisID = vlistInqVarZaxis(vlistID, varID); + int size = zaxisInqSize(zaxisID); + xassert(rect[2][0] >= 0 && rect[2][0] <= rect[2][1] + 1 && rect[2][1] <= size); + start[ndims] = (size_t) rect[2][0]; + count[ndims] = rect[2][1] < 0 ? (size_t) 0 : (size_t) rect[2][1] - (size_t) rect[2][0] + 1; + ndims++; + } + + if (yid != CDI_UNDEFID) + { + size_t size; + cdf_inq_dimlen(fileID, yid, &size); + xassert(rect[1][0] >= 0 && rect[1][0] <= rect[1][1] + 1 && (rect[1][1] < 0 || (size_t) rect[1][1] <= size)); + start[ndims] = (size_t) rect[1][0]; + count[ndims] = rect[1][1] < 0 ? (size_t) 0 : ((size_t) rect[1][1] - (size_t) rect[1][0] + 1); + ndims++; + } + + if (xid != CDI_UNDEFID) + { + size_t size; + cdf_inq_dimlen(fileID, xid, &size); + xassert(rect[0][0] >= 0 && rect[0][0] <= rect[0][1] + 1 && (rect[0][1] < 0 || (size_t) rect[0][1] <= size)); + start[ndims] = (size_t) rect[0][0]; + count[ndims] = rect[0][1] < 0 ? (size_t) 0 : (size_t) rect[0][1] - (size_t) rect[0][0] + 1; + ndims++; + } + + if (CDI_Debug) + for (size_t idim = 0; idim < ndims; ++idim) Message("dim = %d start = %d count = %d", idim, start[idim], count[idim]); +} + +void +cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype, const int rect[][2], const void *data, size_t nmiss) +{ + if (streamptr->accessmode == 0) cdfEndDef(streamptr); + + int streamID = streamptr->self; + + if (CDI_Debug) Message("streamID = %d varID = %d", streamID, varID); + + int vlistID = streamInqVlist(streamID); + int fileID = streamInqFileID(streamID); + + int ncvarID = cdfDefVar(streamptr, varID); + + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + + int xid, yid, zid; + cdfGetXYZid(streamptr, gridID, zaxisID, &xid, &yid, &zid); + + size_t xsize, ysize; + size_t start[5], count[5]; + cdfDefineStartAndCountChunk(streamptr, rect, varID, xid, yid, zid, start, count, &xsize, &ysize); + + if (streamptr->ncmode == 1) + { + cdf_enddef(fileID, streamptr->self); + streamptr->ncmode = 2; + } + + int dtype = vlistInqVarDatatype(vlistID, varID); + + if (nmiss > 0) cdfDefVarMissval(streamptr, varID, dtype, 1); + + size_t nvals = gridInqSize(gridID) * (size_t) (zaxisInqSize(zaxisID)); + + bool swapxy = false; + cdf_write_var_data(fileID, vlistID, varID, ncvarID, dtype, nvals, xsize, ysize, swapxy, start, count, memtype, data, nmiss); +} + +static void +cdfDefineStartAndCountSlice(stream_t *streamptr, int varID, int levelID, int dimorder[3], int xid, int yid, int zid, + size_t start[5], size_t count[5], size_t *xsize, size_t *ysize) +{ + size_t ndims = 0; + *xsize = 0; + *ysize = 0; + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + const long ntsteps = streamptr->ntsteps; + if (CDI_Debug) Message("ntsteps = %ld", ntsteps); + + int timetype = vlistInqVarTimetype(vlistID, varID); + + if (vlistHasTime(vlistID) && timetype != TIME_CONSTANT) + { + start[ndims] = (size_t) ntsteps - 1; + count[ndims] = 1; + ndims++; + } + + for (int id = 0; id < 3; ++id) + { + if (dimorder[id] == 3 && zid != CDI_UNDEFID) + { + start[ndims] = (size_t) levelID; + count[ndims] = 1; + ndims++; + } + else if (dimorder[id] == 2 && yid != CDI_UNDEFID) + { + start[ndims] = 0; + cdf_inq_dimlen(fileID, yid, ysize); + count[ndims] = *ysize; + ndims++; + } + else if (dimorder[id] == 1 && xid != CDI_UNDEFID) + { + start[ndims] = 0; + cdf_inq_dimlen(fileID, xid, xsize); + count[ndims] = *xsize; + ndims++; + } + } + + if (CDI_Debug) + for (size_t idim = 0; idim < ndims; ++idim) Message("dim = %d start = %d count = %d", idim, start[idim], count[idim]); +} + +void +cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, size_t nmiss) +{ + if (streamptr->accessmode == 0) cdfEndDef(streamptr); + + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + int ncvarID = cdfDefVar(streamptr, varID); + + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + + int xid, yid, zid; + cdfGetXYZid(streamptr, gridID, zaxisID, &xid, &yid, &zid); + + int dimorder[3]; + vlistInqVarDimorder(vlistID, varID, dimorder); + bool swapxy = (dimorder[2] == 2 || dimorder[0] == 1) && xid != CDI_UNDEFID && yid != CDI_UNDEFID; + + size_t xsize, ysize; + size_t start[5], count[5]; + cdfDefineStartAndCountSlice(streamptr, varID, levelID, dimorder, xid, yid, zid, start, count, &xsize, &ysize); + + int dtype = vlistInqVarDatatype(vlistID, varID); + + if (nmiss > 0) cdfDefVarMissval(streamptr, varID, dtype, 1); + + size_t nvals = gridInqSize(gridID); + + cdf_write_var_data(fileID, vlistID, varID, ncvarID, dtype, nvals, xsize, ysize, swapxy, start, count, memtype, data, nmiss); +} + +void +cdf_write_record(stream_t *streamptr, int memtype, const void *data, size_t nmiss) +{ + int varID = streamptr->record->varID; + int levelID = streamptr->record->levelID; + cdf_write_var_slice(streamptr, varID, levelID, memtype, data, nmiss); +} + +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#ifdef HAVE_LIBNETCDF + +#include <limits.h> +#include <float.h> + + +static void +cdfReadGridTraj(stream_t *streamptr, int gridID) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + + int gridindex = vlistGridIndex(vlistID, gridID); + int ncLonId = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_X]; + int ncLatId = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_Y]; + + int tsID = streamptr->curTsID; + size_t ncStepIndex = (size_t) streamptr->tsteps[tsID].ncStepIndex; + + double xlon, xlat; + cdf_get_var1_double(fileID, ncLonId, &ncStepIndex, &xlon); + cdf_get_var1_double(fileID, ncLatId, &ncStepIndex, &xlat); + + gridDefXvals(gridID, &xlon); + gridDefYvals(gridID, &xlat); +} + +static void +cdfGetSlapDescription(stream_t *streamptr, int varID, size_t (*start)[MAX_DIMENSIONS], size_t (*count)[MAX_DIMENSIONS]) +{ + int vlistID = streamptr->vlistID; + int tsID = streamptr->curTsID; + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + int timetype = vlistInqVarTimetype(vlistID, varID); + int gridindex = vlistGridIndex(vlistID, gridID); + size_t ncStepIndex = (size_t) streamptr->tsteps[tsID].ncStepIndex; + + int xid = CDI_UNDEFID, yid = CDI_UNDEFID; + if (gridInqType(gridID) == GRID_TRAJECTORY) + { + cdfReadGridTraj(streamptr, gridID); + } + else + { + xid = streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_X]; + yid = streamptr->ncgrid[gridindex].ncIDs[CDF_DIMID_Y]; + } + int zaxisindex = vlistZaxisIndex(vlistID, zaxisID); + int zid = streamptr->zaxisID[zaxisindex]; + + int ndims = 0; +#define addDimension(startCoord, length) \ + do \ + { \ + (*start)[ndims] = startCoord; \ + (*count)[ndims] = length; \ + ndims++; \ + } \ + while (0) + if (timetype != TIME_CONSTANT) addDimension(ncStepIndex, 1); + if (zid != CDI_UNDEFID) addDimension(0, (size_t) zaxisInqSize(zaxisID)); + if (yid != CDI_UNDEFID) addDimension(0, gridInqYsize(gridID)); + if (xid != CDI_UNDEFID) addDimension(0, gridInqXsize(gridID)); +#undef addDimension + + assert(ndims <= (int) (sizeof(*start) / sizeof(**start))); + assert(ndims <= (int) (sizeof(*count) / sizeof(**count))); + + if (CDI_Debug) + for (int idim = 0; idim < ndims; ++idim) Message("dim = %d start = %d count = %d", idim, start[idim], count[idim]); +} + +// Scans the data array for missVals, optionally applying first a scale factor and then an offset. +// Returns the number of missing + out-of-range values encountered. +static size_t +cdfDoInputDataTransformationDP(int vlistID, int varID, size_t valueCount, double *data) +{ + double missVal = vlistInqVarMissval(vlistID, varID); + int haveMissVal = vlistInqVarMissvalUsed(vlistID, varID); + double validRange[2]; + if (!(haveMissVal && vlistInqVarValidrange(vlistID, varID, validRange))) validRange[0] = DBL_MIN, validRange[1] = DBL_MAX; + double addoffset = 0.0, scalefactor = 1.0; + int haveAddoffset = (cdiInqKeyFloat(vlistID, varID, CDI_KEY_ADDOFFSET, &addoffset) == CDI_NOERR); + int haveScalefactor = (cdiInqKeyFloat(vlistID, varID, CDI_KEY_SCALEFACTOR, &scalefactor) == CDI_NOERR); + + bool missValIsNaN = DBL_IS_NAN(missVal); + size_t missValCount = 0; + + double validMin = validRange[0]; + double validMax = validRange[1]; + if (IS_EQUAL(validMin, VALIDMISS)) validMin = DBL_MIN; + if (IS_EQUAL(validMax, VALIDMISS)) validMax = DBL_MAX; + + int haveRangeCheck = (IS_NOT_EQUAL(validMax, DBL_MAX)) | (IS_NOT_EQUAL(validMin, DBL_MIN)); + assert(!haveRangeCheck || haveMissVal); + + switch (haveMissVal | (haveScalefactor << 1) | (haveAddoffset << 2) | (haveRangeCheck << 3)) + { + case 15: // haveRangeCheck & haveMissVal & haveScalefactor & haveAddoffset + for (size_t i = 0; i < valueCount; ++i) + { + int outOfRange = (data[i] < validMin || data[i] > validMax); + int isMissVal = DBL_IS_EQUAL(data[i], missVal); + missValCount += (size_t) (outOfRange | isMissVal); + data[i] = outOfRange ? missVal : isMissVal ? data[i] : data[i] * scalefactor + addoffset; + } + break; + case 13: // haveRangeCheck & haveMissVal & haveAddoffset + for (size_t i = 0; i < valueCount; ++i) + { + int outOfRange = (data[i] < validMin || data[i] > validMax); + int isMissVal = DBL_IS_EQUAL(data[i], missVal); + missValCount += (size_t) (outOfRange | isMissVal); + data[i] = outOfRange ? missVal : isMissVal ? data[i] : data[i] + addoffset; + } + break; + case 11: // haveRangeCheck & haveMissVal & haveScalefactor + for (size_t i = 0; i < valueCount; ++i) + { + int outOfRange = (data[i] < validMin || data[i] > validMax); + int isMissVal = DBL_IS_EQUAL(data[i], missVal); + missValCount += (size_t) (outOfRange | isMissVal); + data[i] = outOfRange ? missVal : isMissVal ? data[i] : data[i] * scalefactor; + } + break; + case 9: // haveRangeCheck & haveMissVal + for (size_t i = 0; i < valueCount; ++i) + { + int outOfRange = (data[i] < validMin || data[i] > validMax); + int isMissVal = DBL_IS_EQUAL(data[i], missVal); + missValCount += (size_t) (outOfRange | isMissVal); + data[i] = outOfRange ? missVal : data[i]; + } + break; + case 7: // haveMissVal & haveScalefactor & haveAddoffset + for (size_t i = 0; i < valueCount; ++i) + if (DBL_IS_EQUAL(data[i], missVal)) + missValCount++; + else + data[i] = data[i] * scalefactor + addoffset; + break; + case 6: // haveAddoffset & haveScalefactor + for (size_t i = 0; i < valueCount; ++i) data[i] = data[i] * scalefactor + addoffset; + break; + case 5: // haveMissVal & haveAddoffset + for (size_t i = 0; i < valueCount; ++i) + if (DBL_IS_EQUAL(data[i], missVal)) + missValCount++; + else + data[i] += addoffset; + break; + case 4: // haveAddoffset + for (size_t i = 0; i < valueCount; ++i) data[i] += addoffset; + break; + case 3: // haveMissVal & haveScalefactor + for (size_t i = 0; i < valueCount; ++i) + if (DBL_IS_EQUAL(data[i], missVal)) + missValCount++; + else + data[i] *= scalefactor; + break; + case 2: // haveScalefactor + for (size_t i = 0; i < valueCount; ++i) data[i] *= scalefactor; + break; + case 1: // haveMissVal + if (missValIsNaN) + { + for (size_t i = 0; i < valueCount; ++i) missValCount += (size_t) DBL_IS_NAN(data[i]); + } + else + { + for (size_t i = 0; i < valueCount; ++i) missValCount += (size_t) DBL_IS_EQUAL(data[i], missVal); + } + break; + } + + return missValCount; +} + +static size_t +cdfDoInputDataTransformationSP(int vlistID, int varID, size_t valueCount, float *data) +{ + double missVal = vlistInqVarMissval(vlistID, varID); + int haveMissVal = vlistInqVarMissvalUsed(vlistID, varID); + double validRange[2]; + if (!(haveMissVal && vlistInqVarValidrange(vlistID, varID, validRange))) validRange[0] = DBL_MIN, validRange[1] = DBL_MAX; + double addoffset = 0.0, scalefactor = 1.0; + int haveAddoffset = (cdiInqKeyFloat(vlistID, varID, CDI_KEY_ADDOFFSET, &addoffset) == CDI_NOERR); + int haveScalefactor = (cdiInqKeyFloat(vlistID, varID, CDI_KEY_SCALEFACTOR, &scalefactor) == CDI_NOERR); + + bool missValIsNaN = DBL_IS_NAN(missVal); + size_t missValCount = 0; + + double validMin = validRange[0]; + double validMax = validRange[1]; + if (IS_EQUAL(validMin, VALIDMISS)) validMin = DBL_MIN; + if (IS_EQUAL(validMax, VALIDMISS)) validMax = DBL_MAX; + + int haveRangeCheck = (IS_NOT_EQUAL(validMax, DBL_MAX)) | (IS_NOT_EQUAL(validMin, DBL_MIN)); + assert(!haveRangeCheck || haveMissVal); + + switch (haveMissVal | (haveScalefactor << 1) | (haveAddoffset << 2) | (haveRangeCheck << 3)) + { + case 15: // haveRangeCheck & haveMissVal & haveScalefactor & haveAddoffset + for (size_t i = 0; i < valueCount; ++i) + { + int outOfRange = (data[i] < validMin || data[i] > validMax); + int isMissVal = DBL_IS_EQUAL(data[i], missVal); + missValCount += (size_t) (outOfRange | isMissVal); + data[i] = outOfRange ? (float) missVal : isMissVal ? data[i] : (float) (data[i] * scalefactor + addoffset); + } + break; + case 13: // haveRangeCheck & haveMissVal & haveAddoffset + for (size_t i = 0; i < valueCount; ++i) + { + int outOfRange = (data[i] < validMin || data[i] > validMax); + int isMissVal = DBL_IS_EQUAL(data[i], missVal); + missValCount += (size_t) (outOfRange | isMissVal); + data[i] = outOfRange ? (float) missVal : isMissVal ? data[i] : (float) (data[i] + addoffset); + } + break; + case 11: // haveRangeCheck & haveMissVal & haveScalefactor + for (size_t i = 0; i < valueCount; ++i) + { + int outOfRange = (data[i] < validMin || data[i] > validMax); + int isMissVal = DBL_IS_EQUAL(data[i], missVal); + missValCount += (size_t) (outOfRange | isMissVal); + data[i] = outOfRange ? (float) missVal : isMissVal ? data[i] : (float) (data[i] * scalefactor); + } + break; + case 9: // haveRangeCheck & haveMissVal + for (size_t i = 0; i < valueCount; ++i) + { + int outOfRange = (data[i] < validMin || data[i] > validMax); + int isMissVal = DBL_IS_EQUAL(data[i], missVal); + missValCount += (size_t) (outOfRange | isMissVal); + data[i] = outOfRange ? (float) missVal : data[i]; + } + break; + case 7: // haveMissVal & haveScalefactor & haveAddoffset + for (size_t i = 0; i < valueCount; ++i) + if (DBL_IS_EQUAL(data[i], missVal)) + missValCount++; + else + data[i] = (float) (data[i] * scalefactor + addoffset); + break; + case 6: // haveAddoffset & haveScalefactor + for (size_t i = 0; i < valueCount; ++i) data[i] = (float) (data[i] * scalefactor + addoffset); + break; + case 5: // haveMissVal & haveAddoffset + for (size_t i = 0; i < valueCount; ++i) + if (DBL_IS_EQUAL(data[i], missVal)) + missValCount++; + else + data[i] = (float) (data[i] + addoffset); + break; + case 4: // haveAddoffset + for (size_t i = 0; i < valueCount; ++i) data[i] = (float) (data[i] + addoffset); + break; + case 3: // haveMissVal & haveScalefactor + for (size_t i = 0; i < valueCount; ++i) + if (DBL_IS_EQUAL(data[i], missVal)) + missValCount++; + else + data[i] = (float) (data[i] * scalefactor); + break; + case 2: // haveScalefactor + for (size_t i = 0; i < valueCount; ++i) data[i] = (float) (data[i] * scalefactor); + break; + case 1: // haveMissVal + if (missValIsNaN) + { + for (size_t i = 0; i < valueCount; ++i) missValCount += (size_t) DBL_IS_NAN(data[i]); + } + else + { + for (size_t i = 0; i < valueCount; ++i) missValCount += (size_t) DBL_IS_EQUAL(data[i], missVal); + } + break; + } + + return missValCount; +} + +static size_t +min_size(size_t a, size_t b) +{ + return a < b ? a : b; +} + +static void +transpose2dArrayDP(int gridId, double *data) +{ + size_t inWidth = gridInqYsize(gridId); + size_t inHeight = gridInqXsize(gridId); + + size_t cacheBlockSize = 256; // Purely an optimization parameter. Current value of 32 means we are handling 8kB blocks, + // which should be a decent compromise on many architectures. + double **out = (double **) malloc(inWidth * sizeof(double *)); + double **temp = (double **) malloc(inHeight * sizeof(double *)); + temp[0] = (double *) malloc(inHeight * inWidth * sizeof(double)); + memcpy(temp[0], data, inHeight * inWidth * sizeof(double)); + for (size_t i = 0; i < inWidth; ++i) out[i] = data + (inHeight * i); + for (size_t i = 1; i < inHeight; ++i) temp[i] = temp[0] + (inWidth * i); + + /* + for (size_t y = 0; y < inHeight; ++y) + for (size_t x = 0; x < inWidth; ++x) + out[x][y] = temp[y][x]; + */ + + for (size_t yBlock = 0; yBlock < inHeight; yBlock += cacheBlockSize) + for (size_t xBlock = 0; xBlock < inWidth; xBlock += cacheBlockSize) + for (size_t y = yBlock, yEnd = min_size(yBlock + cacheBlockSize, inHeight); y < yEnd; y++) + for (size_t x = xBlock, xEnd = min_size(xBlock + cacheBlockSize, inWidth); x < xEnd; x++) + { + out[x][y] = temp[y][x]; + } + + free(out); + free(temp[0]); + free(temp); +} + +static void +transpose2dArraySP(size_t gridId, float *data) +{ + size_t inWidth = gridInqYsize(gridId); + size_t inHeight = gridInqXsize(gridId); + + size_t cacheBlockSize = 256; // Purely an optimization parameter. Current value of 32 means we are handling 8kB blocks, + // which should be a decent compromise on many architectures. + float **out = (float **) malloc(inWidth * sizeof(float *)); + float **temp = (float **) malloc(inHeight * sizeof(float *)); + temp[0] = (float *) malloc(inHeight * inWidth * sizeof(float)); + memcpy(temp[0], data, inHeight * inWidth * sizeof(float)); + for (size_t i = 0; i < inWidth; i++) out[i] = data + (inHeight * i); + for (size_t i = 1; i < inHeight; i++) temp[i] = temp[0] + (inWidth * i); + + /* + for (size_t y = 0; y < inHeight; ++y) + for (size_t x = 0; x < inWidth; ++x) + out[x][y] = temp[y][x]; + */ + + for (size_t yBlock = 0; yBlock < inHeight; yBlock += cacheBlockSize) + for (size_t xBlock = 0; xBlock < inWidth; xBlock += cacheBlockSize) + for (size_t y = yBlock, yEnd = min_size(yBlock + cacheBlockSize, inHeight); y < yEnd; y++) + for (size_t x = xBlock, xEnd = min_size(xBlock + cacheBlockSize, inWidth); x < xEnd; x++) + { + out[x][y] = temp[y][x]; + } + + free(out); + free(temp[0]); + free(temp); +} + +static void +cdf_inq_dimIds(stream_t *streamptr, int varId, int (*outDimIds)[4]) +{ + int vlistID = streamptr->vlistID; + int gridId = vlistInqVarGrid(vlistID, varId); + int gridindex = vlistGridIndex(vlistID, gridId); + const int *ncIDs = streamptr->ncgrid[gridindex].ncIDs; + + switch (gridInqType(gridId)) + { + case GRID_TRAJECTORY: cdfReadGridTraj(streamptr, gridId); break; + case GRID_UNSTRUCTURED: + (*outDimIds)[0] = ncIDs[CDF_DIMID_X]; + (*outDimIds)[3] = ncIDs[CDF_DIMID_E]; // used only for cube_sphere grids + if ((*outDimIds)[3] != CDI_UNDEFID) (*outDimIds)[1] = ncIDs[CDF_DIMID_Y]; // used only for cube_sphere grids + break; + case GRID_GAUSSIAN_REDUCED: (*outDimIds)[0] = ncIDs[CDF_DIMID_X]; break; + default: + (*outDimIds)[0] = ncIDs[CDF_DIMID_X]; + (*outDimIds)[1] = ncIDs[CDF_DIMID_Y]; + break; + } + + int zaxisID = vlistInqVarZaxis(vlistID, varId); + int zaxisindex = vlistZaxisIndex(vlistID, zaxisID); + (*outDimIds)[2] = streamptr->zaxisID[zaxisindex]; +} + +static size_t +stream_inq_dimlen(stream_t *streamptr, int dimid) +{ + int ndims = streamptr->ncNumDims; + int *ncdimid = streamptr->ncDimID; + size_t *ncdimlen = streamptr->ncDimLen; + for (int i = 0; i < ndims; ++i) + { + if (dimid == ncdimid[i]) return ncdimlen[i]; + } + + size_t size = 0; + int fileId = streamptr->fileID; + cdf_inq_dimlen(fileId, dimid, &size); + return size; +} + +static int +stream_get_skip_dim(stream_t *streamptr, int ncvarid, int dimIds[3]) +{ + if (dimIds[0] != CDI_UNDEFID || dimIds[1] != CDI_UNDEFID) return 0; + + int fileId = streamptr->fileID; + int nvdims; + cdf_inq_varndims(fileId, ncvarid, &nvdims); + if (nvdims != 3) return 0; + + int varDimIds[3] = { -1, -1, -1 }; + cdf_inq_vardimid(fileId, ncvarid, varDimIds); + + if (dimIds[2] == varDimIds[2]) + { + if (stream_inq_dimlen(streamptr, varDimIds[1]) == 1) return 1; + } + else if (dimIds[2] == varDimIds[1]) + { + if (stream_inq_dimlen(streamptr, varDimIds[2]) == 1) return 2; + } + + return 0; +} + +enum +{ + cdfSliceNDim = MAX_DIMENSIONS +}; + +static void +cdfGetSliceSlapDescription(stream_t *streamptr, int varID, int levelID, bool *outSwapXY, size_t start[cdfSliceNDim], + size_t count[cdfSliceNDim]) +{ + int tsID = streamptr->curTsID; + int fileId = streamptr->fileID; + int vlistID = streamptr->vlistID; + int ncvarid = streamptr->vars[varID].ncvarid; + size_t ncStepIndex = (size_t) streamptr->tsteps[tsID].ncStepIndex; + + int gridId = vlistInqVarGrid(vlistID, varID); + int timetype = vlistInqVarTimetype(vlistID, varID); + size_t gridsize = gridInqSize(gridId); + + streamptr->numvals += gridsize; + + int dimIds[4] = { -1, -1, -1, -1 }; // this array joins the old variables xid, yid, and zid + cdf_inq_dimIds(streamptr, varID, &dimIds); + + int skipdim = stream_get_skip_dim(streamptr, ncvarid, dimIds); + + int dimorder[4] = { 3, 4, 2, 1 }; // order of cube sphere grid + if (dimIds[3] == CDI_UNDEFID) + { + int tmpdimorder[3]; + vlistInqVarDimorder(vlistID, varID, tmpdimorder); + for (int i = 0; i < 3; ++i) dimorder[i] = tmpdimorder[i]; + dimorder[3] = 4; + *outSwapXY = ((dimorder[2] == 2 || dimorder[0] == 1) && (dimIds[0] != CDI_UNDEFID) && (dimIds[1] != CDI_UNDEFID)); + } + + int ndims = 0; + +#define addDimension(startIndex, extent) \ + do \ + { \ + start[ndims] = startIndex; \ + count[ndims] = extent; \ + ndims++; \ + } \ + while (0) + + if (timetype != TIME_CONSTANT) addDimension(ncStepIndex, 1); + if (skipdim == 1) addDimension(0, 1); + + int gridindex = vlistGridIndex(vlistID, gridId); + const ncgrid_t *ncGrid = &streamptr->ncgrid[gridindex]; + bool readPart = (ncGrid->gridID == gridId && ncGrid->start != -1 && ncGrid->count != -1); + + for (int id = 0; id < 4; ++id) + { + int curDimId = dimIds[dimorder[id] - 1]; + if (curDimId == CDI_UNDEFID) continue; + switch (dimorder[id]) + { + case 1: + case 2: + case 4: + if (readPart && curDimId == dimIds[0]) + addDimension(ncGrid->start, ncGrid->count); + else + addDimension(0, stream_inq_dimlen(streamptr, curDimId)); + break; + case 3: addDimension((size_t) levelID, 1); break; + default: Error("Internal errror: Malformed dimension order encountered. Please report this bug."); + } + } + + if (skipdim == 2) addDimension(0, 1); + + assert(ndims <= cdfSliceNDim); + +#undef addDimension + + if (CDI_Debug) + for (int idim = 0; idim < ndims; ++idim) Message("dim = %d start = %zu count = %zu", idim, start[idim], count[idim]); + + int nvdims; + cdf_inq_varndims(fileId, ncvarid, &nvdims); + + if (nvdims != ndims) + { + char name[CDI_MAX_NAME]; + vlistInqVarName(vlistID, varID, name); + Error("Internal error, variable %s has an unsupported array structure!", name); + } +} + +static size_t +getSizeVar3D(int vlistID, int varID) +{ + int gridID = vlistInqVarGrid(vlistID, varID); + int zaxisID = vlistInqVarZaxis(vlistID, varID); + return gridInqSize(gridID) * (size_t) zaxisInqSize(zaxisID); +} + +static void +cdfReadDataSliceSP2DP(int fileID, int ncvarid, size_t length, size_t start[MAX_DIMENSIONS], size_t count[MAX_DIMENSIONS], + double *data) +{ + float *data_fp = (float *) Malloc(length * sizeof(*data_fp)); + cdf_get_vara_float(fileID, ncvarid, start, count, data_fp); + for (size_t i = 0; i < length; ++i) data[i] = (double) data_fp[i]; + Free(data_fp); +} + +static void +cdfReadDataSliceDP2SP(int fileID, int ncvarid, size_t length, size_t start[MAX_DIMENSIONS], size_t count[MAX_DIMENSIONS], + float *data) +{ + double *data_dp = (double *) Malloc(length * sizeof(*data_dp)); + cdf_get_vara_double(fileID, ncvarid, start, count, data_dp); + for (size_t i = 0; i < length; ++i) data[i] = (float) data_dp[i]; + Free(data_dp); +} + +static void +cdfCheckDataDP_UINT8(int fileID, int ncvarid, int vlistID, int varID, size_t length, double *data) +{ + if (vlistInqVarDatatype(vlistID, varID) == CDI_DATATYPE_UINT8) + { + nc_type xtype; + cdf_inq_vartype(fileID, ncvarid, &xtype); + if (xtype == NC_BYTE) + { + for (size_t i = 0; i < length; ++i) + if (data[i] < 0) data[i] += 256; + } + } +} + +static void +cdfCheckDataSP_UINT8(int fileID, int ncvarid, int vlistID, int varID, size_t length, float *data) +{ + if (vlistInqVarDatatype(vlistID, varID) == CDI_DATATYPE_UINT8) + { + nc_type xtype; + cdf_inq_vartype(fileID, ncvarid, &xtype); + if (xtype == NC_BYTE) + { + for (size_t i = 0; i < length; ++i) + if (data[i] < 0) data[i] += 256; + } + } +} + +static void +cdfReadDataDP(stream_t *streamptr, int varID, size_t length, size_t start[MAX_DIMENSIONS], size_t count[MAX_DIMENSIONS], + double *data) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int ncvarid = streamptr->vars[varID].ncvarid; + int datatype = vlistInqVarDatatype(vlistID, varID); + + if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) + { + cdf_get_vara(fileID, ncvarid, start, count, data); + if (datatype == CDI_DATATYPE_CPX32) + { + for (long i = (long) length - 1; i >= 0; --i) + { + data[2 * i] = (double) (((float *) data)[2 * i]); + data[2 * i + 1] = (double) (((float *) data)[2 * i + 1]); + } + } + } + else + { + if (datatype == CDI_DATATYPE_FLT32) + { + cdfReadDataSliceSP2DP(fileID, ncvarid, length, start, count, data); + } + else + { + cdf_get_vara_double(fileID, ncvarid, start, count, data); + + cdfCheckDataDP_UINT8(fileID, ncvarid, vlistID, varID, length, data); + } + } +} + +static void +cdfReadDataSP(stream_t *streamptr, int varID, size_t length, size_t start[MAX_DIMENSIONS], size_t count[MAX_DIMENSIONS], + float *data) +{ + int vlistID = streamptr->vlistID; + int fileID = streamptr->fileID; + int ncvarid = streamptr->vars[varID].ncvarid; + int datatype = vlistInqVarDatatype(vlistID, varID); + + if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) + { + if (datatype == CDI_DATATYPE_CPX64) + { + double *cdata = (double *) Malloc(2 * length * sizeof(double)); + cdf_get_vara(fileID, ncvarid, start, count, cdata); + for (size_t i = 0; i < length; ++i) + { + data[2 * i] = (float) (cdata[2 * i]); + data[2 * i + 1] = (float) (cdata[2 * i + 1]); + } + Free(cdata); + } + else + { + cdf_get_vara(fileID, ncvarid, start, count, data); + } + } + else + { + if (datatype == CDI_DATATYPE_FLT64) + { + cdfReadDataSliceDP2SP(fileID, ncvarid, length, start, count, data); + } + else + { + cdf_get_vara_float(fileID, ncvarid, start, count, data); + + cdfCheckDataSP_UINT8(fileID, ncvarid, vlistID, varID, length, data); + } + } +} + +static void +cdfReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + + size_t start[MAX_DIMENSIONS], count[MAX_DIMENSIONS]; + cdfGetSlapDescription(streamptr, varID, &start, &count); + + size_t length = getSizeVar3D(vlistID, varID); + cdfReadDataDP(streamptr, varID, length, start, count, data); + + *nmiss = cdfDoInputDataTransformationDP(vlistID, varID, length, data); +} + +static void +cdfReadVarSP(stream_t *streamptr, int varID, float *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + + size_t start[MAX_DIMENSIONS], count[MAX_DIMENSIONS]; + cdfGetSlapDescription(streamptr, varID, &start, &count); + + size_t length = getSizeVar3D(vlistID, varID); + cdfReadDataSP(streamptr, varID, length, start, count, data); + + *nmiss = cdfDoInputDataTransformationSP(vlistID, varID, length, data); +} + +void +cdf_read_var(stream_t *streamptr, int varID, int memtype, void *data, size_t *nmiss) +{ + if (memtype == MEMTYPE_DOUBLE) + cdfReadVarDP(streamptr, varID, (double *) data, nmiss); + else + cdfReadVarSP(streamptr, varID, (float *) data, nmiss); +} + +static void +cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d levelID = %d", streamptr->self, varID, levelID); + + bool swapxy = false; + size_t start[cdfSliceNDim], count[cdfSliceNDim]; + cdfGetSliceSlapDescription(streamptr, varID, levelID, &swapxy, start, count); + + int vlistID = streamptr->vlistID; + int gridId = vlistInqVarGrid(vlistID, varID); + size_t length = gridInqSize(gridId); + cdfReadDataDP(streamptr, varID, length, start, count, data); + + if (swapxy) transpose2dArrayDP(gridId, data); + + *nmiss = cdfDoInputDataTransformationDP(vlistID, varID, length, data); +} + +static void +cdfReadVarSliceSP(stream_t *streamptr, int varID, int levelID, float *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d varID = %d levelID = %d", streamptr->self, varID, levelID); + + bool swapxy = false; + size_t start[cdfSliceNDim], count[cdfSliceNDim]; + cdfGetSliceSlapDescription(streamptr, varID, levelID, &swapxy, start, count); + + int vlistID = streamptr->vlistID; + int gridId = vlistInqVarGrid(vlistID, varID); + size_t length = gridInqSize(gridId); + cdfReadDataSP(streamptr, varID, length, start, count, data); + + if (swapxy) transpose2dArraySP(gridId, data); + + *nmiss = cdfDoInputDataTransformationSP(vlistID, varID, length, data); +} + +void +cdf_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, size_t *nmiss) +{ + if (memtype == MEMTYPE_DOUBLE) + cdfReadVarSliceDP(streamptr, varID, levelID, (double *) data, nmiss); + else + cdfReadVarSliceSP(streamptr, varID, levelID, (float *) data, nmiss); +} + +void +cdf_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss) +{ + if (CDI_Debug) Message("streamID = %d", streamptr->self); + + int tsID = streamptr->curTsID; + int vrecID = streamptr->tsteps[tsID].curRecID; + int recID = streamptr->tsteps[tsID].recIDs[vrecID]; + int varID = streamptr->tsteps[tsID].records[recID].varID; + int levelID = streamptr->tsteps[tsID].records[recID].levelID; + + if (memtype == MEMTYPE_DOUBLE) + cdfReadVarSliceDP(streamptr, varID, levelID, (double *) data, nmiss); + else + cdfReadVarSliceSP(streamptr, varID, levelID, (float *) data, nmiss); +} + +//---------------------------------------------------------------------------- +// Parallel Version +//---------------------------------------------------------------------------- + +void +cdfReadVarSliceDPPart(stream_t *streamptr, int varID, int levelID, int varType, int startpoint, size_t length, double *data, + size_t *nmiss) +{ + (void) (varType); + + if (CDI_Debug) Message("streamID = %d varID = %d levelID = %d", streamptr->self, varID, levelID); + + int vlistID = streamptr->vlistID; + + bool swapxy = false; + size_t start[cdfSliceNDim], count[cdfSliceNDim]; + cdfGetSliceSlapDescription(streamptr, varID, levelID, &swapxy, start, count); + + int gridId = vlistInqVarGrid(vlistID, varID); + size_t gridsize = gridInqSize(gridId); + + unsigned int position = 0; + for (int i = 0; i < MAX_DIMENSIONS; ++i) + if (count[i] == gridsize) position = i; + + start[position] = start[position] + startpoint; + count[position] = length; + + cdfReadDataDP(streamptr, varID, length, start, count, data); + + if (swapxy) transpose2dArrayDP(gridId, data); + + *nmiss = cdfDoInputDataTransformationDP(vlistID, varID, length, data); +} + +void +cdfReadVarSliceSPPart(stream_t *streamptr, int varID, int levelID, int varType, int startpoint, size_t length, float *data, + size_t *nmiss) +{ + (void) (varType); + + if (CDI_Debug) Message("streamID = %d varID = %d levelID = %d", streamptr->self, varID, levelID); + + int vlistID = streamptr->vlistID; + + bool swapxy = false; + size_t start[cdfSliceNDim], count[cdfSliceNDim]; + cdfGetSliceSlapDescription(streamptr, varID, levelID, &swapxy, start, count); + + int gridId = vlistInqVarGrid(vlistID, varID); + size_t gridsize = gridInqSize(gridId); + + unsigned int position = 0; + for (int i = 0; i < MAX_DIMENSIONS; ++i) + if (count[i] == gridsize) position = i; + + start[position] = start[position] + startpoint; + count[position] = length; + + cdfReadDataSP(streamptr, varID, length, start, count, data); + + if (swapxy) transpose2dArraySP(gridId, data); + + *nmiss = cdfDoInputDataTransformationSP(vlistID, varID, length, data); +} + +static int +cdiStreamReadVarSlicePart(int streamID, int varID, int levelID, int varType, int start, size_t size, int memtype, void *data, + size_t *nmiss) +{ + int status = 0; + + if (CDI_Debug) Message("streamID = %d varID = %d", streamID, varID); + + check_parg(data); + check_parg(nmiss); + + stream_t *streamptr = stream_to_pointer(streamID); + int filetype = streamptr->filetype; + + *nmiss = 0; + + // currently we only care for netcdf data + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: + { + grb_read_var_slice(streamptr, varID, levelID, memtype, data, nmiss); + break; + } +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: + { + if (memtype == MEMTYPE_FLOAT) + cdfReadVarSliceSPPart(streamptr, varID, levelID, varType, start, size, (float *) data, nmiss); + else + cdfReadVarSliceDPPart(streamptr, varID, levelID, varType, start, size, (double *) data, nmiss); + break; + } +#endif + default: + { + Error("%s support not compiled in!", strfiletype(filetype)); + status = 2; + break; + } + } + + return status; +} + +void +cdfReadVarDPPart(stream_t *streamptr, int varID, int varType, int startpoint, size_t length, double *data, size_t *nmiss) +{ + (void) (varType); + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + int ncvarid = streamptr->vars[varID].ncvarid; + + size_t start[MAX_DIMENSIONS], count[MAX_DIMENSIONS]; + cdfGetSlapDescription(streamptr, varID, &start, &count); + + int ltime = (TIME_CONSTANT != vlistInqVarTimetype(vlistID, varID)); + start[1 + ltime] = start[1 + ltime] + startpoint; + count[1 + ltime] = length; + + cdf_get_vara_double(streamptr->fileID, ncvarid, start, count, data); + + *nmiss = cdfDoInputDataTransformationDP(vlistID, varID, length, data); +} + +void +cdfReadVarSPPart(stream_t *streamptr, int varID, int varType, int startpoint, size_t length, float *data, size_t *nmiss) +{ + (void) (varType); + if (CDI_Debug) Message("streamID = %d varID = %d", streamptr->self, varID); + + int vlistID = streamptr->vlistID; + int ncvarid = streamptr->vars[varID].ncvarid; + + size_t start[MAX_DIMENSIONS], count[MAX_DIMENSIONS]; + cdfGetSlapDescription(streamptr, varID, &start, &count); + + int ltime = (TIME_CONSTANT != vlistInqVarTimetype(vlistID, varID)); + start[1 + ltime] = start[1 + ltime] + startpoint; + count[1 + ltime] = length; + + cdf_get_vara_float(streamptr->fileID, ncvarid, start, count, data); + + *nmiss = cdfDoInputDataTransformationSP(vlistID, varID, length, data); +} + +static void +cdiStreamReadVarPart(int streamID, int varID, int varType, int start, size_t size, int memtype, void *data, size_t *nmiss) +{ + (void) (varType); + if (CDI_Debug) Message("streamID = %d varID = %d", streamID, varID); + + check_parg(data); + check_parg(nmiss); + + stream_t *streamptr = stream_to_pointer(streamID); + int filetype = streamptr->filetype; + + *nmiss = 0; + + // currently we only care for netcdf data + switch (cdiBaseFiletype(filetype)) + { +#ifdef HAVE_LIBGRIB + case CDI_FILETYPE_GRB: + case CDI_FILETYPE_GRB2: + { + grb_read_var(streamptr, varID, memtype, data, nmiss); + break; + } +#endif +#ifdef HAVE_LIBNETCDF + case CDI_FILETYPE_NETCDF: + { + if (memtype == MEMTYPE_FLOAT) + cdfReadVarSPPart(streamptr, varID, varType, start, size, (float *) data, nmiss); + else + cdfReadVarDPPart(streamptr, varID, varType, start, size, (double *) data, nmiss); + + break; + } +#endif + default: + { + Error("%s support not compiled in!", strfiletype(filetype)); + break; + } + } +} + +void +streamReadVarSlicePart(int streamID, int varID, int levelID, int varType, int start, SizeType size, void *data, SizeType *nmiss, + int memtype) +{ + size_t numMiss = 0; + if (cdiStreamReadVarSlicePart(streamID, varID, levelID, varType, start, size, memtype, data, &numMiss)) + { + Error("Unexpected error returned from cdiStreamReadVarSlicePart()!"); + } + *nmiss = (SizeType) numMiss; +} + +void +streamReadVarPart(int streamID, int varID, int varType, int start, SizeType size, void *data, SizeType *nmiss, int memtype) +{ + size_t numMiss = 0; + cdiStreamReadVarPart(streamID, varID, varType, start, size, memtype, data, &numMiss); + *nmiss = (SizeType) numMiss; +} + +#endif /* HAVE_LIBNETCDF */ +/* Subroutines and data structures for storing "subtypes". */ +/* */ +/* A subtype is, for example, a list of TILES. This can be interpreted */ +/* as an additional axis like the vertical axis. */ +/* */ +/* @author 02/2015 F. Prill, DWD */ +/* */ +/* DATA LAYOUT: */ +/* */ +/* A subtype contains several "subtype entries", each of which */ +/* contains a linked list of subtype attributes. */ +/* */ +/* The number of subtype entries is not specified in advance, but the */ +/* list of entries is itself dynamically growing. There is no */ +/* guaranteed ordering of the entries, therefore each entry must be */ +/* identifiable by its attributes. */ +/* */ +/* [subtype_t] */ +/* | */ +/* |------- globals [subtype_entry_t] */ +/* | |--- atts [subtype_attr_t] */ +/* | */ +/* |------- entries */ +/* |- entry #0 */ +/* | |--- atts [subtype_attr_t] */ +/* |- entry #1 */ +/* | |--- atts [subtype_attr_t] */ +/* |- entry #2 */ +/* . |--- atts [subtype_attr_t] */ +/* . */ + + +/* Literal constants corresponding to the different subtypes of the + enumeration "subtype_kind". */ +static const char *subtypeName[] = { "tileset" }; + +const char *const cdiSubtypeAttributeName[] = { "tileIndex", "totalNumberOfTileAttributePairs", "tileClassification", + "numberOfTiles", "numberOfTileAttributes", "tileAttribute" }; + +/* prototypes: */ +static int subtypeCompareP(subtype_t *z1, subtype_t *z2); +static void subtypeDestroyP(void *subtype_ptr); +static void subtypePrintP(void *subtype_ptr, FILE *fp); +static int subtypeGetPackSize(void *subtype_ptr, void *context); +static void subtypePack(void *subtype_ptr, void *buffer, int size, int *pos, void *context); +static int subtypeTxCode(void *subtype_ptr); + +static const resOps subtypeOps = { (int (*)(void *, void *)) subtypeCompareP, + (void (*)(void *)) subtypeDestroyP, + (void (*)(void *, FILE *)) subtypePrintP, + (int (*)(void *, void *)) subtypeGetPackSize, + subtypePack, + subtypeTxCode }; + +enum +{ + differ = 1, +}; + +/* ------------------------------------------------------------------- */ +/* SUBROUTINES FOR ATTRIBUTE LISTS */ +/* ------------------------------------------------------------------- */ + +static int +attribute_to_index(const char *key) +{ + if (key == NULL) Error("Internal error!"); + for (int i = 0; i < nSubtypeAttributes; i++) + if (str_is_equal(key, cdiSubtypeAttributeName[i])) return i; + return -1; +} + +/* + @Function subtypeAttrNewList + @Title Create new linked list of subtype attributes. + @EndFunction +*/ +static struct subtype_attr_t * +subtypeAttrNewList(struct subtype_entry_t *head, int key, int val) +{ + if (head == NULL) Error("Internal error!"); + struct subtype_attr_t *ptr = (struct subtype_attr_t *) Malloc(sizeof(struct subtype_attr_t)); + if (NULL == ptr) Error("Node creation failed"); + ptr->key = key; + ptr->val = val; + ptr->next = NULL; + + head->atts = ptr; + return ptr; +} + +/* + @Function subtypeAttrInsert + + @Title Add subtype attribute to linked list, s.t. the result is a + smallest-to-largest ordered list. + @EndFunction +*/ +static struct subtype_attr_t * +subtypeAttrInsert(struct subtype_entry_t *head, int key, int val) +{ + if (head == NULL) Error("Internal error!"); + if (head->atts == NULL) return (subtypeAttrNewList(head, key, val)); + + /* create new attribute */ + struct subtype_attr_t *ptr = (struct subtype_attr_t *) Malloc(sizeof(struct subtype_attr_t)); + if (NULL == ptr) Error("Node creation failed"); + + ptr->key = key; + ptr->val = val; + ptr->next = NULL; + + /* find the right place for insertion: */ + if (head->atts->key >= key) + { + /* insert at position 0 */ + ptr->next = head->atts; + head->atts = ptr; + } + else + { + struct subtype_attr_t **predec = &head->atts; + while (((*predec)->next != NULL) && ((*predec)->next->key < key)) + { + predec = &((*predec)->next); + } + ptr->next = (*predec)->next; + (*predec)->next = ptr; + } + return ptr; +} + +/* Recursively free a linked list with attributes. */ +static void +subtypeAttrDestroy(struct subtype_attr_t *head) +{ + if (head == NULL) return; + subtypeAttrDestroy(head->next); + Free(head); + head = NULL; +} + +/* Find an attribute in linked list by its key or return NULL + otherwise. */ +static struct subtype_attr_t * +subtypeAttrFind(struct subtype_attr_t *head, int key) +{ + if (head == NULL) + return NULL; + else if (head->key == key) + return head; + else + return subtypeAttrFind(head->next, key); +} + +/* Recursively compares two subtype attribute lists under the implicit + assumptions that both lists are ordered by their keys and that keys + are unique. */ +static int +subtypeAttsCompare(struct subtype_attr_t *a1, struct subtype_attr_t *a2) +{ + if ((a1 == NULL) && (a2 == NULL)) + return 0; + else if ((a1 == NULL) && (a2 != NULL)) + { + return differ; + } + else if ((a1 != NULL) && (a2 == NULL)) + { + return differ; + } + + if (a1->key != a2->key) + { + return differ; + } + if (a1->val != a2->val) return differ; + + return subtypeAttsCompare(a1->next, a2->next); +} + +/* (Recursively) duplicate linked list of attributes. */ +static void +subtypeAttsDuplicate(struct subtype_attr_t *a1, struct subtype_entry_t *dst) +{ + if (a1 == NULL) return; + /* duplicate "a1->key", "a1->val" */ + subtypeAttsDuplicate(a1->next, dst); + (void) subtypeAttrInsert(dst, a1->key, a1->val); +} + +/* ------------------------------------------------------------------- */ +/* SUBROUTINES FOR LIST OF ENTRIES */ +/* ------------------------------------------------------------------- */ + +/* + @Function subtypeEntryNewList + @Title Create new linked list of subtype entries. + @EndFunction +*/ +static struct subtype_entry_t * +subtypeEntryNewList(subtype_t *head) +{ + struct subtype_entry_t *ptr = (struct subtype_entry_t *) Malloc(sizeof(struct subtype_entry_t)); + if (NULL == ptr) Error("Node creation failed"); + ptr->atts = NULL; + ptr->next = NULL; + head->entries = ptr; + head->nentries = 0; + ptr->self = head->nentries++; + return ptr; +} + +/* + @Function subtypeEntryInsert + + @Title Add subtype entry to the head of a linked list. + @EndFunction +*/ +struct subtype_entry_t * +subtypeEntryInsert(subtype_t *head) +{ + if (head == NULL) Error("Internal error!"); + if (head->entries == NULL) return (subtypeEntryNewList(head)); + + /* create new entry */ + struct subtype_entry_t *ptr = (struct subtype_entry_t *) Malloc(sizeof(struct subtype_entry_t)); + if (NULL == ptr) Error("Node creation failed"); + + ptr->atts = NULL; + ptr->self = head->nentries++; + + /* find the right place for insertion: */ + if (head->entries->self >= ptr->self) + { + /* insert at position 0 */ + ptr->next = head->entries; + head->entries = ptr; + } + else + { + struct subtype_entry_t **predec = &head->entries; + while (((*predec)->next != NULL) && ((*predec)->next->self < ptr->self)) + { + predec = &((*predec)->next); + } + ptr->next = (*predec)->next; + (*predec)->next = ptr; + } + return ptr; +} + +/* + @Function subtypeEntryAppend + + @Title Append subtype entry to the end of a linked list. + @EndFunction +*/ +static struct subtype_entry_t * +subtypeEntryAppend(subtype_t *head) +{ + if (head == NULL) Error("Internal error!"); + if (head->entries == NULL) return (subtypeEntryNewList(head)); + + /* create new entry */ + struct subtype_entry_t *ptr = (struct subtype_entry_t *) Malloc(sizeof(struct subtype_entry_t)); + if (NULL == ptr) Error("Node creation failed"); + + ptr->atts = NULL; + ptr->next = NULL; + ptr->self = head->nentries++; + + /* find last position of linked list */ + struct subtype_entry_t *prec_ptr = head->entries; + while (prec_ptr->next != NULL) prec_ptr = prec_ptr->next; + + prec_ptr->next = ptr; + return ptr; +} + +/* Recursively free a list of subtype entries. */ +static void +subtypeEntryDestroy(struct subtype_entry_t *entry) +{ + if (entry == NULL) return; + subtypeEntryDestroy(entry->next); + subtypeAttrDestroy(entry->atts); + Free(entry); + entry = NULL; +} + +/* Compares two subtype entries. */ +static int +subtypeEntryCompare(struct subtype_entry_t *e1, struct subtype_entry_t *e2) +{ + if (e1 == NULL) Error("Internal error!"); + if (e2 == NULL) Error("Internal error!"); + return (e1->self == e2->self) && subtypeAttsCompare(e1->atts, e2->atts); +} + +/* (Recursively) duplicate list of entries. */ +static void +subtypeEntryDuplicate(struct subtype_entry_t *a1, subtype_t *dst) +{ + if (a1 == NULL) return; + /* append entry to dst pointer */ + struct subtype_entry_t *ptr = subtypeEntryAppend(dst); + /* duplicate attributes */ + subtypeAttsDuplicate(a1->atts, ptr); + ptr->self = a1->self; + /* call next link in linked list */ + subtypeEntryDuplicate(a1->next, dst); +} + +/* ------------------------------------------------------------------- */ +/* SUBROUTINES FOR THE SUBTYPE ITSELF */ +/* ------------------------------------------------------------------- */ + +/* Print-out subtype data structure together with its attributes. */ +static void +subtypePrintKernel(subtype_t *subtype_ptr, FILE *fp) +{ + if (subtype_ptr == NULL) Error("Internal error!"); + fprintf(fp, "# %s (subtype ID %d)\n", subtypeName[subtype_ptr->subtype], subtype_ptr->self); + /* print global attributes of this subtype */ + struct subtype_attr_t *ptr = subtype_ptr->globals.atts; + if (ptr != NULL) fprintf(fp, "#\n# global attributes:\n"); + while (ptr != NULL) + { + fprintf(fp, "# %-40s (%2d) : %d\n", cdiSubtypeAttributeName[ptr->key], ptr->key, ptr->val); + ptr = ptr->next; + } + /* print attributes for each subtype */ + fprintf(fp, "# %d local entries:\n", subtype_ptr->nentries); + struct subtype_entry_t *entry = subtype_ptr->entries; + while (entry != NULL) + { + fprintf(fp, "# subtype entry %d\n", entry->self); + ptr = entry->atts; + if (ptr != NULL) fprintf(fp, "# attributes:\n"); + while (ptr != NULL) + { + fprintf(fp, "# %-40s (%2d) : %d\n", cdiSubtypeAttributeName[ptr->key], ptr->key, ptr->val); + ptr = ptr->next; + } + entry = entry->next; + } + fprintf(fp, "\n"); +} + +/* Compares two subtype data structures. Pointer version of this + method. */ +static int +subtypeCompareP(subtype_t *s1, subtype_t *s2) +{ + xassert(s1 && s2); + if (s1->subtype != s2->subtype) return differ; + if (subtypeEntryCompare(&s1->globals, &s2->globals) != 0) return differ; + + struct subtype_entry_t *entry1 = s1->entries; + struct subtype_entry_t *entry2 = s2->entries; + while ((entry1 != NULL) && (entry2 != NULL)) + { + if (subtypeEntryCompare(entry1, entry2) != 0) return differ; + entry1 = entry1->next; + entry2 = entry2->next; + } + /* compare list lengths: */ + if ((entry1 != NULL) || (entry2 != NULL)) return differ; + return 0; +} + +/* Clean up data structure. */ +static void +subtypeDestroyP(void *ptr) +{ + subtype_t *subtype_ptr = (subtype_t *) ptr; + /* destroy global attributes */ + subtypeAttrDestroy(subtype_ptr->globals.atts); + /* destroy list of subtype entries */ + subtypeEntryDestroy(subtype_ptr->entries); + subtype_ptr->entries = NULL; + Free(subtype_ptr); + subtype_ptr = NULL; +} + +/* Non-static wrapper function for "subtypeDestroyP". */ +void +subtypeDestroyPtr(void *ptr) +{ + subtypeDestroyP(ptr); +} + +/* Non-static wrapper function for "subtypeCompareP". */ +int +subtypeComparePtr(int s1_ID, subtype_t *s2) +{ + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(s1_ID, &subtypeOps); + if (subtype_ptr == NULL) Error("Internal error"); + return subtypeCompareP(subtype_ptr, s2); +} + +/* Print-out subtype data structure together with its attributes. + Pointer version of this method. */ +static void +subtypePrintP(void *subtype_ptr, FILE *fp) +{ + subtypePrintKernel((subtype_t *) subtype_ptr, fp); +} + +/* Print-out subtype data structure together with its attributes. */ +void +subtypePrintPtr(subtype_t *subtype_ptr) +{ + subtypePrintKernel(subtype_ptr, stdout); +} + +/* Fill subtype data structure with default values. */ +static void +subtypeDefaultValue(subtype_t *subtype_ptr) +{ + if (subtype_ptr == NULL) Error("Internal error!"); + subtype_ptr->self = CDI_UNDEFID; + subtype_ptr->nentries = 0; + subtype_ptr->entries = NULL; + subtype_ptr->globals.atts = NULL; + subtype_ptr->globals.next = NULL; + subtype_ptr->globals.self = -1; + subtype_ptr->active_subtype_index = 0; +} + +void +subtypeAllocate(subtype_t **subtype_ptr2, int subtype) +{ + /* allocate new subtype */ + (*subtype_ptr2) = (subtype_t *) Malloc(sizeof(subtype_t)); + subtype_t *subtype_ptr = *subtype_ptr2; + subtypeDefaultValue(subtype_ptr); + subtype_ptr->subtype = subtype; + subtype_ptr->self = CDI_UNDEFID; +} + +/* Create a copy of an existing subtype data structure. */ +void +subtypeDuplicate(subtype_t *subtype_ptr, subtype_t **dst_ptr) +{ + if (subtype_ptr == NULL) Error("Internal error!"); + subtypeAllocate(dst_ptr, subtype_ptr->subtype); + subtype_t *dst = (*dst_ptr); + /* create duplicate of subtype globals */ + subtypeAttsDuplicate(subtype_ptr->globals.atts, &dst->globals); + dst->globals.self = subtype_ptr->globals.self; + /* create duplicate of subtype entries */ + subtypeEntryDuplicate(subtype_ptr->entries, dst); +} + +/* Register subtype object at resource handler. */ +int +subtypePush(subtype_t *subtype_ptr) +{ + if (subtype_ptr == NULL) Error("Internal error!"); + subtype_ptr->self = reshPut(subtype_ptr, &subtypeOps); + return subtype_ptr->self; /* subtypeID */ +} + +/* Sets an attribute for a subtype (for example a set of TILES). If + the attribute has already been defined, then its value is + overwritten. */ +void +subtypeDefGlobalDataP(subtype_t *subtype_ptr, int key, int val) +{ + if (subtype_ptr == NULL) Error("Internal error!"); + /* find entry in linked list or append otherwise */ + struct subtype_attr_t *att_ptr = subtypeAttrFind(subtype_ptr->globals.atts, key); + if (att_ptr == NULL) + subtypeAttrInsert(&subtype_ptr->globals, key, val); + else + att_ptr->val = val; +} + +/* Sets an attribute for a subtype (for example a set of TILES). If + the attribute has already been defined, then its value is + overwritten. */ +void +subtypeDefGlobalData(int subtypeID, int key, int val) +{ + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(subtypeID, &subtypeOps); + subtypeDefGlobalDataP(subtype_ptr, key, val); +} + +/* Retrieves an attribute for a subtype (for example a set of TILES). + If the attribute has not been defined, then return -1. */ +int +subtypeGetGlobalDataP(subtype_t *subtype_ptr, int key) +{ + if (subtype_ptr == NULL) Error("Internal error!"); + /* find entry in linked list */ + struct subtype_attr_t *att_ptr = subtypeAttrFind(subtype_ptr->globals.atts, key); + if (att_ptr == NULL) + return -1; + else + return att_ptr->val; +} + +/* Retrieves an attribute for a subtype (for example a set of TILES) . + If the attribute has not been defined, then return -1. */ +int +subtypeGetGlobalData(int subtypeID, int key) +{ + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(subtypeID, &subtypeOps); + return subtypeGetGlobalDataP(subtype_ptr, key); +} + +/* Sets an attribute for a single subtype entry (e.g. a single TILE). + If the attribute has already been defined, then its value is + overwritten. */ +void +subtypeDefEntryDataP(struct subtype_entry_t *subtype_entry_ptr, int key, int val) +{ + if (subtype_entry_ptr == NULL) Error("Internal error!"); + /* find entry in linked list or append otherwise */ + struct subtype_attr_t *att_ptr = subtypeAttrFind(subtype_entry_ptr->atts, key); + if (att_ptr == NULL) + subtypeAttrInsert(subtype_entry_ptr, key, val); + else + att_ptr->val = val; +} + +/* ------------------------------------------------------------------- */ +/* IMPLEMENTATIONS FOR KEY-VALUE-PAIR QUERIES */ +/* ------------------------------------------------------------------- */ + +/* Generate a "query object" out of a key-value pair. */ +subtype_query_t +keyValuePair(const char *key, int value) +{ + subtype_query_t result; + result.nAND = 1; + result.key_value_pairs[0][0] = attribute_to_index(key); + result.key_value_pairs[1][0] = value; + if (CDI_Debug) Message("key %s matches %d", key, result.key_value_pairs[0][0]); + if (CDI_Debug) Message("%d --?-- %d", result.key_value_pairs[0][0], result.key_value_pairs[1][0]); + return result; +} + +/* Generate an AND-combined "query object" out of two previous query + objects. */ +subtype_query_t +matchAND(subtype_query_t q1, subtype_query_t q2) +{ + if ((q1.nAND + q2.nAND) > MAX_KV_PAIRS_MATCH) Error("Internal error"); + subtype_query_t result; + memset(&result, 0, sizeof(subtype_query_t)); + result.nAND = q1.nAND; + for (int i = 0; i < q1.nAND; i++) + { + result.key_value_pairs[0][i] = q1.key_value_pairs[0][i]; + result.key_value_pairs[1][i] = q1.key_value_pairs[1][i]; + } + for (int i = 0; i < q2.nAND; i++) + { + result.key_value_pairs[0][result.nAND] = q2.key_value_pairs[0][i]; + result.key_value_pairs[1][result.nAND] = q2.key_value_pairs[1][i]; + result.nAND++; + } + + if (CDI_Debug) Message("combined criterion:"); + if (CDI_Debug) + for (int i = 0; i < result.nAND; i++) Message("%d --?-- %d", result.key_value_pairs[0][i], result.key_value_pairs[1][i]); + + return result; +} + +/* ------------------------------------------------------------------- */ +/* SPECIFIC IMPLEMENTATIONS FOR TILE SETS */ +/* ------------------------------------------------------------------- */ + +/* Integrate tile set "s2" into the tile set "subtype1_ID": + + Insert all entries set 2 to set 1 together with its attributes. +*/ +void +tilesetInsertP(subtype_t *s1, subtype_t *s2) +{ + if (s1 == NULL) Error("Internal error!"); + if (s2 == NULL) Error("Internal error!"); + struct subtype_entry_t *entry1 = s1->entries, *entry2 = s2->entries; + struct subtype_attr_t *att_ptr2; + + /* test all entries of set 2 against set 1, to check if entry + already exists: */ + if (subtypeAttsCompare(s1->globals.atts, s2->globals.atts) != differ) + { + while (entry1 != NULL) + { + int found = 1; + entry2 = s2->entries; + while (entry2 != NULL) + { + found &= (subtypeAttsCompare(entry1->atts, entry2->atts) != differ); + entry2 = entry2->next; + } + if (found) + { + return; + } + entry1 = entry1->next; + } + + entry2 = s2->entries; + while (entry2 != NULL) + { + entry1 = subtypeEntryInsert(s1); + + att_ptr2 = entry2->atts; + while (att_ptr2 != NULL) + { + (void) subtypeAttrInsert(entry1, att_ptr2->key, att_ptr2->val); + att_ptr2 = att_ptr2->next; + } + entry2 = entry2->next; + } + } + else + { + fprintf(stderr, "\n# SUBTYPE A:\n"); + subtypePrintKernel(s1, stderr); + fprintf(stderr, "\n# SUBTYPE B:\n"); + subtypePrintKernel(s2, stderr); + Error("Attempting to insert subtype entry into subtype with different global attributes!"); + } +} + +/* ------------------------------------------------------------------- */ +/* IMPLEMENTATIONS FOR ROUTINES VISIBLE THROUGH CDI.H */ +/* ------------------------------------------------------------------- */ + +/* + @Function subtypeCreate + @Title Create a variable subtype + + @Prototype int subtypeCreate(int subtype) + @Parameter + @Item subtype The type of the variable subtype, one of the set of predefined CDI variable subtypes. + The valid CDI variable subtypes are @func{SUBTYPE_TILES} + + @Description + The function @func{subtypeCreate} creates a variable subtype. + + @Result + @func{subtypeCreate} returns an identifier to the variable subtype. + + @EndFunction +*/ +int +subtypeCreate(int subtype) +{ + if (CDI_Debug) Message("subtype: %d ", subtype); + + /* allocate new subtype */ + subtype_t *subtype_ptr; + subtypeAllocate(&subtype_ptr, subtype); + /* register object at resource handler */ + return subtypePush(subtype_ptr); +} + +/* Print-out subtype data structure together with its attributes. */ +void +subtypePrint(int subtypeID) +{ + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(subtypeID, &subtypeOps); + subtypePrintKernel(subtype_ptr, stdout); +} + +/* Compares two subtype data structures. */ +int +subtypeCompare(int subtypeID1, int subtypeID2) +{ + subtype_t *subtype_ptr1 = (subtype_t *) reshGetVal(subtypeID1, &subtypeOps); + subtype_t *subtype_ptr2 = (subtype_t *) reshGetVal(subtypeID2, &subtypeOps); + return subtypeCompareP(subtype_ptr1, subtype_ptr2); +} + +/* Get the size of a subtype (e.g. no. of tiles). */ +int +subtypeInqSize(int subtypeID) +{ + if (subtypeID == CDI_UNDEFID) + { + return 0; + } + else + { + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(subtypeID, &subtypeOps); + return subtype_ptr->nentries; + } +} + +/* Get the currently active index of a subtype (e.g. current tile index). */ +int +subtypeInqActiveIndex(int subtypeID) +{ + if (subtypeID == CDI_UNDEFID) return 0; + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(subtypeID, &subtypeOps); + return subtype_ptr->active_subtype_index; +} + +/* Set the currently active index of a subtype (e.g. current tile index). */ +void +subtypeDefActiveIndex(int subtypeID, int index) +{ + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(subtypeID, &subtypeOps); + subtype_ptr->active_subtype_index = index; +} + +/* subtypeInqSubEntry: Returns subtype entry ID for a given + criterion. */ +int +subtypeInqSubEntry(int subtypeID, subtype_query_t criterion) +{ + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(subtypeID, &subtypeOps); + struct subtype_entry_t *entry = subtype_ptr->entries; + /* loop over all entries of this subtype */ + while (entry != NULL) + { + { + int match = 1; + /* test if this entry matches ALL criteria. */ + for (int j = 0; (j < criterion.nAND) && (match); j++) + { + if (CDI_Debug) + Message("check criterion %d : %d --?-- %d", j, criterion.key_value_pairs[0][j], criterion.key_value_pairs[1][j]); + struct subtype_attr_t *att_ptr = subtypeAttrFind(entry->atts, criterion.key_value_pairs[0][j]); + if (att_ptr == NULL) + { + match = 0; + if (CDI_Debug) Message("did not find %d", criterion.key_value_pairs[0][j]); + } + else + { + if (CDI_Debug) Message("found %d", criterion.key_value_pairs[0][j]); + match &= (att_ptr->val == criterion.key_value_pairs[1][j]); + } + } + if (match) return entry->self; + } + entry = entry->next; + } + return CDI_UNDEFID; +} + +int +subtypeInqTile(int subtypeID, int tileindex, int attribute) +{ + return subtypeInqSubEntry(subtypeID, matchAND(keyValuePair(cdiSubtypeAttributeName[SUBTYPE_ATT_TILEINDEX], tileindex), + keyValuePair(cdiSubtypeAttributeName[SUBTYPE_ATT_TILEATTRIBUTE], attribute))); +} + +int +subtypeInqAttribute(int subtypeID, int index, const char *key, int *outValue) +{ + // Validate input params. + if (subtypeID == CDI_UNDEFID) + xabort("CDI_UNDEFID was passed to %s() as a subtypeID. Please check the origin of that ID.", __func__); + subtype_t *subtype_ptr = (subtype_t *) reshGetVal(subtypeID, &subtypeOps); + if (!subtype_ptr) xabort("Internal error: subtypeID %d resolved to NULL.", subtypeID); + + if ((unsigned) index >= (unsigned) subtype_ptr->nentries) + { + xabort("index argument of %s() is out of range. Expected 0 <= index < %d, but got index = %d.", __func__, + subtype_ptr->nentries, index); + } + +#ifndef __cplusplus + if (!outValue) outValue = &(int){ 0 }; +#else + int dummy = 0; + if (!outValue) outValue = &dummy; +#endif + + if (!key) return CDI_EINVAL; + int iKey = attribute_to_index(key); + if (iKey < 0) return CDI_EINVAL; + + // Find the entry. + struct subtype_entry_t *entry = subtype_ptr->entries; + for (; index--; entry = entry->next) + if (!entry) xabort("internal error: preliminary end of subtype entry list"); + + // Find the attribute. + for (struct subtype_attr_t *attribute = entry->atts; attribute; attribute = attribute->next) + { + if (attribute->key == iKey) + { + *outValue = attribute->val; + return CDI_NOERR; + } + } + + // Failed to find the attribute if this point is reached. + return CDI_EINVAL; +} + +/* Construct a new subtype for a tile set. If a corresponding subtype + * already exists, then we return this subtype ID instead. + * + * See comment on subtype.c::tilesetMatchingPtr for the specification + * of the term "corresponding" tile set. + */ +int +vlistDefTileSubtype(int vlistID, subtype_t *tiles) +{ + int subtypeID = CDI_UNDEFID; + + /* loop over subtypes and search for an identical tileset */ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + int tileset_defined = 0; + for (int isub = 0; isub < vlistptr->nsubtypes; isub++) + { + /* get the ID of the "isub"th subtype */ + subtypeID = vlistptr->subtypeIDs[isub]; + if (subtypeComparePtr(subtypeID, tiles) == 0) + { + tileset_defined = 1; + break; + } + } + + /* tile set seems to be new: register at resource handler. */ + if (tileset_defined == 0) + { + subtype_t *tiles_duplicate = NULL; + subtypeDuplicate(tiles, &tiles_duplicate); + subtypeID = vlistptr->subtypeIDs[vlistptr->nsubtypes++] = subtypePush(tiles_duplicate); + } + + return subtypeID; +} + +int +vlistInsertTrivialTileSubtype(int vlistID) +{ + /* first, generate a subtype */ + subtype_t *subtype_ptr; + subtypeAllocate(&subtype_ptr, SUBTYPE_TILES); + + /* create a tile set that contains only one tile/attribute pair. */ + (void) subtypeEntryInsert(subtype_ptr); + + /* register tile */ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + int subtypeID = vlistptr->subtypeIDs[vlistptr->nsubtypes++] = subtypePush(subtype_ptr); + return subtypeID; +} + +/* ------------------------------------------------------------------- */ +/* NOT YET IMPLEMENTED */ +/* ------------------------------------------------------------------- */ + +static int +subtypeGetPackSize(void *subtype_ptr, void *context) +{ + (void) subtype_ptr; + (void) context; + Error("Not yet implemented for subtypes!"); + return 0; +} + +static void +subtypePack(void *subtype_ptr, void *buffer, int size, int *pos, void *context) +{ + (void) subtype_ptr; + (void) buffer; + (void) size; + (void) pos; + (void) context; + Error("Not yet implemented for subtypes!"); +} + +static int +subtypeTxCode(void *subtypePtr) +{ + (void) subtypePtr; + Error("Not yet implemented for subtypes!"); + return 0; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <inttypes.h> +#include <stdio.h> + + +void +swap4byte(void *ptr, size_t size) +{ + int32_t *ptrtmp = (int32_t *) ptr; + + // clang-format off + for (size_t i = 0; i < size; ++i) + ptrtmp[i] = (((ptrtmp[i] >> 24) & 0x00ff) | ((ptrtmp[i] & 0x00ff) << 24) | + ((ptrtmp[i] >> 8) & 0xff00) | ((ptrtmp[i] & 0xff00) << 8)); + // clang-format on +} + +void +swap8byte(void *ptr, size_t size) +{ + int64_t *ptrtmp = (int64_t *) ptr; + + // clang-format off + for (size_t i = 0; i < size; ++i) + ptrtmp[i] = (((ptrtmp[i] >> 56) & 0x000000ff) | ((ptrtmp[i] & 0x000000ff) << 56) | + ((ptrtmp[i] >> 40) & 0x0000ff00) | ((ptrtmp[i] & 0x0000ff00) << 40) | + ((ptrtmp[i] >> 24) & 0x00ff0000) | ((ptrtmp[i] & 0x00ff0000) << 24) | + ((ptrtmp[i] >> 8) & 0xff000000) | ((ptrtmp[i] & 0xff000000) << 8)); + // clang-format on +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef TABLEPAR_H +#define TABLEPAR_H + +enum +{ + TABLE_DUP_NAME = 1 << 0, + TABLE_DUP_LONGNAME = 1 << 1, + TABLE_DUP_UNITS = 1 << 2, +}; + +typedef struct +{ + int id; // Parameter number (GRIB) + int ltype; // Level type (GRIB) + int dupflags; // keep track of which attributes got strdup'ed + const char *name; // Parameter name + const char *longname; // Parameter long name + const char *units; // Parameter units +} param_type; + +void tableLink(int tableID, const param_type *pars, int npars); +int tableDef(int modelID, int tablegribID, const char *tablename); + +int tableInqParCode(int tableID, char *name, int *code); + +#endif +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +/* Automatically generated, do not edit! */ +#ifndef TABLE_H +#define TABLE_H + +// clang-format off + +static const param_type echam4[] = { + { 4, -1, 0, "precip", "total precipitation", "m/s" }, + { 34, -1, 0, "low_cld", "low cloud", NULL }, + { 35, -1, 0, "mid_cld", "mid cloud", NULL }, + { 36, -1, 0, "hih_cld", "high cloud", NULL }, + { 129, -1, 0, "geosp", "surface geopotential (orography)", "m^2/s^2" }, + { 130, -1, 0, "t", "temperature", "K" }, + { 131, -1, 0, "u", "u-velocity", "m/s" }, + { 132, -1, 0, "v", "v-velocity", "m/s" }, + { 133, -1, 0, "sq", "specific humidity", "kg/kg" }, + { 134, -1, 0, "aps", "Surface pressure", "Pa" }, + { 135, -1, 0, "omega", "vertical velocity", "Pa/s" }, + { 138, -1, 0, "svo", "vorticity", "1/s" }, + { 139, -1, 0, "ts", "surface temperature", "K" }, + { 140, -1, 0, "ws", "soil wetness", "m" }, + { 141, -1, 0, "sn", "snow depth", "m" }, + { 142, -1, 0, "aprl", "large scale precipitation", "m/s" }, + { 143, -1, 0, "aprc", "convective precipitation", "m/s" }, + { 144, -1, 0, "aprs", "snow fall", "m/s" }, + { 145, -1, 0, "vdis", "boundary layer dissipation", "W/m^2" }, + { 146, -1, 0, "ahfs", "surface sensible heat flux", "W/m^2" }, + { 147, -1, 0, "ahfl", "surface latent heat flux", "W/m^2" }, + { 148, -1, 0, "stream", "streamfunction", "m^2/s" }, + { 149, -1, 0, "velopot", "velocity potential", "m^2/s" }, + { 151, -1, 0, "slp", "mean sea level pressure", "Pa" }, + { 152, -1, 0, "lsp", "log surface pressure", NULL }, + { 153, -1, 0, "sx", "liquid water content", "kg/kg" }, + { 155, -1, 0, "sd", "divergence", "1/s" }, + { 156, -1, 0, "geopoth", "geopotential height", "m" }, + { 157, -1, 0, "rhumidity", "relative humidity", "fraction" }, + { 158, -1, 0, "var158", "tendency of surface pressure", "Pa/s" }, + { 159, -1, 0, "ustar3", "ustar3", "m^3/s^3" }, + { 160, -1, 0, "runoff", "surface runoff", "m/s" }, + { 161, -1, 0, "alwc", "liquid water content", "kg/kg" }, + { 162, -1, 0, "aclc", "cloud cover", "fraction" }, + { 163, -1, 0, "aclcv", "total cloud cover", "fraction" }, + { 164, -1, 0, "aclcov", "total cloud cover", "fraction" }, + { 165, -1, 0, "u10", "10m u-velocity", "m/s" }, + { 166, -1, 0, "v10", "10m v-velocity", "m/s" }, + { 167, -1, 0, "temp2", "2m temperature", "K" }, + { 168, -1, 0, "dew2", "2m dew point temperature", "K" }, + { 169, -1, 0, "tsurf", "surface temperature", "K" }, + { 170, -1, 0, "td", "deep soil temperature", "K" }, + { 171, -1, 0, "wind10", "10m windspeed", "m/s" }, + { 172, -1, 0, "slm", "land sea mask", "fraction" }, + { 173, -1, 0, "az0", "surface roughness length", "m" }, + { 174, -1, 0, "alb", "surface background albedo", "fraction" }, + { 175, -1, 0, "albedo", "surface albedo", "fraction" }, + { 176, -1, 0, "srads", "net surface solar radiation", "W/m^2" }, + { 177, -1, 0, "trads", "net surface thermal radiation", "W/m^2" }, + { 178, -1, 0, "srad0", "net top solar radiation", "W/m^2" }, + { 179, -1, 0, "trad0", "top thermal radiation (OLR)", "W/m^2" }, + { 180, -1, 0, "ustr", "surface u-stress", "Pa" }, + { 181, -1, 0, "vstr", "surface v-stress", "Pa" }, + { 182, -1, 0, "evap", "surface evaporation", "m/s" }, + { 183, -1, 0, "tdcl", "soil temperature", "K" }, + { 185, -1, 0, "srafs", "net surf. solar radiation (clear sky)", "W/m^2" }, + { 186, -1, 0, "trafs", "net surf. thermal radiation (clear sky)", "W/m^2" }, + { 187, -1, 0, "sraf0", "net top solar radiation (clear sky)", "W/m^2" }, + { 188, -1, 0, "traf0", "net top thermal radiation (clear sky)", "W/m^2" }, + { 189, -1, 0, "sclfs", "surface solar cloud forcing", "W/m^2" }, + { 190, -1, 0, "tclfs", "surface thermal cloud forcing", "W/m^2" }, + { 191, -1, 0, "sclf0", "top solar cloud forcing", "W/m^2" }, + { 192, -1, 0, "tclf0", "top thermal cloud forcing", "W/m^2" }, + { 193, -1, 0, "wl", "skin reservoir content", "m" }, + { 194, -1, 0, "wlm1", "skin reservoir content of plants", "m" }, + { 195, -1, 0, "ustrgw", "u-gravity wave stress", "Pa" }, + { 196, -1, 0, "vstrgw", "v-gravity wave stress", "Pa" }, + { 197, -1, 0, "vdisgw", "gravity wave dissipation", "W/m^2" }, + { 198, -1, 0, "vgrat", "vegetation ratio", "fraction" }, + { 199, -1, 0, "varor", "orographic variance", "m^2" }, + { 200, -1, 0, "vlt", "leaf area index", NULL }, + { 201, -1, 0, "t2max", "maximum 2m-temperature", "K" }, + { 202, -1, 0, "t2min", "minimum 2m-temperature", "K" }, + { 203, -1, 0, "srad0u", "top solar radiation upward", "W/m^2" }, + { 204, -1, 0, "sradsu", "surface solar radiation upward", "W/m^2" }, + { 205, -1, 0, "tradsu", "surface thermal radiation upward", "W/m^2" }, + { 206, -1, 0, "tsn", "snow temperature", "K" }, + { 207, -1, 0, "td3", "soil temperature 3", "K" }, + { 208, -1, 0, "td4", "soil temperature 4", "K" }, + { 209, -1, 0, "td5", "soil temperature 5", "K" }, + { 210, -1, 0, "seaice", "sea ice cover", "fraction" }, + { 211, -1, 0, "siced", "sea ice depth", "m" }, + { 212, -1, 0, "forest", "vegetation type", "fraction" }, + { 213, -1, 0, "teff", "(effective) sea-ice skin temperature", "K" }, + { 214, -1, 0, "tsmax", "maximum surface temperature", "K" }, + { 215, -1, 0, "tsmin", "minimum surface temperature", "K" }, + { 216, -1, 0, "wimax", "maximum 10m-wind speed", "m/s" }, + { 217, -1, 0, "topmax", "maximum height of convective cloud tops", "Pa" }, + { 218, -1, 0, "snmel", "snow melt", "m/s" }, + { 219, -1, 0, "runtoc", "surface runoff into ocean", NULL }, + { 220, -1, 0, "tslin", "land: residual surface heat budget", "W/m^2" }, + { 221, -1, 0, "dsnac", "snow depth change", "m/s" }, + { 222, -1, 0, "alwcac", "liquid water content", "kg/kg" }, + { 223, -1, 0, "aclcac", "cloud cover", "fraction" }, + { 224, -1, 0, "tke", "turbulent kinetic energy", NULL }, + { 225, -1, 0, "tkem1", "turbulent kinetic energy (t-1)", NULL }, + { 226, -1, 0, "fao", "FAO data set (soil data flags)", NULL }, + { 227, -1, 0, "rgcgn", "heat capacity of soil", NULL }, + { 228, -1, 0, "sodif", "soil diffusivity", NULL }, + { 229, -1, 0, "wsmx", "field capacity of soil", "m" }, + { 230, -1, 0, "qvi", "vertically integrated specific humidity", "kg/m^2" }, + { 231, -1, 0, "alwcvi", "vertically integrated liquid water cont.", "kg/m^2" }, + { 232, -1, 0, "glac", "glacier mask", "fraction" }, + { 233, -1, 0, "runlnd", "surface runoff not running into ocean", NULL }, + { 259, -1, 0, "windspeed", "windspeed (sqrt(u^2+v^2))", NULL }, + { 260, -1, 0, "precip", "total precipitation", "m/s" }, + { 261, -1, 0, "net_top", "total top radiation", NULL }, + { 262, -1, 0, "net_bot", "total surface radiation", NULL }, + { 263, -1, 0, "net_heat", "net surface heat flux", NULL }, + { 264, -1, 0, "net_water", "total surface water", NULL }, + { 268, -1, 0, "sw_atm", NULL, NULL }, + { 269, -1, 0, "lw_atm", NULL, NULL }, + { 270, -1, 0, "net_atm", NULL, NULL }, + { 271, -1, 0, "surf_runoff", "surface runoff", NULL }, + { 275, -1, 0, "fresh_water", NULL, NULL }, +}; + +static const param_type echam5[] = { + { 4, -1, 0, "precip", "total precipitation", "kg/m^2s" }, + { 79, -1, 0, "swnirac", "net surface NIR flux acc.", "W/m^2" }, + { 80, -1, 0, "swdifnirac", "fraction of diffuse NIR acc.", "W/m^2" }, + { 81, -1, 0, "swvisac", "net surface visible flux acc.", "W/m^2" }, + { 82, -1, 0, "swdifvisac", "fraction of diffuse visible acc.", "W/m^2" }, + { 83, -1, 0, "ocu", "ocean eastw. velocity (coupled mode)", "m/s" }, + { 84, -1, 0, "ocv", "ocean northw. velocity (coupled mode)", "m/s" }, + { 85, -1, 0, "tradl", "net LW radiation 200mb", "W/m^2" }, + { 86, -1, 0, "sradl", "net SW radiation 200mb", "W/m^2" }, + { 87, -1, 0, "trafl", "net LW radiation 200mb (clear sky)", "W/m^2" }, + { 88, -1, 0, "srafl", "net SW radiation 200mb (clear sky)", "W/m^2" }, + { 89, -1, 0, "amlcorac", "mixed layer flux correction", "W/m^2" }, + { 90, -1, 0, "amlheatac", "mixed layer heat content", "J/m^2" }, + { 91, -1, 0, "trfliac", "net LW radiation over ice", "W/m^2" }, + { 92, -1, 0, "trflwac", "net LW radiation over water", "W/m^2" }, + { 93, -1, 0, "trfllac", "net LW radiation over land", "W/m^2" }, + { 94, -1, 0, "sofliac", "net SW radiation over ice", "W/m^2" }, + { 95, -1, 0, "soflwac", "net SW radiation over water", "W/m^2" }, + { 96, -1, 0, "sofllac", "net SW radiation over land", "W/m^2" }, + { 97, -1, 0, "friac", "ice cover (fraction of grid box)", NULL }, + { 102, -1, 0, "tsi", "surface temperature of ice", "K" }, + { 103, -1, 0, "tsw", "surface temperature of water", "K" }, + { 104, -1, 0, "ustri", "zonal wind stress over ice", "Pa" }, + { 105, -1, 0, "vstri", "meridional wind stress over ice", "Pa" }, + { 106, -1, 0, "ustrw", "zonal wind stress over water", "Pa" }, + { 107, -1, 0, "vstrw", "meridional wind stress over water", "Pa" }, + { 108, -1, 0, "ustrl", "zonal wind stress over land", "Pa" }, + { 109, -1, 0, "vstrl", "meridional wind stress over land", "Pa" }, + { 110, -1, 0, "ahfliac", "latent heat flux over ice", "W/m^2" }, + { 111, -1, 0, "ahflwac", "latent heat flux over water", "W/m^2" }, + { 112, -1, 0, "ahfllac", "latent heat flux over land", "W/m^2" }, + { 113, -1, 0, "evapiac", "evaporation over ice", "kg/m^2s" }, + { 114, -1, 0, "evapwac", "evaporation over water", "kg/m^2s" }, + { 115, -1, 0, "evaplac", "evaporation over land", "kg/m^2s" }, + { 116, -1, 0, "az0i", "roughness length over ice", "m" }, + { 117, -1, 0, "az0w", "roughness length over water", "m" }, + { 118, -1, 0, "az0l", "roughness length over land", "m" }, + { 119, -1, 0, "ahfsiac", "sensible heat flux over ice", "W/m^2" }, + { 120, -1, 0, "ahfswac", "sensible heat flux over water", "W/m^2" }, + { 121, -1, 0, "ahfslac", "sensible heat flux over land", "W/m^2" }, + { 122, -1, 0, "alsoi", "albedo of ice", NULL }, + { 123, -1, 0, "alsow", "albedo of water", NULL }, + { 124, -1, 0, "alsol", "albedo of land", NULL }, + { 125, -1, 0, "ahfice", "conductive heat flux through ice", "W/m^2" }, + { 126, -1, 0, "qres", "residual heat flux for melting sea ice", "W/m^2" }, + { 127, -1, 0, "alake", "lake fraction", NULL }, + { 128, -1, 0, "rintop", "low level inversion", NULL }, + { 129, -1, 0, "geosp", "surface geopotential (orography)", "m^2/s^2" }, + { 130, -1, 0, "t", "temperature", "K" }, + { 131, -1, 0, "u", "u-velocity", "m/s" }, + { 132, -1, 0, "v", "v-velocity", "m/s" }, + { 133, -1, 0, "q", "specific humidity", "kg/kg" }, + { 134, -1, 0, "aps", "surface pressure", "Pa" }, + { 135, -1, 0, "omega", "vertical velocity", "Pa/s" }, + { 136, -1, 0, "acdnc", "cloud droplet number concentration", "1/m^3" }, + { 137, -1, 0, "apmeb", "(P-E) error", "kg/m^2s" }, + { 138, -1, 0, "svo", "vorticity", "1/s" }, + { 139, -1, 0, "tslm1", "surface temperature of land", "K" }, + { 140, -1, 0, "ws", "soil wetness", "m" }, + { 141, -1, 0, "sn", "water equivalent snow depth", "m" }, + { 142, -1, 0, "aprl", "large scale precipitation", "kg/m^2s" }, + { 143, -1, 0, "aprc", "convective precipitation", "kg/m^2s" }, + { 144, -1, 0, "aprs", "snow fall", "kg/m^2s" }, + { 145, -1, 0, "vdis", "boundary layer dissipation", "W/m^2" }, + { 146, -1, 0, "ahfs", "sensible heat flux", "W/m^2" }, + { 147, -1, 0, "ahfl", "latent heat flux", "W/m^2" }, + { 148, -1, 0, "stream", "streamfunction", "m^2/s" }, + { 149, -1, 0, "velopot", "velocity potential", "m^2/s" }, + { 150, -1, 0, "xivi", "vertically integrated cloud ice", "kg/m^2" }, + { 151, -1, 0, "slp", "mean sea level pressure", "Pa" }, + { 152, -1, 0, "lsp", "log surface pressure", NULL }, + { 153, -1, 0, "xl", "cloud water", "kg/kg" }, + { 154, -1, 0, "xi", "cloud ice", "kg/kg" }, + { 155, -1, 0, "sd", "divergence", "1/s" }, + { 156, -1, 0, "geopoth", "geopotential height", "m" }, + { 157, -1, 0, "rhumidity", "relative humidity", NULL }, + { 159, -1, 0, "wind10w", "10m windspeed over water", "m/s" }, + { 160, -1, 0, "runoff", "surface runoff and drainage", "kg/m^2s" }, + { 161, -1, 0, "drain", "drainage", "kg/m^2s" }, + { 162, -1, 0, "aclc", "cloud cover", NULL }, + { 164, -1, 0, "aclcov", "total cloud cover", NULL }, + { 165, -1, 0, "u10", "10m u-velocity", "m/s" }, + { 166, -1, 0, "v10", "10m v-velocity", "m/s" }, + { 167, -1, 0, "temp2", "2m temperature", "K" }, + { 168, -1, 0, "dew2", "2m dew point temperature", "K" }, + { 169, -1, 0, "tsurf", "surface temperature", "K" }, + { 170, -1, 0, "xvar", "variance of total water amount", "kg/kg" }, + { 171, -1, 0, "wind10", "10m windspeed", "m/s" }, + { 172, -1, 0, "slm", "land sea mask (1. = land, 0. = sea/lakes)", NULL }, + { 173, -1, 0, "az0", "roughness length", "m" }, + { 174, -1, 0, "alb", "surface background albedo", NULL }, + { 175, -1, 0, "albedo", "surface albedo", NULL }, + { 176, -1, 0, "srads", "net surface SW radiation", "W/m^2" }, + { 177, -1, 0, "trads", "net surface LW radiation", "W/m^2" }, + { 178, -1, 0, "srad0", "net top SW radiation", "W/m^2" }, + { 179, -1, 0, "trad0", "net top LW radiation (-OLR)", "W/m^2" }, + { 180, -1, 0, "ustr", "u-stress", "Pa" }, + { 181, -1, 0, "vstr", "v-stress", "Pa" }, + { 182, -1, 0, "evap", "evaporation", "kg/m^2s" }, + { 183, -1, 0, "xskew", "skewness of total water amount qv+qi+ql", NULL }, + { 184, -1, 0, "srad0d", "top incoming SW radiation", "W/m^2" }, + { 185, -1, 0, "srafs", "net surface SW radiation (clear sky)", "W/m^2" }, + { 186, -1, 0, "trafs", "net surface LW radiation (clear sky)", "W/m^2" }, + { 187, -1, 0, "sraf0", "net top SW radiation (clear sky)", "W/m^2" }, + { 188, -1, 0, "traf0", "net top LW radiation (clear sky)", "W/m^2" }, + { 189, -1, 0, "sclfs", "net surface SW cloud forcing (176-185)", "W/m^2" }, + { 190, -1, 0, "tclfs", "net surface LW cloud forcing (177-186)", "W/m^2" }, + { 191, -1, 0, "sclf0", "net SW top cloud forcing (178-187)", "W/m^2" }, + { 192, -1, 0, "tclf0", "net LW top cloud forcing (179-188)", "W/m^2" }, + { 193, -1, 0, "wl", "skin reservoir content", "m" }, + { 194, -1, 0, "slf", "fractional land cover", NULL }, + { 195, -1, 0, "ustrgw", "u-gravity wave stress", "Pa" }, + { 196, -1, 0, "vstrgw", "v-gravity wave stress", "Pa" }, + { 197, -1, 0, "vdisgw", "gravity wave dissipation", "W/m^2" }, + { 198, -1, 0, "vgrat", "vegetation ratio", NULL }, + { 199, -1, 0, "orostd", "orographic standard deviation", "m" }, + { 200, -1, 0, "vlt", "leaf area index", NULL }, + { 201, -1, 0, "t2max", "maximum 2m-temperature", "K" }, + { 202, -1, 0, "t2min", "minimum 2m-temperature", "K" }, + { 203, -1, 0, "srad0u", "top SW radiation upward", "W/m^2" }, + { 204, -1, 0, "sradsu", "surface SW radiation upward", "W/m^2" }, + { 205, -1, 0, "tradsu", "surface LW radiation upward", "W/m^2" }, + { 206, -1, 0, "grndflux", "surface ground heat flux", NULL }, + { 207, -1, 0, "tsoil", "deep soil temperatures (5 layers)", "K" }, + { 208, -1, 0, "ahfcon", "conductive heat flux through ice", "W/m^2" }, + { 209, -1, 0, "ahfres", "res. heat flux for melting ice", "W/m^2" }, + { 210, -1, 0, "seaice", "ice cover (fraction of ice+water)", NULL }, + { 211, -1, 0, "siced", "ice thickness", "m" }, + { 212, -1, 0, "forest", "forest fraction", NULL }, + { 213, -1, 0, "gld", "glacier thickness", "m" }, + { 214, -1, 0, "sni", "water equivalent of snow on ice", "m" }, + { 215, -1, 0, "rogl", "glacier runoff", "kg/m^2s" }, + { 216, -1, 0, "wimax", "maximum 10m-wind speed", "m/s" }, + { 217, -1, 0, "topmax", "maximum height of convective cloud tops", "Pa" }, + { 218, -1, 0, "snmel", "snow melt", "kg/m^2s" }, + { 219, -1, 0, "runtoc", "surface runoff into ocean", "kg/m^2s" }, + { 220, -1, 0, "runlnd", "surface runoff not running into ocean", "kg/m^2s" }, + { 221, -1, 0, "apmegl", "P-E over land ice", "kg/m^2s" }, + { 222, -1, 0, "snacl", "snow accumulation over land", "kg/m^2s" }, + { 223, -1, 0, "aclcac", "cloud cover", NULL }, + { 224, -1, 0, "tke", "turbulent kinetic energy", "m^2/s^2" }, + { 225, -1, 0, "tkem1", "turbulent kinetic energy (t-1)", "m^2/s^2" }, + { 226, -1, 0, "fao", "FAO data set (soil data flags) 0...5", NULL }, + { 227, -1, 0, "rgcgn", "heat capacity of soil", NULL }, + { 228, -1, 0, "sodif", "soil diffusivity", "m^2/s" }, + { 229, -1, 0, "wsmx", "field capacity of soil", "m" }, + { 230, -1, 0, "qvi", "vertically integrated water vapor", "kg/m^2" }, + { 231, -1, 0, "xlvi", "vertically integrated cloud water", "kg/m^2" }, + { 232, -1, 0, "glac", "fraction of land covered by glaciers", NULL }, + { 233, -1, 0, "snc", "snow depth at the canopy", "m" }, + { 234, -1, 0, "rtype", "type of convection", "0...3" }, + { 235, -1, 0, "abso4", "anthropogenic sulfur burden", "kg/m^2" }, + { 236, -1, 0, "ao3", "ipcc ozone", "kg/m^2" }, + { 237, -1, 0, "tropo", "WMO defined tropopause height", "Pa" }, + { 259, -1, 0, "windspeed", "windspeed (sqrt(u^2+v^2))", "m/s" }, + { 260, -1, 0, "precip", "total precipitation (142+143)", "kg/m^2s" }, + { 261, -1, 0, "net_top", "total top radiation (178+179)", "W/m^2" }, + { 262, -1, 0, "net_bot", "total surface radiation (176+177)", "W/m^2" }, + { 272, -1, 0, "mastrfu", "mass stream function", "kg/s" }, +}; + +static const param_type echam6[] = { + { 4, -1, 0, "precip", "total precipitation", "kg m-2 s-1" }, + { 34, -1, 0, "low_cld", "low cloud", NULL }, + { 35, -1, 0, "mid_cld", "mid cloud", NULL }, + { 36, -1, 0, "hih_cld", "high cloud", NULL }, + { 68, -1, 0, "fage", "aging factor of snow on ice", NULL }, + { 69, -1, 0, "snifrac", "fraction of ice covered with snow", NULL }, + { 70, -1, 0, "barefrac", "bare ice fraction", NULL }, + { 71, -1, 0, "alsom", "albedo of melt ponds", NULL }, + { 72, -1, 0, "alsobs", "albedo of bare ice and snow", NULL }, + { 73, -1, 0, "sicepdw", "melt pond depth on sea-ice", "m" }, + { 74, -1, 0, "sicepdi", "ice thickness on melt pond", "m" }, + { 75, -1, 0, "tsicepdi", "ice temperature on frozen melt pond", "K" }, + { 76, -1, 0, "sicepres", "residual heat flux", "W m-2" }, + { 77, -1, 0, "ameltdepth", "total melt pond depth", "m" }, + { 78, -1, 0, "ameltfrac", "fractional area of melt ponds on sea-ice", NULL }, + { 79, -1, 0, "albedo_vis_dir", "surface albedo visible range direct", NULL }, + { 80, -1, 0, "albedo_nir_dir", "surface albedo NIR range direct", NULL }, + { 81, -1, 0, "albedo_vis_dif", "surface albedo visible range diffuse", NULL }, + { 82, -1, 0, "albedo_nir_dif", "surface albedo NIR range diffuse", NULL }, + { 83, -1, 0, "ocu", "ocean eastw. velocity (coupled mode)", "m/s" }, + { 84, -1, 0, "ocv", "ocean northw. velocity (coupled mode)", "m/s" }, + { 85, -1, 0, "tradl", "thermal radiation 200mb", "W m-2" }, + { 86, -1, 0, "sradl", "solar radiation 200mb", "W m-2" }, + { 87, -1, 0, "trafl", "thermal radiation 200mb (clear sky)", "W m-2" }, + { 88, -1, 0, "srafl", "solar radiation 200mb (clear sky)", "W m-2" }, + { 89, -1, 0, "amlcorac", "mixed layer flux correction", "W m-2" }, + { 90, -1, 0, "amlheatac", "mixed layer heat content", "J m-2" }, + { 91, -1, 0, "trfliac", "LW flux over ice", "W m-2" }, + { 92, -1, 0, "trflwac", "LW flux over water", "W m-2" }, + { 93, -1, 0, "trfllac", "LW flux over land", "W m-2" }, + { 94, -1, 0, "sofliac", "SW flux over ice", "W m-2" }, + { 95, -1, 0, "soflwac", "SW flux over water", "W m-2" }, + { 96, -1, 0, "sofllac", "SW flux over land", "W m-2" }, + { 97, -1, 0, "friac", "ice cover (fraction of grid box)", NULL }, + { 102, -1, 0, "tsi", "surface temperature of ice", "K" }, + { 103, -1, 0, "tsw", "surface temperature of water", "K" }, + { 104, -1, 0, "ustri", "zonal wind stress over ice", "Pa" }, + { 105, -1, 0, "vstri", "meridional wind stress over ice", "Pa" }, + { 106, -1, 0, "ustrw", "zonal wind stress over water", "Pa" }, + { 107, -1, 0, "vstrw", "meridional wind stress over water", "Pa" }, + { 108, -1, 0, "ustrl", "zonal wind stress over land", "Pa" }, + { 109, -1, 0, "vstrl", "meridional wind stress over land", "Pa" }, + { 110, -1, 0, "ahfliac", "latent heat flux over ice", "W m-2" }, + { 111, -1, 0, "ahflwac", "latent heat flux over water", "W m-2" }, + { 112, -1, 0, "ahfllac", "latent heat flux over land", "W m-2" }, + { 113, -1, 0, "evapiac", "evaporation over ice", "kg m-2 s-1" }, + { 114, -1, 0, "evapwac", "evaporation over water", "kg m-2 s-1" }, + { 115, -1, 0, "evaplac", "evaporation over land", "kg m-2 s-1" }, + { 116, -1, 0, "az0i", "roughness length over ice", "m" }, + { 117, -1, 0, "az0w", "roughness length over water", "m" }, + { 118, -1, 0, "az0l", "roughness length over land", "m" }, + { 119, -1, 0, "ahfsiac", "sensible heat flux over ice", "W m-2" }, + { 120, -1, 0, "ahfswac", "sensible heat flux over water", "W m-2" }, + { 121, -1, 0, "ahfslac", "sensible heat flux over land", "W m-2" }, + { 122, -1, 0, "alsoi", "albedo of ice", NULL }, + { 123, -1, 0, "alsow", "albedo of water", NULL }, + { 124, -1, 0, "alsol", "albedo of land", NULL }, + { 125, -1, 0, "ahfice", "conductive heat flux", "W m-2" }, + { 126, -1, 0, "qres", "residual heat flux for melting sea ice", "W m-2" }, + { 127, -1, 0, "alake", "lake fraction of grid box", "fraction" }, + { 128, -1, 0, "rintop", "low level inversion", NULL }, + { 129, -1, 0, "geosp", "surface geopotential (orography)", "m^2/s^2" }, + { 130, -1, 0, "t", "temperature", "K" }, + { 131, -1, 0, "u", "u-velocity", "m/s" }, + { 132, -1, 0, "v", "v-velocity", "m/s" }, + { 133, -1, 0, "q", "specific humidity", "kg/kg" }, + { 134, -1, 0, "aps", "surface pressure", "Pa" }, + { 135, -1, 0, "omega", "vertical velocity", "Pa/s" }, + { 136, -1, 0, "acdnc", "cloud droplet number concentration", "1 m-3" }, + { 137, -1, 0, "apmeb", "vert. integr. tendencies of water", "kg m-2 s-1" }, + { 138, -1, 0, "svo", "vorticity", "1/s" }, + { 139, -1, 0, "tslm1", "surface temperature of land", "K" }, + { 140, -1, 0, "ws", "soil wetness", "m" }, + { 141, -1, 0, "sn", "snow depth", "m" }, + { 142, -1, 0, "aprl", "large scale precipitation", "kg m-2 s-1" }, + { 143, -1, 0, "aprc", "convective precipitation", "kg m-2 s-1" }, + { 144, -1, 0, "aprs", "snow fall", "kg m-2 s-1" }, + { 145, -1, 0, "vdis", "boundary layer dissipation", "W m-2" }, + { 146, -1, 0, "ahfs", "sensible heat flux", "W m-2" }, + { 147, -1, 0, "ahfl", "latent heat flux", "W m-2" }, + { 148, -1, 0, "stream", "streamfunction", "m^2/s" }, + { 149, -1, 0, "velopot", "velocity potential", "m^2/s" }, + { 150, -1, 0, "xivi", "vertically integrated cloud ice", "kg m-2" }, + { 151, -1, 0, "slp", "mean sea level pressure", "Pa" }, + { 152, -1, 0, "lsp", "log surface pressure", NULL }, + { 153, -1, 0, "xl", "cloud water", "kg/kg" }, + { 154, -1, 0, "xi", "cloud ice", "kg/kg" }, + { 155, -1, 0, "sd", "divergence", "1/s" }, + { 156, -1, 0, "geopoth", "geopotential height", "m" }, + { 157, -1, 0, "rhumidity", "relative humidity", "fraction" }, + { 158, -1, 0, "var158", "tendency of surface pressure", "Pa/s" }, + { 159, -1, 0, "wind10w", "10m windspeed over water", "m/s" }, + { 160, -1, 0, "runoff", "surface runoff and drainage", "kg m-2 s-1" }, + { 161, -1, 0, "drain", "drainage", "kg m-2 s-1" }, + { 162, -1, 0, "aclc", "cloud cover", NULL }, + { 163, -1, 0, "aclcv", "total cloud cover", NULL }, + { 164, -1, 0, "aclcov", "total cloud cover (mean)", NULL }, + { 165, -1, 0, "u10", "10m u-velocity", "m/s" }, + { 166, -1, 0, "v10", "10m v-velocity", "m/s" }, + { 167, -1, 0, "temp2", "2m temperature", "K" }, + { 168, -1, 0, "dew2", "2m dew point temperature", "K" }, + { 169, -1, 0, "tsurf", "surface temperature", "K" }, + { 170, -1, 0, "xvar", "variance of total water amount qv+qi+ql", "kg/kg" }, + { 171, -1, 0, "wind10", "10m windspeed", "m/s" }, + { 172, -1, 0, "slm", "land sea mask (1. = land, 0. = sea/lakes)", NULL }, + { 173, -1, 0, "az0", "roughness length", "m" }, + { 174, -1, 0, "alb", "surface background albedo", NULL }, + { 175, -1, 0, "albedo", "surface albedo", NULL }, + { 176, -1, 0, "srads", "net surface solar radiation", "W m-2" }, + { 177, -1, 0, "trads", "net surface thermal radiation", "W m-2" }, + { 178, -1, 0, "srad0", "net top solar radiation", "W m-2" }, + { 179, -1, 0, "trad0", "top thermal radiation (OLR)", "W m-2" }, + { 180, -1, 0, "ustr", "u-stress", "Pa" }, + { 181, -1, 0, "vstr", "v-stress", "Pa" }, + { 182, -1, 0, "evap", "evaporation", "kg m-2 s-1" }, + { 183, -1, 0, "xskew", "skewness of total water amount qv+qi+ql", NULL }, + { 184, -1, 0, "srad0d", "top incoming solar radiation", "W m-2" }, + { 185, -1, 0, "srafs", "net surf. solar radiation (clear sky)", "W m-2" }, + { 186, -1, 0, "trafs", "net surf. thermal radiation (clear sky)", "W m-2" }, + { 187, -1, 0, "sraf0", "net top solar radiation (clear sky)", "W m-2" }, + { 188, -1, 0, "traf0", "net top thermal radiation (clear sky)", "W m-2" }, + { 189, -1, 0, "sclfs", "surface solar cloud forcing", "W m-2" }, + { 190, -1, 0, "tclfs", "surface thermal cloud forcing", "W m-2" }, + { 191, -1, 0, "sclf0", "SW top cloud forcing (178-187)", "W m-2" }, + { 192, -1, 0, "tclf0", "LW top cloud forcing (179-188)", "W m-2" }, + { 193, -1, 0, "wl", "skin reservoir content", "m" }, + { 194, -1, 0, "slf", "sea land fraction", NULL }, + { 195, -1, 0, "ustrgw", "u-gravity wave stress", "Pa" }, + { 196, -1, 0, "vstrgw", "v-gravity wave stress", "Pa" }, + { 197, -1, 0, "vdisgw", "gravity wave dissipation", "W m-2" }, + { 198, -1, 0, "vgrat", "vegetation ratio", NULL }, + { 199, -1, 0, "orostd", "orographic standard deviation", "m" }, + { 200, -1, 0, "vlt", "leaf area index", NULL }, + { 201, -1, 0, "t2max", "maximum 2m-temperature", "K" }, + { 202, -1, 0, "t2min", "minimum 2m-temperature", "K" }, + { 203, -1, 0, "srad0u", "top solar radiation upward", "W m-2" }, + { 204, -1, 0, "sradsu", "surface solar radiation upward", "W m-2" }, + { 205, -1, 0, "tradsu", "surface thermal radiation upward", "W m-2" }, + { 206, -1, 0, "grndflux", "surface ground heat flux", NULL }, + { 207, -1, 0, "tsoil", "deep soil temperatures (5 layers)", "K" }, + { 208, -1, 0, "ahfcon", "conductive heat flux through ice", "W m-2" }, + { 209, -1, 0, "ahfres", "melting of ice", "W m-2" }, + { 210, -1, 0, "seaice", "ice cover (fraction of 1-SLM)", NULL }, + { 211, -1, 0, "siced", "ice depth", "m" }, + { 212, -1, 0, "forest", "forest fraction", NULL }, + { 213, -1, 0, "gld", "glacier depth", "m" }, + { 214, -1, 0, "sni", "water equivalent of snow on ice", "m" }, + { 215, -1, 0, "rogl", "glacier runoff", "kg m-2 s-1" }, + { 216, -1, 0, "wimax", "maximum 10m-wind speed", "m/s" }, + { 217, -1, 0, "topmax", "maximum height of convective cloud tops", "Pa" }, + { 218, -1, 0, "snmel", "snow melt", "kg m-2 s-1" }, + { 219, -1, 0, "runtoc", "surface runoff into ocean", "kg m-2 s-1" }, + { 220, -1, 0, "runlnd", "surface runoff not running into ocean", "kg m-2 s-1" }, + { 221, -1, 0, "apmegl", "P-E over land ice", "kg m-2 s-1" }, + { 222, -1, 0, "snacl", "snow accumulation over land", "kg m-2 s-1" }, + { 223, -1, 0, "aclcac", "cloud cover", NULL }, + { 224, -1, 0, "tke", "turbulent kinetic energy", "m^2/s^2" }, + { 225, -1, 0, "tkem1", "turbulent kinetic energy (t-1)", "m^2/s^2" }, + { 226, -1, 0, "fao", "FAO data set (soil data flags)", "0...5" }, + { 227, -1, 0, "rgcgn", "heat capacity of soil", NULL }, + { 228, -1, 0, "sodif", "diffusivity of soil and land ice", "m^2/s" }, + { 229, -1, 0, "wsmx", "field capacity of soil", "m" }, + { 230, -1, 0, "qvi", "vertically integrated water vapor", "kg m-2" }, + { 231, -1, 0, "xlvi", "vertically integrated cloud water", "kg m-2" }, + { 232, -1, 0, "glac", "fraction of land covered by glaciers", NULL }, + { 233, -1, 0, "snc", "snow depth at the canopy", "m" }, + { 234, -1, 0, "rtype", "type of convection", "0...3" }, + { 235, -1, 0, "abso4", "antropogenic sulfur burden", "kg m-2" }, + { 236, -1, 0, "ao3", "ipcc ozone", "kg m-2" }, + { 237, -1, 0, "tropo", "WMO defined tropopause height", "Pa" }, + { 259, -1, 0, "windspeed", "windspeed (sqrt(u^2+v^2))", "m/s" }, + { 260, -1, 0, "precip", "total precipitation (142+143)", "kg m-2 s-1" }, + { 261, -1, 0, "net_top", "total top radiation (178+179)", "W m-2" }, + { 262, -1, 0, "net_bot", "total surface radiation (176+177)", "W m-2" }, + { 272, -1, 0, "mastfru", "mass stream function", "kg/s" }, +}; + +static const param_type mpiom1[] = { + { 2, -1, 0, "THO", "temperature", "C" }, + { 5, -1, 0, "SAO", "salinity", "psu" }, + { 3, -1, 0, "UKO", "zon. velocity", "m/s" }, + { 4, -1, 0, "VKE", "mer. velocity", "m/s" }, + { 303, -1, 0, "UKOMFL", "zon. velocity (divergence free)", "m/s" }, + { 304, -1, 0, "VKEMFL", "mer. velocity (divergence free)", "m/s" }, + { 7, -1, 0, "WO", "ver. velocity", "m/s" }, + { 8, -1, 0, "RHO", "insitu density", "kg/m**3" }, + { 6, -1, 0, "PO", "pressure", "Pa" }, + { 67, -1, 0, "EMINPO", "freshwaterflux by restoring", "m/s" }, + { 70, -1, 0, "FLUM", "total heatflux", "W/m**2" }, + { 79, -1, 0, "PEM", "total freshwaterflux", "m/s" }, + { 13, -1, 0, "SICTHO", "ice thickness", "m" }, + { 15, -1, 0, "SICOMO", "ice compactness", "frac." }, + { 35, -1, 0, "SICUO", "zon. ice velocity", "m/s" }, + { 36, -1, 0, "SICVE", "mer. ice velocity", "m/s" }, + { 92, -1, 0, "TAFO", "surface air temperature", "C" }, + { 164, -1, 0, "FCLOU", "cloud cover", NULL }, + { 52, -1, 0, "TXO", "surface u-stress", "Pa/1025." }, + { 53, -1, 0, "TYE", "surface v-stress", "Pa/1025." }, + { 260, -1, 0, "FPREC", "prescr. precipitation", "m/s" }, + { 80, -1, 0, "FSWR", "downward shortwave rad.", "W/m**2" }, + { 81, -1, 0, "FTDEW", "dewpoint temperature", "K" }, + { 171, -1, 0, "FU10", "10m windspeed", "m/s" }, + { 141, -1, 0, "SICSNO", "snow thickness", "m" }, + { 176, -1, 0, "QSWO", "heat flux shortwave", "W/m**2" }, + { 177, -1, 0, "QLWO", "heat flux longwave", "W/m**2" }, + { 147, -1, 0, "QLAO", "heat flux latent", "W/m**2" }, + { 146, -1, 0, "QSEO", "heat flux sensible", "W/m**2" }, + { 65, -1, 0, "PRECO", "net freshwater flux + runoff", "m/s" }, + { 1, -1, 0, "ZO", "sealevel", "m" }, + { 82, -1, 0, "Z1O", "sealevel change", "m" }, + { 69, -1, 0, "KCONDEP", "depth of convection", "level" }, + { 27, -1, 0, "PSIUWE", "hor. bar. streamfunction", "Sv" }, + { 83, -1, 0, "AMLD", "mixed layer depth", "m" }, + { 172, -1, 0, "WETO", "landseamask (pressure points)", NULL }, + { 507, -1, 0, "AMSUE", "landseamask (vector points v)", NULL }, + { 508, -1, 0, "AMSUO", "landseamask (vector points u)", NULL }, + { 84, -1, 0, "DEPTO", "depth at pressure points", "m" }, + { 484, -1, 0, "DEUTO", "depth at vector points (u)", "m" }, + { 584, -1, 0, "DEUTE", "depth at vector points (v)", "m" }, + { 184, -1, 0, "DDUO", "level thickness (vector u )", "m" }, + { 284, -1, 0, "DDUE", "level thickness (vector v )", "m" }, + { 384, -1, 0, "DDPO", "level thickness (pressure )", "m" }, + { 85, -1, 0, "DLXP", "grid distance x", "m" }, + { 86, -1, 0, "DLYP", "grid distance y", "m" }, + { 185, -1, 0, "DLXU", "grid distance x (vector u)", "m" }, + { 186, -1, 0, "DLYU", "grid distance y (vector u)", "m" }, + { 285, -1, 0, "DLXV", "grid distance x (vector v)", "m" }, + { 286, -1, 0, "DLYV", "grid distance y (vector v)", "m" }, + { 54, -1, 0, "GILA", "latitude in radiants", "rad" }, + { 55, -1, 0, "GIPH", "longitude in radiants", "rad" }, + { 354, -1, 0, "ALAT", "latitude in degrees (pressure)", "deg" }, + { 355, -1, 0, "ALON", "longitude in degrees (pressure)", "deg" }, + { 154, -1, 0, "ALATU", "latitude in degrees (vector u)", "deg" }, + { 155, -1, 0, "ALONU", "longitude in degrees (vector u)", "deg" }, + { 254, -1, 0, "ALATV", "latitude in degrees (vector v)", "deg" }, + { 255, -1, 0, "ALONV", "longitude in degrees (vector v)", "deg" }, + { 110, -1, 0, "AVO", "vertical impuls diffusion", "m**2/s" }, + { 111, -1, 0, "DVO", "vertical T,S diffusion", "m**2/s" }, + { 142, -1, 0, "SICTRU", "seaice transport x", "m**2/s" }, + { 143, -1, 0, "SICTRV", "seaice transport y", "m**2/s" }, + { 612, -1, 0, "WTMIX", "wind mixing", "m**2/s" }, + { 183, -1, 0, "zmld", "mixed layer depth (SJ)", "m" }, + { 207, -1, 0, "WGO", "GM vertical velocity", "m/s" }, + { 305, -1, 0, "rivrun", "RiverRunoff", "m/s" }, + { 158, -1, 0, "TMCDO", "mon. mean depth of convection", "level" }, + { 247, -1, 0, "DQSWO", "heatflux sw over water", "W/m**2" }, + { 248, -1, 0, "DQLWO", "heatflux lw over water", "W/m**2" }, + { 249, -1, 0, "DQSEO", "heatflux se over water", "W/m**2" }, + { 250, -1, 0, "DQLAO", "heatflux la over water", "W/m**2" }, + { 251, -1, 0, "DQTHO", "heatflux net over water", "W/m**2" }, + { 252, -1, 0, "DQSWI", "heatflux sw over seaice", "W/m**2" }, + { 253, -1, 0, "DQLWI", "heatflux lw over seaice", "W/m**2" }, + { 254, -1, 0, "DQSEI", "heatflux se over seaice", "W/m**2" }, + { 255, -1, 0, "DQLAI", "heatflux la over seaice", "W/m**2" }, + { 256, -1, 0, "DQTHI", "heatflux net over seaice", "W/m**2" }, + { 257, -1, 0, "DTICEO", "Equi. temp over seaice", "K" }, + { 270, -1, 0, "AOFLNHWO", "oasis net heat flux water", "W/m**2" }, + { 271, -1, 0, "AOFLSHWO", "oasis downward short wave", "W/m**2" }, + { 272, -1, 0, "AOFLRHIO", "oasis residual heat flux ice", "W/m**2" }, + { 273, -1, 0, "AOFLCHIO", "oasis conduct. heat flux ice", "W/m**2" }, + { 274, -1, 0, "AOFLFRWO", "oasis fluid fresh water flux", "m/s" }, + { 275, -1, 0, "AOFLFRIO", "oasis solid fresh water flux", "m/s" }, + { 276, -1, 0, "AOFLTXWO", "oasis wind stress water x", "Pa/102" }, + { 277, -1, 0, "AOFLTYWO", "oasis wind stress water y", "Pa/102" }, + { 278, -1, 0, "AOFLTXIO", "oasis wind stress ice x", "Pa/102" }, + { 279, -1, 0, "AOFLTYIO", "oasis wind stress ice x", "Pa/102" }, + { 280, -1, 0, "AOFLWSVO", "oasis wind speed", "m/s" }, +}; + +static const param_type ecmwf[] = { + { 1, -1, 0, "STRF", "Stream function", "m**2 s**-1" }, + { 2, -1, 0, "VPOT", "Velocity potential", "m**2 s**-1" }, + { 3, -1, 0, "PT", "Potential temperature", "K" }, + { 4, -1, 0, "EQPT", "Equivalent potential temperature", "K" }, + { 5, -1, 0, "SEPT", "Saturated equivalent potential temperature", "K" }, + { 11, -1, 0, "UDVW", "U component of divergent wind", "m s**-1" }, + { 12, -1, 0, "VDVW", "V component of divergent wind", "m s**-1" }, + { 13, -1, 0, "URTW", "U component of rotational wind", "m s**-1" }, + { 14, -1, 0, "VRTW", "V component of rotational wind", "m s**-1" }, + { 21, -1, 0, "UCTP", "Unbalanced component of temperature", "K" }, + { 22, -1, 0, "UCLN", "Unbalanced component of logarithm of surface pressure", NULL }, + { 23, -1, 0, "UCDV", "Unbalanced component of divergence", "s**-1" }, + { 26, -1, 0, "CL", "Lake cover", NULL }, + { 27, -1, 0, "CVL", "Low vegetation cover", NULL }, + { 28, -1, 0, "CVH", "High vegetation cover", NULL }, + { 29, -1, 0, "TVL", "Type of low vegetation", NULL }, + { 30, -1, 0, "TVH", "Type of high vegetation", NULL }, + { 31, -1, 0, "CI", "Sea-ice cover", NULL }, + { 32, -1, 0, "ASN", "Snow albedo", NULL }, + { 33, -1, 0, "RSN", "Snow density kg", "m**-3" }, + { 34, -1, 0, "SSTK", "Sea surface temperature", "K" }, + { 35, -1, 0, "ISTL1", "Ice surface temperature layer 1", "K" }, + { 36, -1, 0, "ISTL2", "Ice surface temperature layer 2", "K" }, + { 37, -1, 0, "ISTL3", "Ice surface temperature layer 3", "K" }, + { 38, -1, 0, "ISTL4", "Ice surface temperature layer 4", "K" }, + { 39, -1, 0, "SWVL1", "Volumetric soil water layer 1", "m**3 m**-3" }, + { 40, -1, 0, "SWVL2", "Volumetric soil water layer 2", "m**3 m**-3" }, + { 41, -1, 0, "SWVL3", "Volumetric soil water layer 3", "m**3 m**-3" }, + { 42, -1, 0, "SWVL4", "Volumetric soil water layer 4", "m**3 m**-3" }, + { 43, -1, 0, "SLT", "Soil type", NULL }, + { 44, -1, 0, "ES", "Snow evaporation m of water", NULL }, + { 45, -1, 0, "SMLT", "Snowmelt m of water", NULL }, + { 46, -1, 0, "SDUR", "Solar duration", "s" }, + { 47, -1, 0, "DSRP", "Direct solar radiation", "w m**-2" }, + { 48, -1, 0, "MAGSS", "Magnitude of surface stress", "N m**-2 s" }, + { 49, -1, 0, "WG10", "Wind gust at 10 metres", "m s**-1" }, + { 50, -1, 0, "LSPF", "Large-scale precipitation fraction", "s" }, + { 51, -1, 0, "MX2T24", "Maximum 2 metre temperature", "K" }, + { 52, -1, 0, "MN2T24", "Minimum 2 metre temperature", "K" }, + { 53, -1, 0, "MONT", "Montgomery potential", "m**2 s**-2" }, + { 54, -1, 0, "PRES", "Pressure", "Pa" }, + { 55, -1, 0, "MEAN2T24", "Mean 2 metre temperature past 24 hours", "K" }, + { 56, -1, 0, "MEAN2D24", "Mean 2 metre dewpoint temperature past 24 hours", "K" }, + { 60, -1, 0, "PV", "Potential vorticity", "K m**2 kg**-1 s**-1" }, + { 127, -1, 0, "AT", "Atmospheric tide", NULL }, + { 128, -1, 0, "BV", "Budget values", NULL }, + { 129, -1, 0, "Z", "Geopotential", "m**2 s**-2" }, + { 130, -1, 0, "T", "Temperature", "K" }, + { 131, -1, 0, "U", "U velocity", "m s**-1" }, + { 132, -1, 0, "V", "V velocity", "m s**-1" }, + { 133, -1, 0, "Q", "Specific humidity", "kg kg**-1" }, + { 134, -1, 0, "SP", "Surface pressure", "Pa" }, + { 135, -1, 0, "W", "Vertical velocity", "Pa s**-1" }, + { 136, -1, 0, "TCW", "Total column water", "kg m**-2" }, + { 137, -1, 0, "TCWV", "Total column water vapour", "kg m**-2" }, + { 138, -1, 0, "VO", "Vorticity (relative)", "s**-1" }, + { 139, -1, 0, "STL1", "Soil temperature level 1", "K" }, + { 140, -1, 0, "SWL1", "Soil wetness level 1 m of water", NULL }, + { 141, -1, 0, "SD", "Snow depth 1 m of water equivalent", NULL }, + { 142, -1, 0, "LSP", "Stratiform precipitation (Large scale precipitation)", "m" }, + { 143, -1, 0, "CP", "Convective precipitation", "m" }, + { 144, -1, 0, "SF", "Snowfall (convective + stratiform)", "m" }, + { 145, -1, 0, "BLD", "Boundary layer dissipation", "W m**-2 s" }, + { 146, -1, 0, "SSHF", "Surface sensible heat flux", "W m**-2 s" }, + { 147, -1, 0, "SLHF", "Surface latent heat flux", "W m**-2 s" }, + { 148, -1, 0, "CHNK", "Charnock", NULL }, + { 149, -1, 0, "SNR", "Surface net radiation", "W m**-2 s" }, + { 150, -1, 0, "TNR", "Top net radiation", NULL }, + { 151, -1, 0, "MSL", "Mean sea-level pressure", "Pa" }, + { 152, -1, 0, "LNSP", "Logarithm of surface pressure", NULL }, + { 153, -1, 0, "SWHR", "Short-wave heating rate", "K" }, + { 154, -1, 0, "LWHR", "Long-wave heating rate", "K" }, + { 155, -1, 0, "D", "Divergence", "s**-1" }, + { 156, -1, 0, "GH", "Height m Geopotential height", NULL }, + { 157, -1, 0, "R", "Relative humidity", "%" }, + { 158, -1, 0, "TSP", "Tendency of surface pressure", "Pa s**-1" }, + { 159, -1, 0, "BLH", "Boundary layer height", "m" }, + { 160, -1, 0, "SDOR", "Standard deviation of orography", NULL }, + { 161, -1, 0, "ISOR", "Anisotropy of sub-gridscale orography", NULL }, + { 162, -1, 0, "ANOR", "Angle of sub-gridscale orography", "rad" }, + { 163, -1, 0, "SLOR", "Slope of sub-gridscale orography", NULL }, + { 164, -1, 0, "TCC", "Total cloud cover", NULL }, + { 165, -1, 0, "U10M", "10 metre U wind component", "m s**-1" }, + { 166, -1, 0, "V10M", "10 metre V wind component", "m s**-1" }, + { 167, -1, 0, "T2M", "2 metre temperature", "K" }, + { 168, -1, 0, "D2M", "2 metre dewpoint temperature", "K" }, + { 169, -1, 0, "SSRD", "Surface solar radiation downwards", "W m**-2 s" }, + { 170, -1, 0, "STL2", "Soil temperature level 2", "K" }, + { 171, -1, 0, "SWL2", "Soil wetness level 2", "m of water" }, + { 172, -1, 0, "LSM", "Land/sea mask", NULL }, + { 173, -1, 0, "SR", "Surface roughness", "m" }, + { 174, -1, 0, "AL", "Albedo", NULL }, + { 175, -1, 0, "STRD", "Surface thermal radiation downwards", "W m**-2 s" }, + { 176, -1, 0, "SSR", "Surface solar radiation", "W m**-2 s" }, + { 177, -1, 0, "STR", "Surface thermal radiation", "W m**-2 s" }, + { 178, -1, 0, "TSR", "Top solar radiation", "W m**-2 s" }, + { 179, -1, 0, "TTR", "Top thermal radiation", "W m**-2 s" }, + { 180, -1, 0, "EWSS", "East/West surface stress", "N m**-2 s" }, + { 181, -1, 0, "NSSS", "North/South surface stress", "N m**-2 s" }, + { 182, -1, 0, "E", "Evaporation", "m of water" }, + { 183, -1, 0, "STL3", "Soil temperature level 3", "K" }, + { 184, -1, 0, "SWL3", "Soil wetness level 3", "m of water" }, + { 185, -1, 0, "CCC", "Convective cloud cover", NULL }, + { 186, -1, 0, "LCC", "Low cloud cover", NULL }, + { 187, -1, 0, "MCC", "Medium cloud cover", NULL }, + { 188, -1, 0, "HCC", "High cloud cover", NULL }, + { 189, -1, 0, "SUND", "Sunshine duration", "s" }, + { 190, -1, 0, "EWOV", "EW component of subgrid orographic variance", "m**2" }, + { 191, -1, 0, "NSOV", "NS component of subgrid orographic variance", "m**2" }, + { 192, -1, 0, "NWOV", "NWSE component of subgrid orographic variance", "m**2" }, + { 193, -1, 0, "NEOV", "NESW component of subgrid orographic variance", "m**2" }, + { 194, -1, 0, "BTMP", "Brightness temperature", "K" }, + { 195, -1, 0, "LGWS", "Lat. component of gravity wave stress", "N m**-2 s" }, + { 196, -1, 0, "MGWS", "Meridional component of gravity wave stress", "N m**-2 s" }, + { 197, -1, 0, "GWD", "Gravity wave dissipation", "W m**-2 s" }, + { 198, -1, 0, "SRC", "Skin reservoir content", "m of water" }, + { 199, -1, 0, "VEG", "Vegetation fraction", NULL }, + { 200, -1, 0, "VSO", "Variance of sub-gridscale orography", "m**2" }, + { 201, -1, 0, "MX2T", "Maximum 2 metre temperature since previous post-processing", "K" }, + { 202, -1, 0, "MN2T", "Minimum 2 metre temperature since previous post-processing", "K" }, + { 203, -1, 0, "O3", "Ozone mass mixing ratio", "kg kg**-1" }, + { 204, -1, 0, "PAW", "Precipiation analysis weights", NULL }, + { 205, -1, 0, "RO", "Runoff", "m" }, + { 206, -1, 0, "TCO3", "Total column ozone", "kg m**-2" }, + { 207, -1, 0, "WS10", "10 meter windspeed", "m s**-1" }, + { 208, -1, 0, "TSRC", "Top net solar radiation, clear sky", "W m**-2" }, + { 209, -1, 0, "TTRC", "Top net thermal radiation, clear sky", "W m**-2" }, + { 210, -1, 0, "SSRC", "Surface net solar radiation, clear sky", "W m**-2" }, + { 211, -1, 0, "STRC", "Surface net thermal radiation, clear sky", "W m**-2" }, + { 212, -1, 0, "SI", "Solar insolation", "W m**-2" }, + { 214, -1, 0, "DHR", "Diabatic heating by radiation", "K" }, + { 215, -1, 0, "DHVD", "Diabatic heating by vertical diffusion", "K" }, + { 216, -1, 0, "DHCC", "Diabatic heating by cumulus convection", "K" }, + { 217, -1, 0, "DHLC", "Diabatic heating large-scale condensation", "K" }, + { 218, -1, 0, "VDZW", "Vertical diffusion of zonal wind", "m s**-1" }, + { 219, -1, 0, "VDMW", "Vertical diffusion of meridional wind", "m s**-1" }, + { 220, -1, 0, "EWGD", "EW gravity wave drag tendency", "m s**-1" }, + { 221, -1, 0, "NSGD", "NS gravity wave drag tendency", "m s**-1" }, + { 222, -1, 0, "CTZW", "Convective tendency of zonal wind", "m s**-1" }, + { 223, -1, 0, "CTMW", "Convective tendency of meridional wind", "m s**-1" }, + { 224, -1, 0, "VDH", "Vertical diffusion of humidity", "kg kg**-1" }, + { 225, -1, 0, "HTCC", "Humidity tendency by cumulus convection", "kg kg**-1" }, + { 226, -1, 0, "HTLC", "Humidity tendency large-scale condensation", "kg kg**-1" }, + { 227, -1, 0, "CRNH", "Change from removing negative humidity", "kg kg**-1" }, + { 228, -1, 0, "TP", "Total precipitation", "m" }, + { 229, -1, 0, "IEWS", "Instantaneous X surface stress", "N m**-2" }, + { 230, -1, 0, "INSS", "Instantaneous Y surface stress", "N m**-2" }, + { 231, -1, 0, "ISHF", "Instantaneous surface heat flux", "W m**-2" }, + { 232, -1, 0, "IE", "Instantaneous moisture flux", "kg m**-2 s" }, + { 233, -1, 0, "ASQ", "Apparent surface humidity", "kg kg**-1" }, + { 234, -1, 0, "LSRH", "Logarithm of surface roughness length for heat", NULL }, + { 235, -1, 0, "SKT", "Skin temperature", "K" }, + { 236, -1, 0, "STL4", "Soil temperature level 4", "K" }, + { 237, -1, 0, "SWL4", "Soil wetness level 4", "m" }, + { 238, -1, 0, "TSN", "Temperature of snow layer", "K" }, + { 239, -1, 0, "CSF", "Convective snowfall", "m of water equivalent" }, + { 240, -1, 0, "LSF", "Large-scale snowfall", "m of water equivalent" }, + { 241, -1, 0, "ACF", "Accumulated cloud fraction tendency", NULL }, + { 242, -1, 0, "ALW", "Accumulated liquid water tendency", NULL }, + { 243, -1, 0, "FAL", "Forecast albedo", NULL }, + { 244, -1, 0, "FSR", "Forecast surface roughness", "m" }, + { 245, -1, 0, "FLSR", "Forecast log of surface roughness for heat", NULL }, + { 246, -1, 0, "CLWC", "Cloud liquid water content", "kg kg**-1" }, + { 247, -1, 0, "CIWC", "Cloud ice water content", "kg kg**-1" }, + { 248, -1, 0, "CC", "Cloud cover", NULL }, + { 249, -1, 0, "AIW", "Accumulated ice water tendency", NULL }, + { 250, -1, 0, "ICE", "Ice age", NULL }, + { 251, -1, 0, "ATTE", "Adiabatic tendency of temperature", "K" }, + { 252, -1, 0, "ATHE", "Adiabatic tendency of humidity", "kg kg**-1" }, + { 253, -1, 0, "ATZE", "Adiabatic tendency of zonal wind", "m s**-1" }, + { 254, -1, 0, "ATMW", "Adiabatic tendency of meridional wind", "m s**-1" }, +}; + +static const param_type remo[] = { + { 14, -1, 0, "FTKVM", "turbulent transfer coefficient of momentum in the atmosphere", NULL }, + { 15, -1, 0, "FTKVH", "turbulent transfer coefficient of heat in the atmosphere", NULL }, + { 38, -1, 0, "U10ER", "10m u-velocity", "m/s" }, + { 39, -1, 0, "V10ER", "10m v-velocity", "m/s" }, + { 40, -1, 0, "CAPE", "convetive available potential energy", NULL }, + { 41, -1, 0, "GHPBL", "height of the planetary boudary layer", "gpm" }, + { 42, -1, 0, "BETA", "BETA", NULL }, + { 43, -1, 0, "WMINLOK", "WMINLOK", NULL }, + { 44, -1, 0, "WMAXLOK", "WMAXLOK", NULL }, + { 45, -1, 0, "VBM10M", "maximum of the expected gust velocity near the surface", "m/s" }, + { 46, -1, 0, "BFLHS", "surface sensible heat flux", "W/m**2" }, + { 47, -1, 0, "BFLQDS", "surface latent heat flux", "W/m**2" }, + { 48, -1, 0, "TMCM", "turbulent transfer coefficient of momentum at the surface", NULL }, + { 49, -1, 0, "TRSOL", "TRSOL", NULL }, + { 50, -1, 0, "TMCH", "turbulent transfer coefficient of heat at the surface", NULL }, + { 51, -1, 0, "EMTEF", "EMTEF", NULL }, + { 52, -1, 0, "TRSOF", "TRSOF", NULL }, + { 53, -1, 0, "DRAIN", "drainage", "mm" }, + { 54, -1, 0, "TSL", "surface temperature (land)", "K" }, + { 55, -1, 0, "TSW", "surface temperature (water)", "K" }, + { 56, -1, 0, "TSI", "surface temperature (ice)", "K" }, + { 57, -1, 0, "USTRL", "surface u-stress (land)", "Pa" }, + { 58, -1, 0, "USTRW", "surface u-stress (water)", "Pa" }, + { 59, -1, 0, "USTRI", "surface u-stress (ice)", "Pa" }, + { 60, -1, 0, "VSTRL", "surface v-stress (land)", "Pa" }, + { 61, -1, 0, "VSTRW", "surface v-stress (water)", "Pa" }, + { 62, -1, 0, "VSTRI", "surface v-stress (ice)", "Pa" }, + { 63, -1, 0, "EVAPL", "surface evaporation (land)", "mm" }, + { 64, -1, 0, "EVAPW", "surface evaporation (water)", "mm" }, + { 65, -1, 0, "EVAPI", "surface evaporation (ice)", "mm" }, + { 66, -1, 0, "AHFLL", "surface latent heat flux (land)", "W/m**2" }, + { 67, -1, 0, "AHFLW", "surface latent heat flux (water)", "W/m**2" }, + { 68, -1, 0, "AHFLI", "surface latent heat flux (ice)", "W/m**2" }, + { 69, -1, 0, "AHFSL", "surface sensible heat flux (land)", "W/m**2" }, + { 70, -1, 0, "AHFSW", "surface sensible heat flux (water)", "W/m**2" }, + { 71, -1, 0, "AHFSI", "surface sensible heat flux (ice)", "W/m**2" }, + { 72, -1, 0, "AZ0L", "surface roughness length (land)", "m" }, + { 73, -1, 0, "AZ0W", "surface roughness length (water)", "m" }, + { 74, -1, 0, "AZ0I", "surface roughness length (ice)", "m" }, + { 75, -1, 0, "ALSOL", "surface albedo (land)", "fract." }, + { 76, -1, 0, "ALSOW", "surface albedo (water)", "fract." }, + { 77, -1, 0, "ALSOI", "surface albedo (ice)", "fract." }, + { 81, -1, 0, "TMCHL", "turbulent transfer coefficient of heat at the surface (land)", NULL }, + { 82, -1, 0, "TMCHW", "turbulent transfer coefficient of heat at the surface (water)", NULL }, + { 83, -1, 0, "TMCHI", "turbulent transfer coefficient of heat at the surface (ice)", NULL }, + { 84, -1, 0, "QDBL", "specific humidity surface (land)", "kg/kg" }, + { 85, -1, 0, "QDBW", "specific humidity surface (water)", "kg/kg" }, + { 86, -1, 0, "QDBI", "specific humidity surface (ice)", "kg/kg" }, + { 87, -1, 0, "BFLHSL", "surface sensible heat flux (land)", "W/m**2" }, + { 88, -1, 0, "BFLHSW", "surface sensible heat flux (water)", "W/m**2" }, + { 89, -1, 0, "BFLHSI", "surface sensible heat flux (ice)", "W/m**2" }, + { 90, -1, 0, "BFLQDSL", "surface latent heat flux (land)", "W/m**2" }, + { 91, -1, 0, "BFLQDSW", "surface latent heat flux (water)", "W/m**2" }, + { 92, -1, 0, "BFLQDSI", "surface latent heat flux (ice)", "W/m**2" }, + { 93, -1, 0, "AHFICE", "sea-ice: conductive heat", "W/m" }, + { 94, -1, 0, "QRES", "residual heat flux for melting sea ice", "W/m**2" }, + { 95, -1, 0, "SRFL", "SRFL", NULL }, + { 96, -1, 0, "QDBOXS", "horizontal transport of water vapour", "kg/m**2" }, + { 97, -1, 0, "QWBOXS", "horizontal transport of cloud water", "kg/m**2" }, + { 98, -1, 0, "EKBOXS", "horizontal transport of kinetic energy", "(3600*J)/m**2" }, + { 99, -1, 0, "FHBOXS", "horizontal transport of sensible heat", "(3600*J)/m**2" }, + { 100, -1, 0, "FIBOXS", "horizontal transport of potential energy", "(3600*J)/m**2" }, + { 101, -1, 0, "TLAMBDA", "heat conductivity of dry soil", "W/(K*m)" }, + { 103, -1, 0, "DLAMBDA", "parameter for increasing the heat conductivity of the soil", NULL }, + { 104, -1, 0, "PORVOL", "pore volume", NULL }, + { 105, -1, 0, "FCAP", "field capacity of soil", NULL }, + { 106, -1, 0, "WI3", "fraction of frozen soil", NULL }, + { 107, -1, 0, "WI4", "fraction of frozen soil", NULL }, + { 108, -1, 0, "WI5", "fraction of frozen soil", NULL }, + { 109, -1, 0, "WI", "fraction of frozen soil", NULL }, + { 110, -1, 0, "WICL", "fraction of frozen soil", NULL }, + { 112, -1, 0, "QDB", "specific humidity surface", "kg/kg" }, + { 129, -1, 0, "FIB", "surface geopotential (orography)", "m" }, + { 130, -1, 0, "T", "temperature", "K" }, + { 131, -1, 0, "U", "u-velocity", "m/s" }, + { 132, -1, 0, "V", "v-velocity", "m/s" }, + { 133, -1, 0, "QD", "specific humidity", "kg/kg" }, + { 134, -1, 0, "PS", "Surface pressure", "Pa" }, + { 135, -1, 0, "VERVEL", "Vertical velocity", "Pa/s" }, + { 138, -1, 0, "SVO", "vorticity", "1/s" }, + { 139, -1, 0, "TS", "surface temperature", "K" }, + { 140, -1, 0, "WS", "soil wetness", "m" }, + { 141, -1, 0, "SN", "snow depth", "m" }, + { 142, -1, 0, "APRL", "large scale precipitation", "mm" }, + { 143, -1, 0, "APRC", "convective precipitation", "mm" }, + { 144, -1, 0, "APRS", "snow fall", "mm" }, + { 145, -1, 0, "VDIS", "boundary layer dissipation", "W/m**2" }, + { 146, -1, 0, "AHFS", "surface sensible heat flux", "W/m**2" }, + { 147, -1, 0, "AHFL", "surface latent heat flux", "W/m**2" }, + { 148, -1, 0, "STREAM", "streamfunction", "m**2/s" }, + { 149, -1, 0, "VELOPOT", "velocity potential", "m**2/s" }, + { 151, -1, 0, "PSRED", "mean sea level pressure", "Pa" }, + { 152, -1, 0, "LSP", "log surface pressure", NULL }, + { 153, -1, 0, "QW", "liquid water content", "kg/kg" }, + { 155, -1, 0, "SD", "divergence", "1/s" }, + { 156, -1, 0, "FI", "geopotential height", "gpm" }, + { 159, -1, 0, "USTAR3", "ustar**3", "m**3/s**3" }, + { 160, -1, 0, "RUNOFF", "surface runoff", "mm" }, + { 162, -1, 0, "ACLC", "cloud cover", "fract." }, + { 163, -1, 0, "ACLCV", "total cloud cover", "fract." }, + { 164, -1, 0, "ACLCOV", "total cloud cover", "fract." }, + { 165, -1, 0, "U10", "10m u-velocity", "m/s" }, + { 166, -1, 0, "V10", "10m v-velocity", "m/s" }, + { 167, -1, 0, "TEMP2", "2m temperature", "K" }, + { 168, -1, 0, "DEW2", "2m dew point temperature", "K" }, + { 169, -1, 0, "TSURF", "surface temperature (land)", "K" }, + { 170, -1, 0, "TD", "deep soil temperature", "K" }, + { 171, -1, 0, "WIND10", "10m windspeed", "m/s" }, + { 172, -1, 0, "BLA", "land sea mask", "fract." }, + { 173, -1, 0, "AZ0", "surface roughness length", "m" }, + { 174, -1, 0, "ALB", "surface background albedo", "fract." }, + { 175, -1, 0, "ALBEDO", "surface albedo", "fract." }, + { 176, -1, 0, "SRADS", "net surface solar radiation", "W/m**2" }, + { 177, -1, 0, "TRADS", "net surface thermal radiation", "W/m**2" }, + { 178, -1, 0, "SRAD0", "net top solar radiation", "W/m**2" }, + { 179, -1, 0, "TRAD0", "top thermal radiation (OLR)", "W/m**2" }, + { 180, -1, 0, "USTR", "surface u-stress", "Pa" }, + { 181, -1, 0, "VSTR", "surface v-stress", "Pa" }, + { 182, -1, 0, "EVAP", "surface evaporation", "mm" }, + { 183, -1, 0, "TDCL", "soil temperature", "K" }, + { 185, -1, 0, "SRAFS", "net surf. solar radiation (clear sky)", "W/m**2" }, + { 186, -1, 0, "TRAFS", "net surf. thermal radiation (clear sky)", "W/m**2" }, + { 187, -1, 0, "SRAF0", "net top solar radiation (clear sky)", "W/m**2" }, + { 188, -1, 0, "TRAF0", "net top thermal radiation (clear sky)", "W/m**2" }, + { 189, -1, 0, "SCLFS", "surface solar cloud forcing", "W/m**2" }, + { 190, -1, 0, "TCLFS", "surface thermal cloud forcing", "W/m**2" }, + { 191, -1, 0, "SCLF0", "top solar cloud forcing", "W/m**2" }, + { 192, -1, 0, "TCLF0", "top thermal cloud forcing", "W/m**2" }, + { 194, -1, 0, "WL", "skin reservoir content", "m" }, + { 195, -1, 0, "USTRGW", "u-gravity wave stress", "Pa" }, + { 196, -1, 0, "VSTRGW", "v-gravity wave stress", "Pa" }, + { 197, -1, 0, "VDISGW", "gravity wave dissipation", "W/m**2" }, + { 198, -1, 0, "VGRAT", "vegetation ratio", NULL }, + { 199, -1, 0, "VAROR", "orographic variance (for surface runoff)", NULL }, + { 200, -1, 0, "VLT", "leaf area index", NULL }, + { 201, -1, 0, "T2MAX", "maximum 2m-temperature", "K" }, + { 202, -1, 0, "T2MIN", "minimum 2m-temperature", "K" }, + { 203, -1, 0, "SRAD0U", "top solar radiation upward", "W/m**2" }, + { 204, -1, 0, "SRADSU", "surface solar radiation upward", "W/m**2" }, + { 205, -1, 0, "TRADSU", "surface thermal radiation upward", "W/m**2" }, + { 206, -1, 0, "TSN", "snow temperature", "K" }, + { 207, -1, 0, "TD3", "soil temperature", "K" }, + { 208, -1, 0, "TD4", "soil temperature", "K" }, + { 209, -1, 0, "TD5", "soil temperature", "K" }, + { 210, -1, 0, "SEAICE", "sea ice cover", "fract." }, + { 211, -1, 0, "SICED", "sea ice depth", "m" }, + { 212, -1, 0, "FOREST", "vegetation type", NULL }, + { 213, -1, 0, "TEFF", "(effective) sea-ice skin temperature", "K" }, + { 214, -1, 0, "TSMAX", "maximum surface temperature", "K" }, + { 215, -1, 0, "TSMIN", "minimum surface temperature", "K" }, + { 216, -1, 0, "WIMAX", "maximum 10m-wind speed", "m/s" }, + { 217, -1, 0, "TOPMAX", "maximum height of convective cloud tops", "Pa" }, + { 218, -1, 0, "SNMEL", "snow melt", "mm" }, + { 220, -1, 0, "TSLIN", "land: residual surface heat budget", "W/m**2" }, + { 221, -1, 0, "DSNAC", "snow depth change", "mm" }, + { 222, -1, 0, "EMTER", "EMTER", NULL }, + { 223, -1, 0, "ACLCAC", "cloud cover", "fract." }, + { 224, -1, 0, "TKE", "turbulent kinetic energy", NULL }, + { 226, -1, 0, "FAO", "FAO data set (soil data flags)", NULL }, + { 227, -1, 0, "RGCGN", "heat capacity of soil", NULL }, + { 229, -1, 0, "WSMX", "field capacity of soil", NULL }, + { 230, -1, 0, "QVI", "vertically integrated specific humidity", "kg/m**2" }, + { 231, -1, 0, "ALWCVI", "vertically integrated liquid water cont.", "kg/m**2" }, + { 232, -1, 0, "GLAC", "glacier mask", NULL }, + { 253, -1, 0, "PHI", "latitude in real coordinates", "degrees_north" }, + { 254, -1, 0, "RLA", "longitude in real coordinates", "degrees_east" }, + { 259, -1, 0, "WINDSPEED", "windspeed (sqrt(u**2+v**2))", NULL }, + { 260, -1, 0, "PRECIP", "total precipitation", NULL }, +}; + +static const param_type cosmo002[] = { + { 1, -1, 0, "P", "pressure", "Pa" }, + { 2, -1, 0, "PMSL", "mean sea level pressure", "Pa" }, + { 3, -1, 0, "DPSDT", "surface pressure change", "Pa s-1" }, + { 6, -1, 0, "FI", "geopotential", "m2 s-2" }, + { 8, -1, 0, "HH", "height", "m" }, + { 10, -1, 0, "TO3", "vertical integrated ozone content", "Dobson" }, + { 11, -1, 0, "T", "temperature", "K" }, + { 15, -1, 0, "TMAX", "2m maximum temperature", "K" }, + { 16, -1, 0, "TMIN", "2m minimum temperature", "K" }, + { 17, -1, 0, "TD", "2m dew point temperature", "K" }, + { 31, -1, 0, "DD", "undefined", "undefined" }, + { 32, -1, 0, "FF", "undefined", "undefined" }, + { 33, -1, 0, "U", "U-component of wind", "m s-1" }, + { 34, -1, 0, "V", "V-component of wind", "m s-1" }, + { 39, -1, 0, "OMEGA", "omega", "Pa s-1" }, + { 40, -1, 0, "W", "vertical wind velocity", "m s-1" }, + { 51, -1, 0, "QV", "specific humidity", "kg kg-1" }, + { 52, -1, 0, "RELHUM", "relative humidity", "%" }, + { 54, -1, 0, "TQV", "precipitable water", "kg m-2" }, + { 57, -1, 0, "AEVAP", "surface evaporation", "kg m-2" }, + { 58, -1, 0, "TQI", "vertical integrated cloud ice", "kg m-2" }, + { 59, -1, 0, "TOT_PR", "total precipitation rate", "kg m-2 s-1" }, + { 61, -1, 0, "TOT_PREC", "total precipitation amount", "kg m-2" }, + { 65, -1, 0, "W_SNOW", "surface snow amount", "m" }, + { 66, -1, 0, "H_SNOW", "thickness of snow", "m" }, + { 71, -1, 0, "CLCT", "total cloud cover", "1" }, + { 72, -1, 0, "CLC_CON", "convective cloud area fraction", "1" }, + { 73, -1, 0, "CLCL", "low cloud cover", "1" }, + { 74, -1, 0, "CLCM", "medium cloud cover", "1" }, + { 75, -1, 0, "CLCH", "high cloud cover", "1" }, + { 76, -1, 0, "TQC", "vertical integrated cloud water", "kg m-2" }, + { 78, -1, 0, "SNOW_CON", "convective snowfall", "kg m-2" }, + { 79, -1, 0, "SNOW_GSP", "large scale snowfall", "kg m-2" }, + { 81, -1, 0, "FR_LAND", "land-sea fraction", "1" }, + { 83, -1, 0, "Z0", "surface roughness length", "m" }, + { 84, -1, 0, "ALB_RAD", "surface albedo", "1" }, + { 85, -1, 0, "TSOIL", "soil surface temperature", "K" }, + { 86, -1, 0, "WSOIL", "water content of 1. soil layer", "m" }, + { 87, -1, 0, "PLCOV", "vegetation area fraction", "1" }, + { 90, -1, 0, "RUNOFF", "subsurface runoff", "kg m-2" }, + { 91, -1, 0, "FR_ICE", "sea ice area fraction", "1" }, + { 92, -1, 0, "H_ICE", "sea ice thickness", "m" }, + { 111, -1, 0, "ASOB", "averaged surface net downward shortwave radiation", "W m-2" }, + { 112, -1, 0, "ATHB", "averaged surface net downward longwave radiation", "W m-2" }, + { 113, -1, 0, "ASOB", "averaged TOA net downward shortwave radiation", "W m-2" }, + { 114, -1, 0, "ATHB", "averaged TOA outgoing longwave radiation", "W m-2" }, + { 115, -1, 0, "ASWDIR", "direct downward sw radiation at the surface", "W m-2" }, + { 116, -1, 0, "ASWDIFD", "diffuse downward sw radiation at the surface", "W m-2" }, + { 117, -1, 0, "ASWDIFU", "diffuse upwnward sw radiation at the surface", "W m-2" }, + { 118, -1, 0, "ALWD", "downward lw radiation at the surface", "W m-2" }, + { 119, -1, 0, "ALWU", "upward lw radiation at the surface", "W m-2" }, + { 121, -1, 0, "ALHFL", "averaged surface latent heat flux", "W m-2" }, + { 122, -1, 0, "ASHFL", "averaged surface sensible heat flux", "W m-2" }, + { 124, -1, 0, "AUMFL", "averaged eastward stress", "Pa" }, + { 125, -1, 0, "AVMFL", "averaged northward stress", "Pa" }, + { 128, -1, 0, "SUNSH", "undefined", "undefined" }, + { 129, -1, 0, "SUNSH2", "undefined", "undefined" }, + { 130, -1, 0, "SUN_SUM", "undefined", "undefined" }, + { 131, -1, 0, "SUN_SUM2", "undefined", "undefined" }, + { 133, -1, 0, "FCOR", "undefined", "undefined" }, + { 134, -1, 0, "SKYVIEW", "sky-view factor", "1" }, + { 137, -1, 0, "SWDIR_COR", "topo correction of direct solar radiarion", "1" }, +}; + +static const param_type cosmo201[] = { + { 5, -1, 0, "APAB", "&", "W m-2" }, + { 13, -1, 0, "SOHR_RAD", "&", "K s-1" }, + { 14, -1, 0, "THHR_RAD", "&", "K s-1" }, + { 20, -1, 0, "DURSUN", "duration of sunshine", "s" }, + { 29, -1, 0, "CLC", "cloud area fraction", "1" }, + { 30, -1, 0, "CLC_SGS", "grid scale cloud area fraction", "1" }, + { 31, -1, 0, "QC", "specific cloud liquid water content", "kg kg-1" }, + { 33, -1, 0, "QI", "specific cloud ice content", "kg kg-1" }, + { 35, -1, 0, "QR", "specific rain content", "kg kg-1" }, + { 36, -1, 0, "QS", "specific snow content", "kg kg-1" }, + { 37, -1, 0, "TQR", "total rain water content vertically integrated", "kg m-2" }, + { 38, -1, 0, "TQS", "total snow content vertically integrated", "kg m-2" }, + { 39, -1, 0, "QG", "specific graupel content", "kg kg-1" }, + { 40, -1, 0, "TQG", "total graupel content vertically integrated", "kg m-2" }, + { 41, -1, 0, "TWATER", "cloud condensed water content", "kg m-2" }, + { 42, -1, 0, "TDIV_HUM", "atmosphere water divergence", "kg m-2" }, + { 43, -1, 0, "QC_RAD", "sub scale specific cloud liquid water content", "kg kg-1" }, + { 44, -1, 0, "QI_RAD", "sub scale specific cloud ice content", "kg kg-1" }, + { 61, -1, 0, "CLW_CON", "convective cloud liquid water", "1" }, + { 68, -1, 0, "HBAS_CON", "height of convective cloud base", "m" }, + { 69, -1, 0, "HTOP_CON", "height of convective cloud top", "m" }, + { 70, -1, 0, "HBAS_CONI", "height of convective cloud base", "m" }, + { 71, -1, 0, "HTOP_CONI", "height of convective cloud top", "m" }, + { 72, -1, 0, "BAS_CON", "index of convective cloud base", "1" }, + { 73, -1, 0, "TOP_CON", "index of convective cloud top", "1" }, + { 74, -1, 0, "DT_CON", "convective tendency of temperature", "K s-1" }, + { 75, -1, 0, "DQV_CON", "convective tendency of specific humidity", "s-1" }, + { 78, -1, 0, "DU_CON", "convective tendency of u-wind component", "m s-2" }, + { 79, -1, 0, "DV_CON", "convective tendency of v-wind component", "m s-2" }, + { 82, -1, 0, "HTOP_DC", "height of dry convection top", "m" }, + { 84, -1, 0, "HZEROCL", "height of freezing level", "m" }, + { 85, -1, 0, "SNOWLMT", "height of the snow fall limit in m above sea level", "m" }, + { 86, -1, 0, "HCBAS", "height of cloud base", "m" }, + { 87, -1, 0, "HCTOP", "height of cloud top", "m" }, + { 91, -1, 0, "C_T_LK", "&", "1" }, + { 92, -1, 0, "GAMSO_LK", "&", "m-1" }, + { 93, -1, 0, "DP_BS_LK", "&", "m" }, + { 94, -1, 0, "H_B1_LK", "&", "m" }, + { 95, -1, 0, "H_ML_LK", "&", "m" }, + { 96, -1, 0, "DEPTH_LK", "lake depth", "m" }, + { 97, -1, 0, "FETCH_LK", "wind fetch over lake", "m" }, + { 99, -1, 0, "QRS", "precipitation water (water loading)", "1" }, + { 100, -1, 0, "PRR_GSP", "mass flux density of large scale rainfall", "kg m-2 s-1" }, + { 101, -1, 0, "PRS_GSP", "mass flux density of large scale snowfall", "kg m-2 s-1" }, + { 102, -1, 0, "RAIN_GSP", "large scale rainfall", "kg m-2" }, + { 111, -1, 0, "PRR_CON", "mass flux density of convective rainfall", "kg m-2 s-1" }, + { 112, -1, 0, "PRS_CON", "mass flux density of convective snowfall", "kg m-2 s-1" }, + { 113, -1, 0, "RAIN_CON", "convective rainfall", "kg m-2" }, + { 129, -1, 0, "FRESHSNW", "freshness of snow", "undefined" }, + { 131, -1, 0, "PRG_GSP", "mass flux density of large scale graupel", "kg m-2 s-1" }, + { 132, -1, 0, "GRAU_GSP", "large scale graupel", "kg m-2" }, + { 133, -1, 0, "RHO_SNOW", "density of snow", "kg m-3" }, + { 139, -1, 0, "PP", "deviation from reference pressure", "Pa" }, + { 140, -1, 0, "RCLD", "standard deviation of saturation deficit", "undefined" }, + { 143, -1, 0, "CAPE_MU", "cape of most unstable parcel", "J kg-1" }, + { 144, -1, 0, "CIN_MU", "convective inhibition of most unstable parcel", "J kg-1" }, + { 145, -1, 0, "CAPE_ML", "cape of mean surface layer parcel", "J kg-1" }, + { 146, -1, 0, "CIN_ML", "convective inhibition of mean surface layer parcel", "J kg-1" }, + { 147, -1, 0, "TKE_CON", "convective turbulent kinetic energy", "undefined" }, + { 148, -1, 0, "TKETENS", "tendency of turbulent kinetic energy", "undefined" }, + { 152, -1, 0, "TKE", "turbulent kinetic energy", "m2 s-2" }, + { 153, -1, 0, "TKVM", "diffusion coefficient of momentum", "m2 s-1" }, + { 154, -1, 0, "TKVH", "diffusion coefficient of heat", "m2 s-1" }, + { 170, -1, 0, "TCM", "drag coefficient of momentum", "1" }, + { 171, -1, 0, "TCH", "drag coefficient of heat", "1" }, + { 187, -1, 0, "VMAX", "maximum turbulent wind gust in 10m", "m s-1" }, + { 190, -1, 0, "TSOIL", "&", "K" }, + { 191, -1, 0, "TSOIL", "&", "K" }, + { 192, -1, 0, "TSOIL", "&", "K" }, + { 193, -1, 0, "TSOIL", "mixed layer temperature", "K" }, + { 194, -1, 0, "TSOIL", "mean temperature of water column", "K" }, + { 197, -1, 0, "TSOIL", "soil temperature", "K" }, + { 198, -1, 0, "W_SO", "soil water content", "m" }, + { 199, -1, 0, "W_SO_ICE", "soil frozen water content", "m" }, + { 200, -1, 0, "W_I", "canopy water amount", "m" }, + { 203, -1, 0, "TSOIL", "snow surface temperature", "K" }, + { 215, -1, 0, "TSOIL", "temperature of ice upper surface", "K" }, + { 230, -1, 0, "dBZ", "unattenuated radar reflectivity in Rayleigh approximation", "1" }, + { 240, -1, 0, "MFLX_CON", "convective mass flux density", "kg m-2 s-1" }, + { 241, -1, 0, "CAPE_CON", "&", "J kg-1" }, + { 243, -1, 0, "QCVG_CON", "&", "s-1" }, +}; + +static const param_type cosmo202[] = { + { 46, -1, 0, "SSO_STDH", "standard deviation of subgrid scale height", "m" }, + { 47, -1, 0, "SSO_GAMMA", "anisotropy of topography", "-" }, + { 48, -1, 0, "SSO_THETA", "angle between principal axis of orography and global east", "-" }, + { 49, -1, 0, "SSO_SIGMA", "mean slope of subgrid scale orography", "-" }, + { 55, -1, 0, "FR_LAKE", "fraction of inland lake water", "1" }, + { 57, -1, 0, "SOILTYP", "soil type", "1" }, + { 61, -1, 0, "LAI", "leaf area index", "1" }, + { 62, -1, 0, "ROOTDP", "root depth", "m" }, + { 64, -1, 0, "HMO3", "air pressure at ozone maximum", "Pa" }, + { 65, -1, 0, "VIO3", "vertical integrated ozone amount", "Pa" }, + { 67, -1, 0, "PLCOV_MX", "vegetation area fraction maximum", "1" }, + { 68, -1, 0, "PLCOV_MN", "vegetation area fraction minimum", "1" }, + { 69, -1, 0, "LAI_MX", "leaf area index maximum", "1" }, + { 70, -1, 0, "LAI_MN", "leaf area index minimum", "1" }, + { 75, -1, 0, "FOR_E", "ground fraction covered by evergreen forest", "-" }, + { 76, -1, 0, "FOR_D", "ground fraction covered by deciduous forest", "-" }, + { 104, -1, 0, "DQVDT", "tendency of water vapor", "s-1" }, + { 105, -1, 0, "QVSFLX", "surface flux of water vapour", "s-1m-2" }, + { 113, -1, 0, "FC", "coriolis parameter", "s-1" }, + { 114, -1, 0, "RLAT", "latitude", "radian" }, + { 115, -1, 0, "RLON", "longitude", "radian" }, + { 121, -1, 0, "ZTD", "integrated total atmospheric refractivity", "undefined" }, + { 122, -1, 0, "ZWD", "integrated wet atmospheric refractivity", "undefined" }, + { 123, -1, 0, "ZHD", "integrated dry atmospheric refractivity", "undefined" }, + { 180, -1, 0, "O3", "ozone mass mixing ratio", "kg kg-1" }, + { 200, -1, 0, "I131a", "undefined", "undefined" }, + { 201, -1, 0, "I131a_DD", "undefined", "undefined" }, + { 202, -1, 0, "I131a_WD", "undefined", "undefined" }, + { 203, -1, 0, "Cs137", "undefined", "undefined" }, + { 204, -1, 0, "Cs137_DD", "undefined", "undefined" }, + { 205, -1, 0, "Cs137_WD", "undefined", "undefined" }, + { 206, -1, 0, "Te132", "undefined", "undefined" }, + { 207, -1, 0, "Te132_DD", "undefined", "undefined" }, + { 208, -1, 0, "Te132_WD", "undefined", "undefined" }, + { 209, -1, 0, "Zr95", "undefined", "undefined" }, + { 210, -1, 0, "Zr95_DD", "undefined", "undefined" }, + { 211, -1, 0, "Zr95_WD", "undefined", "undefined" }, + { 212, -1, 0, "Kr85", "undefined", "undefined" }, + { 213, -1, 0, "Kr85_DD", "undefined", "undefined" }, + { 214, -1, 0, "Kr85_WD", "undefined", "undefined" }, + { 215, -1, 0, "TRACER", "undefined", "undefined" }, + { 216, -1, 0, "TRACER_DD", "undefined", "undefined" }, + { 217, -1, 0, "TRACER_WD", "undefined", "undefined" }, + { 218, -1, 0, "Xe133", "undefined", "undefined" }, + { 219, -1, 0, "Xe133_DD", "undefined", "undefined" }, + { 220, -1, 0, "Xe133_WD", "undefined", "undefined" }, + { 221, -1, 0, "I131g", "undefined", "undefined" }, + { 222, -1, 0, "I131g_DD", "undefined", "undefined" }, + { 223, -1, 0, "I131g_WD", "undefined", "undefined" }, + { 224, -1, 0, "I131o", "undefined", "undefined" }, + { 225, -1, 0, "I131o_DD", "undefined", "undefined" }, + { 226, -1, 0, "I131o_WD", "undefined", "undefined" }, + { 227, -1, 0, "Ba140", "undefined", "undefined" }, + { 228, -1, 0, "Ba140_DD", "undefined", "undefined" }, + { 229, -1, 0, "Ba140_WD", "undefined", "undefined" }, + { 230, -1, 0, "Sr90", "undefined", "undefined" }, + { 231, -1, 0, "Sr90_DD", "undefined", "undefined" }, + { 232, -1, 0, "Sr90_WD", "undefined", "undefined" }, + { 233, -1, 0, "Ru103", "undefined", "undefined" }, + { 234, -1, 0, "Ru103_DD", "undefined", "undefined" }, + { 235, -1, 0, "Ru103_WD", "undefined", "undefined" }, +}; + +static const param_type cosmo203[] = { + { 135, -1, 0, "LCL_ML", "undefined", "undefined" }, + { 136, -1, 0, "LFC_ML", "undefined", "undefined" }, + { 137, -1, 0, "CAPE_3KM", "undefined", "undefined" }, + { 138, -1, 0, "SWISS00", "swiss00 index", "1" }, + { 139, -1, 0, "SWISS12", "swiss12 index", "1" }, + { 147, -1, 0, "SLI", "surface lifted index", "K" }, + { 149, -1, 0, "SI", "showalter index", "K" }, + { 155, -1, 0, "BRN", "undefined", "undefined" }, + { 156, -1, 0, "HPBL", "undefined", "undefined" }, + { 203, -1, 0, "CLDEPTH", "normalized cloud depth", "1" }, + { 204, -1, 0, "CLCT_MOD", "modified_total_cloud_cover", "1" }, +}; + +static const param_type cosmo205[] = { + { 1, -1, 0, "SYNME5", "synthetic satellite images Meteosat5", "-" }, + { 2, -1, 0, "SYNME6", "synthetic satellite images Meteosat6", "-" }, + { 3, -1, 0, "SYNME7", "synthetic satellite images Meteosat7", "-" }, + { 4, -1, 0, "SYNMSG", "synthetic satellite images MSG", "-" }, +}; + +static const param_type cosmo250[] = { + { 1, -1, 0, "QNH", "sea level air pressure", "hPa" }, + { 11, -1, 0, "TSOIL", "2m temperature", "K" }, + { 12, -1, 0, "TSOIL", "2m temperature", "K" }, + { 13, -1, 0, "D_T_2M_K", "kalman correction to 2m temperature", "K" }, + { 14, -1, 0, "TSOIL", "2m temperature", "K" }, + { 15, -1, 0, "TSOIL", "2m temperature", "K" }, + { 16, -1, 0, "RH_ICE", "relative humidity over ice", "%" }, + { 17, -1, 0, "TD", "dew point temperature", "K" }, + { 18, -1, 0, "D_TD", "dew point depression", "K" }, + { 19, -1, 0, "THETAE", "equivalent potential temperature", "K" }, + { 20, -1, 0, "TD_2M_K", "2m dew point temperature", "K" }, + { 21, -1, 0, "D_TD_2M_K", "kalman correction to 2m dew point temperature", "K" }, + { 22, -1, 0, "TD_2M_OLD", "2m dew point temperature", "K" }, + { 23, -1, 0, "TD_2M_BUZ", "2m dew point temperature", "K" }, + { 24, -1, 0, "HI", "heat index", "Fahrenheit" }, + { 25, -1, 0, "DURSUN_M", "maximum duration of sunshine", "s" }, + { 26, -1, 0, "DURSUN_R", "relative duration of sunshine", "%" }, + { 52, -1, 0, "RH_2M_K", "2m relative humidity", "%" }, + { 53, -1, 0, "D_RH_2M_K", "kalman correction to 2m relative humidity", "%" }, + { 58, -1, 0, "CLI_RATIO", "cloud ice ratio (Qi/Qc+Qi)", "%" }, + { 61, -1, 0, "TOT_SNOW", "total precipitation in snow", "kg/m**2" }, + { 62, -1, 0, "TOT_RAIN", "total precipitation in rain", "kg/m**2" }, + { 63, -1, 0, "TOT_CON", "total convective precipitation", "kg/m**2" }, + { 64, -1, 0, "TOT_GSP", "total large scale precipitation", "kg/m**2" }, + { 65, -1, 0, "SNOW_%", "percentage of precipitation in snow", "%" }, + { 66, -1, 0, "CONV_%", "percentage of convective precipitation", "%" }, + { 67, -1, 0, "VORTP_ABS", "absolute", "VORTP_ABS 67 -1 absolute vorticity" }, + { 68, -1, 0, "VORTP_REL", "relative", "VORTP_REL 68 -1 relative vorticity" }, + { 70, -1, 0, "PDIFF_CON", "pressure difference between cloud base and cloud top", "Pa" }, + { 71, -1, 0, "TTOP_CON", "temperature at cloud top", "K" }, + { 80, -1, 0, "GEM", "emissivity of the ground", "%" }, + { 82, -1, 0, "Z0LOC", "local surface roughness length", "m" }, + { 110, -1, 0, "LUM", "luminosity", "klux" }, + { 111, -1, 0, "GLOB", "global shortwave radiation at surface", "W/m**2" }, + { 112, -1, 0, "LW_IN_TG", "incoming longwave radiation at surface", "W/m**2" }, + { 113, -1, 0, "LW_IN_TS", "incoming longwave radiation at surface", "W/m**2" }, + { 114, -1, 0, "LW_IN_T2M", "incoming longwave radiation at surface", "W/m**2" }, + { 115, -1, 0, "SWISS_WE", "Swiss", "SWISS_WE 115 1 Swiss coordinates" }, + { 116, -1, 0, "SWISS_SN", "Swiss", "SWISS_SN 116 1 Swiss coordinates" }, + { 150, -1, 0, "KOINDEX", "KO index", "K" }, + { 151, -1, 0, "TTINDEX", "total-totals index", "K" }, + { 152, -1, 0, "DCI", "deep convection index", "K" }, + { 153, -1, 0, "SWEAT", "severe weather thread index", "undefined" }, + { 154, -1, 0, "ADEDO2", "adedokun 2 index", "K" }, + { 160, -1, 0, "C_TSTORM", "thunderstorm index using AdaBoost classifier", "undefined" }, + { 161, -1, 0, "CN_TSTORM", "thunderstorm probabilty using AdaBoost classifier", "%" }, + { 200, -1, 0, "WSHEARL", "wind shear between surface and 3 km asl", "1/s" }, + { 201, -1, 0, "WSHEARM", "wind shear between surface and 6 km asl", "1/s" }, + { 202, -1, 0, "WSHEARU", "wind shear between 3 km (or surface) and 6 km asl", "1/s" }, + { 211, -1, 0, "VWIN", "maximum OLD turbulent wind gust in 10m", "m s-1" }, + { 212, -1, 0, "VW10M_20", "maximum 10m wind speed", "m s-1" }, + { 213, -1, 0, "VW10M_25", "duration of VWIN_10M above 25 knots", "s" }, + { 214, -1, 0, "VW10M_30", "duration of VWIN_10M above 30 knots", "s" }, + { 215, -1, 0, "VW10M_35", "duration of VWIN_10M above 35 knots", "s" }, + { 216, -1, 0, "VW10M_40", "duration of VWIN_10M above 40 knots", "s" }, + { 217, -1, 0, "VW10M_45", "duration of VWIN_10M above 45 knots", "s" }, + { 218, -1, 0, "VW10M_50", "duration of VWIN_10M above 50 knots", "s" }, + { 219, -1, 0, "VOLD", "maximum turbulent wind gust in 10m", "m s-1" }, + { 220, -1, 0, "VJPS", "maximum turbulent wind gust in 10m", "m s-1" }, + { 221, -1, 0, "VBRA", "maximum Brasseur turbulent wind gust in 10m", "m s-1" }, + { 222, -1, 0, "VB10M_20", "duration of VBRA_10M above 20 knots", "s" }, + { 223, -1, 0, "VB10M_25", "duration of VBRA_10M above 25 knots", "s" }, + { 224, -1, 0, "VB10M_30", "duration of VBRA_10M above 30 knots", "s" }, + { 225, -1, 0, "VB10M_35", "duration of VBRA_10M above 35 knots", "s" }, + { 226, -1, 0, "VB10M_40", "duration of VBRA_10M above 40 knots", "s" }, + { 227, -1, 0, "VB10M_45", "duration of VBRA_10M above 45 knots", "s" }, + { 228, -1, 0, "VB10M_50", "duration of VBRA_10M above 50 knots", "s" }, + { 231, -1, 0, "VCON", "maximum convective wind gust in 10m", "m s-1" }, + { 232, -1, 0, "VC10M_20", "duration of VCON_10M above 20 knots", "s" }, + { 233, -1, 0, "VC10M_25", "duration of VCON_10M above 25 knots", "s" }, + { 234, -1, 0, "VC10M_30", "duration of VCON_10M above 30 knots", "s" }, + { 235, -1, 0, "VC10M_35", "duration of VCON_10M above 35 knots", "s" }, + { 236, -1, 0, "VC10M_40", "duration of VCON_10M above 40 knots", "s" }, + { 237, -1, 0, "VC10M_45", "duration of VCON_10M above 45 knots", "s" }, + { 238, -1, 0, "VC10M_50", "duration of VCON_10M above 50 knots", "s" }, + { 241, -1, 0, "FMAX", "maximum wind speed at k=ke", "m s-1" }, + { 242, -1, 0, "USTARMAX", "maximal u*=SQRT(Drag_coef)*fmax_10m", "m s-1" }, + { 243, -1, 0, "GLOB_DIF", "global diffuse shortwave radiation at the surface", "W/m**2" }, + { 244, -1, 0, "GLOB_DIR", "global direct (beam) shortwave radiation at the surface", "W/m**2" }, + { 245, -1, 0, "GLOB_vE", "global shortwave radiation on a vertical surface facing east", "W/m**2" }, + { 246, -1, 0, "GLOB_vS", "global shortwave radiation on a vertical surface facing south", "W/m**2" }, + { 247, -1, 0, "GLOB_vW", "global shortwave radiation on a vertical surface facing west", "W/m**2" }, + { 248, -1, 0, "GLOB_vN", "global shortwave radiation on a vertical surface facing north", "W/m**2" }, + { 249, -1, 0, "LW_TG_vS", "incoming longwave radiation on a vertical surface facing south", "W/m**2" }, + { 250, -1, 0, "ENTH", "enthalpy", "kJ/kg" }, + { 251, -1, 0, "ENTH", "enthalpy", "kJ/kg" }, + { 252, -1, 0, "MIXRAT", "mixing ratio", "g/kg" }, + { 253, -1, 0, "MIXRAT", "mixing ratio", "g/kg" }, + { 254, -1, 0, "TW", "wet bulb temperature", "degC" }, + { 255, -1, 0, "TW", "wet bulb temperature", "degC" }, +}; + + +static +void tableDefault(void) +{ + + // define table : echam4 + { + int instID = institutInq(98, 255, "MPIMET", NULL); + if (instID == -1) instID = institutDef(98, 255, "MPIMET", NULL); + + int modelID = modelInq(instID, 0, "ECHAM4"); + if (modelID == -1) modelID = modelDef(instID, 0, "ECHAM4"); + + int tableID = tableDef(modelID, 128, "echam4"); + + tableLink(tableID, echam4, sizeof(echam4) / sizeof(param_type)); + } + + // define table : echam5 + { + int instID = institutInq(98, 232, "MPIMET", NULL); + if (instID == -1) instID = institutDef(98, 232, "MPIMET", NULL); + + int modelID = modelInq(instID, 0, "ECHAM5"); + if (modelID == -1) modelID = modelDef(instID, 0, "ECHAM5"); + + int tableID = tableDef(modelID, 128, "echam5"); + + tableLink(tableID, echam5, sizeof(echam5) / sizeof(param_type)); + } + + // define table : echam6 + { + int instID = institutInq(0, 0, "MPIMET", NULL); + if (instID == -1) instID = institutDef(0, 0, "MPIMET", NULL); + + int modelID = modelInq(instID, 0, "ECHAM6"); + if (modelID == -1) modelID = modelDef(instID, 0, "ECHAM6"); + + int tableID = tableDef(modelID, 128, "echam6"); + + tableLink(tableID, echam6, sizeof(echam6) / sizeof(param_type)); + } + + // define table : mpiom1 + { + int instID = institutInq(0, 0, "MPIMET", NULL); + if (instID == -1) instID = institutDef(0, 0, "MPIMET", NULL); + + int modelID = modelInq(instID, 0, "MPIOM1"); + if (modelID == -1) modelID = modelDef(instID, 0, "MPIOM1"); + + int tableID = tableDef(modelID, 128, "mpiom1"); + + tableLink(tableID, mpiom1, sizeof(mpiom1) / sizeof(param_type)); + } + + // define table : ecmwf + { + int instID = institutInq(0, 0, "ECMWF", NULL); + if (instID == -1) instID = institutDef(0, 0, "ECMWF", NULL); + + int modelID = modelInq(instID, 0, ""); + if (modelID == -1) modelID = modelDef(instID, 0, ""); + + int tableID = tableDef(modelID, 128, "ecmwf"); + + tableLink(tableID, ecmwf, sizeof(ecmwf) / sizeof(param_type)); + } + + // define table : remo + { + int instID = institutInq(0, 0, "MPIMET", NULL); + if (instID == -1) instID = institutDef(0, 0, "MPIMET", NULL); + + int modelID = modelInq(instID, 0, "REMO"); + if (modelID == -1) modelID = modelDef(instID, 0, "REMO"); + + int tableID = tableDef(modelID, 128, "remo"); + + tableLink(tableID, remo, sizeof(remo) / sizeof(param_type)); + } + + // define table : cosmo002 + { + int instID = institutInq(0, 0, "MCH", NULL); + if (instID == -1) instID = institutDef(0, 0, "MCH", NULL); + + int modelID = modelInq(instID, 0, "COSMO"); + if (modelID == -1) modelID = modelDef(instID, 0, "COSMO"); + + int tableID = tableDef(modelID, 002, "cosmo002"); + + tableLink(tableID, cosmo002, sizeof(cosmo002) / sizeof(param_type)); + } + + // define table : cosmo201 + { + int instID = institutInq(0, 0, "MCH", NULL); + if (instID == -1) instID = institutDef(0, 0, "MCH", NULL); + + int modelID = modelInq(instID, 0, "COSMO"); + if (modelID == -1) modelID = modelDef(instID, 0, "COSMO"); + + int tableID = tableDef(modelID, 201, "cosmo201"); + + tableLink(tableID, cosmo201, sizeof(cosmo201) / sizeof(param_type)); + } + + // define table : cosmo202 + { + int instID = institutInq(0, 0, "MCH", NULL); + if (instID == -1) instID = institutDef(0, 0, "MCH", NULL); + + int modelID = modelInq(instID, 0, "COSMO"); + if (modelID == -1) modelID = modelDef(instID, 0, "COSMO"); + + int tableID = tableDef(modelID, 202, "cosmo202"); + + tableLink(tableID, cosmo202, sizeof(cosmo202) / sizeof(param_type)); + } + + // define table : cosmo203 + { + int instID = institutInq(0, 0, "MCH", NULL); + if (instID == -1) instID = institutDef(0, 0, "MCH", NULL); + + int modelID = modelInq(instID, 0, "COSMO"); + if (modelID == -1) modelID = modelDef(instID, 0, "COSMO"); + + int tableID = tableDef(modelID, 203, "cosmo203"); + + tableLink(tableID, cosmo203, sizeof(cosmo203) / sizeof(param_type)); + } + + // define table : cosmo205 + { + int instID = institutInq(0, 0, "MCH", NULL); + if (instID == -1) instID = institutDef(0, 0, "MCH", NULL); + + int modelID = modelInq(instID, 0, "COSMO"); + if (modelID == -1) modelID = modelDef(instID, 0, "COSMO"); + + int tableID = tableDef(modelID, 205, "cosmo205"); + + tableLink(tableID, cosmo205, sizeof(cosmo205) / sizeof(param_type)); + } + + // define table : cosmo250 + { + int instID = institutInq(0, 0, "MCH", NULL); + if (instID == -1) instID = institutDef(0, 0, "MCH", NULL); + + int modelID = modelInq(instID, 0, "COSMO"); + if (modelID == -1) modelID = modelDef(instID, 0, "COSMO"); + + int tableID = tableDef(modelID, 250, "cosmo250"); + + tableLink(tableID, cosmo250, sizeof(cosmo250) / sizeof(param_type)); + } +} + +// clang-format on + +#endif /* TABLE_H */ +#include <stddef.h> +#include <string.h> +#include <ctype.h> + + + +#define MAX_TABLE 256 +#define MAX_PARS 1024 + +typedef struct +{ + bool used; + int npars; + int modelID; + int number; + char *name; + param_type *pars; +} paramtab_type; + +static paramtab_type parTable[MAX_TABLE]; +static int parTableSize = MAX_TABLE; +static int parTableNum = 0; +static int ParTableInit = 0; + +static char *tablePath = NULL; + +static void tableDefModelID(int tableID, int modelID); +static void tableDefNum(int tableID, int tablenum); + +static void +tableDefEntry(int tableID, int id, int ltype, const char *name, const char *longname, const char *units) +{ + if (tableID >= 0 && tableID < MAX_TABLE && parTable[tableID].used) + { + } + else + Error("Invalid table ID %d", tableID); + + int item = parTable[tableID].npars++; + parTable[tableID].pars[item].id = id; + parTable[tableID].pars[item].ltype = ltype; + parTable[tableID].pars[item].dupflags = 0; + parTable[tableID].pars[item].name = NULL; + parTable[tableID].pars[item].longname = NULL; + parTable[tableID].pars[item].units = NULL; + + if (name && name[0]) + { + parTable[tableID].pars[item].name = strdupx(name); + parTable[tableID].pars[item].dupflags |= TABLE_DUP_NAME; + } + if (longname && longname[0]) + { + parTable[tableID].pars[item].longname = strdupx(longname); + parTable[tableID].pars[item].dupflags |= TABLE_DUP_LONGNAME; + } + if (units && units[0]) + { + parTable[tableID].pars[item].units = strdupx(units); + parTable[tableID].pars[item].dupflags |= TABLE_DUP_UNITS; + } +} + +void +tableLink(int tableID, const param_type *pars, int npars) +{ + for (int item = 0; item < npars; item++) + { + parTable[tableID].pars[item].id = pars[item].id; + parTable[tableID].pars[item].ltype = pars[item].ltype; + parTable[tableID].pars[item].dupflags = 0; + parTable[tableID].pars[item].name = pars[item].name; + parTable[tableID].pars[item].longname = pars[item].longname; + parTable[tableID].pars[item].units = pars[item].units; + } + + parTable[tableID].npars = npars; +} + +static void +parTableInitEntry(int tableID) +{ + parTable[tableID].used = false; + parTable[tableID].pars = NULL; + parTable[tableID].npars = 0; + parTable[tableID].modelID = CDI_UNDEFID; + parTable[tableID].number = CDI_UNDEFID; + parTable[tableID].name = NULL; +} + +static void +tableGetPath(void) +{ + char *path = getenv("TABLEPATH"); + if (path) tablePath = strdupx(path); + // printf("tablePath = %s\n", tablePath); +} + +static void +parTableFinalize(void) +{ + for (int tableID = 0; tableID < MAX_TABLE; ++tableID) + if (parTable[tableID].used) + { + int npars = parTable[tableID].npars; + for (int item = 0; item < npars; ++item) + { + if (parTable[tableID].pars[item].dupflags & TABLE_DUP_NAME) Free((void *) parTable[tableID].pars[item].name); + if (parTable[tableID].pars[item].dupflags & TABLE_DUP_LONGNAME) Free((void *) parTable[tableID].pars[item].longname); + if (parTable[tableID].pars[item].dupflags & TABLE_DUP_UNITS) Free((void *) parTable[tableID].pars[item].units); + } + Free(parTable[tableID].pars); + Free(parTable[tableID].name); + } +} + +static void +parTableInit(void) +{ + ParTableInit = 1; + + atexit(parTableFinalize); + if (cdiPartabIntern) tableDefault(); + + tableGetPath(); +} + +static int +tableNewEntry() +{ + int tableID = 0; + + static int init = 0; + if (!init) + { + for (tableID = 0; tableID < parTableSize; tableID++) parTableInitEntry(tableID); + init = 1; + } + + // Look for a free slot in parTable. + for (tableID = 0; tableID < parTableSize; tableID++) + { + if (!parTable[tableID].used) break; + } + + if (tableID == parTableSize) Error("no more entries!"); + + parTable[tableID].used = true; + parTableNum++; + + return tableID; +} + +static int +decodeForm1(char *pline, char *name, char *longname, char *units) +{ + char *pstart, *pend; + + // FIXME: parse success isn't verified + /* long level = */ strtol(pline, &pline, 10); + while (isspace((int) *pline)) pline++; + + pstart = pline; + while (!(isspace((int) *pline) || *pline == 0)) pline++; + size_t len = (size_t) (pline - pstart); + if (len > 0) + { + memcpy(name, pstart, len); + name[len] = 0; + } + else + return 0; + + if (pline[0] == 0) return 0; + + // Format 1 : code name add mult longname [units] + // FIXME: successful parse isn't verified + /* double add = */ strtod(pline, &pline); + // FIXME: successful parse isn't verified + /* double mult = */ strtod(pline, &pline); + + while (isspace((int) *pline)) pline++; + + len = strlen(pline); + if (len > 0) + { + pstart = pline; + pend = strrchr(pline, '['); + if (pend == pstart) + len = 0; + else + { + if (pend) + pend--; + else + pend = pstart + len; + while (isspace((int) *pend)) pend--; + len = (size_t) (pend - pstart + 1); + } + if (len > 0) + { + memcpy(longname, pstart, len); + longname[len] = 0; + } + pstart = strrchr(pline, '['); + if (pstart) + { + pstart++; + while (isspace((int) *pstart)) pstart++; + pend = strchr(pstart, ']'); + if (!pend) return 0; + pend--; + while (isspace((int) *pend)) pend--; + len = (size_t) (pend - pstart + 1); + if (len > 0) + { + memcpy(units, pstart, len); + units[len] = 0; + } + } + } + + return 0; +} + +static int +decodeForm2(char *pline, char *name, char *longname, char *units) +{ + // Format 2 : code | name | longname | units + char *pend; + + pline = strchr(pline, '|'); + pline++; + + while (isspace((int) *pline)) pline++; + if (*pline != '|') + { + pend = strchr(pline, '|'); + if (!pend) + { + pend = pline; + while (!isspace((int) *pend)) pend++; + size_t len = (size_t) (pend - pline); + if (len > 0) + { + memcpy(name, pline, len); + name[len] = 0; + } + return 0; + } + else + { + pend--; + while (isspace((int) *pend)) pend--; + size_t len = (size_t) (pend - pline + 1); + if (len > 0) + { + memcpy(name, pline, len); + name[len] = 0; + } + } + } + else + name[0] = '\0'; + + pline = strchr(pline, '|'); + pline++; + while (isspace((int) *pline)) pline++; + pend = strchr(pline, '|'); + if (!pend) pend = strchr(pline, 0); + pend--; + while (isspace((int) *pend)) pend--; + { + size_t len = (size_t) (pend - pline + 1); + if (len > 0) + { + memcpy(longname, pline, len); + longname[len] = 0; + } + } + + pline = strchr(pline, '|'); + if (pline) + { + pline++; + while (isspace((int) *pline)) pline++; + pend = strchr(pline, '|'); + if (!pend) pend = strchr(pline, 0); + pend--; + while (isspace((int) *pend)) pend--; + ptrdiff_t len = pend - pline + 1; + if (len < 0) len = 0; + memcpy(units, pline, (size_t) len); + units[len] = 0; + } + + return 0; +} + +int +tableRead(const char *tablefile) +{ + char line[1024], *pline; + char name[256], longname[256], units[256]; + int tableID = CDI_UNDEFID; + + FILE *tablefp = fopen(tablefile, "r"); + if (tablefp == NULL) return tableID; + + const char *tablename = strrchr(tablefile, '/'); + if (tablename == 0) + tablename = tablefile; + else + tablename++; + + tableID = tableDef(-1, 0, tablename); + + while (fgets(line, 1023, tablefp)) + { + size_t len = strlen(line); + if (line[len - 1] == '\n') line[len - 1] = '\0'; + name[0] = 0; + longname[0] = 0; + units[0] = 0; + if (line[0] == '#') continue; + pline = line; + + len = strlen(pline); + if (len < 4) continue; + while (isspace((int) *pline)) pline++; + int id = atoi(pline); + // if ( id > 255 ) id -= 256; + if (id == 0) continue; + + while (isdigit((int) *pline)) pline++; + + int ltype = CDI_UNDEFID; + if (*pline == ';' || *pline == ':') + { + pline++; + ltype = atoi(pline); + while (isdigit((int) *pline)) pline++; + + if (*pline == ';' || *pline == ':') + { + pline++; + while (isdigit((int) *pline)) pline++; + } + } + + while (isdigit((int) *pline)) pline++; + + int err = (strchr(pline, '|')) ? decodeForm2(pline, name, longname, units) : decodeForm1(pline, name, longname, units); + if (err) continue; + + if (name[0] == 0) snprintf(name, sizeof(name), "var%d", id); + + tableDefEntry(tableID, id, ltype, name, longname, units); + } + + return tableID; +} + +static int +tableFromEnv(int modelID, int tablenum) +{ + char tablename[256] = { '\0' }; + size_t tablenameLen = 0; + int instID; + + const char *name2Use; + { + const char *modelName, *instName; + if ((modelName = modelInqNamePtr(modelID))) + name2Use = modelName; + else if ((instID = modelInqInstitut(modelID)) != CDI_UNDEFID && (instName = institutInqNamePtr(instID))) + name2Use = instName; + else + return CDI_UNDEFID; + } + tablenameLen = strlen(name2Use); + memcpy(tablename, name2Use, tablenameLen); + if (tablenum) tablenameLen += (size_t) (sprintf(tablename + tablenameLen, "_%03d", tablenum)); + size_t lenp = 0, lenf = tablenameLen; + if (tablePath) lenp = strlen(tablePath); + // if (tablePath) printf("tablePath = %s\n", tablePath); + // if (tablename) printf("tableName = %s\n", tablename); + char *tablefile = (char *) Malloc(lenp + lenf + 3); + if (tablePath) + { + strcpy(tablefile, tablePath); + strcat(tablefile, "/"); + } + else + tablefile[0] = '\0'; + strcat(tablefile, tablename); + // if (tablefile) printf("tableFile = %s\n", tablefile); + + int tableID = tableRead(tablefile); + if (tableID != CDI_UNDEFID) + { + tableDefModelID(tableID, modelID); + tableDefNum(tableID, tablenum); + } + // printf("tableID = %d %s\n", tableID, tablefile); + Free(tablefile); + + return tableID; +} + +int +tableInq(int modelID, int tablenum, const char *tablename) +{ + int tableID = CDI_UNDEFID; + int modelID2 = CDI_UNDEFID; + char tablefile[256] = { '\0' }; + + if (!ParTableInit) parTableInit(); + + if (tablename) + { + strcpy(tablefile, tablename); + /* + printf("tableInq: tablefile = >%s<\n", tablefile); + */ + /* search for internal table */ + for (tableID = 0; tableID < MAX_TABLE; tableID++) + { + if (parTable[tableID].used && parTable[tableID].name) + { + /* len = strlen(parTable[tableID].name); */ + size_t len = strlen(tablename); + if (memcmp(parTable[tableID].name, tablename, len) == 0) break; + } + } + if (tableID == MAX_TABLE) tableID = CDI_UNDEFID; + if (CDI_Debug) Message("tableID = %d tablename = %s", tableID, tablename); + } + else + { + for (tableID = 0; tableID < MAX_TABLE; tableID++) + { + if (parTable[tableID].used) + { + if (parTable[tableID].modelID == modelID && parTable[tableID].number == tablenum) break; + } + } + + if (tableID == MAX_TABLE) tableID = CDI_UNDEFID; + + if (tableID == CDI_UNDEFID) + { + if (modelID != CDI_UNDEFID) + { + const char *modelName; + if ((modelName = modelInqNamePtr(modelID))) + { + strcpy(tablefile, modelName); + size_t len = strlen(tablefile); + for (size_t i = 0; i < len; i++) + if (tablefile[i] == '.') tablefile[i] = '\0'; + modelID2 = modelInq(-1, 0, tablefile); + } + } + if (modelID2 != CDI_UNDEFID) + for (tableID = 0; tableID < MAX_TABLE; tableID++) + { + if (parTable[tableID].used) + { + if (parTable[tableID].modelID == modelID2 && parTable[tableID].number == tablenum) break; + } + } + } + + if (tableID == MAX_TABLE) tableID = CDI_UNDEFID; + + if (tableID == CDI_UNDEFID && modelID != CDI_UNDEFID) tableID = tableFromEnv(modelID, tablenum); + + if (CDI_Debug && tablename) Message("tableID = %d tablename = %s", tableID, tablename); + } + + return tableID; +} + +int +tableDef(int modelID, int tablenum, const char *tablename) +{ + int tableID = CDI_UNDEFID; + + if (!ParTableInit) parTableInit(); + // if (!(modelID == CDI_UNDEFID && tablenum == 0)) tableID = tableInq(modelID, tablenum, tablename); + if (tableID == CDI_UNDEFID) + { + tableID = tableNewEntry(); + + parTable[tableID].modelID = modelID; + parTable[tableID].number = tablenum; + if (tablename) parTable[tableID].name = strdupx(tablename); + + parTable[tableID].pars = (param_type *) Malloc(MAX_PARS * sizeof(param_type)); + } + + return tableID; +} + +static void +tableDefModelID(int tableID, int modelID) +{ + parTable[tableID].modelID = modelID; +} + +static void +tableDefNum(int tableID, int tablenum) +{ + parTable[tableID].number = tablenum; +} + +int +tableInqNum(int tableID) +{ + int number = 0; + + if (tableID >= 0 && tableID < MAX_TABLE) number = parTable[tableID].number; + + return number; +} + +int +tableInqModel(int tableID) +{ + int modelID = -1; + + if (tableID >= 0 && tableID < MAX_TABLE) modelID = parTable[tableID].modelID; + + return modelID; +} + +static void +partabCheckID(int item) +{ + if (item < 0 || item >= parTableSize) Error("item %d undefined!", item); + + if (!parTable[item].name) Error("item %d name undefined!", item); +} + +const char * +tableInqNamePtr(int tableID) +{ + const char *tablename = NULL; + + if (CDI_Debug) Message("tableID = %d", tableID); + + if (!ParTableInit) parTableInit(); + + if (tableID >= 0 && tableID < parTableSize) + if (parTable[tableID].name) tablename = parTable[tableID].name; + + return tablename; +} + +static size_t +max_length(size_t maxlen, const char *cstring) +{ + if (cstring) + { + size_t len = strlen(cstring); + if (len > maxlen) maxlen = len; + } + return maxlen; +} + +void +tableWrite(const char *ptfile, int tableID) +{ + size_t maxname = 4, maxlname = 10, maxunits = 2; + int instID = CDI_UNDEFID; + int center = 0, subcenter = 0; + const char *instnameptr = NULL, *modelnameptr = NULL; + + if (CDI_Debug) Message("write parameter table %d to %s", tableID, ptfile); + + if (tableID == CDI_UNDEFID) + { + Warning("parameter table ID undefined"); + return; + } + + partabCheckID(tableID); + + FILE *ptfp = fopen(ptfile, "w"); + + int npars = parTable[tableID].npars; + for (int item = 0; item < npars; item++) + { + maxname = max_length(maxname, parTable[tableID].pars[item].name); + maxlname = max_length(maxlname, parTable[tableID].pars[item].longname); + maxunits = max_length(maxunits, parTable[tableID].pars[item].units); + } + + int tablenum = tableInqNum(tableID); + int modelID = parTable[tableID].modelID; + if (modelID != CDI_UNDEFID) + { + modelnameptr = modelInqNamePtr(modelID); + instID = modelInqInstitut(modelID); + } + if (instID != CDI_UNDEFID) + { + center = institutInqCenter(instID); + subcenter = institutInqSubcenter(instID); + instnameptr = institutInqNamePtr(instID); + } + + fprintf(ptfp, "# Parameter table\n"); + fprintf(ptfp, "#\n"); + if (tablenum) fprintf(ptfp, "# TABLE_ID=%d\n", tablenum); + fprintf(ptfp, "# TABLE_NAME=%s\n", parTable[tableID].name); + if (modelnameptr) fprintf(ptfp, "# TABLE_MODEL=%s\n", modelnameptr); + if (instnameptr) fprintf(ptfp, "# TABLE_INSTITUT=%s\n", instnameptr); + if (center) fprintf(ptfp, "# TABLE_CENTER=%d\n", center); + if (subcenter) fprintf(ptfp, "# TABLE_SUBCENTER=%d\n", subcenter); + fprintf(ptfp, "#\n"); + fprintf(ptfp, "#\n"); + fprintf(ptfp, "# id = parameter ID\n"); + fprintf(ptfp, "# name = variable name\n"); + fprintf(ptfp, "# title = long name (description)\n"); + fprintf(ptfp, "# units = variable units\n"); + fprintf(ptfp, "#\n"); + fprintf(ptfp, "# The format of each record is:\n"); + fprintf(ptfp, "#\n"); + fprintf(ptfp, "# id | %-*s | %-*s | %-*s\n", (int) maxname, "name", (int) maxlname, "title", (int) maxunits, "units"); + + for (int item = 0; item < npars; item++) + { + const char *name = parTable[tableID].pars[item].name, *longname = parTable[tableID].pars[item].longname, + *units = parTable[tableID].pars[item].units; + if (name == NULL) name = " "; + if (longname == NULL) longname = " "; + if (units == NULL) units = " "; + fprintf(ptfp, "%4d | %-*s | %-*s | %-*s\n", parTable[tableID].pars[item].id, (int) maxname, name, (int) maxlname, longname, + (int) maxunits, units); + } + + fclose(ptfp); +} + +void +tableFWriteC(FILE *ptfp, int tableID) +{ + const char chelp[] = ""; + size_t maxname = 0, maxlname = 0, maxunits = 0; + char tablename[256]; + + if (tableID == CDI_UNDEFID) + { + Warning("parameter table ID undefined"); + return; + } + + partabCheckID(tableID); + + int npars = parTable[tableID].npars; + for (int item = 0; item < npars; item++) + { + maxname = max_length(maxname, parTable[tableID].pars[item].name); + maxlname = max_length(maxlname, parTable[tableID].pars[item].longname); + maxunits = max_length(maxunits, parTable[tableID].pars[item].units); + } + + strncpy(tablename, parTable[tableID].name, sizeof(tablename) - 1); + tablename[sizeof(tablename) - 1] = '\0'; + { + size_t len = strlen(tablename); + for (size_t i = 0; i < len; i++) + if (tablename[i] == '.') tablename[i] = '_'; + } + fprintf(ptfp, "static const param_type %s[] = {\n", tablename); + + for (int item = 0; item < npars; item++) + { + size_t len = strlen(parTable[tableID].pars[item].name), + llen = parTable[tableID].pars[item].longname ? strlen(parTable[tableID].pars[item].longname) : 0, + ulen = parTable[tableID].pars[item].units ? strlen(parTable[tableID].pars[item].units) : 0; + fprintf(ptfp, " {%4d, -1, 0, \"%s\", %-*s%c%s%s, %-*s%c%s%s %-*s},\n", parTable[tableID].pars[item].id, + parTable[tableID].pars[item].name, (int) (maxname - len), chelp, llen ? '"' : ' ', + llen ? parTable[tableID].pars[item].longname : "NULL", llen ? "\"" : "", (int) (maxlname - (llen ? llen : 3)), chelp, + ulen ? '"' : ' ', ulen ? parTable[tableID].pars[item].units : "NULL", ulen ? "\"" : "", + (int) (maxunits - (ulen ? ulen : 3)), chelp); + } + + fprintf(ptfp, "};\n\n"); +} + +void +tableInqEntry(int tableID, int id, int ltype, char *name, char *longname, char *units) +{ + if (((tableID >= 0) & (tableID < MAX_TABLE)) | (tableID == CDI_UNDEFID)) + { + } + else + Error("Invalid table ID %d", tableID); + + if (tableID != CDI_UNDEFID) + { + int npars = parTable[tableID].npars; + for (int item = 0; item < npars; item++) + { + if (parTable[tableID].pars[item].id == id + && (parTable[tableID].pars[item].ltype == -1 || ltype == -1 || parTable[tableID].pars[item].ltype == ltype)) + { + if (name && parTable[tableID].pars[item].name) strcpy(name, parTable[tableID].pars[item].name); + if (longname && parTable[tableID].pars[item].longname) strcpy(longname, parTable[tableID].pars[item].longname); + if (units && parTable[tableID].pars[item].units) strcpy(units, parTable[tableID].pars[item].units); + + break; + } + } + } +} + +int +tableInqParCode(int tableID, char *varname, int *code) +{ + int err = 1; + + if (tableID != CDI_UNDEFID && varname != NULL) + { + int npars = parTable[tableID].npars; + for (int item = 0; item < npars; item++) + { + if (parTable[tableID].pars[item].name && str_is_equal(parTable[tableID].pars[item].name, varname)) + { + *code = parTable[tableID].pars[item].id; + err = 0; + break; + } + } + } + + return err; +} + +int +tableInqNumber(void) +{ + if (!ParTableInit) parTableInit(); + + return parTableNum; +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifndef NORMALIZE_MONTH_H +#define NORMALIZE_MONTH_H + +#include <stdlib.h> + +struct YearMonth +{ + int year, month; +}; + +/* normalizes month to range [1,12] and adjusts year accordingly */ +static inline struct YearMonth +normalize_month(int year, int month) +{ + div_t modres = div(month - 1, 12); + year += modres.quot - ((month < 1) & (modres.rem != 0)); + return (struct YearMonth){ .year = year, .month = (modres.rem + 12) % 12 + 1 }; +} + +#endif +#include <stddef.h> +#include <stdio.h> + + +static int DefaultTimeType = TAXIS_ABSOLUTE; +static int DefaultTimeUnit = TUNIT_HOUR; + +static int taxisCompareP(void *taxisptr1, void *taxisptr2); +static void taxisDestroyP(void *taxisptr); +static void taxisPrintKernel(taxis_t *taxisptr, FILE *fp); +static int taxisGetPackSize(void *taxisptr, void *context); +static void taxisPack(void *taxisptr, void *buf, int size, int *position, void *context); +static int taxisTxCode(void *taxisptr); + +const resOps taxisOps + = { taxisCompareP, taxisDestroyP, (void (*)(void *, FILE *)) taxisPrintKernel, taxisGetPackSize, taxisPack, taxisTxCode }; + +#define container_of(ptr, type, member) ((type *) (void *) ((unsigned char *) ptr - offsetof(type, member))) + +struct refcount_string +{ + int ref_count; + char string[]; +}; + +static char * +new_refcount_string(size_t len) +{ + struct refcount_string *container = (struct refcount_string *) Malloc(sizeof(*container) + len + 1); + container->ref_count = 1; + return container->string; +} + +static void +delete_refcount_string(void *p) +{ + if (p) + { + struct refcount_string *container = container_of(p, struct refcount_string, string); + if (!--(container->ref_count)) Free(container); + } +} + +static char * +dup_refcount_string(char *p) +{ + if (p) + { + struct refcount_string *container = container_of(p, struct refcount_string, string); + ++(container->ref_count); + } + return p; +} + +#undef container_of + +const char * +taxisNamePtr(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->name; +} + +const char * +tunitNamePtr(int unitID) +{ + static const char Timeunits[][TAXIS_MAX_UNIT_STR_LEN + 1] = { + "undefined", "seconds", "minutes", "quarters", "30minutes", "hours", "3hours", "6hours", "12hours", "days", "months", "years", + }; + enum + { + size = sizeof(Timeunits) / sizeof(Timeunits[0]) + }; + + const char *name = unitID > 0 && unitID < size ? Timeunits[unitID] : Timeunits[0]; + + return name; +} + +void +ptaxisInit(taxis_t *taxisptr) +{ + taxisptr->self = CDI_UNDEFID; + taxisptr->datatype = CDI_DATATYPE_FLT64; + taxisptr->type = DefaultTimeType; + taxisptr->calendar = CDI_Default_Calendar; + taxisptr->unit = DefaultTimeUnit; + taxisptr->numavg = 0; + taxisptr->climatology = false; + taxisptr->hasBounds = false; + cdiDateTime_init(&taxisptr->sDateTime); + cdiDateTime_init(&taxisptr->vDateTime); + cdiDateTime_init(&taxisptr->rDateTime); + cdiDateTime_init(&taxisptr->fDateTime); + cdiDateTime_init(&taxisptr->vDateTime_lb); + cdiDateTime_init(&taxisptr->vDateTime_ub); + taxisptr->fc_unit = DefaultTimeUnit; + taxisptr->fc_period = 0; + taxisptr->name = NULL; + taxisptr->longname = NULL; + taxisptr->units = NULL; +} + +static taxis_t * +taxisNewEntry(cdiResH resH) +{ + taxis_t *taxisptr = (taxis_t *) Malloc(sizeof(taxis_t)); + + ptaxisInit(taxisptr); + if (resH == CDI_UNDEFID) + taxisptr->self = reshPut(taxisptr, &taxisOps); + else + { + taxisptr->self = resH; + reshReplace(resH, taxisptr, &taxisOps); + } + + return taxisptr; +} + +/* +@Function taxisCreate +@Title Create a Time axis + +@Prototype int taxisCreate(int taxistype) +@Parameter + @Item taxistype The type of the Time axis, one of the set of predefined CDI time axis types. + The valid CDI time axis types are @func{TAXIS_ABSOLUTE} and @func{TAXIS_RELATIVE}. + +@Description +The function @func{taxisCreate} creates a Time axis. + +@Result +@func{taxisCreate} returns an identifier to the Time axis. + +@Example +Here is an example using @func{taxisCreate} to create a relative T-axis with a standard calendar. + +@Source + ... +int taxisID; + ... +taxisID = taxisCreate(TAXIS_RELATIVE); +taxisDefCalendar(taxisID, CALENDAR_STANDARD); +taxisDefRdate(taxisID, 19850101); +taxisDefRtime(taxisID, 120000); + ... +@EndSource +@EndFunction +*/ +int +taxisCreate(int taxistype) +{ + taxis_t *taxisptr = taxisNewEntry(CDI_UNDEFID); + taxisptr->type = taxistype; + + int taxisID = taxisptr->self; + return taxisID; +} + +void +taxisDestroyKernel(taxis_t *taxisptr) +{ + delete_refcount_string(taxisptr->name); + delete_refcount_string(taxisptr->longname); + delete_refcount_string(taxisptr->units); +} + +/* +@Function taxisDestroy +@Title Destroy a Time axis + +@Prototype void taxisDestroy(int taxisID) +@Parameter + @Item taxisID Time axis ID, from a previous call to @func{taxisCreate} + +@EndFunction +*/ +void +taxisDestroy(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + reshRemove(taxisID, &taxisOps); + taxisDestroyKernel(taxisptr); + Free(taxisptr); +} + +void +taxisDestroyP(void *taxisptr) +{ + taxisDestroyKernel((taxis_t *) taxisptr); + Free(taxisptr); +} + +int +taxisDuplicate(int taxisID1) +{ + taxis_t *taxisptr1 = (taxis_t *) reshGetVal(taxisID1, &taxisOps); + taxis_t *taxisptr2 = taxisNewEntry(CDI_UNDEFID); + + int taxisID2 = taxisptr2->self; + + ptaxisCopy(taxisptr2, taxisptr1); + + return taxisID2; +} + +void +taxisDefType(int taxisID, int taxistype) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->type != taxistype) + { + taxisptr->type = taxistype; + taxisptr->datatype = CDI_DATATYPE_FLT64; + delete_refcount_string(taxisptr->units); + taxisptr->units = NULL; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function taxisDefVdate +@Title Define the verification date + +@Prototype void taxisDefVdate(int taxisID, int vdate) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} + @Item vdate Verification date (YYYYMMDD) + +@Description +The function @func{taxisDefVdate} defines the verification date of a Time axis. + +@EndFunction +*/ +void +taxisDefVdate(int taxisID, int vdate) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if ((int) cdiDate_get(taxisptr->vDateTime.date) != vdate) + { + taxisptr->vDateTime.date = cdiDate_set(vdate); + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function taxisDefVtime +@Title Define the verification time + +@Prototype void taxisDefVtime(int taxisID, int vtime) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} + @Item vtime Verification time (hhmmss) + +@Description +The function @func{taxisDefVtime} defines the verification time of a Time axis. + +@EndFunction +*/ +void +taxisDefVtime(int taxisID, int vtime) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiTime_get(taxisptr->vDateTime.time) != vtime) + { + taxisptr->vDateTime.time = cdiTime_set(vtime); + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisDefVdatetime(int taxisID, CdiDateTime vDateTime) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiDateTime_isNE(taxisptr->vDateTime, vDateTime)) + { + taxisptr->vDateTime = vDateTime; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisDefRdatetime(int taxisID, CdiDateTime rDateTime) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiDateTime_isNE(taxisptr->rDateTime, rDateTime)) + { + taxisptr->rDateTime = rDateTime; + delete_refcount_string(taxisptr->units); + taxisptr->units = NULL; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function taxisDefRdate +@Title Define the reference date + +@Prototype void taxisDefRdate(int taxisID, int rdate) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} + @Item rdate Reference date (YYYYMMDD) + +@Description +The function @func{taxisDefRdate} defines the reference date of a Time axis. + +@EndFunction +*/ +void +taxisDefRdate(int taxisID, int rdate) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if ((int) cdiDate_get(taxisptr->rDateTime.date) != rdate) + { + taxisptr->rDateTime.date = cdiDate_set(rdate); + delete_refcount_string(taxisptr->units); + taxisptr->units = NULL; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function taxisDefRtime +@Title Define the reference time + +@Prototype void taxisDefRtime(int taxisID, int rtime) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} + @Item rtime Reference time (hhmmss) + +@Description +The function @func{taxisDefRtime} defines the reference time of a Time axis. + +@EndFunction +*/ +void +taxisDefRtime(int taxisID, int rtime) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiTime_get(taxisptr->rDateTime.time) != rtime) + { + taxisptr->rDateTime.time = cdiTime_set(rtime); + if (taxisptr->units) + { + delete_refcount_string(taxisptr->units); + taxisptr->units = NULL; + } + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function taxisDefFdatetime +@Title Define the forecast reference date/time + +@Prototype void taxisDefFdatetime(int taxisID, CdiDateTime fDateTime) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} + @Item fDateTime Forecast reference date/time + +@Description +The function @func{taxisDefFdatetime} defines the forecast reference date/time of a Time axis. + +@EndFunction +*/ +void +taxisDefFdatetime(int taxisID, CdiDateTime fDateTime) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiDateTime_isNE(taxisptr->fDateTime, fDateTime)) + { + taxisptr->fDateTime = fDateTime; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function taxisDefCalendar +@Title Define the calendar + +@Prototype void taxisDefCalendar(int taxisID, int calendar) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} + @Item calendar The type of the calendar, one of the set of predefined CDI calendar types. + The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC}, + @func{CALENDAR_360DAYS}, @func{CALENDAR_365DAYS} and @func{CALENDAR_366DAYS}. + +@Description +The function @func{taxisDefCalendar} defines the calendar of a Time axis. + +@EndFunction +*/ +void +taxisDefCalendar(int taxisID, int calendar) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->calendar != calendar) + { + taxisptr->calendar = calendar; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisDefTunit(int taxisID, int unit) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->unit != unit) + { + taxisptr->unit = unit; + delete_refcount_string(taxisptr->units); + taxisptr->units = NULL; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisDefForecastTunit(int taxisID, int unit) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->fc_unit != unit) + { + taxisptr->fc_unit = unit; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisDefForecastPeriod(int taxisID, double fc_period) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (IS_NOT_EQUAL(taxisptr->fc_period, fc_period)) + { + taxisptr->fc_period = fc_period; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisDefNumavg(int taxisID, int numavg) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->numavg != numavg) + { + taxisptr->numavg = numavg; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* + The type of the time axis, one of the set of predefined CDI time types. + The valid CDI time types are TAXIS_ABSOLUTE and TAXIS_RELATIVE. +*/ +int +taxisInqType(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->type; +} + +int +taxisHasBounds(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return (int) taxisptr->hasBounds; +} + +void +taxisWithBounds(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->hasBounds == false) + { + taxisptr->hasBounds = true; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisDeleteBounds(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->hasBounds) + { + taxisptr->hasBounds = false; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisCopyTimestep(int taxisID2, int taxisID1) +{ + taxis_t *taxisptr1 = (taxis_t *) reshGetVal(taxisID1, &taxisOps), *taxisptr2 = (taxis_t *) reshGetVal(taxisID2, &taxisOps); + + reshLock(); + + // reference date/time and units can't be changed after streamDefVlist()! + + taxisptr2->sDateTime = taxisptr1->sDateTime; + taxisptr2->vDateTime = taxisptr1->vDateTime; + taxisptr2->fDateTime = taxisptr1->fDateTime; + + if (taxisptr2->hasBounds) + { + taxisptr2->vDateTime_lb = taxisptr1->vDateTime_lb; + taxisptr2->vDateTime_ub = taxisptr1->vDateTime_ub; + } + + taxisptr2->fc_unit = taxisptr1->fc_unit; + taxisptr2->fc_period = taxisptr1->fc_period; + + reshSetStatus(taxisID2, &taxisOps, RESH_DESYNC_IN_USE); + reshUnlock(); +} + +CdiDateTime +taxisInqVdatetime(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->vDateTime; +} + +CdiDateTime +taxisInqRdatetime(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiDateTime_isNull(taxisptr->rDateTime)) + { + taxisptr->rDateTime = taxisptr->vDateTime; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } + + return taxisptr->rDateTime; +} + +/* +@Function taxisInqVdate +@Title Get the verification date + +@Prototype int taxisInqVdate(int taxisID) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis} + +@Description +The function @func{taxisInqVdate} returns the verification date of a Time axis. + +@Result +@func{taxisInqVdate} returns the verification date. + +@EndFunction +*/ +int +taxisInqVdate(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return (int) cdiDate_get(taxisptr->vDateTime.date); +} + +CdiDateTime +taxisInqSdatetime(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->sDateTime; +} + +void +taxisInqVdateBounds(int taxisID, int *vdate_lb, int *vdate_ub) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + *vdate_lb = (int) cdiDate_get(taxisptr->vDateTime_lb.date); + *vdate_ub = (int) cdiDate_get(taxisptr->vDateTime_ub.date); +} + +void +taxisInqVdatetimeBounds(int taxisID, CdiDateTime *vDateTime_lb, CdiDateTime *vDateTime_ub) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + *vDateTime_lb = taxisptr->vDateTime_lb; + *vDateTime_ub = taxisptr->vDateTime_ub; +} + +void +taxisDefVdateBounds(int taxisID, int vdate_lb, int vdate_ub) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->hasBounds == false || (int) cdiDate_get(taxisptr->vDateTime_lb.date) != vdate_lb + || (int) cdiDate_get(taxisptr->vDateTime_ub.date) != vdate_ub) + { + taxisptr->vDateTime_lb.date = cdiDate_set(vdate_lb); + taxisptr->vDateTime_ub.date = cdiDate_set(vdate_ub); + taxisptr->hasBounds = true; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +void +taxisDefVdatetimeBounds(int taxisID, CdiDateTime vDateTime_lb, CdiDateTime vDateTime_ub) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->hasBounds == false || cdiDateTime_isNE(taxisptr->vDateTime_lb, vDateTime_lb) + || cdiDateTime_isNE(taxisptr->vDateTime_ub, vDateTime_ub)) + { + taxisptr->vDateTime_lb = vDateTime_lb; + taxisptr->vDateTime_ub = vDateTime_ub; + taxisptr->hasBounds = true; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function taxisInqVtime +@Title Get the verification time + +@Prototype int taxisInqVtime(int taxisID) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis} + +@Description +The function @func{taxisInqVtime} returns the verification time of a Time axis. + +@Result +@func{taxisInqVtime} returns the verification time. + +@EndFunction +*/ +int +taxisInqVtime(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return cdiTime_get(taxisptr->vDateTime.time); +} + +void +taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + *vtime_lb = cdiTime_get(taxisptr->vDateTime_lb.time); + *vtime_ub = cdiTime_get(taxisptr->vDateTime_ub.time); +} + +void +taxisDefVtimeBounds(int taxisID, int vtime_lb, int vtime_ub) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (taxisptr->hasBounds == false || cdiTime_get(taxisptr->vDateTime_lb.time) != vtime_lb + || cdiTime_get(taxisptr->vDateTime_ub.time) != vtime_ub) + { + taxisptr->vDateTime_lb.time = cdiTime_set(vtime_lb); + taxisptr->vDateTime_ub.time = cdiTime_set(vtime_ub); + taxisptr->hasBounds = true; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function taxisInqRdate +@Title Get the reference date + +@Prototype int taxisInqRdate(int taxisID) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis} + +@Description +The function @func{taxisInqRdate} returns the reference date of a Time axis. + +@Result +@func{taxisInqRdate} returns the reference date. + +@EndFunction +*/ +int +taxisInqRdate(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiDateTime_isNull(taxisptr->rDateTime)) + { + taxisptr->rDateTime = taxisptr->vDateTime; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } + + return (int) cdiDate_get(taxisptr->rDateTime.date); +} + +/* +@Function taxisInqRtime +@Title Get the reference time + +@Prototype int taxisInqRtime(int taxisID) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis} + +@Description +The function @func{taxisInqRtime} returns the reference time of a Time axis. + +@Result +@func{taxisInqRtime} returns the reference time. + +@EndFunction +*/ +int +taxisInqRtime(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiDateTime_isNull(taxisptr->rDateTime)) + { + taxisptr->rDateTime = taxisptr->vDateTime; + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } + + return cdiTime_get(taxisptr->rDateTime.time); +} + +/* +@Function taxisInqFdatetime +@Title Get the forecast reference date/time + +@Prototype int taxisInqFdatetime(int taxisID) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis} + +@Description +The function @func{taxisInqFdatetime} returns the forecast reference date/time of a Time axis. + +@Result +@func{taxisInqFdate} returns the forecast reference date/time. + +@EndFunction +*/ +CdiDateTime +taxisInqFdatetime(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + + if (cdiDateTime_isNull(taxisptr->fDateTime)) + { + // rDateTime is initialized from vDateTime if empty! + taxisptr->fDateTime = taxisInqRdatetime(taxisID); + reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE); + } + + return taxisptr->fDateTime; +} + +/* +@Function taxisInqCalendar +@Title Get the calendar + +@Prototype int taxisInqCalendar(int taxisID) +@Parameter + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis} + +@Description +The function @func{taxisInqCalendar} returns the calendar of a Time axis. + +@Result +@func{taxisInqCalendar} returns the type of the calendar, +one of the set of predefined CDI calendar types. +The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC}, +@func{CALENDAR_360DAYS}, @func{CALENDAR_365DAYS} and @func{CALENDAR_366DAYS}. + +@EndFunction +*/ +int +taxisInqCalendar(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->calendar; +} + +int +taxisInqTunit(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->unit; +} + +int +taxisInqForecastTunit(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->fc_unit; +} + +double +taxisInqForecastPeriod(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->fc_period; +} + +int +taxisInqNumavg(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr->numavg; +} + +taxis_t * +taxisPtr(int taxisID) +{ + taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps); + return taxisptr; +} + +void +ptaxisDefDatatype(taxis_t *taxisptr, int datatype) +{ + taxisptr->datatype = datatype; +} + +void +ptaxisDefName(taxis_t *taxisptr, const char *name) +{ + if (name) + { + size_t len = strlen(name); + delete_refcount_string(taxisptr->name); + char *taxisname = taxisptr->name = new_refcount_string(len); + strcpy(taxisname, name); + } +} + +void +ptaxisDefLongname(taxis_t *taxisptr, const char *longname) +{ + if (longname) + { + size_t len = strlen(longname); + delete_refcount_string(taxisptr->longname); + char *taxislongname = taxisptr->longname = new_refcount_string(len); + strcpy(taxislongname, longname); + } +} + +char * +ptaxisAllocUnits(taxis_t *taxisptr, size_t len) +{ + delete_refcount_string(taxisptr->units); + return taxisptr->units = new_refcount_string(len); +} + +void +ptaxisDefUnits(taxis_t *taxisptr, const char *units) +{ + if (units) + { + size_t len = strlen(units); + char *taxisunits = ptaxisAllocUnits(taxisptr, len); + strcpy(taxisunits, units); + } +} + +static JulianDate +timevalue_decode(int timeunits, double timevalue) +{ + JulianDate julianDate; + julianDate.julianDay = 0; + julianDate.secondOfDay = 0.0; + + if (timeunits == TUNIT_MINUTE) + { + timevalue *= 60; + timeunits = TUNIT_SECOND; + } + else if (timeunits == TUNIT_HOUR) + { + timevalue /= 24; + timeunits = TUNIT_DAY; + } + + if (timeunits == TUNIT_SECOND) + { + julianDate.julianDay = (int64_t) (timevalue / 86400.0); + double seconds = timevalue - julianDate.julianDay * 86400.0; + julianDate.secondOfDay = round(seconds * 1000.0) / 1000.0; + if (julianDate.secondOfDay < 0) + { + julianDate.julianDay -= 1; + julianDate.secondOfDay += 86400.0; + }; + /* + { + double cval = julianDate.julianDay * 86400.0 + julianDate.secondOfDay; + if (cval != timevalue) printf("TUNIT_SECOND error: %g %g %d %d\n", timevalue, cval, julianDate.julianDay, + julianDate.secondOfDay); + } + */ + } + else if (timeunits == TUNIT_DAY) + { + julianDate.julianDay = (int64_t) timevalue; + double seconds = (timevalue - julianDate.julianDay) * 86400.0; + julianDate.secondOfDay = (int) lround(seconds); + if (julianDate.secondOfDay < 0) + { + julianDate.julianDay -= 1; + julianDate.secondOfDay += 86400.0; + }; + /* + { + double cval = julianDate.julianDay + julianDate.secondOfDay / 86400.0; + if (cval != timevalue) printf("TUNIT_DAY error: %g %g %d %d\n", timevalue, cval, julianDate.julianDay, + julianDate.secondOfDay); + } + */ + } + else + { + static bool lwarn = true; + if (lwarn) + { + Warning("timeunit %s unsupported!", tunitNamePtr(timeunits)); + lwarn = false; + } + } + + return julianDate; +} + +static double +cdi_encode_timevalue(int days, double secs, int timeunit) +{ + double timevalue = 0.0; + + if (timeunit == TUNIT_SECOND) + { + timevalue = days * 86400.0 + secs; + } + else if (timeunit == TUNIT_MINUTE || timeunit == TUNIT_QUARTER || timeunit == TUNIT_30MINUTES) + { + timevalue = days * 1440. + secs / 60.; + } + else if (timeunit == TUNIT_HOUR || timeunit == TUNIT_3HOURS || timeunit == TUNIT_6HOURS || timeunit == TUNIT_12HOURS) + { + timevalue = days * 24. + secs / 3600.; + } + else if (timeunit == TUNIT_DAY) + { + timevalue = days + secs / 86400.; + } + else + { + static bool lwarn = true; + if (lwarn) + { + Warning("timeunit %s unsupported!", tunitNamePtr(timeunit)); + lwarn = false; + } + } + + return timevalue; +} + +// convert relative time value to CdiDateTime +static CdiDateTime +rtimeval2datetime(double timevalue, const taxis_t *taxis) +{ + if (IS_EQUAL(timevalue, 0.0)) return taxis->rDateTime; + + int timeunits = taxis->unit; + int calendar = taxis->calendar; + + if (timeunits == TUNIT_MONTH && calendar == CALENDAR_360DAYS) + { + timeunits = TUNIT_DAY; + timevalue *= 30; + } + + CdiDateTime rDateTime = taxis->rDateTime; + + if (timeunits == TUNIT_MONTH || timeunits == TUNIT_YEAR) + { + int year = rDateTime.date.year; + int month = rDateTime.date.month; + + if (timeunits == TUNIT_YEAR) timevalue *= 12; + + int nmon = (int) timevalue; + double fmon = timevalue - nmon; + + month += nmon; + + struct YearMonth ym = normalize_month(year, month); + year = ym.year; + month = ym.month; + + timeunits = TUNIT_DAY; + timevalue = fmon * days_per_month(calendar, year, month); + + rDateTime.date.year = year; + rDateTime.date.month = month; + } + + JulianDate julianDate = julianDate_encode(calendar, rDateTime); + JulianDate julianDate2 = timevalue_decode(timeunits, timevalue); + + return julianDate_decode(calendar, julianDate_add(julianDate2, julianDate)); +} + +// convert CdiDateTime to relative time value +static double +datetime2rtimeval(CdiDateTime vDateTime, const taxis_t *taxis) +{ + double value = 0.0; + + int calendar = taxis->calendar; + int timeunits = taxis->unit; + int timeunits0 = timeunits; + + CdiDateTime rDateTime = taxis->rDateTime; + + if (cdiDateTime_isNull(rDateTime)) rDateTime = (*taxis).vDateTime; + + if (cdiDateTime_isNull(rDateTime) && cdiDateTime_isNull(vDateTime)) return value; + + JulianDate julianDate1 = julianDate_encode(calendar, rDateTime); + + if (timeunits == TUNIT_MONTH && calendar == CALENDAR_360DAYS) timeunits = TUNIT_DAY; + + if (timeunits == TUNIT_MONTH || timeunits == TUNIT_YEAR) + { + int ryear = rDateTime.date.year; + int rmonth = rDateTime.date.month; + int year = vDateTime.date.year; + int month = vDateTime.date.month; + value = (year - ryear) * 12 - rmonth + month; + + int nmonth = (int) value; + month -= nmonth; + + struct YearMonth ym = normalize_month(year, month); + year = ym.year; + month = ym.month; + + int dpm = days_per_month(calendar, year, month); + + vDateTime.date.year = year; + vDateTime.date.month = month; + JulianDate julianDate2 = julianDate_encode(calendar, vDateTime); + JulianDate dateDifference = julianDate_sub(julianDate2, julianDate1); + + value += (dateDifference.julianDay + dateDifference.secondOfDay / 86400.0) / dpm; + if (timeunits == TUNIT_YEAR) value = value / 12; + } + else + { + JulianDate julianDate2 = julianDate_encode(calendar, vDateTime); + JulianDate dateDifference = julianDate_sub(julianDate2, julianDate1); + + value = cdi_encode_timevalue(dateDifference.julianDay, dateDifference.secondOfDay, timeunits); + } + + if (timeunits0 == TUNIT_MONTH && calendar == CALENDAR_360DAYS) value /= 30.0; + + return value; +} + +// convert absolute time value to CdiDateTime +static CdiDateTime +atimeval2datetime(double timevalue) +{ + int64_t vdate = (int64_t) timevalue; + double tmpval = (timevalue - vdate) * 86400.0; + int daysec = (vdate < 0) ? (int) (-tmpval + 0.01) : (int) (tmpval + 0.01); + + int year, month, day; + cdiDecodeDate(vdate, &year, &month, &day); + + int hour = daysec / 3600; + int minute = (daysec - hour * 3600) / 60; + int second = daysec - hour * 3600 - minute * 60; + int ms = 0; + + CdiDateTime datetime; + datetime.date = cdiDate_encode(year, month, day); + datetime.time = cdiTime_encode(hour, minute, second, ms); + + return datetime; +} + +static CdiDateTime +split_timevalue(double timevalue, int timeunit) +{ + CdiDateTime datetime; + cdiDateTime_init(&datetime); + + if (timeunit == TUNIT_SECOND) + { + timevalue /= 86400; + datetime = atimeval2datetime(timevalue); + } + else if (timeunit == TUNIT_HOUR) + { + timevalue /= 24; + datetime = atimeval2datetime(timevalue); + } + else if (timeunit == TUNIT_DAY) + { + datetime = atimeval2datetime(timevalue); + } + else if (timeunit == TUNIT_MONTH) + { + int64_t vdate = (int64_t) timevalue * 100 - ((timevalue < 0) * 2 - 1); + datetime.date = cdiDate_set(vdate); + } + else if (timeunit == TUNIT_YEAR) + { + { + static bool lwarn = true; + if (lwarn && (fabs(timevalue - (int64_t) timevalue) > 0)) + { + Warning("Fraction of a year is not supported!!"); + lwarn = false; + } + } + + { + static bool lwarn = true; + if (timevalue < -214700) + { + if (lwarn) + { + Warning("Year %g out of range, set to -214700", timevalue); + lwarn = false; + } + timevalue = -214700; + } + else if (timevalue > 214700) + { + if (lwarn) + { + Warning("Year %g out of range, set to 214700", timevalue); + lwarn = false; + } + timevalue = 214700; + } + } + + int64_t vdate = (int64_t) timevalue * 10000; + vdate += (timevalue < 0) ? -101 : 101; + datetime.date = cdiDate_set(vdate); + } + else + { + static bool lwarn = true; + if (lwarn) + { + Warning("timeunit %s unsupported!", tunitNamePtr(timeunit)); + lwarn = false; + } + } + + // verify date and time + + int year, month, day; + cdiDate_decode(datetime.date, &year, &month, &day); + int hour, minute, second, ms; + cdiTime_decode(datetime.time, &hour, &minute, &second, &ms); + + if (month > 17 || day > 31 || hour > 23 || minute > 59 || second > 59) + { + if ((month > 17 || day > 31) && (year < -9999 || year > 9999)) year = 1; + if (month > 17) month = 1; + if (day > 31) day = 1; + if (hour > 23) hour = 0; + if (minute > 59) minute = 0; + if (second > 59) second = 0; + + datetime.date = cdiDate_encode(year, month, day); + datetime.time = cdiTime_encode(hour, minute, second, ms); + + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("Reset wrong date/time to %4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d!", year, month, day, hour, minute, second); + } + } + + return datetime; +} + +void +cdi_set_forecast_period(double timevalue, taxis_t *taxis) +{ + taxis->fc_period = timevalue; + + int timeunits = taxis->fc_unit; + int calendar = taxis->calendar; + + if (cdiDateTime_isNull(taxis->vDateTime) && DBL_IS_EQUAL(timevalue, 0.0)) return; + + if (timeunits == TUNIT_MONTH && calendar == CALENDAR_360DAYS) + { + timeunits = TUNIT_DAY; + timevalue *= 30; + } + + CdiDateTime vDateTime = taxis->vDateTime; + + if (timeunits == TUNIT_MONTH || timeunits == TUNIT_YEAR) + { + int year = vDateTime.date.year; + int month = vDateTime.date.month; + + if (timeunits == TUNIT_YEAR) timevalue *= 12; + + int nmon = (int) timevalue; + double fmon = timevalue - nmon; + + month -= nmon; + + struct YearMonth ym = normalize_month(year, month); + year = ym.year; + month = ym.month; + + timeunits = TUNIT_DAY; + timevalue = fmon * days_per_month(calendar, year, month); + + vDateTime.date.year = year; + vDateTime.date.month = month; + } + + JulianDate julianDate = julianDate_encode(calendar, vDateTime); + JulianDate julianDate2 = timevalue_decode(timeunits, timevalue); + + taxis->fDateTime = julianDate_decode(calendar, julianDate_sub(julianDate, julianDate2)); +} + +CdiDateTime +cdi_decode_timeval(double timevalue, const taxis_t *taxis) +{ + return (taxis->type == TAXIS_ABSOLUTE) ? split_timevalue(timevalue, taxis->unit) : rtimeval2datetime(timevalue, taxis); +} + +double +cdi_encode_timeval(CdiDateTime datetime, taxis_t *taxis) +{ + double timeValue = 0.0; + + if (taxis->type == TAXIS_ABSOLUTE) + { + if (taxis->unit == TUNIT_YEAR) + { + timeValue = datetime.date.year; + } + else if (taxis->unit == TUNIT_MONTH) + { + int64_t xdate = cdiDate_get(datetime.date); + timeValue = xdate / 100 + copysign((double) (datetime.date.day != 0) * 0.5, (double) xdate); + } + else if (taxis->unit == TUNIT_SECOND) + { + int hour, minute, second, ms; + cdiTime_decode(datetime.time, &hour, &minute, &second, &ms); + timeValue = hour * 3600 + minute * 60 + second; + } + else + { + int hour, minute, second, ms; + cdiTime_decode(datetime.time, &hour, &minute, &second, &ms); + int64_t xdate = cdiDate_get(datetime.date); + timeValue = copysign(1.0, (double) xdate) * (fabs((double) xdate) + (hour * 3600 + minute * 60 + second) / 86400.0); + } + } + else + timeValue = datetime2rtimeval(datetime, taxis); + + return timeValue; +} + +void +ptaxisCopy(taxis_t *dest, taxis_t *source) +{ + reshLock(); + + // memcpy(dest, source, sizeof(taxis_t)); + dest->datatype = source->datatype; + dest->type = source->type; + dest->calendar = source->calendar; + dest->unit = source->unit; + dest->numavg = source->numavg; + dest->climatology = source->climatology; + dest->hasBounds = source->hasBounds; + dest->sDateTime = source->sDateTime; + dest->vDateTime = source->vDateTime; + dest->rDateTime = source->rDateTime; + dest->fDateTime = source->fDateTime; + dest->vDateTime_lb = source->vDateTime_lb; + dest->vDateTime_ub = source->vDateTime_ub; + dest->fc_unit = source->fc_unit; + dest->fc_period = source->fc_period; + + dest->climatology = source->climatology; + delete_refcount_string(dest->name); + delete_refcount_string(dest->longname); + delete_refcount_string(dest->units); + dest->name = dup_refcount_string(source->name); + dest->longname = dup_refcount_string(source->longname); + dest->units = dup_refcount_string(source->units); + if (dest->self != CDI_UNDEFID) reshSetStatus(dest->self, &taxisOps, RESH_DESYNC_IN_USE); + + reshUnlock(); +} + +static void +taxisPrintKernel(taxis_t *taxisptr, FILE *fp) +{ + int vdate_lb, vdate_ub; + int vtime_lb, vtime_ub; + + taxisInqVdateBounds(taxisptr->self, &vdate_lb, &vdate_ub); + taxisInqVtimeBounds(taxisptr->self, &vtime_lb, &vtime_ub); + + fprintf(fp, + "#\n" + "# taxisID %d\n" + "#\n" + "self = %d\n" + "type = %d\n" + "vdate = %d\n" + "vtime = %d\n" + "rdate = %d\n" + "rtime = %d\n" + "fdate = %d\n" + "ftime = %d\n" + "calendar = %d\n" + "unit = %d\n" + "numavg = %d\n" + "climatology = %d\n" + "hasBounds = %d\n" + "vdate_lb = %d\n" + "vtime_lb = %d\n" + "vdate_ub = %d\n" + "vtime_ub = %d\n" + "fc_unit = %d\n" + "fc_period = %g\n" + "\n", + taxisptr->self, taxisptr->self, taxisptr->type, (int) cdiDate_get(taxisptr->vDateTime.date), + cdiTime_get(taxisptr->vDateTime.time), (int) cdiDate_get(taxisptr->rDateTime.date), cdiTime_get(taxisptr->rDateTime.time), + (int) cdiDate_get(taxisptr->fDateTime.date), cdiTime_get(taxisptr->fDateTime.time), taxisptr->calendar, taxisptr->unit, + taxisptr->numavg, (int) taxisptr->climatology, (int) taxisptr->hasBounds, vdate_lb, vtime_lb, vdate_ub, vtime_ub, + taxisptr->fc_unit, taxisptr->fc_period); +} + +static int +taxisCompareP(void *taxisptr1, void *taxisptr2) +{ + const taxis_t *t1 = (const taxis_t *) taxisptr1, *t2 = (const taxis_t *) taxisptr2; + + xassert(t1 && t2); + + return !(t1->type == t2->type && cdiDateTime_isEQ(t1->vDateTime, t2->vDateTime) && cdiDateTime_isEQ(t1->rDateTime, t2->rDateTime) + && cdiDateTime_isEQ(t1->fDateTime, t2->fDateTime) && t1->calendar == t2->calendar && t1->unit == t2->unit + && t1->fc_unit == t2->fc_unit && t1->fc_period == t2->fc_period && t1->numavg == t2->numavg + && t1->climatology == t2->climatology && t1->hasBounds == t2->hasBounds + && cdiDateTime_isEQ(t1->vDateTime_lb, t2->vDateTime_lb) && cdiDateTime_isEQ(t1->vDateTime_ub, t2->vDateTime_ub)); +} + +static int +taxisTxCode(void *taxisptr) +{ + (void) taxisptr; + return TAXIS; +} + +enum +{ + TAXIS_PACK_INT_SELF, + TAXIS_PACK_INT_TYPE, + TAXIS_PACK_INT_VDATE, + TAXIS_PACK_INT_VTIME, + TAXIS_PACK_INT_RDATE, + TAXIS_PACK_INT_RTIME, + TAXIS_PACK_INT_FDATE, + TAXIS_PACK_INT_FTIME, + TAXIS_PACK_INT_CALENDAR, + TAXIS_PACK_INT_UNIT, + TAXIS_PACK_INT_FC_UNIT, + TAXIS_PACK_INT_NUMAVG, + TAXIS_PACK_INT_CLIMATOLOGY, + TAXIS_PACK_INT_HAS_BOUNDS, + TAXIS_PACK_INT_VDATE_LB, + TAXIS_PACK_INT_VDATE_UB, + TAXIS_PACK_INT_VTIME_LB, + TAXIS_PACK_INT_VTIME_UB, + TAXIS_PACK_INT_NAMELEN, + TAXIS_PACK_INT_LNAMELEN, + TAXIS_PACK_INT_UNITSLEN, + taxisNint +}; + +enum +{ + TAXIS_PACK_FC_PERIOD, + taxisNdouble +}; + +static int +taxisGetPackSize(void *p, void *context) +{ + taxis_t *taxisptr = (taxis_t *) p; + int packBufferSize = serializeGetSize(taxisNint, CDI_DATATYPE_INT, context) + + serializeGetSize(taxisNdouble, CDI_DATATYPE_FLT64, context) + + (taxisptr->name ? serializeGetSize((int) strlen(taxisptr->name), CDI_DATATYPE_TXT, context) : 0) + + (taxisptr->longname ? serializeGetSize((int) strlen(taxisptr->longname), CDI_DATATYPE_TXT, context) : 0) + + (taxisptr->units ? serializeGetSize((int) strlen(taxisptr->units), CDI_DATATYPE_TXT, context) : 0) + + serializeGetSize(1, CDI_DATATYPE_UINT32, context); + return packBufferSize; +} + +int +taxisUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, int force_id) +{ +#define adaptKey(key) (namespaceAdaptKey((key), originNamespace)) + taxis_t *taxisP; + int intBuffer[taxisNint]; + double dblBuffer[taxisNdouble]; + uint32_t d; + + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, intBuffer, taxisNint, CDI_DATATYPE_INT, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, dblBuffer, taxisNdouble, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + + xassert(cdiCheckSum(CDI_DATATYPE_INT, taxisNint, intBuffer) == d); + + cdiResH targetID = force_id ? adaptKey(intBuffer[TAXIS_PACK_INT_SELF]) : CDI_UNDEFID; + taxisP = taxisNewEntry(targetID); + + xassert(!force_id || targetID == taxisP->self); + + taxisP->type = intBuffer[TAXIS_PACK_INT_TYPE]; + taxisP->vDateTime.date = cdiDate_set(intBuffer[TAXIS_PACK_INT_VDATE]); + taxisP->vDateTime.time = cdiTime_set(intBuffer[TAXIS_PACK_INT_VTIME]); + taxisP->rDateTime.date = cdiDate_set(intBuffer[TAXIS_PACK_INT_RDATE]); + taxisP->rDateTime.time = cdiTime_set(intBuffer[TAXIS_PACK_INT_RTIME]); + taxisP->fDateTime.date = cdiDate_set(intBuffer[TAXIS_PACK_INT_FDATE]); + taxisP->fDateTime.time = cdiTime_set(intBuffer[TAXIS_PACK_INT_FTIME]); + taxisP->calendar = intBuffer[TAXIS_PACK_INT_CALENDAR]; + taxisP->unit = intBuffer[TAXIS_PACK_INT_UNIT]; + taxisP->fc_unit = intBuffer[TAXIS_PACK_INT_FC_UNIT]; + taxisP->numavg = intBuffer[TAXIS_PACK_INT_NUMAVG]; + taxisP->climatology = intBuffer[TAXIS_PACK_INT_CLIMATOLOGY]; + taxisP->hasBounds = (bool) intBuffer[TAXIS_PACK_INT_HAS_BOUNDS]; + taxisP->vDateTime_lb.date = cdiDate_set(intBuffer[TAXIS_PACK_INT_VDATE_LB]); + taxisP->vDateTime_lb.time = cdiTime_set(intBuffer[TAXIS_PACK_INT_VDATE_UB]); + taxisP->vDateTime_ub.date = cdiDate_set(intBuffer[TAXIS_PACK_INT_VTIME_LB]); + taxisP->vDateTime_ub.time = cdiTime_set(intBuffer[TAXIS_PACK_INT_VTIME_UB]); + taxisP->fc_period = dblBuffer[TAXIS_PACK_FC_PERIOD]; + if (intBuffer[TAXIS_PACK_INT_NAMELEN]) + { + int len = intBuffer[TAXIS_PACK_INT_NAMELEN]; + char *name = new_refcount_string((size_t) len); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, name, len, CDI_DATATYPE_TXT, context); + name[len] = '\0'; + taxisP->name = name; + } + if (intBuffer[TAXIS_PACK_INT_LNAMELEN]) + { + int len = intBuffer[TAXIS_PACK_INT_LNAMELEN]; + char *longname = new_refcount_string((size_t) len); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, longname, len, CDI_DATATYPE_TXT, context); + longname[len] = '\0'; + taxisP->longname = longname; + } + if (intBuffer[TAXIS_PACK_INT_UNITSLEN]) + { + int len = intBuffer[TAXIS_PACK_INT_UNITSLEN]; + char *units = new_refcount_string((size_t) len); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, units, len, CDI_DATATYPE_TXT, context); + units[len] = '\0'; + taxisP->units = units; + } + + reshSetStatus(taxisP->self, &taxisOps, reshGetStatus(taxisP->self, &taxisOps) & ~RESH_SYNC_BIT); +#undef adaptKey + + return taxisP->self; +} + +static void +taxisPack(void *voidP, void *packBuffer, int packBufferSize, int *packBufferPos, void *context) +{ + taxis_t *taxisP = (taxis_t *) voidP; + int nameLen, lnameLen, unitsLen; + uint32_t d; + + { + int intBuffer[taxisNint]; + intBuffer[TAXIS_PACK_INT_SELF] = taxisP->self; + intBuffer[TAXIS_PACK_INT_TYPE] = taxisP->type; + intBuffer[TAXIS_PACK_INT_VDATE] = (int) cdiDate_get(taxisP->vDateTime.date); + intBuffer[TAXIS_PACK_INT_VTIME] = cdiTime_get(taxisP->vDateTime.time); + intBuffer[TAXIS_PACK_INT_RDATE] = (int) cdiDate_get(taxisP->rDateTime.date); + intBuffer[TAXIS_PACK_INT_RTIME] = cdiTime_get(taxisP->rDateTime.time); + intBuffer[TAXIS_PACK_INT_FDATE] = (int) cdiDate_get(taxisP->fDateTime.date); + intBuffer[TAXIS_PACK_INT_FTIME] = cdiTime_get(taxisP->fDateTime.time); + intBuffer[TAXIS_PACK_INT_CALENDAR] = taxisP->calendar; + intBuffer[TAXIS_PACK_INT_UNIT] = taxisP->unit; + intBuffer[TAXIS_PACK_INT_FC_UNIT] = taxisP->fc_unit; + intBuffer[TAXIS_PACK_INT_NUMAVG] = taxisP->numavg; + intBuffer[TAXIS_PACK_INT_CLIMATOLOGY] = taxisP->climatology; + intBuffer[TAXIS_PACK_INT_HAS_BOUNDS] = taxisP->hasBounds; + intBuffer[TAXIS_PACK_INT_VDATE_LB] = (int) cdiDate_get(taxisP->vDateTime_lb.date); + intBuffer[TAXIS_PACK_INT_VDATE_UB] = cdiTime_get(taxisP->vDateTime_lb.time); + intBuffer[TAXIS_PACK_INT_VTIME_LB] = (int) cdiDate_get(taxisP->vDateTime_ub.date); + intBuffer[TAXIS_PACK_INT_VTIME_UB] = cdiTime_get(taxisP->vDateTime_ub.time); + intBuffer[TAXIS_PACK_INT_NAMELEN] = nameLen = taxisP->name ? (int) strlen(taxisP->name) : 0; + intBuffer[TAXIS_PACK_INT_LNAMELEN] = lnameLen = taxisP->longname ? (int) strlen(taxisP->longname) : 0; + intBuffer[TAXIS_PACK_INT_UNITSLEN] = unitsLen = taxisP->units ? (int) strlen(taxisP->units) : 0; + serializePack(intBuffer, taxisNint, CDI_DATATYPE_INT, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_INT, taxisNint, intBuffer); + } + + { + double dblBuffer[taxisNdouble]; + dblBuffer[TAXIS_PACK_FC_PERIOD] = taxisP->fc_period; + serializePack(dblBuffer, taxisNdouble, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + } + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + if (taxisP->name) serializePack(taxisP->name, nameLen, CDI_DATATYPE_TXT, packBuffer, packBufferSize, packBufferPos, context); + if (taxisP->longname) + serializePack(taxisP->longname, lnameLen, CDI_DATATYPE_TXT, packBuffer, packBufferSize, packBufferPos, context); + if (taxisP->units) serializePack(taxisP->units, unitsLen, CDI_DATATYPE_TXT, packBuffer, packBufferSize, packBufferPos, context); +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <limits.h> + + +static void +tstepsInitEntry(tsteps_t *tstep) +{ + tstep->recIDs = NULL; + tstep->records = NULL; + tstep->recordSize = 0; + tstep->nrecs = 0; + tstep->curRecID = CDI_UNDEFID; + tstep->ncStepIndex = 0; + tstep->position = 0; + tstep->nallrecs = 0; + tstep->next = 0; + + ptaxisInit(&(tstep->taxis)); +} + +int +tstepsNewEntry(stream_t *streamptr) +{ + const int tsID = streamptr->tstepsNextID++; + int tstepsTableSize = streamptr->tstepsTableSize; + tsteps_t *tstepsTable = streamptr->tsteps; + + // If the table overflows, double its size. + if (tsID == tstepsTableSize) + { + if (tstepsTableSize == 0) tstepsTableSize = 1; + if (tstepsTableSize <= INT_MAX / 2) + tstepsTableSize *= 2; + else if (tstepsTableSize < INT_MAX) + tstepsTableSize = INT_MAX; + else + Error("Resizing of tstep table failed!"); + + tstepsTable = (tsteps_t *) Realloc(tstepsTable, (size_t) tstepsTableSize * sizeof(tsteps_t)); + } + + streamptr->tstepsTableSize = tstepsTableSize; + streamptr->tsteps = tstepsTable; + + tsteps_t *curTstep = &streamptr->tsteps[tsID]; + tstepsInitEntry(curTstep); + + return tsID; +} + +void +cdi_create_timesteps(int numTimesteps, stream_t *streamptr) +{ + streamptr->ntsteps = (long) numTimesteps; + if (numTimesteps < 0 || streamptr->tstepsTableSize > 0) return; + + int ntsteps = (numTimesteps == 0) ? 1 : numTimesteps; + + streamptr->tsteps = (tsteps_t *) Malloc((size_t) ntsteps * sizeof(tsteps_t)); + + streamptr->tstepsTableSize = ntsteps; + streamptr->tstepsNextID = ntsteps; + + for (int tsID = 0; tsID < ntsteps; tsID++) + { + tstepsInitEntry(&streamptr->tsteps[tsID]); + } +} +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#define _XOPEN_SOURCE 600 + +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + + +static const char uuidFmt[] = "%02hhx%02hhx%02hhx%02hhx-" + "%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-" + "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"; + +int +cdiUUID2Str(const unsigned char *uuid, char *uuidstr) +{ + if (uuid == NULL || uuidstr == NULL) return 0; + + int iret = sprintf(uuidstr, uuidFmt, uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5], uuid[6], uuid[7], uuid[8], uuid[9], + uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]); + + if (iret != uuidNumHexChars) + { + uuidstr[0] = 0; + iret = -1; + } + + return iret; +} + +int +cdiStr2UUID(const char *uuidstr, unsigned char *uuid) +{ + if (uuid == NULL || uuidstr == NULL || strlen(uuidstr) != uuidNumHexChars) return -1; + + int iret = sscanf(uuidstr, uuidFmt, &uuid[0], &uuid[1], &uuid[2], &uuid[3], &uuid[4], &uuid[5], &uuid[6], &uuid[7], &uuid[8], + &uuid[9], &uuid[10], &uuid[11], &uuid[12], &uuid[13], &uuid[14], &uuid[15]); + if (iret != CDI_UUID_SIZE) return -1; + + return iret; +} + +// Returns a malloc'ed string that escapes all spaces and backslashes with backslashes. +char * +cdiEscapeSpaces(const char *string) +{ + // How much memory do we need? + size_t escapeCount = 0, length = 0; + for (; string[length]; ++length) escapeCount += string[length] == ' ' || string[length] == '\\'; + + char *result = (char *) Malloc(length + escapeCount + 1); + if (!result) return NULL; + + // Do the escaping. + for (size_t in = 0, out = 0; in < length; ++out, ++in) + { + if (string[in] == ' ' || string[in] == '\\') result[out++] = '\\'; + result[out] = string[in]; + } + result[length + escapeCount] = 0; // termination! + return result; +} + +// input: a space terminated string that may contain escaped characters +// output: a new zero terminated string with the escape characters removed +//*outStringEnd points to the terminating character upon return. +char * +cdiUnescapeSpaces(const char *string, const char **outStringEnd) +{ + // How much memory do we need? + size_t escapeCount = 0, length = 0; + for (const char *current = string; *current && *current != ' '; current++) + { + if (*current == '\\') + { + current++, escapeCount++; + if (!current) return NULL; + } + length++; + } + + char *result = (char *) Malloc(length + 1); + if (!result) return NULL; + + // Do the unescaping. + for (size_t in = 0, out = 0; out < length;) + { + if (string[in] == '\\') in++; + result[out++] = string[in++]; + } + result[length] = 0; // termination! + if (outStringEnd) *outStringEnd = &string[length + escapeCount]; + return result; +} + +#if defined(HAVE_DECL_UUID_GENERATE) && defined(HAVE_UUID_UUID_H) +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#include <uuid/uuid.h> +void +cdiCreateUUID(unsigned char uuid[CDI_UUID_SIZE]) +{ + static int uuid_seeded = 0; + static char uuid_rand_state[31 * sizeof(long)]; + char *caller_rand_state; + if (uuid_seeded) + caller_rand_state = setstate(uuid_rand_state); + else + { + struct timeval tv; + int status = gettimeofday(&tv, NULL); + if (status != 0) + { + perror("uuid random seed generation failed!"); + exit(1); + } + unsigned seed = (unsigned) (tv.tv_sec ^ tv.tv_usec); + caller_rand_state = initstate(seed, uuid_rand_state, sizeof(uuid_rand_state)); + uuid_seeded = 1; + } + uuid_generate(uuid); + setstate(caller_rand_state); +} +#elif defined(HAVE_DECL_UUID_CREATE) && defined(HAVE_UUID_H) +#ifdef HAVE_DECL_UUID_MAKE_V5 +#include <uuid.h> +void +cdiCreateUUID(unsigned char *uuid) +{ + static const char error_stage[][16] + = { "uuid_create", "uuid_create", "uuid_load", "uuid_make", "uuid_export", "uuid_destroy1", "uuid_destroy2" }; + uuid_t *objuuid = NULL, *nsuuid = NULL; + int stage = 0; + uuid_rc_t status; + if ((status = uuid_create(&objuuid)) == UUID_RC_OK) + { + ++stage; + if ((status = uuid_create(&nsuuid)) == UUID_RC_OK) + { + ++stage; + if ((status = uuid_load(nsuuid, "ns:OID")) == UUID_RC_OK) + { + ++stage; + if ((status = uuid_make(objuuid, UUID_MAKE_V5, nsuuid, cdiLibraryVersion())) == UUID_RC_OK) + { + ++stage; + size_t datalen = CDI_UUID_SIZE; + status = uuid_export(objuuid, UUID_FMT_BIN, &uuid, &datalen); + } + } + } + } + if (status != UUID_RC_OK) Error("failed to generate UUID at stage %s\n", error_stage[stage]); + stage = 5; + if ((status = uuid_destroy(nsuuid)) != UUID_RC_OK) Error("failed to generate UUID at stage %s\n", error_stage[stage]); + ++stage; + if ((status = uuid_destroy(objuuid)) != UUID_RC_OK) Error("failed to generate UUID at stage %s\n", error_stage[stage]); +} +#else +#include <inttypes.h> +typedef uint8_t u_int8_t; +typedef uint16_t u_int16_t; +typedef uint32_t u_int32_t; +#include <uuid.h> +void +cdiCreateUUID(unsigned char *uuid) +{ + uint32_t status; + uuid_create((uuid_t *) (void *) uuid, &status); + if (status != uuid_s_ok) + { + perror("uuid generation failed!"); + exit(1); + } +} +#endif +#else +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +void +cdiCreateUUID(unsigned char *uuid) +{ + static int uuid_seeded = 0; +#ifndef _SX + static char uuid_rand_state[31 * sizeof(long)]; + char *caller_rand_state; + if (uuid_seeded) + caller_rand_state = setstate(uuid_rand_state); + else + { +#ifdef HAVE_SYS_TIME_H + struct timeval tv; + int status = gettimeofday(&tv, NULL); + if (status != 0) + { + perror("failed seed generation!"); + exit(1); + } + unsigned seed = tv.tv_sec ^ tv.tv_usec; +#else + unsigned seed = 0; +#endif + caller_rand_state = initstate(seed, uuid_rand_state, sizeof(uuid_rand_state)); + uuid_seeded = 1; + } + for (size_t i = 0; i < CDI_UUID_SIZE; ++i) uuid[i] = (unsigned char) random(); +#else + unsigned short caller_rand_state[3]; + { + static unsigned short our_rand_state[3]; + if (!uuid_seeded) + { +#ifdef HAVE_SYS_TIME_H + struct timeval tv; + int status = gettimeofday(&tv, NULL); + if (status != 0) + { + perror("failed seed generation!"); + exit(1); + } + unsigned seed = tv.tv_sec ^ tv.tv_usec; +#else + unsigned seed = 0; +#endif + our_rand_state[0] = 0x330E; + our_rand_state[1] = (unsigned short) (seed & 0xFFFFU); + our_rand_state[2] = (unsigned short) ((seed >> 16) & 0xFFFFU); + } + unsigned short *p = seed48(our_rand_state); + uuid_seeded = 1; + memcpy(caller_rand_state, p, sizeof(caller_rand_state)); + } + for (size_t i = 0; i < CDI_UUID_SIZE; ++i) uuid[i] = (unsigned char) lrand48(); +#endif + /* encode variant into msb of octet 8 */ + uuid[8] = (unsigned char) ((uuid[8] & 0x3f) | (1 << 7)); + /* encode version 4 ((pseudo-)random uuid) into msb of octet 7 */ + uuid[7] = (unsigned char) ((uuid[7] & 0x0f) | (4 << 4)); +#ifndef _SX + setstate(caller_rand_state); +#else + seed48(caller_rand_state); +#endif +} +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + + +static size_t Vctsize = 0; +static double *Vct = NULL; + +static int numberOfVerticalLevels = 0; +static int numberOfVerticalGrid = 0; +static unsigned char uuidVGrid[CDI_UUID_SIZE]; + +typedef struct +{ + int level1; + int level2; + int recID; + int lindex; +} leveltable_t; + +typedef struct +{ + int subtypeIndex; // corresponding tile in subtype_t structure (subtype->self) + int nlevels; + int levelTableSize; + leveltable_t *levelTable; +} subtypetable_t; + +typedef struct +{ + int varID; + int param; + int prec; + int tsteptype; + VarScanKeys scanKeys; + int gridID; + int zaxistype; + int ltype1; // GRIB first level type + int ltype2; // GRIB second level type + int hasBounds; + int level_sf; + int level_unit; + int zaxisID; + + int nsubtypes_alloc; + int nsubtypes; + subtypetable_t *recordTable; // ~ two-dimensional record list [nsubtypes_alloc][levelTableSize] + + int instID; + int modelID; + int tableID; + int comptype; // compression type + int complevel; // compression level + bool lmissval; + double missval; + char *name; + + // meta-data for specification of tiles (currently only GRIB-API: + subtype_t *tiles; + + cdi_keys_t keys; + + int opt_grib_nentries; // current no. key-value pairs + int opt_grib_kvpair_size; // current allocated size + opt_key_val_pair_t *opt_grib_kvpair; // (optional) list of keyword/value pairs +} vartable_t; + +static vartable_t *vartable; +static int varTableSize = 0; +static int varTableUsed = 0; + +static void +paramInitEntry(int varID, int param) +{ + vartable[varID].varID = varID; + vartable[varID].param = param; + vartable[varID].prec = 0; + vartable[varID].tsteptype = TSTEP_INSTANT; + varScanKeysInit(&vartable[varID].scanKeys); + vartable[varID].gridID = CDI_UNDEFID; + vartable[varID].zaxistype = 0; + vartable[varID].ltype1 = 0; + vartable[varID].ltype2 = -1; + vartable[varID].hasBounds = 0; + vartable[varID].level_sf = 0; + vartable[varID].level_unit = 0; + vartable[varID].recordTable = NULL; + vartable[varID].nsubtypes_alloc = 0; + vartable[varID].nsubtypes = 0; + vartable[varID].instID = CDI_UNDEFID; + vartable[varID].modelID = CDI_UNDEFID; + vartable[varID].tableID = CDI_UNDEFID; + cdiInitKeys(&vartable[varID].keys); + vartable[varID].comptype = CDI_COMPRESS_NONE; + vartable[varID].complevel = 1; + vartable[varID].lmissval = false; + vartable[varID].missval = 0; + vartable[varID].name = NULL; + vartable[varID].tiles = NULL; +} + +// Test if a variable specified by the given meta-data has already been registered in "vartable". +static int +varGetEntry(int param, int gridID, int zaxistype, int ltype1, int tsteptype, const char *name, const VarScanKeys *scanKeys, + const var_tile_t *tiles) +{ + for (int varID = 0; varID < varTableSize; ++varID) + { + // testing for "param" implicitly checks if we are beyond the current vartable size: + if (vartable[varID].param == param) + { + const int no_of_tiles = tiles ? tiles->numberOfTiles : -1; + const int vt_no_of_tiles + = vartable[varID].tiles ? subtypeGetGlobalDataP(vartable[varID].tiles, SUBTYPE_ATT_NUMBER_OF_TILES) : -1; + if ((vartable[varID].zaxistype == zaxistype) && (vartable[varID].ltype1 == ltype1) + && (vartable[varID].tsteptype == tsteptype) + && (scanKeys == NULL || varScanKeysIsEqual(&vartable[varID].scanKeys, scanKeys)) && (vartable[varID].gridID == gridID) + && (vt_no_of_tiles == no_of_tiles)) + { + if (name && name[0] && vartable[varID].name && vartable[varID].name[0]) + { + if (str_is_equal(name, vartable[varID].name)) return varID; + } + else + { + return varID; + } + } + } + } + + return -1; +} + +static void +varFree(void) +{ + if (CDI_Debug) Message("call to varFree"); + + for (int varID = 0; varID < varTableUsed; ++varID) + { + if (vartable[varID].recordTable) + { + for (int isub = 0; isub < vartable[varID].nsubtypes_alloc; isub++) Free(vartable[varID].recordTable[isub].levelTable); + Free(vartable[varID].recordTable); + } + + if (vartable[varID].name) Free(vartable[varID].name); + if (vartable[varID].tiles) subtypeDestroyPtr(vartable[varID].tiles); + + cdi_keys_t *keysp = &(vartable[varID].keys); + cdiDeleteVarKeys(keysp); + + if (vartable[varID].opt_grib_kvpair) + { + for (int i = 0; i < vartable[varID].opt_grib_nentries; i++) + { + if (vartable[varID].opt_grib_kvpair[i].keyword) Free(vartable[varID].opt_grib_kvpair[i].keyword); + } + Free(vartable[varID].opt_grib_kvpair); + } + vartable[varID].opt_grib_nentries = 0; + vartable[varID].opt_grib_kvpair_size = 0; + vartable[varID].opt_grib_kvpair = NULL; + } + + if (vartable) Free(vartable); + vartable = NULL; + varTableSize = 0; + varTableUsed = 0; + + if (Vct) Free(Vct); + Vct = NULL; + Vctsize = 0; +} + +// Search for a tile subtype with subtypeIndex == tile_index. +static int +tileGetEntry(int varID, int tile_index) +{ + for (int isub = 0; isub < vartable[varID].nsubtypes; isub++) + if (vartable[varID].recordTable[isub].subtypeIndex == tile_index) return isub; + return CDI_UNDEFID; +} + +/* Resizes vartable:recordTable data structure, if necessary. */ +static int +tileNewEntry(int varID) +{ + int tileID = 0; + if (vartable[varID].nsubtypes_alloc == 0) + { + /* create table for the first time. */ + vartable[varID].nsubtypes_alloc = 2; + vartable[varID].nsubtypes = 0; + vartable[varID].recordTable = (subtypetable_t *) Malloc((size_t) vartable[varID].nsubtypes_alloc * sizeof(subtypetable_t)); + if (vartable[varID].recordTable == NULL) SysError("Allocation of leveltable failed!"); + + for (int isub = 0; isub < vartable[varID].nsubtypes_alloc; isub++) + { + vartable[varID].recordTable[isub].levelTable = NULL; + vartable[varID].recordTable[isub].levelTableSize = 0; + vartable[varID].recordTable[isub].nlevels = 0; + vartable[varID].recordTable[isub].subtypeIndex = CDI_UNDEFID; + } + } + else + { + /* data structure large enough; find a free entry. */ + while (tileID < vartable[varID].nsubtypes_alloc) + { + if (vartable[varID].recordTable[tileID].levelTable == NULL) break; + tileID++; + } + } + + /* If the table overflows, double its size. */ + if (tileID == vartable[varID].nsubtypes_alloc) + { + tileID = vartable[varID].nsubtypes_alloc; + vartable[varID].nsubtypes_alloc *= 2; + vartable[varID].recordTable = (subtypetable_t *) Realloc(vartable[varID].recordTable, + (size_t) vartable[varID].nsubtypes_alloc * sizeof(subtypetable_t)); + if (vartable[varID].recordTable == NULL) SysError("Reallocation of leveltable failed"); + for (int isub = tileID; isub < vartable[varID].nsubtypes_alloc; isub++) + { + vartable[varID].recordTable[isub].levelTable = NULL; + vartable[varID].recordTable[isub].levelTableSize = 0; + vartable[varID].recordTable[isub].nlevels = 0; + vartable[varID].recordTable[isub].subtypeIndex = CDI_UNDEFID; + } + } + + return tileID; +} + +static int +levelNewEntry(int varID, int level1, int level2, int tileID) +{ + int levelID = 0; + int levelTableSize = vartable[varID].recordTable[tileID].levelTableSize; + leveltable_t *levelTable = vartable[varID].recordTable[tileID].levelTable; + + // Look for a free slot in levelTable. (Create the table the first time through). + if (!levelTableSize) + { + levelTableSize = 2; + levelTable = (leveltable_t *) Malloc((size_t) levelTableSize * sizeof(leveltable_t)); + for (int i = 0; i < levelTableSize; i++) levelTable[i].recID = CDI_UNDEFID; + } + else + { + while (levelID < levelTableSize && levelTable[levelID].recID != CDI_UNDEFID) ++levelID; + } + + // If the table overflows, double its size. + if (levelID == levelTableSize) + { + levelTable = (leveltable_t *) Realloc(levelTable, (size_t) (levelTableSize *= 2) * sizeof(leveltable_t)); + for (int i = levelID; i < levelTableSize; i++) levelTable[i].recID = CDI_UNDEFID; + } + + levelTable[levelID].level1 = level1; + levelTable[levelID].level2 = level2; + levelTable[levelID].lindex = levelID; + + vartable[varID].recordTable[tileID].nlevels = levelID + 1; + vartable[varID].recordTable[tileID].levelTableSize = levelTableSize; + vartable[varID].recordTable[tileID].levelTable = levelTable; + + return levelID; +} + +#define UNDEF_PARAM -4711 + +static int +paramNewEntry(int param) +{ + int varID = 0; + + // Look for a free slot in vartable. (Create the table the first time through). + if (!varTableSize) + { + varTableSize = 2; + vartable = (vartable_t *) Malloc((size_t) varTableSize * sizeof(vartable_t)); + if (vartable == NULL) + { + Message("varTableSize = %d", varTableSize); + SysError("Allocation of vartable failed"); + } + + for (int i = 0; i < varTableSize; i++) + { + vartable[i].param = UNDEF_PARAM; + vartable[i].opt_grib_kvpair = NULL; + vartable[i].opt_grib_kvpair_size = 0; + vartable[i].opt_grib_nentries = 0; + } + } + else + { + while (varID < varTableSize) + { + if (vartable[varID].param == UNDEF_PARAM) break; + varID++; + } + } + + // If the table overflows, double its size. + if (varID == varTableSize) + { + vartable = (vartable_t *) Realloc(vartable, (size_t) (varTableSize *= 2) * sizeof(vartable_t)); + for (int i = varID; i < varTableSize; i++) + { + vartable[i].param = UNDEF_PARAM; + vartable[i].opt_grib_kvpair = NULL; + vartable[i].opt_grib_kvpair_size = 0; + vartable[i].opt_grib_nentries = 0; + } + } + + paramInitEntry(varID, param); + + return varID; +} + +// Append tile set to a subtype. Return index of the new tile (i.e. the "entry->self" value). +static int +varInsertTileSubtype(vartable_t *vptr, const var_tile_t *tiles) +{ + if (tiles == NULL) return 0; + + // first, generate a subtype based on the info in "tiles". + subtype_t *subtype_ptr; + subtypeAllocate(&subtype_ptr, SUBTYPE_TILES); + subtypeDefGlobalDataP(subtype_ptr, SUBTYPE_ATT_TOTALNO_OF_TILEATTR_PAIRS, tiles->totalno_of_tileattr_pairs); + subtypeDefGlobalDataP(subtype_ptr, SUBTYPE_ATT_TILE_CLASSIFICATION, tiles->tileClassification); + subtypeDefGlobalDataP(subtype_ptr, SUBTYPE_ATT_NUMBER_OF_TILES, tiles->numberOfTiles); + + // Here, we create a tile set for comparison that contains only one tile/attribute pair (based on "tiles"). + struct subtype_entry_t *entry = subtypeEntryInsert(subtype_ptr); + subtypeDefEntryDataP(entry, SUBTYPE_ATT_NUMBER_OF_ATTR, tiles->numberOfAttributes); + subtypeDefEntryDataP(entry, SUBTYPE_ATT_TILEINDEX, tiles->tileindex); + subtypeDefEntryDataP(entry, SUBTYPE_ATT_TILEATTRIBUTE, tiles->attribute); + + if (vptr->tiles == NULL) + { + vptr->tiles = subtype_ptr; + return 0; + } + else + { + tilesetInsertP(vptr->tiles, subtype_ptr); + subtypeDestroyPtr(subtype_ptr); + return vptr->tiles->nentries - 1; + } +} + +void +varAddRecord(int recID, int param, int gridID, int zaxistype, int hasBounds, int level1, int level2, int level_sf, int level_unit, + int prec, int *pvarID, int *plevelID, int tsteptype, int ltype1, int ltype2, const char *name, + const VarScanKeys *scanKeys, const var_tile_t *tiles, int *tile_index) +{ + int varID = (CDI_Split_Ltype105 != 1 || zaxistype != ZAXIS_HEIGHT) + ? varGetEntry(param, gridID, zaxistype, ltype1, tsteptype, name, scanKeys, tiles) + : CDI_UNDEFID; + + if (varID == CDI_UNDEFID) + { + varTableUsed++; + varID = paramNewEntry(param); + vartable[varID].gridID = gridID; + vartable[varID].zaxistype = zaxistype; + vartable[varID].ltype1 = ltype1; + vartable[varID].ltype2 = ltype2; + vartable[varID].hasBounds = hasBounds; + vartable[varID].level_sf = level_sf; + vartable[varID].level_unit = level_unit; + vartable[varID].tsteptype = tsteptype; + if (scanKeys) vartable[varID].scanKeys = *scanKeys; + + if (name && name[0]) vartable[varID].name = strdup(name); + } + else + { + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + + if (vartable[varID].gridID != gridID) + { + Message("param = %s gridID = %d", paramstr, gridID); + Error("horizontal grid must not change for same parameter!"); + } + if (vartable[varID].zaxistype != zaxistype) + { + Message("param = %s zaxistype = %d", paramstr, zaxistype); + Error("zaxistype must not change for same parameter!"); + } + } + + if (prec > vartable[varID].prec) vartable[varID].prec = prec; + + // append current tile to tile subtype info. + const int this_tile = varInsertTileSubtype(&vartable[varID], tiles); + int tileID = tileGetEntry(varID, this_tile); + if (tile_index) (*tile_index) = this_tile; + if (tileID == CDI_UNDEFID) + { + tileID = tileNewEntry((int) varID); + vartable[varID].recordTable[tileID].subtypeIndex = this_tile; + vartable[varID].nsubtypes++; + } + + // append current level to level table info + const int levelID = levelNewEntry(varID, level1, level2, tileID); + if (CDI_Debug) + Message("vartable[%d].recordTable[%d].levelTable[%d].recID = %d; level1,2=%d,%d", varID, tileID, levelID, recID, level1, + level2); + vartable[varID].recordTable[tileID].levelTable[levelID].recID = recID; + + *pvarID = (int) varID; + *plevelID = levelID; +} + +/* +static +int dblcmp(const void *s1, const void *s2) +{ + int cmp = 0; + + if ( *((double *) s1) < *((double *) s2) ) cmp = -1; + else if ( *((double *) s1) > *((double *) s2) ) cmp = 1; + + return cmp; +} +*/ +static int +cmpLevelTable(const void *s1, const void *s2) +{ + int cmp = 0; + const leveltable_t *x = (const leveltable_t *) s1; + const leveltable_t *y = (const leveltable_t *) s2; + // printf("%g %g %d %d\n", x->leve11, y->level1, x, y); + if (x->level1 < y->level1) + cmp = -1; + else if (x->level1 > y->level1) + cmp = 1; + + return cmp; +} + +static int +cmpLevelTableInv(const void *s1, const void *s2) +{ + int cmp = 0; + const leveltable_t *x = (const leveltable_t *) s1; + const leveltable_t *y = (const leveltable_t *) s2; + // printf("%g %g %d %d\n", x->leve11, y->level1, x, y); + if (x->level1 < y->level1) + cmp = 1; + else if (x->level1 > y->level1) + cmp = -1; + + return cmp; +} + +void +varCopyKeys(int vlistID, int varID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + cdiInitKeys(&vlistptr->vars[varID].keys); + cdiCopyVarKeys(&vartable[varID].keys, &vlistptr->vars[varID].keys); +} + +struct cdi_generate_varinfo +{ + int varid; + const char *name; +}; + +/* +static int +cdi_generate_cmp_varname(const void *s1, const void *s2) +{ + const struct cdi_generate_varinfo *x = (const struct cdi_generate_varinfo *) s1, *y = (const struct cdi_generate_varinfo *) s2; + return strcmp(x->name, y->name); +} +*/ + +void +cdi_generate_vars(stream_t *streamptr) +{ + const int vlistID = streamptr->vlistID; + + int *varids = (int *) Malloc(varTableUsed * sizeof(int)); + for (int varID = 0; varID < varTableUsed; varID++) varids[varID] = (int) varID; + /* + if ( streamptr->sortname ) + { + size_t varID; + for (varID = 0; varID < varTableUsed; varID++) + if (!vartable[varID].name) break; + + if ( varID == varTableUsed ) + { + struct cdi_generate_varinfo *varInfo + = (struct cdi_generate_varinfo *) Malloc((size_t)varTableUsed * sizeof(struct cdi_generate_varinfo)); + + for (size_t varID = 0; varID < varTableUsed; varID++) + { + varInfo[varID].varid = varids[varID]; + varInfo[varID].name = vartable[varids[varID]].name; + } + qsort(varInfo, varTableUsed, sizeof(varInfo[0]), cdi_generate_cmp_varname); + for (size_t varID = 0; varID < varTableUsed; varID++) + { + varids[varID] = varInfo[varID].varid; + } + Free(varInfo); + } + } + */ + for (int index = 0; index < varTableUsed; index++) + { + const int varid = varids[index]; + + const int gridID = vartable[varid].gridID; + const int param = vartable[varid].param; + const int ltype1 = vartable[varid].ltype1; + const int ltype2 = vartable[varid].ltype2; + int zaxistype = vartable[varid].zaxistype; + if (ltype1 == 0 && zaxistype == ZAXIS_GENERIC && cdiDefaultLeveltype != -1) zaxistype = cdiDefaultLeveltype; + const int hasBounds = vartable[varid].hasBounds; + const int prec = vartable[varid].prec; + int instID = vartable[varid].instID; + int modelID = vartable[varid].modelID; + int tableID = vartable[varid].tableID; + const int tsteptype = vartable[varid].tsteptype; + const int comptype = vartable[varid].comptype; + + const double level_sf = (vartable[varid].level_sf != 0) ? (1.0 / vartable[varid].level_sf) : 1; + + /* consistency check: test if all subtypes have the same levels: */ + const int nlevels = vartable[varid].recordTable[0].nlevels; + for (int isub = 1; isub < vartable[varid].nsubtypes; isub++) + { + if (vartable[varid].recordTable[isub].nlevels != nlevels) + { + fprintf(stderr, + "var \"%s\": isub = %d / %d :: " + "nlevels = %d, vartable[varid].recordTable[isub].nlevels = %d\n", + vartable[varid].name, isub, vartable[varid].nsubtypes, nlevels, vartable[varid].recordTable[isub].nlevels); + Error("zaxis size must not change for same parameter!"); + } + + const leveltable_t *t1 = vartable[varid].recordTable[isub - 1].levelTable; + const leveltable_t *t2 = vartable[varid].recordTable[isub].levelTable; + for (int ilev = 0; ilev < nlevels; ilev++) + if ((t1[ilev].level1 != t2[ilev].level1) || (t1[ilev].level2 != t2[ilev].level2) + || (t1[ilev].lindex != t2[ilev].lindex)) + { + fprintf(stderr, + "var \"%s\", varID=%d: isub = %d / %d :: " + "nlevels = %d, vartable[varid].recordTable[isub].nlevels = %d\n", + vartable[varid].name, varid, isub, vartable[varid].nsubtypes, nlevels, + vartable[varid].recordTable[isub].nlevels); + Message("t1[ilev].level1=%d / t2[ilev].level1=%d", t1[ilev].level1, t2[ilev].level1); + Message("t1[ilev].level2=%d / t2[ilev].level2=%d", t1[ilev].level2, t2[ilev].level2); + Message("t1[ilev].lindex=%d / t2[ilev].lindex=%d", t1[ilev].lindex, t2[ilev].lindex); + Error("zaxis type must not change for same parameter!"); + } + } + leveltable_t *levelTable = vartable[varid].recordTable[0].levelTable; + + if (ltype1 == 0 && zaxistype == ZAXIS_GENERIC && nlevels == 1 && levelTable[0].level1 == 0) zaxistype = ZAXIS_SURFACE; + + double *dlevels = (double *) Malloc(nlevels * sizeof(double)); + + /* + if ( hasBounds && zaxistype != ZAXIS_HYBRID && zaxistype != ZAXIS_HYBRID_HALF ) + for (int levelID = 0; levelID < nlevels; levelID++) + dlevels[levelID] = (level_sf*levelTable[levelID].level1 + level_sf*levelTable[levelID].level2) / 2.0; + else + */ + for (int levelID = 0; levelID < nlevels; levelID++) dlevels[levelID] = level_sf * levelTable[levelID].level1; + + if (nlevels > 1) + { + bool linc = true, ldec = true, lsort = false; + for (int levelID = 1; levelID < nlevels; levelID++) + { + // check increasing of levels + linc &= (dlevels[levelID] > dlevels[levelID - 1]); + // check decreasing of levels + ldec &= (dlevels[levelID] < dlevels[levelID - 1]); + } + /* + * always sort pressure z-axis to ensure + * levelTable[levelID1].level1 < levelTable[levelID2].level1 <=> levelID1 > levelID2 + * unless already sorted in decreasing order + */ + if ((!linc && !ldec) && zaxistype == ZAXIS_PRESSURE) + { + qsort(levelTable, nlevels, sizeof(leveltable_t), cmpLevelTableInv); + lsort = true; + } + /* + * always sort hybrid and depth-below-land z-axis to ensure + * levelTable[levelID1].level1 < levelTable[levelID2].level1 <=> levelID1 < levelID2 + * unless already sorted in increasing order + */ + else if ((!linc && !ldec) || zaxistype == ZAXIS_HYBRID || zaxistype == ZAXIS_DEPTH_BELOW_LAND) + { + qsort(levelTable, nlevels, sizeof(leveltable_t), cmpLevelTable); + lsort = true; + } + + if (lsort) + { + /* + if ( hasBounds && zaxistype != ZAXIS_HYBRID && zaxistype != ZAXIS_HYBRID_HALF ) + for (int levelID = 0; levelID < nlevels; levelID++) + dlevels[levelID] = (level_sf*levelTable[levelID].level1 + level_sf*levelTable[levelID].level2) / 2.0; + else + */ + for (int levelID = 0; levelID < nlevels; levelID++) dlevels[levelID] = level_sf * levelTable[levelID].level1; + } + } + + double *dlevels1 = NULL; + double *dlevels2 = NULL; + if (hasBounds) + { + dlevels1 = (double *) Malloc(nlevels * sizeof(double)); + for (int levelID = 0; levelID < nlevels; levelID++) dlevels1[levelID] = level_sf * levelTable[levelID].level1; + dlevels2 = (double *) Malloc(nlevels * sizeof(double)); + for (int levelID = 0; levelID < nlevels; levelID++) dlevels2[levelID] = level_sf * levelTable[levelID].level2; + } + + const char **cvals = NULL; + const char *unitptr = cdiUnitNamePtr(vartable[varid].level_unit); + int zaxisID = varDefZaxis(vlistID, zaxistype, (int) nlevels, dlevels, cvals, 0, hasBounds, dlevels1, dlevels2, (int) Vctsize, + Vct, NULL, NULL, unitptr, 0, 0, ltype1, ltype2); + + if (CDI_CMOR_Mode && nlevels == 1 && zaxistype != ZAXIS_HYBRID) zaxisDefScalar(zaxisID); + + if (zaxisInqType(zaxisID) == ZAXIS_REFERENCE) + { + if (numberOfVerticalLevels > 0) cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NLEV, numberOfVerticalLevels); + if (numberOfVerticalGrid > 0) cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NUMBEROFVGRIDUSED, numberOfVerticalGrid); + if (!cdiUUIDIsNull(uuidVGrid)) cdiDefKeyBytes(zaxisID, CDI_GLOBAL, CDI_KEY_UUID, uuidVGrid, CDI_UUID_SIZE); + } + + if (hasBounds) Free(dlevels1); + if (hasBounds) Free(dlevels2); + Free(dlevels); + + // define new subtype for tile set + int tilesetID = CDI_UNDEFID; + if (vartable[varid].tiles) tilesetID = vlistDefTileSubtype(vlistID, vartable[varid].tiles); + + // generate new variable + int varID = stream_new_var(streamptr, gridID, zaxisID, tilesetID); + varID = vlistDefVarTiles(vlistID, gridID, zaxisID, TIME_VARYING, tilesetID); + + vlistDefVarTsteptype(vlistID, varID, tsteptype); + vlistDefVarParam(vlistID, varID, param); + vlistDefVarDatatype(vlistID, varID, prec); + vlistDefVarCompType(vlistID, varID, comptype); + + varCopyKeys(vlistID, varID); + + if (vartable[varid].lmissval) vlistDefVarMissval(vlistID, varID, vartable[varid].missval); + if (vartable[varid].name) cdiDefKeyString(vlistID, varID, CDI_KEY_NAME, vartable[varid].name); + + vlist_t *vlistptr = vlist_to_pointer(vlistID); + for (int i = 0; i < vartable[varid].opt_grib_nentries; i++) + { + resize_opt_grib_entries(&vlistptr->vars[varID], vlistptr->vars[varID].opt_grib_nentries + 1); + vlistptr->vars[varID].opt_grib_nentries += 1; + const int idx = vlistptr->vars[varID].opt_grib_nentries - 1; + + vlistptr->vars[varID].opt_grib_kvpair[idx] = vartable[varid].opt_grib_kvpair[i]; + vlistptr->vars[varID].opt_grib_kvpair[idx].keyword = NULL; + if (vartable[varid].opt_grib_kvpair[i].keyword) + vlistptr->vars[varID].opt_grib_kvpair[idx].keyword = strdupx(vartable[varid].opt_grib_kvpair[i].keyword); + vlistptr->vars[varID].opt_grib_kvpair[i].update = true; + } + // note: if the key is not defined, we do not throw an error! + + if (CDI_Default_TableID != CDI_UNDEFID) + { + int pdis, pcat, pnum; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + char name[CDI_MAX_NAME]; + name[0] = 0; + char longname[CDI_MAX_NAME]; + longname[0] = 0; + char units[CDI_MAX_NAME]; + units[0] = 0; + tableInqEntry(CDI_Default_TableID, pnum, -1, name, longname, units); + if (name[0]) + { + if (tableID != CDI_UNDEFID) + { + cdiDefKeyString(vlistID, varID, CDI_KEY_NAME, name); + if (longname[0]) cdiDefKeyString(vlistID, varID, CDI_KEY_LONGNAME, longname); + if (units[0]) cdiDefKeyString(vlistID, varID, CDI_KEY_UNITS, units); + } + else + tableID = CDI_Default_TableID; + } + if (CDI_Default_ModelID != CDI_UNDEFID) modelID = CDI_Default_ModelID; + if (CDI_Default_InstID != CDI_UNDEFID) instID = CDI_Default_InstID; + } + + if (instID != CDI_UNDEFID) vlistDefVarInstitut(vlistID, varID, instID); + if (modelID != CDI_UNDEFID) vlistDefVarModel(vlistID, varID, modelID); + if (tableID != CDI_UNDEFID) vlistDefVarTable(vlistID, varID, tableID); + } + + for (int index = 0; index < varTableUsed; index++) + { + int varid = varids[index]; + int nlevels = vartable[varid].recordTable[0].nlevels; + + int nsub = (vartable[varid].nsubtypes >= 0) ? vartable[varid].nsubtypes : 0; + for (int isub = 0; isub < nsub; isub++) + { + sleveltable_t *streamRecordTable = streamptr->vars[index].recordTable + isub; + leveltable_t *vartableLevelTable = vartable[varid].recordTable[isub].levelTable; + for (int levelID = 0; levelID < nlevels; levelID++) + { + streamRecordTable->recordID[levelID] = vartableLevelTable[levelID].recID; + int lindex; + for (lindex = 0; lindex < nlevels; lindex++) + if (levelID == vartableLevelTable[lindex].lindex) break; + if (lindex == nlevels) Error("Internal problem! lindex not found."); + streamRecordTable->lindex[levelID] = (int) lindex; + } + } + } + + Free(varids); + + varFree(); +} + +void +varDefVCT(size_t vctsize, double *vctptr) +{ + if (Vct == NULL && vctptr != NULL && vctsize > 0) + { + Vctsize = vctsize; + Vct = (double *) Malloc(vctsize * sizeof(double)); + memcpy(Vct, vctptr, vctsize * sizeof(double)); + } +} + +void +varDefZAxisReference(int nhlev, int nvgrid, unsigned char uuid[CDI_UUID_SIZE]) +{ + numberOfVerticalLevels = nhlev; + numberOfVerticalGrid = nvgrid; + memcpy(uuidVGrid, uuid, CDI_UUID_SIZE); +} + +bool +zaxis_compare(int zaxisID, int zaxistype, int nlevels, const double *levels, const double *lbounds, const double *ubounds, + const char *longname, const char *units, int ltype1, int ltype2) +{ + bool differ = true; + + int ltype1_0 = 0, ltype2_0 = -1; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, <ype1_0); + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFSECONDFIXEDSURFACE, <ype2_0); + const bool ltype1IsEqual = (ltype1 == ltype1_0); + const bool ltype2IsEqual = (ltype2 == ltype2_0); + const bool hasBounds = (lbounds && ubounds); + + if (ltype1IsEqual && ltype2IsEqual && (zaxistype == zaxisInqType(zaxisID) || zaxistype == ZAXIS_GENERIC)) + { + const bool hasBoundsZ = (zaxisInqLbounds(zaxisID, NULL) > 0 && zaxisInqUbounds(zaxisID, NULL) > 0); + if (nlevels == zaxisInqSize(zaxisID) && hasBoundsZ == hasBounds) + { + const double *dlevels = zaxisInqLevelsPtr(zaxisID); + if (dlevels && levels) + { + int levelID; + for (levelID = 0; levelID < nlevels; levelID++) + { + if (fabs(dlevels[levelID] - levels[levelID]) > 1.e-9) break; + } + if (levelID == nlevels) differ = false; + } + + if (!differ && hasBounds) + { + double *bounds = (double *) malloc(2 * nlevels * sizeof(double)); + zaxisInqLbounds(zaxisID, bounds); + zaxisInqUbounds(zaxisID, bounds + nlevels); + for (int levelID = 0; levelID < nlevels; levelID++) + { + if (fabs(lbounds[levelID] - bounds[levelID]) > 1.e-9 + || fabs(ubounds[levelID] - bounds[levelID + nlevels]) > 1.e-9) + { + differ = true; + break; + } + } + free(bounds); + } + + if (!differ) + { + if (longname && longname[0]) + { + char zlongname[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, zlongname, &length); + if (zlongname[0] && !str_is_equal(longname, zlongname)) differ = true; + } + if (units && units[0]) + { + char zunits[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, zunits, &length); + if (zunits[0] && !str_is_equal(units, zunits)) differ = true; + } + } + } + } + + return differ; +} + +struct varDefZAxisSearchState +{ + int resIDValue; + int zaxistype; + int nlevels; + const double *levels; + const double *lbounds; + const double *ubounds; + const char *longname; + const char *units; + int ltype1; + int ltype2; +}; + +static enum cdiApplyRet +varDefZAxisSearch(int id, void *res, void *data) +{ + struct varDefZAxisSearchState *state = (struct varDefZAxisSearchState *) data; + (void) res; + if (zaxis_compare(id, state->zaxistype, state->nlevels, state->levels, state->lbounds, state->ubounds, state->longname, + state->units, state->ltype1, state->ltype2) + == false) + { + state->resIDValue = id; + return CDI_APPLY_STOP; + } + else + return CDI_APPLY_GO_ON; +} + +int +varDefZaxis(int vlistID, int zaxistype, int nlevels, const double *levels, const char **cvals, size_t clength, bool hasBounds, + const double *levels1, const double *levels2, int vctsize, const double *vct, char *name, const char *longname, + const char *units, int prec, int mode, int ltype1, int ltype2) +{ + /* + mode: 0 search in vlist and zaxis table + 1 search in zaxis table + */ + int zaxisID = CDI_UNDEFID; + bool zaxisdefined = false; + bool zaxisglobdefined = false; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + int nzaxis = vlistptr->nzaxis; + + if (ltype2 == 255) ltype2 = -1; + + if (mode == 0) + for (int index = 0; index < nzaxis; index++) + { + zaxisID = vlistptr->zaxisIDs[index]; + + if (!zaxis_compare(zaxisID, zaxistype, nlevels, levels, levels1, levels2, longname, units, ltype1, ltype2)) + { + zaxisdefined = true; + break; + } + } + + if (!zaxisdefined) + { + struct varDefZAxisSearchState query; + query.zaxistype = zaxistype; + query.nlevels = nlevels; + query.levels = levels; + query.lbounds = levels1; + query.ubounds = levels2; + query.longname = longname; + query.units = units; + query.ltype1 = ltype1; + query.ltype2 = ltype2; + + if ((zaxisglobdefined = (cdiResHFilterApply(getZaxisOps(), varDefZAxisSearch, &query) == CDI_APPLY_STOP))) + zaxisID = query.resIDValue; + + if (mode == 1 && zaxisglobdefined) + for (int index = 0; index < nzaxis; index++) + if (vlistptr->zaxisIDs[index] == zaxisID) + { + zaxisglobdefined = false; + break; + } + } + + if (!zaxisdefined) + { + if (!zaxisglobdefined) + { + zaxisID = zaxisCreate(zaxistype, nlevels); + if (levels) zaxisDefLevels(zaxisID, levels); + if (hasBounds) + { + zaxisDefLbounds(zaxisID, levels1); + zaxisDefUbounds(zaxisID, levels2); + } + + if (cvals != NULL && nlevels != 0 && clength != 0) zaxisDefCvals(zaxisID, cvals, (int) clength); + + if ((zaxistype == ZAXIS_HYBRID || zaxistype == ZAXIS_HYBRID_HALF) && vctsize > 0) zaxisDefVct(zaxisID, vctsize, vct); + + if (name && name[0]) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, name); + if (longname && longname[0]) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, longname); + if (units && units[0]) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units); + zaxisDefDatatype(zaxisID, prec); + cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, ltype1); + if (ltype2 != -1) cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFSECONDFIXEDSURFACE, ltype2); + } + + vlistptr->zaxisIDs[nzaxis] = zaxisID; + vlistptr->nzaxis++; + } + + return zaxisID; +} + +void +varDefMissval(int varID, double missval) +{ + vartable[varID].lmissval = true; + vartable[varID].missval = missval; +} + +void +varDefCompType(int varID, int comptype) +{ + if (vartable[varID].comptype == CDI_COMPRESS_NONE) vartable[varID].comptype = comptype; +} + +void +varDefCompLevel(int varID, int complevel) +{ + vartable[varID].complevel = complevel; +} + +int +varInqInst(int varID) +{ + return vartable[varID].instID; +} + +void +varDefInst(int varID, int instID) +{ + vartable[varID].instID = instID; +} + +int +varInqModel(int varID) +{ + return vartable[varID].modelID; +} + +void +varDefModel(int varID, int modelID) +{ + vartable[varID].modelID = modelID; +} + +int +varInqTable(int varID) +{ + return vartable[varID].tableID; +} + +void +varDefTable(int varID, int tableID) +{ + vartable[varID].tableID = tableID; +} + +void +varDefKeyInt(int varID, int key, int value) +{ + cdi_keys_t *keysp = &(vartable[varID].keys); + cdiDefVarKeyInt(keysp, key, value); +} + +void +varDefKeyBytes(int varID, int key, const unsigned char *bytes, int length) +{ + cdi_keys_t *keysp = &(vartable[varID].keys); + cdiDefVarKeyBytes(keysp, key, bytes, length); +} + +void +varDefKeyString(int varID, int key, const char *string) +{ + int length = strlen(string) + 1; + cdi_keys_t *keysp = &(vartable[varID].keys); + cdiDefVarKeyBytes(keysp, key, (const unsigned char *) string, length); +} + +#ifdef HAVE_LIBGRIB_API +// Resizes and initializes opt_grib_kvpair data structure. +static void +resize_vartable_opt_grib_entries(vartable_t *var, int nentries) +{ + if (var->opt_grib_kvpair_size < nentries) + { + if (CDI_Debug) Message("resize data structure, %d -> %d", var->opt_grib_kvpair_size, nentries); + + int new_size = ((2 * var->opt_grib_kvpair_size) > nentries) ? (2 * var->opt_grib_kvpair_size) : nentries; + if (CDI_Debug) Message("resize vartable opt_grib_entries array to size %d", new_size); + opt_key_val_pair_t *tmp = (opt_key_val_pair_t *) Malloc((size_t) new_size * sizeof(opt_key_val_pair_t)); + for (int i = 0; i < var->opt_grib_kvpair_size; i++) + { + tmp[i] = var->opt_grib_kvpair[i]; + } + for (int i = var->opt_grib_kvpair_size; i < new_size; i++) + { + tmp[i].int_val = 0; + tmp[i].dbl_val = 0; + tmp[i].update = false; + tmp[i].keyword = NULL; + } // for + var->opt_grib_kvpair_size = new_size; + Free(var->opt_grib_kvpair); + var->opt_grib_kvpair = tmp; + } +} +#endif + +#ifdef HAVE_LIBGRIB_API +void +varDefOptGribInt(int varID, int tile_index, long lval, const char *keyword) +{ + int idx = -1; + for (int i = 0; i < vartable[varID].opt_grib_nentries; i++) + { + if (str_is_equal(keyword, vartable[varID].opt_grib_kvpair[i].keyword) + && (vartable[varID].opt_grib_kvpair[i].data_type == t_int) + && (vartable[varID].opt_grib_kvpair[i].subtype_index == tile_index)) + idx = i; + } + + if (idx == -1) + { + resize_vartable_opt_grib_entries(&vartable[varID], vartable[varID].opt_grib_nentries + 1); + vartable[varID].opt_grib_nentries += 1; + idx = vartable[varID].opt_grib_nentries - 1; + } + else + { + if (vartable[varID].opt_grib_kvpair[idx].keyword) Free(vartable[varID].opt_grib_kvpair[idx].keyword); + } + vartable[varID].opt_grib_kvpair[idx].data_type = t_int; + vartable[varID].opt_grib_kvpair[idx].int_val = (int) lval; + vartable[varID].opt_grib_kvpair[idx].keyword = strdupx(keyword); + vartable[varID].opt_grib_kvpair[idx].subtype_index = tile_index; +} +#endif + +#ifdef HAVE_LIBGRIB_API +void +varDefOptGribDbl(int varID, int tile_index, double dval, const char *keyword) +{ + int idx = -1; + for (int i = 0; i < vartable[varID].opt_grib_nentries; i++) + { + if (str_is_equal(keyword, vartable[varID].opt_grib_kvpair[i].keyword) + && (vartable[varID].opt_grib_kvpair[i].data_type == t_double) + && (vartable[varID].opt_grib_kvpair[i].subtype_index == tile_index)) + idx = i; + } + + if (idx == -1) + { + resize_vartable_opt_grib_entries(&vartable[varID], vartable[varID].opt_grib_nentries + 1); + vartable[varID].opt_grib_nentries += 1; + idx = vartable[varID].opt_grib_nentries - 1; + } + else + { + if (vartable[varID].opt_grib_kvpair[idx].keyword) Free(vartable[varID].opt_grib_kvpair[idx].keyword); + } + vartable[varID].opt_grib_kvpair[idx].data_type = t_double; + vartable[varID].opt_grib_kvpair[idx].dbl_val = dval; + vartable[varID].opt_grib_kvpair[idx].keyword = strdupx(keyword); + vartable[varID].opt_grib_kvpair[idx].subtype_index = tile_index; +} +#endif + +#ifdef HAVE_LIBGRIB_API +int +varOptGribNentries(int varID) +{ + int nentries = vartable[varID].opt_grib_nentries; + return nentries; +} +#endif + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + +#include <stdbool.h> + + + +#ifdef HAVE_LIBGRIB_API +/* list of additional GRIB2 keywords which are read by the open process */ +int cdiNAdditionalGRIBKeys = 0; +char *cdiAdditionalGRIBKeys[MAX_OPT_GRIB_ENTRIES]; +#endif + +static int VLIST_Debug = 0; + +static void vlist_initialize(void); + +#ifdef HAVE_LIBPTHREAD +#include <pthread.h> + +static pthread_once_t _vlist_init_thread = PTHREAD_ONCE_INIT; + +#define VLIST_INIT() pthread_once(&_vlist_init_thread, vlist_initialize) + +#else + +static bool vlistIsInitialized = false; + +#define VLIST_INIT() \ + if (!vlistIsInitialized) vlist_initialize() +#endif + +static int +vlist_compare(vlist_t *a, vlist_t *b) +{ + int diff = (a->nvars != b->nvars) | (a->ngrids != b->ngrids) | (a->nzaxis != b->nzaxis) | (a->instID != b->instID) + | (a->modelID != b->modelID) | (a->tableID != b->tableID) | (a->ntsteps != b->ntsteps) + | (a->atts.nelems != b->atts.nelems); + + int nvars = a->nvars; + for (int varID = 0; varID < nvars; ++varID) diff |= vlistVarCompare(a, varID, b, varID); + + size_t natts = a->atts.nelems; + for (size_t attID = 0; attID < natts; ++attID) diff |= cdi_att_compare(&a->atts, &a->atts, (int) attID); + + return diff; +} + +static void vlistPrintKernel(vlist_t *vlistptr, FILE *fp); +static void vlist_delete(vlist_t *vlistptr); + +static int vlistGetSizeP(void *vlistptr, void *context); +static void vlistPackP(void *vlistptr, void *buff, int size, int *position, void *context); +static int vlistTxCode(void *vlistptr); + +#if !defined(__cplusplus) +const +#endif + resOps vlistOps + = { (valCompareFunc) vlist_compare, + (valDestroyFunc) vlist_delete, + (valPrintFunc) vlistPrintKernel, + vlistGetSizeP, + vlistPackP, + vlistTxCode }; + +vlist_t * +vlist_to_pointer(int vlistID) +{ + VLIST_INIT(); + return (vlist_t *) reshGetVal(vlistID, &vlistOps); +} + +static void +vlist_init_entry(vlist_t *vlistptr) +{ + vlistptr->immutable = 0; + vlistptr->internal = 0; + vlistptr->self = CDI_UNDEFID; + vlistptr->nvars = 0; + vlistptr->vars = NULL; + vlistptr->ngrids = 0; + vlistptr->nzaxis = 0; + vlistptr->taxisID = CDI_UNDEFID; + vlistptr->instID = CDI_Default_InstID; + vlistptr->modelID = CDI_Default_ModelID; + vlistptr->tableID = CDI_Default_TableID; + vlistptr->varsAllocated = 0; + vlistptr->ntsteps = CDI_UNDEFID; + vlistptr->keys.nalloc = MAX_KEYS; + vlistptr->keys.nelems = 0; + for (int i = 0; i < MAX_KEYS; ++i) vlistptr->keys.value[i].length = 0; + vlistptr->atts.nalloc = MAX_ATTRIBUTES; + vlistptr->atts.nelems = 0; + vlistptr->nsubtypes = 0; + for (int i = 0; i < MAX_SUBTYPES_PS; ++i) vlistptr->subtypeIDs[i] = CDI_UNDEFID; +} + +static vlist_t * +vlist_new_entry(cdiResH resH) +{ + vlist_t *vlistptr = (vlist_t *) Malloc(sizeof(vlist_t)); + vlist_init_entry(vlistptr); + if (resH == CDI_UNDEFID) + vlistptr->self = reshPut(vlistptr, &vlistOps); + else + { + vlistptr->self = resH; + reshReplace(resH, vlistptr, &vlistOps); + } + return vlistptr; +} + +static void +vlist_delete_entry(int vlistID) +{ + reshRemove(vlistID, &vlistOps); + + if (VLIST_Debug) Message("Removed idx %d from vlist list", vlistID); +} + +static void +vlist_initialize(void) +{ + char *env = getenv("VLIST_DEBUG"); + if (env) VLIST_Debug = atoi(env); +#ifndef HAVE_LIBPTHREAD + vlistIsInitialized = true; +#endif +} + +static void +vlist_copy(vlist_t *vlistptr2, vlist_t *vlistptr1) +{ + int vlistID2 = vlistptr2->self; + int vlist2internal = vlistptr2->internal; + memcpy(vlistptr2, vlistptr1, sizeof(vlist_t)); + vlistptr2->internal = vlist2internal; // the question who's responsible to destroy the vlist is tied to its containing memory + // region, so we retain this flag + vlistptr2->immutable = 0; // this is a copy, so it's mutable, independent of whether the original is mutable or not + vlistptr2->keys.nelems = 0; + vlistptr2->atts.nelems = 0; + vlistptr2->self = vlistID2; +} + +void +cdiVlistMakeInternal(int vlistID) +{ + vlist_to_pointer(vlistID)->internal = 1; +} + +void +cdiVlistMakeImmutable(int vlistID) +{ + vlist_to_pointer(vlistID)->immutable = 1; +} + +/* +@Function vlistCreate +@Title Create a variable list + +@Prototype int vlistCreate(void) + +@Example +Here is an example using @func{vlistCreate} to create a variable list +and add a variable with @func{vlistDefVar}. + +@Source + ... +int vlistID, varID; + ... +vlistID = vlistCreate(); +varID = vlistDefVar(vlistID, gridID, zaxisID, TIME_VARYING); + ... +streamDefVlist(streamID, vlistID); + ... +vlistDestroy(vlistID); + ... +@EndSource +@EndFunction +*/ +int +vlistCreate(void) +{ + cdiInitialize(); + + VLIST_INIT(); + + vlist_t *vlistptr = vlist_new_entry(CDI_UNDEFID); + if (CDI_Debug) Message("create vlistID = %d", vlistptr->self); + return vlistptr->self; +} + +static void +vlist_delete(vlist_t *vlistptr) +{ + int vlistID = vlistptr->self; + if (CDI_Debug) Message("call to vlist_delete, vlistID = %d", vlistID); + + cdiDeleteKeys(vlistID, CDI_GLOBAL); + cdiDeleteAtts(vlistID, CDI_GLOBAL); + + int nvars = vlistptr->nvars; + var_t *vars = vlistptr->vars; + + for (int varID = 0; varID < nvars; varID++) + { + if (vars[varID].levinfo) Free(vars[varID].levinfo); + + if (vlistptr->vars[varID].opt_grib_kvpair) + { + for (int i = 0; i < vlistptr->vars[varID].opt_grib_nentries; i++) + { + if (vlistptr->vars[varID].opt_grib_kvpair[i].keyword) Free(vlistptr->vars[varID].opt_grib_kvpair[i].keyword); + } + Free(vlistptr->vars[varID].opt_grib_kvpair); + } + vlistptr->vars[varID].opt_grib_nentries = 0; + vlistptr->vars[varID].opt_grib_kvpair_size = 0; + vlistptr->vars[varID].opt_grib_kvpair = NULL; + + cdiDeleteKeys(vlistID, varID); + cdiDeleteAtts(vlistID, varID); + } + + if (vars) Free(vars); + + Free(vlistptr); +} + +// destroy a vlist object, should always be called through namespace lookup +void +cdiVlistDestroy_(int vlistID, bool assertInternal) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + static const char warningTextUserByInternal[] + = "Destroying a vlist object that is owned by the user (vlistID=%d).\n" + "This is most likely because of a missing vlistDestroy() in the application code.\n" + "If that's not the case, and you are absolutely certain about it, please report the bug.", + warningTextInternalByUser[] = "Attempt to destroy an internal vlist object by the user (vlistID=%d)."; + static const char *const wText[2] = { warningTextUserByInternal, warningTextInternalByUser }; + if (vlistptr->internal == assertInternal) + { + vlist_delete(vlistptr); + vlist_delete_entry(vlistID); + } + else + Warning(wText[!assertInternal], vlistID); +} + +/* +@Function vlistDestroy +@Title Destroy a variable list + +@Prototype void vlistDestroy(int vlistID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + +@EndFunction +*/ +void +vlistDestroy(int vlistID) +{ + void (*mycdiVlistDestroy_)(int, bool) = (void (*)(int, bool)) namespaceSwitchGet(NSSWITCH_VLIST_DESTROY_).func; + mycdiVlistDestroy_(vlistID, false); +} + +static void +var_copy_entries(var_t *var2, var_t *var1) +{ + var2->opt_grib_kvpair_size = 0; + var2->opt_grib_kvpair = NULL; + var2->opt_grib_nentries = 0; + + resize_opt_grib_entries(var2, var1->opt_grib_nentries); + var2->opt_grib_nentries = var1->opt_grib_nentries; + if ((var2->opt_grib_nentries > 0) && CDI_Debug) Message("copy %d optional GRIB keywords", var2->opt_grib_nentries); + + for (int i = 0; i < var1->opt_grib_nentries; i++) + { + if (CDI_Debug) Message("copy entry \"%s\" ...", var1->opt_grib_kvpair[i].keyword); + var2->opt_grib_kvpair[i].keyword = NULL; + if (var1->opt_grib_kvpair[i].keyword != NULL) + { + var2->opt_grib_kvpair[i] = var1->opt_grib_kvpair[i]; + var2->opt_grib_kvpair[i].keyword = strdupx(var1->opt_grib_kvpair[i].keyword); + var2->opt_grib_kvpair[i].update = true; + if (CDI_Debug) Message("done."); + } + else + { + if (CDI_Debug) Message("not done."); + } + } +} + +/* +@Function vlistCopy +@Title Copy a variable list + +@Prototype void vlistCopy(int vlistID2, int vlistID1) +@Parameter + @Item vlistID2 Target variable list ID. + @Item vlistID1 Source variable list ID. + +@Description +The function @func{vlistCopy} copies all entries from vlistID1 to vlistID2. + +@EndFunction +*/ +void +vlistCopy(int vlistID2, int vlistID1) +{ + vlist_t *vlistptr1 = vlist_to_pointer(vlistID1); + vlist_t *vlistptr2 = vlist_to_pointer(vlistID2); + if (CDI_Debug) Message("call to vlistCopy, vlistIDs %d -> %d", vlistID1, vlistID2); + + var_t *vars1 = vlistptr1->vars; + var_t *vars2 = vlistptr2->vars; + vlist_copy(vlistptr2, vlistptr1); + + vlistptr2->keys.nelems = 0; + cdiCopyKeys(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL); + vlistptr2->atts.nelems = 0; + cdiCopyAtts(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL); + + if (vars1) + { + int nvars = vlistptr1->nvars; + // vlistptr2->varsAllocated = nvars; + + size_t n = (size_t) vlistptr2->varsAllocated; + vars2 = (var_t *) Realloc(vars2, n * sizeof(var_t)); + memcpy(vars2, vars1, n * sizeof(var_t)); + vlistptr2->vars = vars2; + + for (int varID = 0; varID < nvars; varID++) + { + var_copy_entries(&vars2[varID], &vars1[varID]); + vlistptr2->vars[varID].keys.nelems = 0; + cdiCopyKeys(vlistID1, varID, vlistID2, varID); + + vlistptr2->vars[varID].atts.nelems = 0; + cdiCopyAtts(vlistID1, varID, vlistID2, varID); + + if (vars1[varID].levinfo) + { + n = (size_t) zaxisInqSize(vars1[varID].zaxisID); + vars2[varID].levinfo = (levinfo_t *) Malloc(n * sizeof(levinfo_t)); + memcpy(vars2[varID].levinfo, vars1[varID].levinfo, n * sizeof(levinfo_t)); + } + } + } +} + +/* +@Function vlistDuplicate +@Title Duplicate a variable list + +@Prototype int vlistDuplicate(int vlistID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + +@Description +The function @func{vlistDuplicate} duplicates the variable list from vlistID1. + +@Result +@func{vlistDuplicate} returns an identifier to the duplicated variable list. + +@EndFunction +*/ +int +vlistDuplicate(int vlistID) +{ + if (CDI_Debug) Message("call to vlistDuplicate"); + + int vlistIDnew = vlistCreate(); + vlistCopy(vlistIDnew, vlistID); + return vlistIDnew; +} + +void +vlistClearFlag(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + for (int varID = 0; varID < vlistptr->nvars; varID++) + { + vlistptr->vars[varID].flag = false; + if (vlistptr->vars[varID].levinfo) + { + int nlevs = zaxisInqSize(vlistptr->vars[varID].zaxisID); + for (int levID = 0; levID < nlevs; levID++) vlistptr->vars[varID].levinfo[levID].flag = false; + } + } +} + +struct vgzSearchState +{ + int resIDValue; + int zaxistype; + int nlevels; + const double *levels; + const double *lbounds; + const double *ubounds; +}; + +static enum cdiApplyRet +vgzZAxisSearch(int id, void *res, void *data) +{ + struct vgzSearchState *state = (struct vgzSearchState *) data; + (void) res; + if (zaxis_compare(id, state->zaxistype, state->nlevels, state->levels, state->lbounds, state->ubounds, NULL, NULL, 0, -1) + == false) + { + state->resIDValue = id; + return CDI_APPLY_STOP; + } + else + return CDI_APPLY_GO_ON; +} + +static int +vlist_generate_zaxis(int vlistID, int zaxistype, int nlevels, const double *levels, const double *lbounds, const double *ubounds, + int vctsize, const double *vct, const char **cvals, size_t clen) +{ + int zaxisID = CDI_UNDEFID; + bool zaxisdefined = false; + bool zaxisglobdefined = false; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + int nzaxis = vlistptr->nzaxis; + + const bool hasBounds = (lbounds && ubounds); + + for (int index = 0; index < nzaxis; ++index) + { + zaxisID = vlistptr->zaxisIDs[index]; + + if (zaxis_compare(zaxisID, zaxistype, nlevels, levels, lbounds, ubounds, NULL, NULL, 0, -1) == false) + { + zaxisdefined = true; + break; + } + } + + if (!zaxisdefined) + { + struct vgzSearchState query; + query.zaxistype = zaxistype; + query.nlevels = nlevels; + query.levels = levels; + + if ((zaxisglobdefined = (cdiResHFilterApply(getZaxisOps(), vgzZAxisSearch, &query) == CDI_APPLY_STOP))) + zaxisID = query.resIDValue; + } + + if (!zaxisdefined) + { + if (!zaxisglobdefined) + { + zaxisID = zaxisCreate(zaxistype, nlevels); + zaxisDefLevels(zaxisID, levels); + + if (zaxistype == ZAXIS_CHAR) zaxisDefCvals(zaxisID, cvals, (int) clen); + + if (hasBounds) + { + zaxisDefLbounds(zaxisID, lbounds); + zaxisDefUbounds(zaxisID, ubounds); + } + + if (zaxistype == ZAXIS_HYBRID && vctsize > 0) zaxisDefVct(zaxisID, vctsize, vct); + } + + nzaxis = vlistptr->nzaxis; + vlistptr->zaxisIDs[nzaxis] = zaxisID; + vlistptr->nzaxis++; + } + + return zaxisID; +} + +/* +@Function vlistCopyFlag +@Title Copy some entries of a variable list + +@Prototype void vlistCopyFlag(int vlistID2, int vlistID1) +@Parameter + @Item vlistID2 Target variable list ID. + @Item vlistID1 Source variable list ID. + +@Description +The function @func{vlistCopyFlag} copies all entries with a flag from vlistID1 to vlistID2. + +@EndFunction +*/ +void +vlistCopyFlag(int vlistID2, int vlistID1) +{ + vlist_t *vlistptr1 = vlist_to_pointer(vlistID1); + vlist_t *vlistptr2 = vlist_to_pointer(vlistID2); + var_t *vars1 = vlistptr1->vars; + var_t *vars2 = vlistptr2->vars; + + vlist_copy(vlistptr2, vlistptr1); + + vlistptr2->keys.nelems = 0; + cdiCopyKeys(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL); + vlistptr2->atts.nelems = 0; + cdiCopyAtts(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL); + + if (vlistptr1->vars) + { + vlistptr2->ngrids = 0; + vlistptr2->nzaxis = 0; + + int nvars = vlistptr1->nvars; + int nvars2 = 0; + for (int varID = 0; varID < nvars; varID++) nvars2 += vars1[varID].flag; + + vlistptr2->nvars = nvars2; + vlistptr2->varsAllocated = nvars2; + vars2 = (nvars2 > 0) ? (var_t *) Malloc((size_t) nvars2 * sizeof(var_t)) : NULL; + + vlistptr2->vars = vars2; + + int varID2 = 0; + for (int varID = 0; varID < nvars; varID++) + if (vars1[varID].flag) + { + vlistptr2->vars[varID2].flag = false; + int zaxisID = vlistptr1->vars[varID].zaxisID; + int gridID = vlistptr1->vars[varID].gridID; + int subtypeID = vlistptr1->vars[varID].subtypeID; + + memcpy(&vars2[varID2], &vars1[varID], sizeof(var_t)); + + vars1[varID].fvarID = varID2; + vars2[varID2].fvarID = varID; + + vars2[varID2].mvarID = varID2; + + var_copy_entries(&vars2[varID2], &vars1[varID]); + vlistptr2->vars[varID2].keys.nelems = 0; + cdiCopyKeys(vlistID1, varID, vlistID2, varID2); + + vlistptr2->vars[varID2].atts.nelems = 0; + cdiCopyAtts(vlistID1, varID, vlistID2, varID2); + + int nlevs = zaxisInqSize(vars1[varID].zaxisID); + int nlevs2 = 0; + if (vars1[varID].levinfo) + for (int levID = 0; levID < nlevs; levID++) nlevs2 += vars1[varID].levinfo[levID].flag; + + vars2[varID2].levinfo = (levinfo_t *) Malloc((size_t) nlevs2 * sizeof(levinfo_t)); + + if (nlevs != nlevs2) + { + int nvct = 0; + double *levels = NULL; + double *lbounds = NULL, *ubounds = NULL; + const double *vct = NULL; + + if (!vars1[varID].levinfo) cdiVlistCreateVarLevInfo(vlistptr1, varID); + + zaxisID = vars1[varID].zaxisID; + int zaxisType = zaxisInqType(zaxisID); + + int levID2 = 0; + for (int levID = 0; levID < nlevs; levID++) + if (vars1[varID].levinfo[levID].flag) + { + vars1[varID].levinfo[levID].flevelID = levID2; + vars1[varID].levinfo[levID].mlevelID = levID2; + } + + if (zaxisInqLevels(zaxisID, NULL)) + { + levels = (double *) Malloc((size_t) nlevs2 * sizeof(double)); + + levID2 = 0; + for (int levID = 0; levID < nlevs; ++levID) + if (vars1[varID].levinfo[levID].flag) levels[levID2++] = zaxisInqLevel(zaxisID, levID); + } + + if (zaxisType == ZAXIS_HYBRID) + { + nvct = zaxisInqVctSize(zaxisID); + vct = zaxisInqVctPtr(zaxisID); + } + + size_t clen2 = 0; + char **cvals2 = NULL; +#ifndef USE_MPI + if (zaxisType == ZAXIS_CHAR) + { + char **cvals1 = zaxisInqCValsPtr(zaxisID); + size_t clen1 = (size_t) zaxisInqCLen(zaxisID); + for (int levID = 0; levID < nlevs; ++levID) + if (vars1[varID].levinfo[levID].flag) + { + size_t testlen = clen1; + while (cvals1[levID][testlen] == ' ') testlen--; + if (clen2 < testlen) clen2 = testlen; + } + cvals2 = (char **) Malloc((size_t) nlevs2 * sizeof(char *)); + levID2 = 0; + + for (int levID = 0; levID < nlevs; ++levID) + if (vars1[varID].levinfo[levID].flag) + { + cvals2[levID2] = (char *) Malloc((size_t) (clen2) * sizeof(char)); + memcpy(cvals2[levID2], cvals1[levID], clen2 * sizeof(char)); + levID2++; + } + } +#endif + + if (zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL)) + { + lbounds = (double *) Malloc(2 * (size_t) nlevs2 * sizeof(double)); + ubounds = lbounds + nlevs2; + + double *lbounds1 = (double *) Malloc(2 * (size_t) nlevs * sizeof(double)), *ubounds1 = lbounds1 + nlevs; + + zaxisInqLbounds(zaxisID, lbounds1); + zaxisInqUbounds(zaxisID, ubounds1); + + levID2 = 0; + for (int levID = 0; levID < nlevs; ++levID) + if (vars1[varID].levinfo[levID].flag) + { + lbounds[levID2] = lbounds1[levID]; + ubounds[levID2] = ubounds1[levID]; + levID2++; + } + + Free(lbounds1); + } + + int zaxisID2 = vlist_generate_zaxis(vlistID2, zaxisType, nlevs2, levels, lbounds, ubounds, nvct, vct, + (const char **) cvals2, clen2); + if (levels) Free(levels); + if (lbounds) Free(lbounds); + if (cvals2) + { + for (int levID = 0; levID < nlevs2; ++levID) Free(cvals2[levID]); + Free(cvals2); + } + + char ctemp[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, ctemp, &length); + cdiDefKeyString(zaxisID2, CDI_GLOBAL, CDI_KEY_NAME, ctemp); + length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, ctemp, &length); + cdiDefKeyString(zaxisID2, CDI_GLOBAL, CDI_KEY_LONGNAME, ctemp); + length = CDI_MAX_NAME; + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, ctemp, &length); + cdiDefKeyString(zaxisID2, CDI_GLOBAL, CDI_KEY_UNITS, ctemp); + + zaxisDefDatatype(zaxisID2, zaxisInqDatatype(zaxisID)); + zaxisDefPositive(zaxisID2, zaxisInqPositive(zaxisID)); + + if (zaxisType == ZAXIS_CHAR) + { + char dimname[CDI_MAX_NAME + 3]; + length = sizeof(dimname); + cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_DIMNAME, dimname, &length); + if (dimname[0] == 0) + { + memcpy(dimname, "area_type", 10); + dimname[10] = 0; + } + cdiDefKeyString(zaxisID2, CDI_GLOBAL, CDI_KEY_DIMNAME, dimname); + } + + if (zaxisType == ZAXIS_GENERIC) cdiCopyKey(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, zaxisID2); + + cdiCopyAtts(zaxisID, CDI_GLOBAL, zaxisID2, CDI_GLOBAL); + + zaxisID = zaxisID2; + vars2[varID2].zaxisID = zaxisID2; + } + + for (int levID = 0; levID < nlevs2; levID++) + { + vars2[varID2].levinfo[levID].flag = false; + vars2[varID2].levinfo[levID].index = -1; + } + + int levID2 = 0; + for (int levID = 0; levID < nlevs; levID++) + if (vars1[varID].levinfo[levID].flag) + { + vars2[varID2].levinfo[levID2].flevelID = levID; + vars2[varID2].levinfo[levID2].mlevelID = levID2; + levID2++; + } + + vlistAdd2GridIDs(vlistptr2, gridID); + vlistAdd2ZaxisIDs(vlistptr2, zaxisID); + vlistAdd2SubtypeIDs(vlistptr2, subtypeID); + + varID2++; + } + } +} + +/* +@Function vlistCat +@Title Concatenate two variable lists + +@Prototype void vlistCat(int vlistID2, int vlistID1) +@Parameter + @Item vlistID2 Target variable list ID. + @Item vlistID1 Source variable list ID. + +@Description +Concatenate the variable list vlistID1 at the end of vlistID2. + +@EndFunction +*/ +void +vlistCat(int vlistID2, int vlistID1) +{ + vlist_t *vlistptr1 = vlist_to_pointer(vlistID1); + vlist_t *vlistptr2 = vlist_to_pointer(vlistID2); + var_t *vars1 = vlistptr1->vars; + var_t *vars2 = vlistptr2->vars; + int nvars1 = vlistptr1->nvars; + int nvars2 = vlistptr2->nvars; + int nvars = nvars1 + nvars2; + vlistptr2->nvars = nvars; + + if (nvars > vlistptr2->varsAllocated) + { + vlistptr2->varsAllocated = nvars; + vars2 = (var_t *) Realloc(vars2, (size_t) nvars * sizeof(var_t)); + vlistptr2->vars = vars2; + } + memcpy(vars2 + nvars2, vars1, (size_t) nvars1 * sizeof(var_t)); + + for (int varID = 0; varID < nvars1; varID++) + { + int varID2 = varID + nvars2; + vars1[varID].fvarID = varID2; + vars2[varID2].fvarID = varID; + + vars1[varID].mvarID = varID2; + vars2[varID2].mvarID = varID; + + if (vars1[varID].param < 0) + { + int pnum, pcat, pdis; + cdiDecodeParam(vars1[varID].param, &pnum, &pcat, &pdis); + pnum = -(varID2 + 1); + vars2[varID2].param = cdiEncodeParam(pnum, pcat, pdis); + } + + var_copy_entries(&vars2[varID2], &vars1[varID]); + vars2[varID2].keys.nelems = 0; + cdiCopyKeys(vlistID1, varID, vlistID2, varID2); + + if (vars1[varID].levinfo) + { + size_t nlevs = (size_t) zaxisInqSize(vars1[varID].zaxisID); + vars2[varID2].levinfo = (levinfo_t *) Malloc(nlevs * sizeof(levinfo_t)); + memcpy(vars2[varID2].levinfo, vars1[varID].levinfo, nlevs * sizeof(levinfo_t)); + } + + vars2[varID2].atts.nelems = 0; + cdiCopyAtts(vlistID1, varID, vlistID2, varID2); + + vlistAdd2GridIDs(vlistptr2, vars1[varID].gridID); + vlistAdd2ZaxisIDs(vlistptr2, vars1[varID].zaxisID); + vlistAdd2SubtypeIDs(vlistptr2, vars1[varID].subtypeID); + } +} + +/* +@Function vlistMerge +@Title Merge two variable lists + +@Prototype void vlistMerge(int vlistID2, int vlistID1) +@Parameter + @Item vlistID2 Target variable list ID. + @Item vlistID1 Source variable list ID. + +@Description +Merge the variable list vlistID1 to the variable list vlistID2. + +@EndFunction +*/ +void +vlistMerge(int vlistID2, int vlistID1) +{ + int varID = 0; + vlist_t *vlistptr1 = vlist_to_pointer(vlistID1); + vlist_t *vlistptr2 = vlist_to_pointer(vlistID2); + var_t *vars1 = vlistptr1->vars; + var_t *vars2 = vlistptr2->vars; + int nvars1 = vlistptr1->nvars; + int nvars2 = vlistptr2->nvars; + + if (nvars1 == nvars2) + { + char name1[CDI_MAX_NAME], name2[CDI_MAX_NAME]; + for (varID = 0; varID < nvars2; varID++) + { + size_t ngp1 = gridInqSize(vars1[varID].gridID); + size_t ngp2 = gridInqSize(vars2[varID].gridID); + if (ngp1 != ngp2) break; + + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(vlistID1, varID, CDI_KEY_NAME, name1, &length); + length = CDI_MAX_NAME; + (void) cdiInqKeyString(vlistID2, varID, CDI_KEY_NAME, name2, &length); + + if (*name1 && *name2) + { + if (!str_is_equal(name1, name2)) break; + } + else + { + if (vars1[varID].param != vars2[varID].param) break; + } + } + } + + if (varID == nvars2) /* same variables in vlistID1 and vlistID2 */ + { + for (varID = 0; varID < nvars2; varID++) + { + vars1[varID].fvarID = varID; + vars2[varID].fvarID = varID; + + vars1[varID].mvarID = varID; + vars2[varID].mvarID = varID; + + int nlevs1 = zaxisInqSize(vars1[varID].zaxisID); + int nlevs2 = zaxisInqSize(vars2[varID].zaxisID); + + int nlevs = nlevs1 + nlevs2; + + /* + fprintf(stderr, "var %d %d %d %d %d\n", varID, nlevs1, nlevs2, nlevs, sizeof(levinfo_t)); + */ + if (vars1[varID].levinfo) + { + vars2[varID].levinfo = (levinfo_t *) Realloc(vars2[varID].levinfo, (size_t) nlevs * sizeof(levinfo_t)); + + memcpy(vars2[varID].levinfo + nlevs2, vars1[varID].levinfo, (size_t) nlevs1 * sizeof(levinfo_t)); + } + else + cdiVlistCreateVarLevInfo(vlistptr1, varID); + + for (int levID = 0; levID < nlevs1; levID++) vars1[varID].levinfo[levID].mlevelID = nlevs2 + levID; + } + + bool *lvar = (bool *) Calloc((size_t) nvars2, sizeof(bool)); + + for (varID = 0; varID < nvars2; varID++) + { + if (lvar[varID] == true) continue; + + int zaxisID1 = vars1[varID].zaxisID; + int zaxisID2 = vars2[varID].zaxisID; + // nlevs1 = zaxisInqSize(vars1[varID].zaxisID); + // nlevs2 = zaxisInqSize(vars2[varID].zaxisID); + int nlevs1 = zaxisInqSize(zaxisID1); + int nlevs2 = zaxisInqSize(zaxisID2); + // fprintf(stderr, "zaxis %d %d %d %d\n", zaxisID1, zaxisID2, nlevs1, nlevs2); + + int nlevs = nlevs1 + nlevs2; + + int zaxisID = zaxisDuplicate(zaxisID2); + zaxisResize(zaxisID, nlevs); + + if (zaxisInqLevels(zaxisID1, NULL)) + { + double *levels = (double *) Malloc((size_t) nlevs1 * sizeof(double)); + + zaxisInqLevels(zaxisID1, levels); + /* + for (int levID = 0; levID < nlevs1; levID++) + fprintf(stderr, "%d %d %d %d %d %g\n", varID, levID, nlevs1, nlevs2, vars2[varID].nlevs, levels[levID]); + */ + for (int levID = 0; levID < nlevs1; levID++) zaxisDefLevel(zaxisID, nlevs2 + levID, levels[levID]); + + Free(levels); + } + + for (int index = 0; index < vlistptr2->nzaxis; index++) + if (vlistptr2->zaxisIDs[index] == zaxisID2) vlistptr2->zaxisIDs[index] = zaxisID; + + for (int varID2 = 0; varID2 < nvars2; varID2++) + if (lvar[varID2] == false && vars2[varID2].zaxisID == zaxisID2) + { + vars2[varID2].zaxisID = zaxisID; + lvar[varID2] = true; + } + } + + Free(lvar); + } + else + { + vlistCat(vlistID2, vlistID1); + } +} + +/* +@Function vlistNvars +@Title Number of variables in a variable list + +@Prototype int vlistNvars(int vlistID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + +@Description +The function @func{vlistNvars} returns the number of variables in the variable list vlistID. + +@Result +@func{vlistNvars} returns the number of variables in a variable list. + +@EndFunction +*/ +int +vlistNvars(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + return vlistptr->nvars; +} + +int +vlistNrecs(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int nrecs = 0; + for (int varID = 0; varID < vlistptr->nvars; varID++) nrecs += zaxisInqSize(vlistptr->vars[varID].zaxisID); + + return nrecs; +} + +int +vlistNumber(int vlistID) +{ + int number, number2; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int datatype = vlistptr->vars[0].datatype; + if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) + number = CDI_COMP; + else + number = CDI_REAL; + + for (int varID = 1; varID < vlistptr->nvars; varID++) + { + datatype = vlistptr->vars[varID].datatype; + if (datatype == CDI_DATATYPE_CPX32 || datatype == CDI_DATATYPE_CPX64) + number2 = CDI_COMP; + else + number2 = CDI_REAL; + + if (number2 != number) + { + number = CDI_BOTH; + break; + } + } + + return number; +} + +/* +@Function vlistNgrids +@Title Number of grids in a variable list + +@Prototype int vlistNgrids(int vlistID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + +@Description +The function @func{vlistNgrids} returns the number of grids in the variable list vlistID. + +@Result +@func{vlistNgrids} returns the number of grids in a variable list. + +@EndFunction +*/ +int +vlistNgrids(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + return vlistptr->ngrids; +} + +/* +@Function vlistNzaxis +@Title Number of zaxis in a variable list + +@Prototype int vlistNzaxis(int vlistID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + +@Description +The function @func{vlistNzaxis} returns the number of zaxis in the variable list vlistID. + +@Result +@func{vlistNzaxis} returns the number of zaxis in a variable list. + +@EndFunction +*/ +int +vlistNzaxis(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + return vlistptr->nzaxis; +} + +int +vlistNsubtypes(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + return vlistptr->nsubtypes; +} + +void +vlistDefNtsteps(int vlistID, int nts) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (vlistptr->ntsteps != nts) + { + vlistptr->ntsteps = nts; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +// This function is used in CDO! +int +vlistNtsteps(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + return (int) vlistptr->ntsteps; +} + +static void +vlistPrintKernel(vlist_t *vlistptr, FILE *fp) +{ + const int vlistID = vlistptr->self; + fprintf(fp, "#\n# vlistID %d\n#\n", vlistID); + + const int nvars = vlistptr->nvars; + + fprintf(fp, + "nvars : %d\n" + "ngrids : %d\n" + "nzaxis : %d\n" + "nsubtypes: %d\n" + "taxisID : %d\n" + "instID : %d\n" + "modelID : %d\n" + "tableID : %d\n", + nvars, vlistptr->ngrids, vlistptr->nzaxis, vlistptr->nsubtypes, vlistptr->taxisID, vlistptr->instID, vlistptr->modelID, + vlistptr->tableID); + + if (nvars > 0) + { + fprintf(fp, " varID param gridID zaxisID stypeID tsteptype flag name longname units\n"); + for (int varID = 0; varID < nvars; varID++) + { + int param = vlistptr->vars[varID].param; + int gridID = vlistptr->vars[varID].gridID; + int zaxisID = vlistptr->vars[varID].zaxisID; + int subtypeID = vlistptr->vars[varID].subtypeID; + int tsteptype = vlistptr->vars[varID].tsteptype; + char name[CDI_MAX_NAME], longname[CDI_MAX_NAME], units[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(vlistID, varID, CDI_KEY_NAME, name, &length); + length = CDI_MAX_NAME; + (void) cdiInqKeyString(vlistID, varID, CDI_KEY_LONGNAME, longname, &length); + length = CDI_MAX_NAME; + (void) cdiInqKeyString(vlistID, varID, CDI_KEY_UNITS, units, &length); + int flag = vlistptr->vars[varID].flag; + + char paramstr[32]; + cdiParamToString(param, paramstr, sizeof(paramstr)); + fprintf(fp, "%6d %-8s %6d %6d %6d %6d %5d %-8s %s [%s]\n", varID, paramstr, gridID, zaxisID, subtypeID, tsteptype, + flag, name, longname, units); + } + + fputs("\n" + " varID levID fvarID flevID mvarID mlevID index dtype flag level\n", + fp); + for (int varID = 0; varID < nvars; varID++) + { + int zaxisID = vlistptr->vars[varID].zaxisID; + int nlevs = zaxisInqSize(zaxisID); + int fvarID = vlistptr->vars[varID].fvarID; + int mvarID = vlistptr->vars[varID].mvarID; + int dtype = vlistptr->vars[varID].datatype; + for (int levID = 0; levID < nlevs; levID++) + { + levinfo_t li; + if (vlistptr->vars[varID].levinfo) + li = vlistptr->vars[varID].levinfo[levID]; + else + li = DEFAULT_LEVINFO(levID); + int flevID = li.flevelID; + int mlevID = li.mlevelID; + int index = li.index; + int flag = li.flag; + + double level = zaxisInqLevels(zaxisID, NULL) ? zaxisInqLevel(zaxisID, levID) : levID + 1; + + fprintf(fp, "%6d %6d %6d %6d %6d %6d %6d %6d %5d %.9g\n", varID, levID, fvarID, flevID, mvarID, mlevID, index, dtype, + flag, level); + } + } + + fputs("\n" + " varID size\n", + fp); + for (int varID = 0; varID < nvars; varID++) + fprintf(fp, "%3d %8zu\n", varID, + (size_t) zaxisInqSize(vlistptr->vars[varID].zaxisID) * gridInqSize(vlistptr->vars[varID].gridID)); + } +} + +void +vlistPrint(int vlistID) +{ + if (vlistID == CDI_UNDEFID) return; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + vlistPrintKernel(vlistptr, stdout); +} + +/* +@Function vlistDefTaxis +@Title Define the time axis + +@Prototype void vlistDefTaxis(int vlistID, int taxisID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item taxisID Time axis ID, from a previous call to @fref{taxisCreate}. + +@Description +The function @func{vlistDefTaxis} defines the time axis of a variable list. + +@EndFunction +*/ +void +vlistDefTaxis(int vlistID, int taxisID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (vlistptr->taxisID != taxisID) + { + // FIXME: This code seems to leak a taxis_t object if `vlistptr->taxisID` was valid before the call to vlistDefTaxis. + vlistptr->taxisID = taxisID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function vlistInqTaxis +@Title Get the time axis + +@Prototype int vlistInqTaxis(int vlistID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + +@Description +The function @func{vlistInqTaxis} returns the time axis of a variable list. + +@Result +@func{vlistInqTaxis} returns an identifier to the time axis. + +@EndFunction +*/ +int +vlistInqTaxis(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + return vlistptr->taxisID; +} + +void +vlistDefTable(int vlistID, int tableID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (vlistptr->tableID != tableID) + { + vlistptr->tableID = tableID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqTable(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + return vlistptr->tableID; +} + +void +vlistDefInstitut(int vlistID, int instID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (vlistptr->instID != instID) + { + vlistptr->instID = instID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqInstitut(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int instID = vlistptr->instID; + + if (instID == CDI_UNDEFID) + { + instID = vlistInqVarInstitut(vlistID, 0); + + for (int varID = 1; varID < vlistptr->nvars; varID++) + if (instID != vlistInqVarInstitut(vlistID, varID)) + { + instID = CDI_UNDEFID; + break; + } + vlistDefInstitut(vlistID, instID); + } + + return instID; +} + +void +vlistDefModel(int vlistID, int modelID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (vlistptr->modelID != modelID) + { + vlistptr->modelID = modelID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqModel(int vlistID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int modelID = vlistptr->modelID; + + if (modelID == CDI_UNDEFID) + { + modelID = vlistInqVarModel(vlistID, 0); + + for (int varID = 1; varID < vlistptr->nvars; varID++) + if (modelID != vlistInqVarModel(vlistID, varID)) + { + modelID = CDI_UNDEFID; + break; + } + + vlistDefModel(vlistID, modelID); + } + + return modelID; +} + +SizeType +vlistGridsizeMax(int vlistID) +{ + SizeType gridsizemax = 0; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + for (int index = 0; index < vlistptr->ngrids; index++) + { + int gridID = vlistptr->gridIDs[index]; + SizeType gridsize = gridInqSize(gridID); + if (gridsize > gridsizemax) gridsizemax = gridsize; + } + + return gridsizemax; +} + +int +vlistGrid(int vlistID, int index) +{ + int gridID = CDI_UNDEFID; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (index < vlistptr->ngrids && index >= 0) gridID = vlistptr->gridIDs[index]; + + return gridID; +} + +int +vlistGridIndex(int vlistID, int gridID) +{ + int index; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + for (index = 0; index < vlistptr->ngrids; index++) + if (gridID == vlistptr->gridIDs[index]) break; + + if (index == vlistptr->ngrids) index = -1; + + return index; +} + +void +vlistChangeGridIndex(int vlistID, int index, int gridID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int gridIDold = vlistptr->gridIDs[index]; + if (gridIDold != gridID) + { + vlistptr->gridIDs[index] = gridID; + + int nvars = vlistptr->nvars; + for (int varID = 0; varID < nvars; varID++) + if (vlistptr->vars[varID].gridID == gridIDold) vlistptr->vars[varID].gridID = gridID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +void +vlistChangeGrid(int vlistID, int gridID1, int gridID2) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (gridID1 != gridID2) + { + int ngrids = vlistptr->ngrids; + for (int index = 0; index < ngrids; index++) + { + if (vlistptr->gridIDs[index] == gridID1) + { + vlistptr->gridIDs[index] = gridID2; + break; + } + } + int nvars = vlistptr->nvars; + for (int varID = 0; varID < nvars; varID++) + if (vlistptr->vars[varID].gridID == gridID1) vlistptr->vars[varID].gridID = gridID2; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistZaxis(int vlistID, int index) +{ + int zaxisID = CDI_UNDEFID; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (index < vlistptr->nzaxis && index >= 0) zaxisID = vlistptr->zaxisIDs[index]; + + return zaxisID; +} + +int +vlistZaxisIndex(int vlistID, int zaxisID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int index; + for (index = 0; index < vlistptr->nzaxis; index++) + if (zaxisID == vlistptr->zaxisIDs[index]) break; + + if (index == vlistptr->nzaxis) index = -1; + + return index; +} + +void +vlistChangeZaxisIndex(int vlistID, int index, int zaxisID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int zaxisIDold = vlistptr->zaxisIDs[index]; + if (zaxisIDold != zaxisID) + { + vlistptr->zaxisIDs[index] = zaxisID; + + int nlevs = zaxisInqSize(zaxisID), nlevsOld = zaxisInqSize(zaxisIDold); + int nvars = vlistptr->nvars; + for (int varID = 0; varID < nvars; varID++) + if (vlistptr->vars[varID].zaxisID == zaxisIDold) + { + vlistptr->vars[varID].zaxisID = zaxisID; + if (vlistptr->vars[varID].levinfo && nlevs != nlevsOld) + { + vlistptr->vars[varID].levinfo + = (levinfo_t *) Realloc(vlistptr->vars[varID].levinfo, (size_t) nlevs * sizeof(levinfo_t)); + + for (int levID = 0; levID < nlevs; levID++) vlistptr->vars[varID].levinfo[levID] = DEFAULT_LEVINFO(levID); + } + } + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +void +vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2) +{ + int nlevs1 = zaxisInqSize(zaxisID1), nlevs2 = zaxisInqSize(zaxisID2); + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int nzaxis = vlistptr->nzaxis; + for (int index = 0; index < nzaxis; index++) + { + if (vlistptr->zaxisIDs[index] == zaxisID1) + { + vlistptr->zaxisIDs[index] = zaxisID2; + break; + } + } + + int nvars = vlistptr->nvars; + for (int varID = 0; varID < nvars; varID++) + if (vlistptr->vars[varID].zaxisID == zaxisID1) + { + vlistptr->vars[varID].zaxisID = zaxisID2; + + if (vlistptr->vars[varID].levinfo && nlevs2 != nlevs1) + { + vlistptr->vars[varID].levinfo + = (levinfo_t *) Realloc(vlistptr->vars[varID].levinfo, (size_t) nlevs2 * sizeof(levinfo_t)); + + for (int levID = 0; levID < nlevs2; levID++) vlistptr->vars[varID].levinfo[levID] = DEFAULT_LEVINFO(levID); + } + } + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +} + +int +vlistSubtype(int vlistID, int index) +{ + int subtypeID = CDI_UNDEFID; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (index < vlistptr->nsubtypes && index >= 0) subtypeID = vlistptr->subtypeIDs[index]; + + return subtypeID; +} + +int +vlistSubtypeIndex(int vlistID, int subtypeID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + int index; + for (index = vlistptr->nsubtypes; index--;) + if (subtypeID == vlistptr->subtypeIDs[index]) break; + + return index; +} + +int +vlistHasTime(int vlistID) +{ + bool hastime = false; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + if (!(CDI_Reduce_Dim && vlistptr->ntsteps == 1)) + { + size_t nvars = vlistptr->nvars > 0 ? (size_t) vlistptr->nvars : (size_t) 0; + var_t *restrict vars = vlistptr->vars; + for (size_t varID = 0; varID < nvars; varID++) + if (vars[varID].timetype != TIME_CONSTANT) + { + hastime = true; + break; + } + } + + return (int) hastime; +} + +enum +{ + VLIST_PACK_INT_SELF, + VLIST_PACK_INT_NVARS, + VLIST_PACK_INT_TAXISID, + VLIST_PACK_INT_TABLEID, + VLIST_PACK_INT_INSTID, + VLIST_PACK_INT_MODELID, + vlistNints, +}; + +static int +vlistTxCode(void *vlistptr) +{ + (void) vlistptr; + return VLIST; +} + +static int +vlistGetSizeP(void *vlistptr, void *context) +{ + vlist_t *p = (vlist_t *) vlistptr; + int txsize = serializeGetSize(vlistNints, CDI_DATATYPE_INT, context); + txsize += serializeGetSize(1, CDI_DATATYPE_LONG, context); + txsize += cdiAttsGetSize(p, CDI_GLOBAL, context); + for (int varID = 0; varID < p->nvars; varID++) txsize += vlistVarGetPackSize(p, varID, context); + return txsize; +} + +static void +vlistPackP(void *vlistptr, void *buf, int size, int *position, void *context) +{ + int tempbuf[vlistNints]; + vlist_t *p = (vlist_t *) vlistptr; + tempbuf[VLIST_PACK_INT_SELF] = p->self; + tempbuf[VLIST_PACK_INT_NVARS] = p->nvars; + tempbuf[VLIST_PACK_INT_TAXISID] = p->taxisID; + tempbuf[VLIST_PACK_INT_TABLEID] = p->tableID; + tempbuf[VLIST_PACK_INT_INSTID] = p->instID; + tempbuf[VLIST_PACK_INT_MODELID] = p->modelID; + serializePack(tempbuf, vlistNints, CDI_DATATYPE_INT, buf, size, position, context); + serializePack(&p->ntsteps, 1, CDI_DATATYPE_LONG, buf, size, position, context); + + cdiAttsPack(p, CDI_GLOBAL, buf, size, position, context); + for (int varID = 0; varID < p->nvars; varID++) + { + vlistVarPack(p, varID, (char *) buf, size, position, context); + } +} + +int +vlistUnpack(char *buf, int size, int *position, int originNamespace, void *context, int force_id) +{ +#define adaptKey(key) (namespaceAdaptKey((key), originNamespace)) + int tempbuf[vlistNints]; + serializeUnpack(buf, size, position, tempbuf, vlistNints, CDI_DATATYPE_INT, context); + int nvars = tempbuf[VLIST_PACK_INT_NVARS]; + int targetID = force_id ? adaptKey(tempbuf[VLIST_PACK_INT_SELF]) : CDI_UNDEFID; + vlist_t *p = vlist_new_entry(targetID); + xassert(!force_id || p->self == targetID); + if (!force_id) targetID = p->self; + cdiVlistMakeInternal(p->self); + p->taxisID = adaptKey(tempbuf[VLIST_PACK_INT_TAXISID]); + p->tableID = tempbuf[VLIST_PACK_INT_TABLEID]; + p->instID = adaptKey(tempbuf[VLIST_PACK_INT_INSTID]); + p->modelID = adaptKey(tempbuf[VLIST_PACK_INT_MODELID]); + serializeUnpack(buf, size, position, &p->ntsteps, 1, CDI_DATATYPE_LONG, context); + cdiAttsUnpack(targetID, CDI_GLOBAL, buf, size, position, context); + for (int varID = 0; varID < nvars; varID++) vlistVarUnpack(targetID, buf, size, position, originNamespace, context); + reshSetStatus(targetID, &vlistOps, reshGetStatus(targetID, &vlistOps) & ~RESH_SYNC_BIT); +#undef adaptKey + return targetID; +} + +void +vlist_check_contents(int vlistID) +{ + int nzaxis = vlistNzaxis(vlistID); + for (int index = 0; index < nzaxis; index++) + { + int zaxisID = vlistZaxis(vlistID, index); + if (zaxisInqType(zaxisID) == ZAXIS_GENERIC) cdiCheckZaxis(zaxisID); + } +} + +/* Resizes and initializes opt_grib_kvpair data structure. */ +void +resize_opt_grib_entries(var_t *var, int nentries) +{ + if (var->opt_grib_kvpair_size >= nentries) + { + return; /* nothing to do; array is still large enough */ + } + else + { + if (CDI_Debug) Message("resize data structure, %d -> %d", var->opt_grib_kvpair_size, nentries); + + int new_size = (2 * var->opt_grib_kvpair_size) > nentries ? (2 * var->opt_grib_kvpair_size) : nentries; + opt_key_val_pair_t *tmp = (opt_key_val_pair_t *) Malloc((size_t) new_size * sizeof(opt_key_val_pair_t)); + for (int i = 0; i < var->opt_grib_kvpair_size; ++i) + { + tmp[i] = var->opt_grib_kvpair[i]; + } + for (int i = var->opt_grib_kvpair_size; i < new_size; ++i) + { + tmp[i].int_val = 0; + tmp[i].dbl_val = 0; + tmp[i].update = false; + tmp[i].keyword = NULL; + } // for + var->opt_grib_kvpair_size = new_size; + Free(var->opt_grib_kvpair); + var->opt_grib_kvpair = tmp; + } +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + +static cdi_keys_t * +vlist_get_keysp(vlist_t *vlistptr, int varID) +{ + if (varID == CDI_GLOBAL) return &vlistptr->keys; + if (varID >= 0 && varID < vlistptr->nvars) return &(vlistptr->vars[varID].keys); + + return NULL; +} + +static cdi_keys_t * +grid_get_keysp(grid_t *gridptr, int varID) +{ + if (varID == CDI_GLOBAL) return &gridptr->keys; + if (varID == CDI_XAXIS) return &gridptr->x.keys; + if (varID == CDI_YAXIS) return &gridptr->y.keys; + + return NULL; +} + +static cdi_keys_t * +zaxis_get_keysp(zaxis_t *zaxisptr, int varID) +{ + return (varID == CDI_GLOBAL) ? &zaxisptr->keys : NULL; +} + +static cdi_key_t * +new_key(cdi_keys_t *keysp, int key) +{ + xassert(keysp != NULL); + + if (keysp->nelems == keysp->nalloc) return NULL; + + cdi_key_t *keyp = &(keysp->value[keysp->nelems]); + keysp->nelems++; + + keyp->key = key; + keyp->type = 0; + keyp->length = 0; + keyp->v.s = NULL; + + return keyp; +} + +cdi_key_t * +find_key(cdi_keys_t *keysp, int key) +{ + xassert(keysp != NULL); + + if (keysp->nelems == 0) return NULL; + + for (size_t keyid = 0; keyid < keysp->nelems; keyid++) + { + cdi_key_t *keyp = &(keysp->value[keyid]); + if (keyp->key == key) return keyp; // Normal return + } + + return NULL; +} + +static const cdi_key_t * +find_key_const(const cdi_keys_t *keysp, int key) +{ + xassert(keysp != NULL); + + if (keysp->nelems == 0) return NULL; + + for (size_t keyid = 0; keyid < keysp->nelems; keyid++) + { + const cdi_key_t *keyp = &(keysp->value[keyid]); + if (keyp->key == key) return keyp; // Normal return + } + + return NULL; +} + +static cdi_keys_t * +cdi_get_keysp(int objID, int varID) +{ + if (reshGetTxCode(objID) == GRID) return grid_get_keysp(grid_to_pointer(objID), varID); + if (reshGetTxCode(objID) == DIST_GRID) return grid_get_keysp(grid_to_pointer(objID), varID); + if (reshGetTxCode(objID) == ZAXIS) return zaxis_get_keysp(zaxis_to_pointer(objID), varID); + if (reshGetTxCode(objID) == VLIST) return vlist_get_keysp(vlist_to_pointer(objID), varID); + + return NULL; +} + +int +cdi_key_compare(cdi_keys_t *keyspa, cdi_keys_t *keyspb, int keynum) +{ + xassert(keynum >= 0 && keynum < (int) keyspa->nelems && keynum < (int) keyspb->nelems); + cdi_key_t *keypa = keyspa->value + keynum, *keypb = keyspb->value + keynum; + + if (keypa->key != keypb->key) return 1; + if (keypa->type != keypb->type) return 1; + if (keypa->length != keypb->length) return 1; + + if (keypa->type == KEY_BYTES) return (memcmp(keypa->v.s, keypb->v.s, keypa->length) != 0); + if (keypa->type == KEY_FLOAT) return (IS_NOT_EQUAL(keypa->v.d, keypb->v.d)); + if (keypa->type == KEY_INT) return (keypa->v.i != keypb->v.i); + + return 0; +} + +static void +cdi_delete_key(cdi_key_t *keyp) +{ + if (keyp != NULL && keyp->length) // key in use + { + keyp->length = 0; + if (keyp->type == KEY_BYTES) + { + if (keyp->v.s) free(keyp->v.s); + keyp->v.s = NULL; + } + else if (keyp->type == KEY_FLOAT) + { + keyp->v.d = 0.0; + } + else if (keyp->type == KEY_INT) + { + keyp->v.i = 0; + } + } +} + +void +cdiDeleteVarKeys(cdi_keys_t *keysp) +{ + int nelems = keysp ? (int) keysp->nelems : 0; + for (int keyid = 0; keyid < nelems; keyid++) + { + cdi_delete_key(&(keysp->value[keyid])); + } + + keysp->nelems = 0; +} + +void +cdiDeleteKeys(int cdiID, int varID) +{ + cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + cdiDeleteVarKeys(keysp); +} + +void +cdiPrintVarKeys(cdi_keys_t *keysp) +{ + int nelems = keysp ? (int) keysp->nelems : 0; + for (int keyid = 0; keyid < nelems; keyid++) + { + cdi_key_t *keyp = &(keysp->value[keyid]); + if (keyp->length == 0) continue; + if (keyp->type == KEY_BYTES) + { + fprintf(stdout, "%d key %d length %d value %s\n", keyid + 1, keyp->key, keyp->length, keyp->v.s); + } + else if (keyp->type == KEY_FLOAT) + { + fprintf(stdout, "%d key %d value %g\n", keyid + 1, keyp->key, keyp->v.d); + } + else if (keyp->type == KEY_INT) + { + fprintf(stdout, "%d key %d value %d\n", keyid + 1, keyp->key, keyp->v.i); + } + } +} + +void +cdiPrintKeys(int cdiID, int varID) +{ + cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + cdiPrintVarKeys(keysp); +} + +// cdiInqKeyLen: Get the length of the string representation of the key +int +cdiInqKeyLen(int cdiID, int varID, int key, int *length) +{ + int status = -1; + + const cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + const cdi_key_t *keyp = find_key_const(keysp, key); + if (keyp != NULL && keyp->length > 0) + { + *length = keyp->length; + status = CDI_NOERR; + } + + return status; +} + +static void +cdi_define_key(const cdi_key_t *keyp, cdi_keys_t *keysp) +{ + // clang-format off + if (keyp->type == KEY_INT) cdiDefVarKeyInt(keysp, keyp->key, keyp->v.i); + else if (keyp->type == KEY_FLOAT) cdiDefVarKeyFloat(keysp, keyp->key, keyp->v.d); + else if (keyp->type == KEY_BYTES) cdiDefVarKeyBytes(keysp, keyp->key, keyp->v.s, keyp->length); + // clang-format on +} + +int +cdiDeleteKey(int cdiID, int varID, int key) +{ + int status = CDI_NOERR; + + cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + cdi_delete_key(find_key(keysp, key)); + + return status; +} + +void +cdiCopyVarKeys(const cdi_keys_t *keysp1, cdi_keys_t *keysp2) +{ + for (size_t keyid = 0; keyid < keysp1->nelems; keyid++) + { + const cdi_key_t *keyp = &(keysp1->value[keyid]); + if (keyp->length > 0) cdi_define_key(keyp, keysp2); + } +} + +int +cdiCopyKeys(int cdiID1, int varID1, int cdiID2, int varID2) +{ + int status = CDI_NOERR; + + cdi_keys_t *keysp1 = cdi_get_keysp(cdiID1, varID1); + xassert(keysp1 != NULL); + + cdi_keys_t *keysp2 = cdi_get_keysp(cdiID2, varID2); + xassert(keysp2 != NULL); + + cdiCopyVarKeys(keysp1, keysp2); + + return status; +} + +int +cdiCopyVarKey(const cdi_keys_t *keysp1, int key, cdi_keys_t *keysp2) +{ + int status = CDI_NOERR; + + const cdi_key_t *keyp = find_key_const(keysp1, key); + if (keyp == NULL) return -1; + + if (keyp->length > 0) cdi_define_key(keyp, keysp2); + + return status; +} + +int +cdiCopyKey(int cdiID1, int varID1, int key, int cdiID2) +{ + cdi_keys_t *keysp1 = cdi_get_keysp(cdiID1, varID1); + xassert(keysp1 != NULL); + + cdi_keys_t *keysp2 = cdi_get_keysp(cdiID2, varID1); + xassert(keysp2 != NULL); + + return cdiCopyVarKey(keysp1, key, keysp2); +} + +void +cdiDefVarKeyInt(cdi_keys_t *keysp, int key, int value) +{ + cdi_key_t *keyp = find_key(keysp, key); + if (keyp == NULL) keyp = new_key(keysp, key); + + if (keyp != NULL) + { + // if ( keyp->v.i != value ) + { + keyp->type = KEY_INT; + keyp->v.i = value; + keyp->length = 1; + } + } +} + +/* +@Function cdiDefKeyInt +@Title Define an integer value from a key + +@Prototype int cdiDefKeyInt(int cdiID, int varID, int key, int value) +@Parameter + @Item cdiID CDI object ID (vlistID, gridID, zaxisID). + @Item varID Variable identifier or CDI_GLOBAL. + @Item key The key to be searched. + @Item value An integer where the data will be read. + +@Description +The function @func{cdiDefKeyInt} defines an integer value from a key. + +@Result +@func{cdiDefKeyInt} returns CDI_NOERR if OK. + +@EndFunction +*/ +int +cdiDefKeyInt(int cdiID, int varID, int key, int value) +{ + int status = CDI_NOERR; + + cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + cdiDefVarKeyInt(keysp, key, value); + + return status; +} + +/* +@Function cdiInqKeyInt +@Title Get an integer value from a key + +@Prototype int cdiInqKeyInt(int cdiID, int varID, int key, int *value) +@Parameter + @Item cdiID CDI object ID (vlistID, gridID, zaxisID). + @Item varID Variable identifier or CDI_GLOBAL. + @Item key The key to be searched.. + @Item value The address of an integer where the data will be retrieved. + +@Description +The function @func{cdiInqKeyInt} gets an integer value from a key. + +@Result +@func{cdiInqKeyInt} returns CDI_NOERR if key is available. + +@EndFunction +*/ +int +cdiInqKeyInt(int cdiID, int varID, int key, int *value) +{ + int status = -1; + + // if (varID != CDI_GLOBAL) status = cdiInqKeyInt(cdiID, CDI_GLOBAL, key, value); + + const cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + const cdi_key_t *keyp = find_key_const(keysp, key); + if (keyp != NULL && keyp->length == 1) // key in use + { + if (keyp->type == KEY_INT) + { + *value = keyp->v.i; + status = CDI_NOERR; + } + } + + return status; +} + +int +cdiInqVarKeyInt(const cdi_keys_t *keysp, int key) +{ + int value = 0; + + const cdi_key_t *keyp = find_key_const(keysp, key); + if (keyp && keyp->type == KEY_INT) value = keyp->v.i; + + return value; +} + +void +cdiDefVarKeyFloat(cdi_keys_t *keysp, int key, double value) +{ + cdi_key_t *keyp = find_key(keysp, key); + if (keyp == NULL) keyp = new_key(keysp, key); + + if (keyp != NULL) + { + keyp->type = KEY_FLOAT; + keyp->v.d = value; + keyp->length = 1; + } +} + +/* +@Function cdiDefKeyFloat +@Title Define a floating point value from a key + +@Prototype int cdiDefKeyFloat(int cdiID, int varID, int key, double value) +@Parameter + @Item cdiID CDI object ID (vlistID, gridID, zaxisID). + @Item varID Variable identifier or CDI_GLOBAL. + @Item key The key to be searched + @Item value A double where the data will be read + +@Description +The function @func{cdiDefKeyFloat} defines a CDI floating point value from a key. + +@Result +@func{cdiDefKeyFloat} returns CDI_NOERR if OK. + +@EndFunction +*/ +int +cdiDefKeyFloat(int cdiID, int varID, int key, double value) +{ + int status = CDI_NOERR; + + cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + cdiDefVarKeyFloat(keysp, key, value); + + return status; +} + +/* +@Function cdiInqKeyFloat +@Title Get a floating point value from a key + +@Prototype int cdiInqKeyFloat(int cdiID, int varID, int key, double *value) +@Parameter + @Item cdiID CDI object ID (vlistID, gridID, zaxisID). + @Item varID Variable identifier or CDI_GLOBAL. + @Item key The key to be searched. + @Item value The address of a double where the data will be retrieved. + +@Description +The function @func{cdiInqKeyFloat} gets a floating point value from a key. + +@Result +@func{cdiInqKeyFloat} returns CDI_NOERR if key is available. + +@EndFunction +*/ +int +cdiInqKeyFloat(int cdiID, int varID, int key, double *value) +{ + int status = -1; + + // if (varID != CDI_GLOBAL) status = cdiInqKeyFloat(cdiID, CDI_GLOBAL, key, value); + + const cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + const cdi_key_t *keyp = find_key_const(keysp, key); + if (keyp != NULL && keyp->length == 1) // key in use + { + if (keyp->type == KEY_FLOAT) + { + *value = keyp->v.d; + status = CDI_NOERR; + } + } + + return status; +} + +void +cdiDefVarKeyBytes(cdi_keys_t *keysp, int key, const unsigned char *bytes, int length) +{ + cdi_key_t *keyp = find_key(keysp, key); + if (keyp == NULL) keyp = new_key(keysp, key); + + if (keyp != NULL) + { + if (keyp->length != 0 && keyp->length != length) + { + if (keyp->v.s) free(keyp->v.s); + keyp->length = 0; + } + if (keyp->length == 0) + { + keyp->v.s = (unsigned char *) malloc((size_t) length); + keyp->length = length; + } + + memcpy(keyp->v.s, bytes, length); + keyp->type = KEY_BYTES; + } +} + +/* +@Function cdiDefKeyBytes +@Title Define a byte array from a key + +@Prototype int cdiDefKeyBytes(int cdiID, int varID, int key, const unsigned char *bytes, int length) +@Parameter + @Item cdiID CDI object ID (vlistID, gridID, zaxisID). + @Item varID Variable identifier or CDI_GLOBAL. + @Item key The key to be searched. + @Item bytes The address of a byte array where the data will be read. + @Item length Length of the byte array + +@Description +The function @func{cdiDefKeyBytes} defines a byte array from a key. + +@Result +@func{cdiDefKeyBytes} returns CDI_NOERR if OK. + +@EndFunction +*/ +int +cdiDefKeyBytes(int cdiID, int varID, int key, const unsigned char *bytes, int length) +{ + int status = CDI_NOERR; + + cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + cdiDefVarKeyBytes(keysp, key, bytes, length); + + return status; +} + +int +cdiInqVarKeyBytes(const cdi_keys_t *keysp, int key, unsigned char *bytes, int *length) +{ + int status = -1; + + const cdi_key_t *keyp = find_key_const(keysp, key); + if (keyp != NULL && keyp->length > 0) // key in use + { + if (keyp->type == KEY_BYTES) + { + if (keyp->length < *length) *length = keyp->length; + memcpy(bytes, keyp->v.s, *length); + status = CDI_NOERR; + } + } + + return status; +} + +// cdiInqKeyBytes: Get a byte array from a key +/* +@Function cdiInqKeyBytes +@Title Get a byte array from a key + +@Prototype int cdiInqKeyBytes(int cdiID, int varID, int key, unsigned char *bytes, int *length) +@Parameter + @Item cdiID CDI object ID (vlistID, gridID, zaxisID). + @Item varID Variable identifier or CDI_GLOBAL. + @Item key The key to be searched. + @Item bytes The address of a byte array where the data will be retrieved. + The caller must allocate space for the returned byte array. + @Item length The allocated length of the byte array on input. +@Description +The function @func{cdiInqKeyBytes} gets a byte array from a key. + +@Result +@func{cdiInqKeyBytes} returns CDI_NOERR if key is available. + +@EndFunction +*/ +int +cdiInqKeyBytes(int cdiID, int varID, int key, unsigned char *bytes, int *length) +{ + xassert(bytes != NULL); + xassert(length != NULL); + + // if (varID != CDI_GLOBAL) status = cdiInqKeyBytes(cdiID, CDI_GLOBAL, key, bytes, length); + + const cdi_keys_t *keysp = cdi_get_keysp(cdiID, varID); + xassert(keysp != NULL); + + return cdiInqVarKeyBytes(keysp, key, bytes, length); +} + +/* +@Function cdiDefKeyString +@Title Define a string from a key + +@Prototype int cdiDefKeyString(int cdiID, int varID, int key, const char *string) +@Parameter + @Item cdiID CDI object ID (vlistID, gridID, zaxisID). + @Item varID Variable identifier or CDI_GLOBAL. + @Item key The key to be searched. + @Item string The address of a string where the data will be read. + +@Description +The function @func{cdiDefKeyString} defines a text string from a key. + +@Result +@func{cdiDefKeyString} returns CDI_NOERR if OK. + +@Example +Here is an example using @func{cdiDefKeyString} to define the name of a variable: + +@Source + ... +int vlistID, varID, status; + ... +vlistID = vlistCreate(); +varID = vlistDefVar(vlistID, gridID, zaxisID, TIME_VARYING); + ... +status = cdiDefKeyString(vlistID, varID, CDI_KEY_NAME, "temperature"); + ... +@EndSource +@EndFunction +*/ +int +cdiDefKeyString(int cdiID, int varID, int key, const char *string) +{ + xassert(string != NULL); + + int length = strlen(string) + 1; + int status = cdiDefKeyBytes(cdiID, varID, key, (const unsigned char *) string, length); + + return status; +} + +/* +@Function cdiInqKeyString +@Title Get a string from a key + +@Prototype int cdiInqKeyString(int cdiID, int varID, int key, char *string, int *length) +@Parameter + @Item cdiID CDI object ID (vlistID, gridID, zaxisID). + @Item varID Variable identifier or CDI_GLOBAL. + @Item key The key to be searched. + @Item string The address of a string where the data will be retrieved. + The caller must allocate space for the returned string. + @Item length The allocated length of the string on input. +@Description +The function @func{cdiInqKeyString} gets a text string from a key. + +@Result +@func{cdiInqKeyString} returns CDI_NOERR if key is available. + +@Example +Here is an example using @func{cdiInqKeyString} to get the name of the first variable: + +@Source + ... +#define STRLEN 256 + ... +int streamID, vlistID, varID, status; +int length = STRLEN; +char name[STRLEN]; + ... +streamID = streamOpenRead(...); +vlistID = streamInqVlist(streamID); + ... +varID = 0; +status = cdiInqKeyString(vlistID, varID, CDI_KEY_NAME, name, &length); + ... +@EndSource +@EndFunction +*/ +int +cdiInqKeyString(int cdiID, int varID, int key, char *string, int *length) +{ + xassert(string != NULL); + xassert(length != NULL); + + int maxlength = *length; + if (maxlength > 0) string[0] = '\0'; + + int status = cdiInqKeyBytes(cdiID, varID, key, (unsigned char *) string, length); + if (CDI_NOERR == status) + string[maxlength - 1] = '\0'; + else + *length = 0; + + return status; +} + +const char * +cdiInqVarKeyStringPtr(const cdi_keys_t *keysp, int key) +{ + const cdi_key_t *keyp = find_key_const(keysp, key); + if (keyp != NULL) // key in use + { + if (keyp->type == KEY_BYTES) return (const char *) keyp->v.s; + } + + return NULL; +} + +void +cdiInitKeys(cdi_keys_t *keysp) +{ + keysp->nalloc = MAX_KEYS; + keysp->nelems = 0; + for (int i = 0; i < MAX_KEYS; ++i) keysp->value[i].length = 0; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <assert.h> +#include <limits.h> +#include <stdio.h> +#include <string.h> + + + +static cdi_atts_t * +get_attsp(vlist_t *vlistptr, int varID) +{ + if (varID == CDI_GLOBAL) + return &vlistptr->atts; + else if (varID >= 0 && varID < vlistptr->nvars) + return &(vlistptr->vars[varID].atts); + + return NULL; +} + +static cdi_att_t * +find_att(cdi_atts_t *attsp, const char *name) +{ + xassert(attsp != NULL); + + if (attsp->nelems == 0) return NULL; + + size_t slen = strlen(name); + if (slen > CDI_MAX_NAME) slen = CDI_MAX_NAME; + + cdi_att_t *atts = attsp->value; + for (size_t attid = 0; attid < attsp->nelems; attid++) + { + cdi_att_t *attp = atts + attid; + if (attp->namesz == slen && memcmp(attp->name, name, slen) == 0) return attp; // Normal return + } + + return NULL; +} + +static cdi_att_t * +new_att(cdi_atts_t *attsp, const char *name) +{ + xassert(attsp != NULL); + xassert(name != NULL); + + if (attsp->nelems == attsp->nalloc) return NULL; + + cdi_att_t *attp = &(attsp->value[attsp->nelems]); + attsp->nelems++; + + size_t slen = strlen(name); + if (slen > CDI_MAX_NAME) slen = CDI_MAX_NAME; + + attp->name = (char *) Malloc(slen + 1); + memcpy(attp->name, name, slen + 1); + attp->namesz = slen; + attp->xvalue = NULL; + + return attp; +} + +static void +fill_att(cdi_att_t *attp, int indtype, int exdtype, size_t nelems, size_t xsz, const void *xvalue) +{ + xassert(attp != NULL); + + attp->xsz = xsz; + attp->indtype = indtype; + attp->exdtype = exdtype; + attp->nelems = nelems; + + if (xsz > 0) + { + attp->xvalue = Realloc(attp->xvalue, xsz); + memcpy(attp->xvalue, xvalue, xsz); + } +} + +static cdi_atts_t * +cdi_get_attsp(int objID, int varID) +{ + cdi_atts_t *attsp = NULL; + + if (varID == CDI_GLOBAL && reshGetTxCode(objID) == GRID) + { + grid_t *gridptr = grid_to_pointer(objID); + attsp = &gridptr->atts; + } + else if (varID == CDI_GLOBAL && reshGetTxCode(objID) == ZAXIS) + { + zaxis_t *zaxisptr = zaxis_to_pointer(objID); + attsp = &zaxisptr->atts; + } + else + { + vlist_t *vlistptr = vlist_to_pointer(objID); + attsp = get_attsp(vlistptr, varID); + } + + return attsp; +} + +/* +@Function cdiInqNatts +@Title Get number of attributes + +@Prototype int cdiInqNatts(int cdiID, int varID, int *nattsp) +@Parameter + @Item cdiID CDI ID, from a previous call to @fref{vlistCreate}, @fref{gridCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier, or @func{CDI_GLOBAL} for a global attribute. + @Item nattsp Pointer to location for returned number of attributes. + +@Description +The function @func{cdiInqNatts} gets the number of attributes assigned to this variable. + +@EndFunction +*/ +int +cdiInqNatts(int cdiID, int varID, int *nattsp) +{ + int status = CDI_NOERR; + + cdi_atts_t *attsp = cdi_get_attsp(cdiID, varID); + xassert(attsp != NULL); + + *nattsp = (int) attsp->nelems; + + return status; +} + +/* +@Function cdiInqAtt +@Title Get information about an attribute + +@Prototype int cdiInqAtt(int cdiID, int varID, int attnum, char *name, int *typep, int *lenp) +@Parameter + @Item cdiID CDI ID, from a previous call to @fref{vlistCreate}, @fref{gridCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier, or @func{CDI_GLOBAL} for a global attribute. + @Item attnum Attribute number (from 0 to natts-1). + @Item name Pointer to the location for the returned attribute name. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + @Item typep Pointer to location for returned attribute type. + @Item lenp Pointer to location for returned attribute number. + +@Description +The function @func{cdiInqAtt} gets information about an attribute. + +@EndFunction +*/ +int +cdiInqAtt(int cdiID, int varID, int attnum, char *name, int *typep, int *lenp) +{ + int status = CDI_NOERR; + + xassert(name != NULL); + + cdi_atts_t *attsp = cdi_get_attsp(cdiID, varID); + xassert(attsp != NULL); + + cdi_att_t *attp = NULL; + if (attnum >= 0 && attnum < (int) attsp->nelems) attp = &(attsp->value[attnum]); + + if (attp != NULL && attp->name) // name in use + { + memcpy(name, attp->name, attp->namesz + 1); + *typep = attp->exdtype; + *lenp = (int) attp->nelems; + } + else + { + name[0] = 0; + *typep = -1; + *lenp = 0; + status = -1; + } + + return status; +} + +int +cdiInqAttLen(int cdiID, int varID, const char *name) +{ + int length = -1; + + xassert(name != NULL); + + cdi_atts_t *attsp = cdi_get_attsp(cdiID, varID); + xassert(attsp != NULL); + + for (int attid = 0; attid < (int) attsp->nelems; attid++) + { + cdi_att_t *attp = &(attsp->value[attid]); + if (attp->name && str_is_equal(attp->name, name)) length = (int) attp->nelems; + } + + return length; +} + +int +cdiInqAttType(int cdiID, int varID, const char *name) +{ + int type = -1; + + xassert(name != NULL); + + cdi_atts_t *attsp = cdi_get_attsp(cdiID, varID); + xassert(attsp != NULL); + + for (int attid = 0; attid < (int) attsp->nelems; attid++) + { + cdi_att_t *attp = &(attsp->value[attid]); + if (attp->name && str_is_equal(attp->name, name)) type = attp->exdtype; + } + + return type; +} + +static void +cdi_attribute_free(cdi_att_t *attp) +{ + if (attp->name) + { + Free(attp->name); + attp->name = NULL; + attp->namesz = 0; + } + if (attp->xvalue) + { + Free(attp->xvalue); + attp->xvalue = NULL; + } +} + +int +cdiDeleteAtts(int cdiID, int varID) +{ + int status = CDI_NOERR; + + cdi_atts_t *attsp = cdi_get_attsp(cdiID, varID); + xassert(attsp != NULL); + + for (int attid = 0; attid < (int) attsp->nelems; attid++) + { + cdi_att_t *attp = &(attsp->value[attid]); + cdi_attribute_free(attp); + } + + attsp->nelems = 0; + + return status; +} + +int +cdiDelAtt(int cdiID, int varID, const char *name) +{ + int status = -1; + + cdi_atts_t *attsp = cdi_get_attsp(cdiID, varID); + xassert(attsp != NULL); + + for (int attid = 0; attid < (int) attsp->nelems; attid++) + { + cdi_att_t *attp = &(attsp->value[attid]); + if (attp->name && str_is_equal(attp->name, name)) + { + cdi_attribute_free(attp); + status = CDI_NOERR; + break; + } + } + + return status; +} + +static int +cdi_def_att(int indtype, int exdtype, int cdiID, int varID, const char *name, size_t len, size_t xsz, const void *xp) +{ + int status = CDI_NOERR; + + if (len != 0 && xp == NULL) return CDI_EINVAL; // Null arg + + cdi_atts_t *attsp = cdi_get_attsp(cdiID, varID); + xassert(attsp != NULL); + + cdi_att_t *attp = find_att(attsp, name); + if (attp == NULL) attp = new_att(attsp, name); + + if (attp != NULL) fill_att(attp, indtype, exdtype, len, xsz, xp); + + return status; +} + +static int +cdi_inq_att(int indtype, int cdiID, int varID, const char *name, size_t mxsz, void *xp) +{ + int status = CDI_NOERR; + + if (mxsz != 0 && xp == NULL) return CDI_EINVAL; // Null arg + + cdi_atts_t *attsp = cdi_get_attsp(cdiID, varID); + xassert(attsp != NULL); + + cdi_att_t *attp = find_att(attsp, name); + if (attp != NULL) // name in use + { + if (attp->indtype == indtype) + { + size_t xsz = attp->xsz; + if (mxsz < xsz) xsz = mxsz; + if (xsz > 0) memcpy(xp, attp->xvalue, xsz); + } + else + { + Warning("Attribute %s has wrong data type!", name); + status = -2; + } + } + else + { + // Warning("Internal problem, attribute %s not found!", name); + status = -1; + } + + return status; +} + +int +cdiCopyAtts(int cdiID1, int varID1, int cdiID2, int varID2) +{ + int status = CDI_NOERR; + + cdi_atts_t *attsp1 = cdi_get_attsp(cdiID1, varID1); + xassert(attsp1 != NULL); + + for (size_t attid = 0; attid < attsp1->nelems; attid++) + { + cdi_att_t *attp = &(attsp1->value[attid]); + cdi_def_att(attp->indtype, attp->exdtype, cdiID2, varID2, attp->name, attp->nelems, attp->xsz, attp->xvalue); + } + + return status; +} + +/* +@Function cdiDefAttInt +@Title Define an integer attribute + +@Prototype int cdiDefAttInt(int cdiID, int varID, const char *name, int type, int len, const int *ip) + +@Parameter + @Item cdiID CDI ID, from a previous call to @fref{vlistCreate}, @fref{gridCreate} or @fref{zaxisCreate}. + @Item varID Variable identifier, or @func{CDI_GLOBAL} for a global attribute. + @Item name Attribute name. + @Item type External data type (@func{CDI_DATATYPE_INT16} or @func{CDI_DATATYPE_INT32}). + @Item len Number of values provided for the attribute. + @Item ip Pointer to one or more integer values. + +@Description +The function @func{cdiDefAttInt} defines an integer attribute. + +@EndFunction +*/ +int +cdiDefAttInt(int cdiID, int varID, const char *name, int type, int len, const int *ip) +{ + return cdi_def_att(CDI_DATATYPE_INT, type, cdiID, varID, name, (size_t) len, (size_t) len * sizeof(int), ip); +} + +/* +@Function cdiDefAttFlt +@Title Define a floating point attribute + +@Prototype int cdiDefAttFlt(int cdiID, int varID, const char *name, int type, int len, const double *dp) + +@Parameter + @Item cdiID CDI ID, from a previous call to @fref{vlistCreate}, @fref{gridCreate} or @fref{zaxisCreate}. + @Item varID Variable identifier, or @func{CDI_GLOBAL} for a global attribute. + @Item name Attribute name. + @Item type External data type (@func{CDI_DATATYPE_FLT32} or @func{CDI_DATATYPE_FLT64}). + @Item len Number of values provided for the attribute. + @Item dp Pointer to one or more floating point values. + +@Description +The function @func{cdiDefAttFlt} defines a floating point attribute. + +@EndFunction +*/ +int +cdiDefAttFlt(int cdiID, int varID, const char *name, int type, int len, const double *dp) +{ + return cdi_def_att(CDI_DATATYPE_FLT, type, cdiID, varID, name, (size_t) len, (size_t) len * sizeof(double), dp); +} + +/* +@Function cdiDefAttTxt +@Title Define a text attribute + +@Prototype int cdiDefAttTxt(int cdiID, int varID, const char *name, int len, const char *tp) + +@Parameter + @Item cdiID CDI ID, from a previous call to @fref{vlistCreate}, @fref{gridCreate} or @fref{zaxisCreate}. + @Item varID Variable identifier, or @func{CDI_GLOBAL} for a global attribute. + @Item name Attribute name. + @Item len Number of values provided for the attribute. + @Item tp Pointer to one or more character values. + +@Description +The function @func{cdiDefAttTxt} defines a text attribute. + +@Example +Here is an example using @func{cdiDefAttTxt} to define the attribute "description": + +@Source + ... +int vlistID, varID, status; +char text[] = "description of the variable"; + ... +vlistID = vlistCreate(); +varID = vlistDefVar(vlistID, gridID, zaxisID, TIME_VARYING); + ... +status = cdiDefAttTxt(vlistID, varID, "description", LEN(text), text); + ... +@EndSource +@EndFunction +*/ +int +cdiDefAttTxt(int cdiID, int varID, const char *name, int len, const char *tp) +{ + return cdi_def_att(CDI_DATATYPE_TXT, CDI_DATATYPE_TXT, cdiID, varID, name, (size_t) len, (size_t) len, tp); +} + +/* +@Function cdiInqAttInt +@Title Get the value(s) of an integer attribute + +@Prototype int cdiInqAttInt(int cdiID, int varID, const char *name, int mlen, int *ip) +@Parameter + @Item cdiID CDI ID, from a previous call to @fref{vlistCreate}, @fref{gridCreate} or @fref{zaxisCreate}. + @Item varID Variable identifier, or @func{CDI_GLOBAL} for a global attribute. + @Item name Attribute name. + @Item mlen Number of allocated values provided for the attribute. + @Item ip Pointer location for returned integer attribute value(s). + +@Description +The function @func{cdiInqAttInt} gets the values(s) of an integer attribute. + +@EndFunction +*/ +int +cdiInqAttInt(int cdiID, int varID, const char *name, int mlen, int *ip) +{ + return cdi_inq_att(CDI_DATATYPE_INT, cdiID, varID, name, (size_t) mlen * sizeof(int), ip); +} + +/* +@Function cdiInqAttFlt +@Title Get the value(s) of a floating point attribute + +@Prototype int cdiInqAttFlt(int cdiID, int varID, const char *name, int mlen, double *dp) +@Parameter + @Item cdiID CDI ID, from a previous call to @fref{vlistCreate}, @fref{gridCreate} or @fref{zaxisCreate}. + @Item varID Variable identifier, or @func{CDI_GLOBAL} for a global attribute. + @Item name Attribute name. + @Item mlen Number of allocated values provided for the attribute. + @Item dp Pointer location for returned floating point attribute value(s). + +@Description +The function @func{cdiInqAttFlt} gets the values(s) of a floating point attribute. + +@EndFunction +*/ +int +cdiInqAttFlt(int cdiID, int varID, const char *name, int mlen, double *dp) +{ + return cdi_inq_att(CDI_DATATYPE_FLT, cdiID, varID, name, (size_t) mlen * sizeof(double), dp); +} + +/* +@Function cdiInqAttTxt +@Title Get the value(s) of a text attribute + +@Prototype int cdiInqAttTxt(int cdiID, int varID, const char *name, int mlen, char *tp) +@Parameter + @Item cdiID CDI ID, from a previous call to @fref{vlistCreate}, @fref{gridCreate} or @fref{zaxisCreate}. + @Item varID Variable identifier, or @func{CDI_GLOBAL} for a global attribute. + @Item name Attribute name. + @Item mlen Number of allocated values provided for the attribute. + @Item tp Pointer location for returned text attribute value(s). + +@Description +The function @func{cdiInqAttTxt} gets the values(s) of a text attribute. + +@EndFunction +*/ +int +cdiInqAttTxt(int cdiID, int varID, const char *name, int mlen, char *tp) +{ + return cdi_inq_att(CDI_DATATYPE_TXT, cdiID, varID, name, (size_t) mlen * sizeof(char), tp); +} + +enum +{ + cdi_att_nints = 4, /* namesz, exdtype, indtype, nelems */ +}; + +static inline int +cdiAttTypeLookup(cdi_att_t *attp) +{ + int type; + switch (attp->indtype) + { + case CDI_DATATYPE_FLT: type = CDI_DATATYPE_FLT64; break; + case CDI_DATATYPE_INT: + case CDI_DATATYPE_TXT: type = attp->indtype; break; + default: xabort("Unknown datatype encountered in attribute %s: %d\n", attp->name, attp->indtype); + } + return type; +} + +int +cdi_att_compare(cdi_atts_t *attspa, cdi_atts_t *attspb, int attnum) +{ + xassert(attnum >= 0 && attnum < (int) attspa->nelems && attnum < (int) attspb->nelems); + cdi_att_t *attpa = attspa->value + attnum, *attpb = attspb->value + attnum; + + if (attpa->namesz != attpb->namesz) return 1; + + if (attpa->name && attpb->name && memcmp(attpa->name, attpb->name, attpa->namesz)) return 1; + + if (attpa->indtype != attpb->indtype || attpa->exdtype != attpb->exdtype || attpa->nelems != attpb->nelems) return 1; + + return memcmp(attpa->xvalue, attpb->xvalue, attpa->xsz); +} + +static int +cdiAttGetSize(cdi_atts_t *attsp, int attnum, void *context) +{ + xassert(attnum >= 0 && attnum < (int) attsp->nelems); + cdi_att_t *attp = &(attsp->value[attnum]); + int txsize = serializeGetSize(cdi_att_nints, CDI_DATATYPE_INT, context) + + serializeGetSize((int) attp->namesz, CDI_DATATYPE_TXT, context); + txsize += serializeGetSize((int) attp->nelems, cdiAttTypeLookup(attp), context); + return txsize; +} + +int +cdiAttsGetSize(void *vp, int varID, void *context) +{ + cdi_atts_t *attsp; + xassert(attsp = get_attsp((vlist_t *) vp, varID)); + int txsize = serializeGetSize(1, CDI_DATATYPE_INT, context); + size_t numAtts = attsp->nelems; + for (size_t i = 0; i < numAtts; ++i) txsize += cdiAttGetSize(attsp, (int) i, context); + return txsize; +} + +static void +cdiAttPack(cdi_atts_t *attsp, int attnum, void *buf, int size, int *position, void *context) +{ + int tempbuf[cdi_att_nints]; + + xassert(attnum >= 0 && attnum < (int) attsp->nelems); + cdi_att_t *attp = &(attsp->value[attnum]); + tempbuf[0] = (int) attp->namesz; + tempbuf[1] = attp->exdtype; + tempbuf[2] = attp->indtype; + tempbuf[3] = (int) attp->nelems; + serializePack(tempbuf, cdi_att_nints, CDI_DATATYPE_INT, buf, size, position, context); + serializePack(attp->name, (int) attp->namesz, CDI_DATATYPE_TXT, buf, size, position, context); + serializePack(attp->xvalue, (int) attp->nelems, cdiAttTypeLookup(attp), buf, size, position, context); +} + +void +cdiAttsPack(void *vp, int varID, void *buf, int size, int *position, void *context) +{ + cdi_atts_t *attsp; + xassert(attsp = get_attsp((vlist_t *) vp, varID)); + size_t numAtts = attsp->nelems; + int numAttsI = (int) numAtts; + xassert(numAtts <= INT_MAX); + serializePack(&numAttsI, 1, CDI_DATATYPE_INT, buf, size, position, context); + for (size_t i = 0; i < numAtts; ++i) cdiAttPack(attsp, (int) i, buf, size, position, context); +} + +static void +cdiAttUnpack(int cdiID, int varID, void *buf, int size, int *position, void *context) +{ + int tempbuf[cdi_att_nints]; + + serializeUnpack(buf, size, position, tempbuf, cdi_att_nints, CDI_DATATYPE_INT, context); + char *attName = (char *) Malloc((size_t) tempbuf[0] + 1); + serializeUnpack(buf, size, position, attName, tempbuf[0], CDI_DATATYPE_TXT, context); + attName[tempbuf[0]] = '\0'; + int attVDt; + size_t elemSize; + switch (tempbuf[2]) + { + case CDI_DATATYPE_FLT: + attVDt = CDI_DATATYPE_FLT64; + elemSize = sizeof(double); + break; + case CDI_DATATYPE_INT: + attVDt = CDI_DATATYPE_INT; + elemSize = sizeof(int); + break; + case CDI_DATATYPE_TXT: + attVDt = CDI_DATATYPE_TXT; + elemSize = 1; + break; + default: xabort("Unknown datatype encountered in attribute %s: %d\n", attName, tempbuf[2]); + } + void *attData = Malloc(elemSize * (size_t) tempbuf[3]); + serializeUnpack(buf, size, position, attData, tempbuf[3], attVDt, context); + cdi_def_att(tempbuf[2], tempbuf[1], cdiID, varID, attName, (size_t) tempbuf[3], (size_t) tempbuf[3] * elemSize, attData); + Free(attName); + Free(attData); +} + +void +cdiAttsUnpack(int cdiID, int varID, void *buf, int size, int *position, void *context) +{ + int numAtts; + serializeUnpack(buf, size, position, &numAtts, 1, CDI_DATATYPE_INT, context); + for (int i = 0; i < numAtts; ++i) cdiAttUnpack(cdiID, varID, buf, size, position, context); +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <float.h> /* FLT_MAX */ + +static void +vlistvar_init_entry(var_t *vlistvars, int varID) +{ + var_t *varptr = &vlistvars[varID]; + varptr->flag = false; + varptr->lvalidrange = false; + varptr->xyz = 5; // xyzStorVals[5] == 321 + varptr->missvalused = false; + varptr->mvarID = varID; + varptr->fvarID = varID; + varptr->param = 0; + varptr->gridID = CDI_UNDEFID; + varptr->zaxisID = CDI_UNDEFID; + varptr->timetype = CDI_UNDEFID; + varptr->tsteptype = TSTEP_INSTANT; + varptr->datatype = CDI_UNDEFID; + varptr->instID = CDI_UNDEFID; + varptr->modelID = CDI_UNDEFID; + varptr->tableID = CDI_UNDEFID; + varptr->timave = 0; + varptr->nsb = 0; + varptr->missval = CDI_Default_Missval; + varptr->validrange[0] = VALIDMISS; + varptr->validrange[1] = VALIDMISS; + varptr->levinfo = NULL; + varptr->comptype = CDI_COMPRESS_NONE; + varptr->complevel = 1; + varptr->keys.nalloc = MAX_KEYS; + varptr->keys.nelems = 0; + for (int i = 0; i < MAX_KEYS; ++i) varptr->keys.value[i].length = 0; + varptr->atts.nalloc = MAX_ATTRIBUTES; + varptr->atts.nelems = 0; + varptr->subtypeID = CDI_UNDEFID; + varptr->opt_grib_nentries = 0; + varptr->opt_grib_kvpair_size = 0; + varptr->opt_grib_kvpair = NULL; +} + +static int +vlistvarNewEntry(int vlistID) +{ + int varID = 0; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + int vlistvarSize = vlistptr->varsAllocated; + var_t *vlistvars = vlistptr->vars; + // Look for a free slot in vlistvar. (Create the table the first time through). + if (!vlistvarSize) + { + vlistvarSize = 2; + vlistvars = (var_t *) Malloc((size_t) vlistvarSize * sizeof(var_t)); + for (int i = 0; i < vlistvarSize; ++i) vlistvars[i].isUsed = false; + } + else + { + while (varID < vlistvarSize && vlistvars[varID].isUsed) ++varID; + } + // If the table overflows, double its size. + if (varID == vlistvarSize) + { + vlistvars = (var_t *) Realloc(vlistvars, (size_t) (vlistvarSize *= 2) * sizeof(var_t)); + for (int i = varID; i < vlistvarSize; ++i) vlistvars[i].isUsed = false; + } + + vlistptr->varsAllocated = vlistvarSize; + vlistptr->vars = vlistvars; + + vlistvar_init_entry(vlistvars, varID); + vlistvars[varID].isUsed = true; + + return varID; +} + +static var_t * +vlistptr_get_varptr(const char *caller, vlist_t *vlistptr, int varID) +{ + if (varID < 0 || varID >= vlistptr->nvars || !vlistptr->vars[varID].isUsed) Errorc("varID %d undefined!", varID); + return &vlistptr->vars[varID]; +} + +int +vlistDefVarTiles(int vlistID, int gridID, int zaxisID, int timetype, int tilesetID) +{ + if (CDI_Debug) Message("gridID = %d zaxisID = %d timetype = %d", gridID, zaxisID, timetype); + + int varID = vlistvarNewEntry(vlistID); + + vlist_t *vlistptr = vlist_to_pointer(vlistID); + vlistptr->nvars++; + var_t *varptr = &vlistptr->vars[varID]; + varptr->gridID = gridID; + varptr->zaxisID = zaxisID; + varptr->timetype = timetype; + varptr->subtypeID = tilesetID; + + if (timetype < 0) + { + Warning("Unexpected time type %d, set to TIME_VARYING!", timetype); + varptr->timetype = TIME_VARYING; + } + + // Compatibility for release 1.8.3 + if (timetype > 1 && timetype < 15) + { + varptr->timetype = TIME_VARYING; + varptr->tsteptype = timetype; + static bool printInfo = true; + if (printInfo) + { + printInfo = false; + fprintf(stdout, "CDI info: The vlistDefVar() function was called with an invalid value for the timetype parameter.\n"); + fprintf(stdout, "CDI info: This may be an obsolete form of using the vlistDefVar() function.\n"); + fprintf(stdout, "CDI info: The correct form is:\n"); + fprintf(stdout, "CDI info: varID = vlistDefVar(vlistID, gridID, zaxisID, timetype)\n"); + fprintf(stdout, "CDI info: vlistDefVarTsteptype(vlistID, varID, tsteptype)\n"); + fprintf(stdout, "CDI info: with: timetype = TIME_CONSTANT | TIME_VARYING\n"); + fprintf(stdout, "CDI info: tsteptype = TSTEP_AVG .... TSTEP_SUM\n"); + } + } + + vlistAdd2GridIDs(vlistptr, gridID); + vlistAdd2ZaxisIDs(vlistptr, zaxisID); + vlistAdd2SubtypeIDs(vlistptr, tilesetID); + + varptr->param = cdiEncodeParam(-(varID + 1), 255, 255); + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + + return varID; +} + +/* +@Function vlistDefVar +@Title Define a Variable + +@Prototype int vlistDefVar(int vlistID, int gridID, int zaxisID, int timetype) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item gridID Grid ID, from a previous call to @fref{gridCreate}. + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + @Item timetype One of the set of predefined CDI timestep types. + The valid CDI timestep types are @func{TIME_CONSTANT} and @func{TIME_VARYING}. + +@Description +The function @func{vlistDefVar} adds a new variable to vlistID. + +@Result +@func{vlistDefVar} returns an identifier to the new variable. + +@Example +Here is an example using @func{vlistCreate} to create a variable list +and add a variable with @func{vlistDefVar}. + +@Source + ... +int vlistID, varID; + ... +vlistID = vlistCreate(); +varID = vlistDefVar(vlistID, gridID, zaxisID, TIME_VARYING); + ... +streamDefVlist(streamID, vlistID); + ... +vlistDestroy(vlistID); + ... +@EndSource +@EndFunction +*/ +int +vlistDefVar(int vlistID, int gridID, int zaxisID, int timetype) +{ + // call "vlistDefVarTiles" with a trivial tile index: + return vlistDefVarTiles(vlistID, gridID, zaxisID, timetype, CDI_UNDEFID); +} + +void +cdiVlistCreateVarLevInfo(vlist_t *vlistptr, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlistptr, varID); + xassert(varID >= 0 && varID < vlistptr->nvars && varptr->levinfo == NULL); + + int zaxisID = varptr->zaxisID; + size_t nlevs = (size_t) zaxisInqSize(zaxisID); + + varptr->levinfo = (levinfo_t *) Malloc(nlevs * sizeof(levinfo_t)); + + for (size_t levID = 0; levID < nlevs; ++levID) varptr->levinfo[levID] = DEFAULT_LEVINFO((int) levID); +} + +/* +@Function vlistDefVarParam +@Title Define the parameter number of a Variable + +@Prototype void vlistDefVarParam(int vlistID, int varID, int param) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item varID Variable identifier. + @Item param Parameter number. + +@Description +The function @func{vlistDefVarParam} defines the parameter number of a variable. + +@EndFunction +*/ +void +vlistDefVarParam(int vlistID, int varID, int param) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varptr->param != param) + { + varptr->param = param; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function vlistDefVarCode +@Title Define the code number of a Variable + +@Prototype void vlistDefVarCode(int vlistID, int varID, int code) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item varID Variable identifier. + @Item code Code number. + +@Description +The function @func{vlistDefVarCode} defines the code number of a variable. + +@EndFunction +*/ +void +vlistDefVarCode(int vlistID, int varID, int code) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + int pnum, pcat, pdis; + cdiDecodeParam(varptr->param, &pnum, &pcat, &pdis); + int newParam = cdiEncodeParam(code, pcat, pdis); + if (varptr->param != newParam) + { + varptr->param = newParam; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +void +vlistInqVar(int vlistID, int varID, int *gridID, int *zaxisID, int *timetype) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + *gridID = varptr->gridID; + *zaxisID = varptr->zaxisID; + *timetype = varptr->timetype; +} + +/* +@Function vlistInqVarGrid +@Title Get the Grid ID of a Variable + +@Prototype int vlistInqVarGrid(int vlistID, int varID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + +@Description +The function @func{vlistInqVarGrid} returns the grid ID of a Variable. + +@Result +@func{vlistInqVarGrid} returns the grid ID of the Variable. + +@EndFunction +*/ +int +vlistInqVarGrid(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->gridID; +} + +/* +@Function vlistInqVarZaxis +@Title Get the Zaxis ID of a Variable + +@Prototype int vlistInqVarZaxis(int vlistID, int varID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + +@Description +The function @func{vlistInqVarZaxis} returns the zaxis ID of a variable. + +@Result +@func{vlistInqVarZaxis} returns the zaxis ID of the variable. + +@EndFunction +*/ +int +vlistInqVarZaxis(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->zaxisID; +} + +/* +@Function vlistInqVarSubtype +@Title Get the Subtype ID of a Variable + +@Description +The function @func{vlistInqVarSubtype} returns the subtype ID of a variable. + +@Result +@func{vlistInqVarSubtype} returns the subtype ID of the variable. + +@EndFunction +*/ +int +vlistInqVarSubtype(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->subtypeID; +} + +/* +@Function vlistInqVarParam +@Title Get the parameter number of a Variable + +@Prototype int vlistInqVarParam(int vlistID, int varID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + +@Description +The function @func{vlistInqVarParam} returns the parameter number of a variable. + +@Result +@func{vlistInqVarParam} returns the parameter number of the variable. + +@EndFunction +*/ +int +vlistInqVarParam(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->param; +} + +/* +@Function vlistInqVarCode +@Title Get the Code number of a Variable + +@Prototype int vlistInqVarCode(int vlistID, int varID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + +@Description +The function @func{vlistInqVarCode} returns the code number of a variable. + +@Result +@func{vlistInqVarCode} returns the code number of the variable. + +@EndFunction +*/ +int +vlistInqVarCode(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + int pdis, pcat, pnum; + cdiDecodeParam(varptr->param, &pnum, &pcat, &pdis); + int code = pnum; + if (pdis != 255) code = -varID - 1; // GRIB2 Parameter + + int tableID = varptr->tableID; + if (code < 0 && tableID != -1) + { + char name[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(vlistID, varID, CDI_KEY_NAME, name, &length); + + if (name[0]) tableInqParCode(tableID, name, &code); + } + + return code; +} + +/* +@Function vlistInqVarName +@Title Get the name of a Variable + +@Prototype void vlistInqVarName(int vlistID, int varID, char *name) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + @Item name Returned variable name. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{vlistInqVarName} returns the name of a variable. + +@Result +@func{vlistInqVarName} returns the name of the variable to the parameter name if available, +otherwise the result is an empty string. + +@EndFunction +*/ +void +vlistInqVarName(int vlistID, int varID, char *name) +{ + int length = CDI_MAX_NAME; + if (CDI_NOERR != cdiInqKeyString(vlistID, varID, CDI_KEY_NAME, name, &length)) + { + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + int pdis, pcat, pnum; + cdiDecodeParam(varptr->param, &pnum, &pcat, &pdis); + if (pdis == 255) + { + int code = pnum; + int tableID = varptr->tableID; + tableInqEntry(tableID, code, -1, name, NULL, NULL); + if (!name[0]) sprintf(name, "var%d", code); + } + else + { + sprintf(name, "param%d.%d.%d", pnum, pcat, pdis); + } + } +} + +/* +@Function vlistCopyVarName +@Tatle Get the name of a Variable in a safe way + +@Prototype char* vlistCopyVarName(int vlistId, int varId) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + +@Return A pointer to a malloc'ed string. Must be cleaned up with Free(). + +@Description +This is the buffer overflow immune version of vlistInqVarName(). +The memory for the returned string is allocated to fit the string via Malloc(). + +@EndFunction +*/ +char * +vlistCopyVarName(int vlistID, int varID) +{ + // If a name is set in the variable description, use that. + char name[CDI_MAX_NAME]; + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(vlistID, varID, CDI_KEY_NAME, name, &length); + if (name[0]) return strdup(name); + + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + // Otherwise we check if we should use the table of parameter descriptions. + int discipline, category, number; + cdiDecodeParam(varptr->param, &number, &category, &discipline); + char *result = NULL; + if (discipline == 255) + { + tableInqEntry(varptr->tableID, number, -1, name, NULL, NULL); + if (name[0]) + result = strdup(name); + else + { + // No luck, fall back to outputting a name of the format "var<num>". + result = (char *) Malloc(3 + 3 * sizeof(int) * CHAR_BIT / 8 + 2); + sprintf(result, "var%d", number); + } + } + else + { + result = (char *) Malloc(5 + 2 + 3 * (3 * sizeof(int) * CHAR_BIT + 1) + 1); + sprintf(result, "param%d.%d.%d", number, category, discipline); + } + // Finally, we fall back to outputting a name of the format "param<num>.<cat>.<dis>". + return result; +} + +/* +@Function vlistInqVarLongname +@Title Get the longname of a Variable + +@Prototype void vlistInqVarLongname(int vlistID, int varID, char *longname) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + @Item longname Long name of the variable. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{vlistInqVarLongname} returns the longname of a variable if available, +otherwise the result is an empty string. + +@Result +@func{vlistInqVarLongname} returns the longname of the variable to the parameter longname. + +@EndFunction +*/ +void +vlistInqVarLongname(int vlistID, int varID, char *longname) +{ + int length = CDI_MAX_NAME; + if (CDI_NOERR != cdiInqKeyString(vlistID, varID, CDI_KEY_LONGNAME, longname, &length)) + { + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + int pdis, pcat, pnum; + cdiDecodeParam(varptr->param, &pnum, &pcat, &pdis); + if (pdis == 255) tableInqEntry(varptr->tableID, pnum, -1, NULL, longname, NULL); + } +} + +/* +@Function vlistInqVarStdname +@Title Get the standard name of a Variable + +@Prototype void vlistInqVarStdname(int vlistID, int varID, char *stdname) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + @Item stdname Standard name of the variable. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{vlistInqVarStdname} returns the standard name of a variable if available, +otherwise the result is an empty string. + +@Result +@func{vlistInqVarStdname} returns the standard name of the variable to the parameter stdname. + +@EndFunction +*/ +void +vlistInqVarStdname(int vlistID, int varID, char *stdname) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(vlistID, varID, CDI_KEY_STDNAME, stdname, &length); +} + +// obsolete function +int +vlistInqVarTypeOfGeneratingProcess(int vlistID, int varID) +{ + static bool printInfo = true; + if (printInfo) printInfo = cdiObsoleteInfo(__func__, "cdiInqKeyInt"); + int typeOfGeneratingProcess = 0; + cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFGENERATINGPROCESS, &typeOfGeneratingProcess); + return typeOfGeneratingProcess; +} + +// obsolete function +void +vlistDefVarTypeOfGeneratingProcess(int vlistID, int varID, int typeOfGeneratingProcess) +{ + static bool printInfo = true; + if (printInfo) printInfo = cdiObsoleteInfo(__func__, "cdiDefKeyInt"); + cdiDefKeyInt(vlistID, varID, CDI_KEY_TYPEOFGENERATINGPROCESS, typeOfGeneratingProcess); +} + +// obsolete function +void +vlistDefVarProductDefinitionTemplate(int vlistID, int varID, int productDefinitionTemplate) +{ + static bool printInfo = true; + if (printInfo) printInfo = cdiObsoleteInfo(__func__, "cdiDefKeyInt"); + cdiDefKeyInt(vlistID, varID, CDI_KEY_PRODUCTDEFINITIONTEMPLATE, productDefinitionTemplate); +} + +/* +@Function vlistInqVarUnits +@Title Get the units of a Variable + +@Prototype void vlistInqVarUnits(int vlistID, int varID, char *units) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + @Item units Units of the variable. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{vlistInqVarUnits} returns the units of a variable if available, +otherwise the result is an empty string. + +@Result +@func{vlistInqVarUnits} returns the units of the variable to the parameter units. + +@EndFunction +*/ +void +vlistInqVarUnits(int vlistID, int varID, char *units) +{ + int length = CDI_MAX_NAME; + if (CDI_NOERR != cdiInqKeyString(vlistID, varID, CDI_KEY_UNITS, units, &length)) + { + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + int pdis, pcat, pnum; + cdiDecodeParam(varptr->param, &pnum, &pcat, &pdis); + if (pdis == 255) tableInqEntry(varptr->tableID, pnum, -1, NULL, NULL, units); + } +} + +// used in MPIOM ! +int +vlistInqVarID(int vlistID, int code) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + for (int varID = 0; varID < vlistptr->nvars; ++varID) + { + int param = vlistptr->vars[varID].param; + int pdis, pcat, pnum; + cdiDecodeParam(param, &pnum, &pcat, &pdis); + if (pnum == code) return varID; + } + + return CDI_UNDEFID; +} + +SizeType +vlistInqVarSize(int vlistID, int varID) +{ + int zaxisID, gridID, timetype; + vlistInqVar(vlistID, varID, &gridID, &zaxisID, &timetype); + + SizeType nlevs = (SizeType) zaxisInqSize(zaxisID); + SizeType gridsize = gridInqSize(gridID); + + return gridsize * nlevs; +} + +/* +@Function vlistInqVarDatatype +@Title Get the data type of a Variable + +@Prototype int vlistInqVarDatatype(int vlistID, int varID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + +@Description +The function @func{vlistInqVarDatatype} returns the data type of a variable. + +@Result +@func{vlistInqVarDatatype} returns an identifier to the data type of the variable. +The valid CDI data types are @func{CDI_DATATYPE_PACK8}, @func{CDI_DATATYPE_PACK16}, @func{CDI_DATATYPE_PACK24}, +@func{CDI_DATATYPE_FLT32}, @func{CDI_DATATYPE_FLT64}, @func{CDI_DATATYPE_INT8}, @func{CDI_DATATYPE_INT16} and +@func{CDI_DATATYPE_INT32}. + +@EndFunction +*/ +int +vlistInqVarDatatype(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->datatype; +} + +int +vlistInqVarNumber(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return (varptr->datatype == CDI_DATATYPE_CPX32 || varptr->datatype == CDI_DATATYPE_CPX64) ? CDI_COMP : CDI_REAL; +} + +static bool +check_range(double value, double lowerBound, double upperBound) +{ + return (value >= lowerBound && value <= upperBound); +} + +/* +@Function vlistDefVarDatatype +@Title Define the data type of a Variable + +@Prototype void vlistDefVarDatatype(int vlistID, int varID, int datatype) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item varID Variable identifier. + @Item datatype The data type identifier. + The valid CDI data types are @func{CDI_DATATYPE_PACK8}, @func{CDI_DATATYPE_PACK16}, + @func{CDI_DATATYPE_PACK24}, @func{CDI_DATATYPE_FLT32}, @func{CDI_DATATYPE_FLT64}, + @func{CDI_DATATYPE_INT8}, @func{CDI_DATATYPE_INT16} and @func{CDI_DATATYPE_INT32}. + +@Description +The function @func{vlistDefVarDatatype} defines the data type of a variable. + +@EndFunction +*/ +void +vlistDefVarDatatype(int vlistID, int varID, int datatype) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varptr->datatype != datatype) + { + varptr->datatype = datatype; + + if (!varptr->missvalused) + { + double missval = varptr->missval; + bool missvalIsDefault = DBL_IS_EQUAL(missval, CDI_Default_Missval); + if (missvalIsDefault) + { + // clang-format off + switch (datatype) + { + case CDI_DATATYPE_INT8: varptr->missval = -SCHAR_MAX; break; + case CDI_DATATYPE_UINT8: varptr->missval = UCHAR_MAX; break; + case CDI_DATATYPE_INT16: varptr->missval = -SHRT_MAX; break; + case CDI_DATATYPE_UINT16: varptr->missval = USHRT_MAX; break; + case CDI_DATATYPE_INT32: varptr->missval = -INT_MAX; break; + case CDI_DATATYPE_UINT32: varptr->missval = UINT_MAX; break; + case CDI_DATATYPE_FLT32: varptr->missval = (float) CDI_Default_Missval; break; + } + // clang-format on + } + else + { + // clang-format off + switch (datatype) + { + case CDI_DATATYPE_INT8: varptr->missval = check_range(missval, -SCHAR_MAX, SCHAR_MAX) ? missval : -SCHAR_MAX; break; + case CDI_DATATYPE_UINT8: varptr->missval = check_range(missval, 0, UCHAR_MAX) ? missval : UCHAR_MAX; break; + case CDI_DATATYPE_INT16: varptr->missval = check_range(missval, -SHRT_MAX, SHRT_MAX) ? missval : -SHRT_MAX; break; + case CDI_DATATYPE_UINT16: varptr->missval = check_range(missval, 0, USHRT_MAX) ? missval : USHRT_MAX; break; + case CDI_DATATYPE_INT32: varptr->missval = check_range(missval, -INT_MAX, INT_MAX) ? missval : -INT_MAX; break; + case CDI_DATATYPE_UINT32: varptr->missval = check_range(missval, 0, UINT_MAX) ? missval : UINT_MAX; break; + case CDI_DATATYPE_FLT32: varptr->missval = check_range(missval, -FLT_MAX, FLT_MAX) ? missval : CDI_Default_Missval; break; + } + // clang-format on + } + } + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +void +vlistDefVarInstitut(int vlistID, int varID, int instID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + if (varptr->instID != instID) + { + varptr->instID = instID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqVarInstitut(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->instID; +} + +void +vlistDefVarModel(int vlistID, int varID, int modelID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + if (varptr->modelID != modelID) + { + varptr->modelID = modelID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqVarModel(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->modelID; +} + +void +vlistDefVarTable(int vlistID, int varID, int tableID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varptr->tableID != tableID) + { + varptr->tableID = tableID; + int tablenum = tableInqNum(tableID); + int pnum, pcat, pdis; + cdiDecodeParam(varptr->param, &pnum, &pcat, &pdis); + varptr->param = cdiEncodeParam(pnum, tablenum, pdis); + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqVarTable(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->tableID; +} + +/* +@Function vlistDefVarName +@Title Define the name of a Variable + +@Prototype void vlistDefVarName(int vlistID, int varID, const char *name) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item varID Variable identifier. + @Item name Name of the variable. + +@Description +The function @func{vlistDefVarName} defines the name of a variable. + +@EndFunction +*/ +void +vlistDefVarName(int vlistID, int varID, const char *name) +{ + (void) cdiDefKeyString(vlistID, varID, CDI_KEY_NAME, name); +} + +/* +@Function vlistDefVarLongname +@Title Define the long name of a Variable + +@Prototype void vlistDefVarLongname(int vlistID, int varID, const char *longname) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item varID Variable identifier. + @Item longname Long name of the variable. + +@Description +The function @func{vlistDefVarLongname} defines the long name of a variable. + +@EndFunction +*/ +void +vlistDefVarLongname(int vlistID, int varID, const char *longname) +{ + if (longname) (void) cdiDefKeyString(vlistID, varID, CDI_KEY_LONGNAME, longname); +} + +/* +@Function vlistDefVarStdname +@Title Define the standard name of a Variable + +@Prototype void vlistDefVarStdname(int vlistID, int varID, const char *stdname) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item varID Variable identifier. + @Item stdname Standard name of the variable. + +@Description +The function @func{vlistDefVarStdname} defines the standard name of a variable. + +@EndFunction +*/ +void +vlistDefVarStdname(int vlistID, int varID, const char *stdname) +{ + if (stdname) (void) cdiDefKeyString(vlistID, varID, CDI_KEY_STDNAME, stdname); +} + +/* +@Function vlistDefVarUnits +@Title Define the units of a Variable + +@Prototype void vlistDefVarUnits(int vlistID, int varID, const char *units) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item varID Variable identifier. + @Item units Units of the variable. + +@Description +The function @func{vlistDefVarUnits} defines the units of a variable. + +@EndFunction +*/ +void +vlistDefVarUnits(int vlistID, int varID, const char *units) +{ + if (units) (void) cdiDefKeyString(vlistID, varID, CDI_KEY_UNITS, units); +} + +/* +@Function vlistInqVarMissval +@Title Get the missing value of a Variable + +@Prototype double vlistInqVarMissval(int vlistID, int varID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + +@Description +The function @func{vlistInqVarMissval} returns the missing value of a variable. + +@Result +@func{vlistInqVarMissval} returns the missing value of the variable. + +@EndFunction +*/ +double +vlistInqVarMissval(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->missval; +} + +/* +@Function vlistDefVarMissval +@Title Define the missing value of a Variable + +@Prototype void vlistDefVarMissval(int vlistID, int varID, double missval) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate}. + @Item varID Variable identifier. + @Item missval Missing value. + +@Description +The function @func{vlistDefVarMissval} defines the missing value of a variable. + +@EndFunction +*/ +void +vlistDefVarMissval(int vlistID, int varID, double missval) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + varptr->missval = missval; + varptr->missvalused = true; +} + +int +vlistInqVarValidrange(int vlistID, int varID, double *validrange) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (validrange != NULL && varptr->lvalidrange) + { + validrange[0] = varptr->validrange[0]; + validrange[1] = varptr->validrange[1]; + } + + return (int) varptr->lvalidrange; +} + +void +vlistDefVarValidrange(int vlistID, int varID, const double *validrange) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + varptr->validrange[0] = validrange[0]; + varptr->validrange[1] = validrange[1]; + varptr->lvalidrange = true; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +} + +void +vlistDefVarTimetype(int vlistID, int varID, int timetype) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + if (varptr->timetype != timetype) + { + varptr->timetype = timetype; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqVarTimetype(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->timetype; +} + +void +vlistDefVarTsteptype(int vlistID, int varID, int tsteptype) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + if (varptr->tsteptype != tsteptype) + { + varptr->tsteptype = tsteptype; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +/* +@Function vlistInqVarTsteptype +@Title Get the timestep type of a Variable + +@Prototype int vlistInqVarTsteptype(int vlistID, int varID) +@Parameter + @Item vlistID Variable list ID, from a previous call to @fref{vlistCreate} or @fref{streamInqVlist}. + @Item varID Variable identifier. + +@Description +The function @func{vlistInqVarTsteptype} returns the timestep type of a Variable. + +@Result +@func{vlistInqVarTsteptype} returns the timestep type of the Variable, +one of the set of predefined CDI timestep types. +The valid CDI timestep types are @func{TSTEP_INSTANT}, +@func{TSTEP_ACCUM}, @func{TSTEP_AVG}, @func{TSTEP_MAX}, @func{TSTEP_MIN} and @func{TSTEP_SD}. + +@EndFunction +*/ +int +vlistInqVarTsteptype(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->tsteptype; +} + +int +vlistInqVarMissvalUsed(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return (int) varptr->missvalused; +} + +void +vlistDefFlag(int vlistID, int varID, int levID, int flag) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + var_t *varptr = vlistptr_get_varptr(__func__, vlistptr, varID); + + levinfo_t li = DEFAULT_LEVINFO(levID); + if (varptr->levinfo) + ; + else if (flag != li.flag) + cdiVlistCreateVarLevInfo(vlistptr, varID); + else + return; + + varptr->levinfo[levID].flag = flag; + varptr->flag = 0; + + int nlevs = zaxisInqSize(varptr->zaxisID); + for (int levelID = 0; levelID < nlevs; ++levelID) + { + if (varptr->levinfo[levelID].flag) + { + varptr->flag = 1; + break; + } + } + + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +} + +int +vlistInqFlag(int vlistID, int varID, int levID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varptr->levinfo) + return varptr->levinfo[levID].flag; + else + { + levinfo_t li = DEFAULT_LEVINFO(levID); + return li.flag; + } +} + +int +vlistFindVar(int vlistID, int fvarID) +{ + int varID; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + for (varID = 0; varID < vlistptr->nvars; ++varID) + { + if (vlistptr->vars[varID].fvarID == fvarID) break; + } + + if (varID == vlistptr->nvars) + { + varID = -1; + Warning("varID not found for fvarID %d in vlistID %d!", fvarID, vlistID); + } + + return varID; +} + +int +vlistFindLevel(int vlistID, int fvarID, int flevelID) +{ + int levelID = -1; + int varID = vlistFindVar(vlistID, fvarID); + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varID != -1) + { + int nlevs = zaxisInqSize(varptr->zaxisID); + for (levelID = 0; levelID < nlevs; ++levelID) + { + if (varptr->levinfo[levelID].flevelID == flevelID) break; + } + + if (levelID == nlevs) + { + levelID = -1; + Warning("levelID not found for fvarID %d and levelID %d in vlistID %d!", fvarID, flevelID, vlistID); + } + } + + return levelID; +} + +int +vlistMergedVar(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->mvarID; +} + +int +vlistMergedLevel(int vlistID, int varID, int levelID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varptr->levinfo) + return varptr->levinfo[levelID].mlevelID; + else + { + levinfo_t li = DEFAULT_LEVINFO(levelID); + return li.mlevelID; + } +} + +void +vlistDefIndex(int vlistID, int varID, int levelID, int index) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + var_t *varptr = vlistptr_get_varptr(__func__, vlistptr, varID); + + levinfo_t li = DEFAULT_LEVINFO(levelID); + if (varptr->levinfo) + ; + else if (index != li.index) + cdiVlistCreateVarLevInfo(vlistptr, varID); + else + return; + + varptr->levinfo[levelID].index = index; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +} + +int +vlistInqIndex(int vlistID, int varID, int levelID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varptr->levinfo) + return varptr->levinfo[levelID].index; + else + { + levinfo_t li = DEFAULT_LEVINFO(levelID); + return li.index; + } +} + +void +vlistChangeVarZaxis(int vlistID, int varID, int zaxisID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + var_t *varptr = vlistptr_get_varptr(__func__, vlistptr, varID); + + int nlevs1 = zaxisInqSize(varptr->zaxisID); + int nlevs2 = zaxisInqSize(zaxisID); + + if (nlevs1 != nlevs2) Error("Number of levels must not change!"); + + int nvars = vlistptr->nvars; + int found = 0; + int oldZaxisID = varptr->zaxisID; + for (int i = 0; i < varID; ++i) found |= (vlistptr->vars[i].zaxisID == oldZaxisID); + for (int i = varID + 1; i < nvars; ++i) found |= (vlistptr->vars[i].zaxisID == oldZaxisID); + + if (found) + { + int nzaxis = vlistptr->nzaxis; + for (int i = 0; i < nzaxis; ++i) + if (vlistptr->zaxisIDs[i] == oldZaxisID) vlistptr->zaxisIDs[i] = zaxisID; + } + else + vlistAdd2ZaxisIDs(vlistptr, zaxisID); + + varptr->zaxisID = zaxisID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +} + +void +vlistChangeVarGrid(int vlistID, int varID, int gridID) +{ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + var_t *varptr = vlistptr_get_varptr(__func__, vlistptr, varID); + + int nvars = vlistptr->nvars; + int index; + for (index = 0; index < nvars; index++) + if (index != varID) + if (vlistptr->vars[index].gridID == vlistptr->vars[varID].gridID) break; + + if (index == nvars) + { + for (index = 0; index < vlistptr->ngrids; index++) + if (vlistptr->gridIDs[index] == vlistptr->vars[varID].gridID) vlistptr->gridIDs[index] = gridID; + } + else + vlistAdd2GridIDs(vlistptr, gridID); + + varptr->gridID = gridID; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +} + +void +vlistDefVarCompType(int vlistID, int varID, int comptype) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varptr->comptype != comptype) + { + varptr->comptype = comptype; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqVarCompType(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->comptype; +} + +void +vlistDefVarCompLevel(int vlistID, int varID, int complevel) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (varptr->complevel != complevel) + { + varptr->complevel = complevel; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqVarCompLevel(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->complevel; +} + +void +vlistDefVarNSB(int vlistID, int varID, int nsb) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + if (varptr->nsb != nsb) + { + varptr->nsb = nsb; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); + } +} + +int +vlistInqVarNSB(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return varptr->nsb; +} + +static int +vlistEncodeXyz(const int dimorder[3]) +{ + return (short) (dimorder[0] * 100 + dimorder[1] * 10 + dimorder[2]); +} + +static void +vlistDecodeXyz(int xyz, int outDimorder[3]) +{ + outDimorder[0] = xyz / 100, xyz = xyz % 100; + outDimorder[1] = xyz / 10; + outDimorder[2] = xyz % 10; +} + +static const short xyzStorVals[] = { 123, 132, 213, 231, 312, 321 }; +enum +{ + numXYZStorVals = sizeof(xyzStorVals) / sizeof(xyzStorVals[0]) +}; + +void +vlistDefVarXYZ(int vlistID, int varID, int xyz) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + + if (xyz == 3) xyz = 321; + + // check xyz dimension order + { + int dimorder[3]; + vlistDecodeXyz(xyz, dimorder); + int dimx = 0, dimy = 0, dimz = 0; + for (int id = 0; id < 3; ++id) + { + switch (dimorder[id]) + { + case 1: dimx++; break; + case 2: dimy++; break; + case 3: dimz++; break; + default: dimorder[id] = 0; break; // Ensure that we assign a valid dimension to this position. + } + } + if (dimz > 1 || dimy > 1 || dimx > 1) + xyz = 321; // ZYX + else + { + // clang-format off + if (dimz == 0) for (int id = 0; id < 3; ++id) if (dimorder[id] == 0) { dimorder[id] = 3; break; } + if (dimy == 0) for (int id = 0; id < 3; ++id) if (dimorder[id] == 0) { dimorder[id] = 2; break; } + if (dimx == 0) for (int id = 0; id < 3; ++id) if (dimorder[id] == 0) { dimorder[id] = 1; break; } + // clang-format on + xyz = vlistEncodeXyz(dimorder); + } + } + + assert(xyz == 123 || xyz == 312 || xyz == 231 || xyz == 321 || xyz == 132 || xyz == 213); + + for (size_t i = 0; i < numXYZStorVals; ++i) + if (xyz == xyzStorVals[i]) + { + xyz = (int) i; + break; + } + varptr->xyz = (signed char) xyz; + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +} + +void +vlistInqVarDimorder(int vlistID, int varID, int outDimorder[3]) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + vlistDecodeXyz(xyzStorVals[varptr->xyz], outDimorder); +} + +int +vlistInqVarXYZ(int vlistID, int varID) +{ + var_t *varptr = vlistptr_get_varptr(__func__, vlist_to_pointer(vlistID), varID); + return xyzStorVals[varptr->xyz]; +} + +int +vlistVarCompare(vlist_t *a, int varIDA, vlist_t *b, int varIDB) +{ + xassert(a && b && varIDA >= 0 && varIDA < a->nvars && varIDB >= 0 && varIDB < b->nvars); + var_t *pva = a->vars + varIDA, *pvb = b->vars + varIDB; +#define FCMP(f) ((pva->f) != (pvb->f)) +#define FCMPFLT(f) (IS_NOT_EQUAL((pva->f), (pvb->f))) +#define FCMPSTR(fs) ((pva->fs) != (pvb->fs) && strcmp((pva->fs), (pvb->fs))) +#define FCMP2(f) (namespaceResHDecode(pva->f).idx != namespaceResHDecode(pvb->f).idx) + int diff = (int) FCMP(fvarID) | FCMP(mvarID) | FCMP(flag) | FCMP(param) | FCMP(datatype) | FCMP(timetype) | FCMP(tsteptype) + | FCMP(xyz) | FCMP2(gridID) | FCMP2(zaxisID) | FCMP2(instID) | FCMP2(modelID) | FCMP2(tableID) | FCMP(missvalused) + | FCMPFLT(missval) | FCMP(comptype) | FCMP(complevel) | FCMP(lvalidrange) | FCMPFLT(validrange[0]) + | FCMPFLT(validrange[1]); +#undef FCMP +#undef FCMPFLT +#undef FCMPSTR +#undef FCMP2 + if ((diff |= ((pva->levinfo == NULL) ^ (pvb->levinfo == NULL)))) return 1; + + if (pva->levinfo) + { + int zaxisID = pva->zaxisID; + size_t nlevs = (size_t) zaxisInqSize(zaxisID); + diff |= (memcmp(pva->levinfo, pvb->levinfo, sizeof(levinfo_t) * nlevs) != 0); + if (diff) return 1; + } + + size_t natts = a->vars[varIDA].atts.nelems; + if (natts != b->vars[varIDB].atts.nelems) return 1; + for (size_t attID = 0; attID < natts; ++attID) diff |= cdi_att_compare(&a->vars[varIDA].atts, &b->vars[varIDB].atts, (int) attID); + + size_t nkeys = a->vars[varIDA].keys.nelems; + if (nkeys != b->vars[varIDB].keys.nelems) return 1; + for (size_t keyID = 0; keyID < nkeys; ++keyID) diff |= cdi_key_compare(&a->vars[varIDA].keys, &b->vars[varIDB].keys, (int) keyID); + + return diff; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ + +enum +{ + VLISTVAR_PACK_INT_IDX_FLAG, + VLISTVAR_PACK_INT_IDX_GRIDID, + VLISTVAR_PACK_INT_IDX_ZAXISID, + VLISTVAR_PACK_INT_IDX_TIMETYPE, + VLISTVAR_PACK_INT_IDX_DATATYPE, + VLISTVAR_PACK_INT_IDX_PARAM, + VLISTVAR_PACK_INT_IDX_INSTID, + VLISTVAR_PACK_INT_IDX_MODELID, + VLISTVAR_PACK_INT_IDX_TABLEID, + VLISTVAR_PACK_INT_IDX_MISSVALUSED, + VLISTVAR_PACK_INT_IDX_COMPTYPE, + VLISTVAR_PACK_INT_IDX_COMPLEVEL, + VLISTVAR_PACK_INT_IDX_NLEVS, + vlistvarNint +}; + +enum +{ + VLIST_VAR_PACK_DBL_MISSVAL, + vlistvar_ndbls, +}; + +int +vlistVarGetPackSize(vlist_t *p, int varID, void *context) +{ + var_t *var = p->vars + varID; + int varsize + = serializeGetSize(vlistvarNint, CDI_DATATYPE_INT, context) + serializeGetSize(vlistvar_ndbls, CDI_DATATYPE_FLT64, context); + + if (var->levinfo) varsize += serializeGetSize(4 * zaxisInqSize(var->zaxisID), CDI_DATATYPE_INT, context); + varsize += serializeKeysGetPackSize(&var->keys, context); + varsize += cdiAttsGetSize(p, varID, context); + + return varsize; +} + +void +vlistVarPack(vlist_t *p, int varID, char *buf, int size, int *position, void *context) +{ + var_t *var = p->vars + varID; + int nlevs; + { + int tempbuf[vlistvarNint]; + tempbuf[VLISTVAR_PACK_INT_IDX_FLAG] = var->flag; + tempbuf[VLISTVAR_PACK_INT_IDX_GRIDID] = var->gridID; + tempbuf[VLISTVAR_PACK_INT_IDX_ZAXISID] = var->zaxisID; + tempbuf[VLISTVAR_PACK_INT_IDX_TIMETYPE] = var->timetype; + tempbuf[VLISTVAR_PACK_INT_IDX_DATATYPE] = var->datatype; + tempbuf[VLISTVAR_PACK_INT_IDX_PARAM] = var->param; + tempbuf[VLISTVAR_PACK_INT_IDX_INSTID] = var->instID; + tempbuf[VLISTVAR_PACK_INT_IDX_MODELID] = var->modelID; + tempbuf[VLISTVAR_PACK_INT_IDX_TABLEID] = var->tableID; + tempbuf[VLISTVAR_PACK_INT_IDX_MISSVALUSED] = (int) var->missvalused; + tempbuf[VLISTVAR_PACK_INT_IDX_COMPTYPE] = var->comptype; + tempbuf[VLISTVAR_PACK_INT_IDX_COMPLEVEL] = var->complevel; + nlevs = var->levinfo ? zaxisInqSize(var->zaxisID) : 0; + tempbuf[VLISTVAR_PACK_INT_IDX_NLEVS] = nlevs; + serializePack(tempbuf, vlistvarNint, CDI_DATATYPE_INT, buf, size, position, context); + } + { + double dtempbuf[vlistvar_ndbls]; + dtempbuf[VLIST_VAR_PACK_DBL_MISSVAL] = var->missval; + serializePack(dtempbuf, vlistvar_ndbls, CDI_DATATYPE_FLT64, buf, size, position, context); + } + if (nlevs) + { + int *levbuf = (int *) malloc(nlevs * sizeof(int)); + for (int levID = 0; levID < nlevs; ++levID) levbuf[levID] = var->levinfo[levID].flag; + serializePack(levbuf, nlevs, CDI_DATATYPE_INT, buf, size, position, context); + for (int levID = 0; levID < nlevs; ++levID) levbuf[levID] = var->levinfo[levID].index; + serializePack(levbuf, nlevs, CDI_DATATYPE_INT, buf, size, position, context); + for (int levID = 0; levID < nlevs; ++levID) levbuf[levID] = var->levinfo[levID].mlevelID; + serializePack(levbuf, nlevs, CDI_DATATYPE_INT, buf, size, position, context); + for (int levID = 0; levID < nlevs; ++levID) levbuf[levID] = var->levinfo[levID].flevelID; + free(levbuf); + } + + serializeKeysPack(&var->keys, buf, size, position, context); + + cdiAttsPack(p, varID, buf, size, position, context); +} + +void +vlistVarUnpack(int vlistID, char *buf, int size, int *position, int originNamespace, void *context) +{ +#define adaptKey(key) (namespaceAdaptKey((key), originNamespace)) + double dtempbuf[vlistvar_ndbls]; + int tempbuf[vlistvarNint]; + vlist_t *vlistptr = vlist_to_pointer(vlistID); + serializeUnpack(buf, size, position, tempbuf, vlistvarNint, CDI_DATATYPE_INT, context); + serializeUnpack(buf, size, position, dtempbuf, vlistvar_ndbls, CDI_DATATYPE_FLT64, context); + + /* ------------------------------------------- */ + /* NOTE: Tile sets currently not supported!!! */ + /* ------------------------------------------- */ + + int newvar = vlistDefVar(vlistID, adaptKey(tempbuf[VLISTVAR_PACK_INT_IDX_GRIDID]), + adaptKey(tempbuf[VLISTVAR_PACK_INT_IDX_ZAXISID]), tempbuf[VLISTVAR_PACK_INT_IDX_TIMETYPE]); + vlistDefVarDatatype(vlistID, newvar, tempbuf[VLISTVAR_PACK_INT_IDX_DATATYPE]); + vlistDefVarInstitut(vlistID, newvar, adaptKey(tempbuf[VLISTVAR_PACK_INT_IDX_INSTID])); + vlistDefVarModel(vlistID, newvar, adaptKey(tempbuf[VLISTVAR_PACK_INT_IDX_MODELID])); + vlistDefVarTable(vlistID, newvar, tempbuf[VLISTVAR_PACK_INT_IDX_TABLEID]); + // FIXME: changing the table might change the param code + vlistDefVarParam(vlistID, newvar, tempbuf[VLISTVAR_PACK_INT_IDX_PARAM]); + if (tempbuf[VLISTVAR_PACK_INT_IDX_MISSVALUSED]) vlistDefVarMissval(vlistID, newvar, dtempbuf[VLIST_VAR_PACK_DBL_MISSVAL]); + vlistDefVarCompType(vlistID, newvar, tempbuf[VLISTVAR_PACK_INT_IDX_COMPTYPE]); + vlistDefVarCompLevel(vlistID, newvar, tempbuf[VLISTVAR_PACK_INT_IDX_COMPLEVEL]); + const int nlevs = tempbuf[VLISTVAR_PACK_INT_IDX_NLEVS]; + var_t *var = vlistptr->vars + newvar; + if (nlevs) + { + int i, flagSetLev = 0; + cdiVlistCreateVarLevInfo(vlistptr, newvar); + + int *levbuf = (int *) malloc(nlevs * sizeof(int)); + serializeUnpack(buf, size, position, levbuf, nlevs, CDI_DATATYPE_INT, context); + for (i = 0; i < nlevs; ++i) vlistDefFlag(vlistID, newvar, i, levbuf[i]); + for (i = 0; i < nlevs; ++i) + if (levbuf[i] == tempbuf[0]) flagSetLev = i; + vlistDefFlag(vlistID, newvar, flagSetLev, levbuf[flagSetLev]); + serializeUnpack(buf, size, position, levbuf, nlevs, CDI_DATATYPE_INT, context); + for (i = 0; i < nlevs; ++i) vlistDefIndex(vlistID, newvar, i, levbuf[i]); + serializeUnpack(buf, size, position, levbuf, nlevs, CDI_DATATYPE_INT, context); + for (i = 0; i < nlevs; ++i) var->levinfo[i].mlevelID = levbuf[i]; + serializeUnpack(buf, size, position, levbuf, nlevs, CDI_DATATYPE_INT, context); + for (i = 0; i < nlevs; ++i) var->levinfo[i].flevelID = levbuf[i]; + free(levbuf); + } + + serializeKeysUnpack(buf, size, position, &var->keys, context); + + cdiAttsUnpack(vlistID, newvar, buf, size, position, context); +#undef adaptKey +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#ifdef HAVE_CONFIG_H +#endif + + +/* vlistDefVarIntKey: Set an arbitrary keyword/integer value pair for GRIB API */ +void +vlistDefVarIntKey(int vlistID, int varID, const char *name, int value) +{ +#ifdef HAVE_LIBGRIB_API + vlist_t *vlistptr = vlist_to_pointer(vlistID); + if (vlistptr == NULL) Error("Internal error!"); + int idx; + + if (vlistptr->immutable) + Error("vlistDefVarIntKey() was called on an immutable vlist object (vlistID = %d)\n" + "Either call vlistDefVarIntKey() before passing the vlist object to streamDefVlist(),\n" + "or use the stream-internal vlist by calling streamInqVlist().", + vlistID); + + for (idx = 0; idx < vlistptr->vars[varID].opt_grib_nentries; idx++) + if (str_is_equal(name, vlistptr->vars[varID].opt_grib_kvpair[idx].keyword) + && (vlistptr->vars[varID].opt_grib_kvpair[idx].data_type == t_int)) + break; + + if (idx < vlistptr->vars[varID].opt_grib_nentries) + { + vlistptr->vars[varID].opt_grib_kvpair[idx].int_val = value; + vlistptr->vars[varID].opt_grib_kvpair[idx].update = true; + } + else + { + resize_opt_grib_entries(&vlistptr->vars[varID], vlistptr->vars[varID].opt_grib_nentries + 1); + vlistptr->vars[varID].opt_grib_nentries += 1; + idx = vlistptr->vars[varID].opt_grib_nentries - 1; + vlistptr->vars[varID].opt_grib_kvpair[idx].data_type = t_int; + vlistptr->vars[varID].opt_grib_kvpair[idx].int_val = value; + vlistptr->vars[varID].opt_grib_kvpair[idx].update = true; + if (name) + vlistptr->vars[varID].opt_grib_kvpair[idx].keyword = strdupx(name); + else + Error("Internal error, name undefined!"); + } + + if (CDI_Debug) + { + Message("define additional GRIB2 key \"%s\" (integer): %d", name, value); + Message("total list of registered, additional GRIB2 keys (total: %d):", vlistptr->vars[varID].opt_grib_nentries); + for (idx = 0; idx < vlistptr->vars[varID].opt_grib_nentries; idx++) + if (vlistptr->vars[varID].opt_grib_kvpair[idx].data_type == t_int) + Message("%s -> integer %d", vlistptr->vars[varID].opt_grib_kvpair[idx].keyword, + vlistptr->vars[varID].opt_grib_kvpair[idx].int_val); + else if (vlistptr->vars[varID].opt_grib_kvpair[idx].data_type == t_double) + Message("%s -> double %d", vlistptr->vars[varID].opt_grib_kvpair[idx].keyword, + vlistptr->vars[varID].opt_grib_kvpair[idx].dbl_val); + else + Message("%s -> unknown", vlistptr->vars[varID].opt_grib_kvpair[idx].keyword); + } + + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +#else + (void) vlistID; + (void) varID; + (void) name; + (void) value; +#endif +} + +/* vlistDefVarDblKey: Set an arbitrary keyword/double value pair for GRIB API */ +void +vlistDefVarDblKey(int vlistID, int varID, const char *name, double value) +{ +#ifdef HAVE_LIBGRIB_API + vlist_t *vlistptr = vlist_to_pointer(vlistID); + if (vlistptr == NULL) Error("Internal error!"); + int idx; + + if (vlistptr->immutable) + Error("vlistDefVarDblKey() was called on an immutable vlist object (vlistID = %d)\n" + "Either call vlistDefVarIntKey() before passing the vlist object to streamDefVlist(),\n" + "or use the stream-internal vlist by calling streamInqVlist().", + vlistID); + + for (idx = 0; idx < vlistptr->vars[varID].opt_grib_nentries; idx++) + if (str_is_equal(name, vlistptr->vars[varID].opt_grib_kvpair[idx].keyword) + && (vlistptr->vars[varID].opt_grib_kvpair[idx].data_type == t_double)) + break; + + if (idx < vlistptr->vars[varID].opt_grib_nentries) + { + vlistptr->vars[varID].opt_grib_kvpair[idx].dbl_val = value; + vlistptr->vars[varID].opt_grib_kvpair[idx].update = true; + } + else + { + resize_opt_grib_entries(&vlistptr->vars[varID], vlistptr->vars[varID].opt_grib_nentries + 1); + vlistptr->vars[varID].opt_grib_nentries += 1; + idx = vlistptr->vars[varID].opt_grib_nentries - 1; + vlistptr->vars[varID].opt_grib_kvpair[idx].data_type = t_double; + vlistptr->vars[varID].opt_grib_kvpair[idx].dbl_val = value; + vlistptr->vars[varID].opt_grib_kvpair[idx].update = true; + if (name) + vlistptr->vars[varID].opt_grib_kvpair[idx].keyword = strdupx(name); + else + Error("Internal error, name undefined!"); + } + + if (CDI_Debug) + { + Message("define additional GRIB2 key \"%s\" (double): %d", name, value); + Message("total list of registered, additional GRIB2 keys (total: %d):", vlistptr->vars[varID].opt_grib_nentries); + for (idx = 0; idx < vlistptr->vars[varID].opt_grib_nentries; idx++) + if (vlistptr->vars[varID].opt_grib_kvpair[idx].data_type == t_int) + Message("%s -> integer %d", vlistptr->vars[varID].opt_grib_kvpair[idx].keyword, + vlistptr->vars[varID].opt_grib_kvpair[idx].int_val); + else if (vlistptr->vars[varID].opt_grib_kvpair[idx].data_type == t_double) + Message("%s -> double %d", vlistptr->vars[varID].opt_grib_kvpair[idx].keyword, + vlistptr->vars[varID].opt_grib_kvpair[idx].dbl_val); + else + Message("%s -> unknown", vlistptr->vars[varID].opt_grib_kvpair[idx].keyword); + } + + reshSetStatus(vlistID, &vlistOps, RESH_DESYNC_IN_USE); +#else + (void) vlistID; + (void) varID; + (void) name; + (void) value; +#endif +} + +/* cdiClearAdditionalKeys: Clears the list of additional GRIB keys. */ +void +cdiClearAdditionalKeys() +{ +#ifdef HAVE_LIBGRIB_API + for (int i = 0; i < cdiNAdditionalGRIBKeys; ++i) free(cdiAdditionalGRIBKeys[i]); + cdiNAdditionalGRIBKeys = 0; +#endif +} + +/* cdiDefAdditionalKey: Register an additional GRIB key which is read when file is opened. */ +void +cdiDefAdditionalKey(const char *name) +{ +#ifdef HAVE_LIBGRIB_API + int idx = cdiNAdditionalGRIBKeys; + cdiNAdditionalGRIBKeys++; + if (idx >= MAX_OPT_GRIB_ENTRIES) Error("Too many additional keywords!"); + if (name) + cdiAdditionalGRIBKeys[idx] = strdupx(name); + else + Error("Internal error!"); +#else + (void) name; +#endif +} + +/* vlistHasVarKey: returns 1 if meta-data key was read, 0 otherwise. */ +int +vlistHasVarKey(int vlistID, int varID, const char *name) +{ +#ifdef HAVE_LIBGRIB_API + /* check if the GRIB key was previously read and is stored */ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + for (int i = 0; i < vlistptr->vars[varID].opt_grib_nentries; ++i) + { + if (str_is_equal(name, vlistptr->vars[varID].opt_grib_kvpair[i].keyword)) return 1; + } +#else + (void) vlistID; + (void) varID; + (void) name; +#endif + return 0; +} + +/* vlistInqVarDblKey: raw access to GRIB meta-data */ +double +vlistInqVarDblKey(int vlistID, int varID, const char *name) +{ + double value = 0; +#ifdef HAVE_LIBGRIB_API + /* check if the GRIB key was previously read and is stored in "opt_grib_dbl_val" */ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + for (int i = 0; i < vlistptr->vars[varID].opt_grib_nentries; ++i) + { + int isub = subtypeInqActiveIndex(vlistptr->vars[varID].subtypeID); + if (str_is_equal(name, vlistptr->vars[varID].opt_grib_kvpair[i].keyword) + && (vlistptr->vars[varID].opt_grib_kvpair[i].data_type == t_double) + && (vlistptr->vars[varID].opt_grib_kvpair[i].subtype_index == isub)) + return vlistptr->vars[varID].opt_grib_kvpair[i].dbl_val; + } +#else + (void) vlistID; + (void) varID; + (void) name; +#endif + return value; +} + +/* vlistInqVarIntKey: raw access to GRIB meta-data */ +int +vlistInqVarIntKey(int vlistID, int varID, const char *name) +{ + long value = 0; +#ifdef HAVE_LIBGRIB_API + /* check if the GRIB key was previously read and is stored in "opt_grib_int_val" */ + vlist_t *vlistptr = vlist_to_pointer(vlistID); + + for (int i = 0; i < vlistptr->vars[varID].opt_grib_nentries; ++i) + { + int isub = subtypeInqActiveIndex(vlistptr->vars[varID].subtypeID); + if (str_is_equal(name, vlistptr->vars[varID].opt_grib_kvpair[i].keyword) + && (vlistptr->vars[varID].opt_grib_kvpair[i].data_type == t_int) + && (vlistptr->vars[varID].opt_grib_kvpair[i].subtype_index == isub)) + return vlistptr->vars[varID].opt_grib_kvpair[i].int_val; + } + +#else + (void) vlistID; + (void) varID; + (void) name; +#endif + return (int) value; +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +#include <string.h> +#include <math.h> +#include <float.h> + + + +#define LevelUp 1 +#define LevelDown 2 + +// clang-format off +static const struct +{ + unsigned char positive; // 1: up; 2: down + const char *name; + const char *longname; + const char *stdname; + const char *units; +} +ZaxistypeEntry[] = { + { /* 0 */ 0, "sfc", "surface", "", ""}, + { /* 1 */ 0, "lev", "generic", "", ""}, + { /* 2 */ 2, "lev", "hybrid", "", "level"}, + { /* 3 */ 2, "lev", "hybrid_half", "", "level"}, + { /* 4 */ 2, "plev", "pressure", "air_pressure", "Pa"}, + { /* 5 */ 1, "height", "height", "height", "m"}, + { /* 6 */ 2, "depth", "depth_below_sea", "depth", "m"}, + { /* 7 */ 2, "depth", "depth_below_land", "", "cm"}, + { /* 8 */ 0, "lev", "isentropic", "", "K"}, + { /* 9 */ 0, "lev", "trajectory", "", ""}, + { /* 10 */ 1, "alt", "height above mean sea level", "altitude", "m"}, + { /* 11 */ 0, "lev", "sigma", "", "level"}, + { /* 12 */ 0, "lev", "meansea", "", "level"}, + { /* 13 */ 0, "toa", "top_of_atmosphere", "", ""}, + { /* 14 */ 0, "seabottom", "sea_bottom", "", ""}, + { /* 15 */ 0, "atmosphere", "atmosphere", "", ""}, + { /* 16 */ 0, "cloudbase", "cloud_base", "", ""}, + { /* 17 */ 0, "cloudtop", "cloud_top", "", ""}, + { /* 18 */ 0, "isotherm0", "isotherm_zero", "", ""}, + { /* 19 */ 0, "snow", "snow", "", ""}, + { /* 20 */ 0, "lakebottom", "lake_bottom", "", ""}, + { /* 21 */ 0, "sedimentbottom", "sediment_bottom", "", ""}, + { /* 22 */ 0, "sedimentbottomta", "sediment_bottom_ta", "", ""}, + { /* 23 */ 0, "sedimentbottomtw", "sediment_bottom_tw", "", ""}, + { /* 24 */ 0, "mixlayer", "mix_layer", "", ""}, + { /* 25 */ 0, "height", "generalized_height", "height", ""}, + { /* 26 */ 0, "character", "area_type", "", ""}, + { /* 27 */ 0, "tropopause", "tropopause", "", ""}, +}; +// clang-format on + +enum +{ + CDI_NumZaxistype = sizeof(ZaxistypeEntry) / sizeof(ZaxistypeEntry[0]), +}; + +static int zaxisCompareP(zaxis_t *z1, zaxis_t *z2); +static void zaxisDestroyP(void *zaxisptr); +static void zaxisPrintP(void *zaxisptr, FILE *fp); +static int zaxisGetPackSize(void *zaxisptr, void *context); +static void zaxisPack(void *zaxisptr, void *buffer, int size, int *pos, void *context); +static int zaxisTxCode(void *zaxisptr); + +static const resOps zaxisOps + = { (int (*)(void *, void *)) zaxisCompareP, zaxisDestroyP, zaxisPrintP, zaxisGetPackSize, zaxisPack, zaxisTxCode }; + +const resOps * +getZaxisOps(void) +{ + return &zaxisOps; +} + +void +zaxisGetTypeDescription(int zaxisType, int *outPositive, const char **outName, const char **outLongName, const char **outStdName, + const char **outUnit) +{ + if (zaxisType < 0 || zaxisType >= CDI_NumZaxistype) + { + if (outPositive) *outPositive = 0; + if (outName) *outName = NULL; + if (outLongName) *outLongName = NULL; + if (outStdName) *outStdName = NULL; + if (outUnit) *outUnit = NULL; + } + else + { + if (outPositive) *outPositive = ZaxistypeEntry[zaxisType].positive; + if (outName) *outName = ZaxistypeEntry[zaxisType].name; + if (outLongName && zaxisType != ZAXIS_GENERIC) *outLongName = ZaxistypeEntry[zaxisType].longname; + if (outStdName) *outStdName = ZaxistypeEntry[zaxisType].stdname; + if (outUnit) *outUnit = ZaxistypeEntry[zaxisType].units; + } +} + +zaxis_t * +zaxis_to_pointer(int id) +{ + return (zaxis_t *) reshGetVal(id, &zaxisOps); +} + +static void +zaxis_init(zaxis_t *zaxisptr) +{ + zaxisptr->self = CDI_UNDEFID; + zaxisptr->vals = NULL; +#ifndef USE_MPI + zaxisptr->cvals = NULL; + zaxisptr->clength = 0; +#endif + zaxisptr->ubounds = NULL; + zaxisptr->lbounds = NULL; + zaxisptr->weights = NULL; + zaxisptr->type = CDI_UNDEFID; + zaxisptr->positive = 0; + zaxisptr->scalar = 0; + zaxisptr->direction = 0; + zaxisptr->size = 0; + zaxisptr->vctsize = 0; + zaxisptr->vct = NULL; + + cdiInitKeys(&zaxisptr->keys); + zaxisptr->atts.nalloc = MAX_ATTRIBUTES; + zaxisptr->atts.nelems = 0; + + cdiDefVarKeyInt(&zaxisptr->keys, CDI_KEY_DATATYPE, CDI_DATATYPE_FLT64); +} + +static zaxis_t * +zaxisNewEntry(int id) +{ + zaxis_t *zaxisptr = (zaxis_t *) Malloc(sizeof(zaxis_t)); + zaxis_init(zaxisptr); + + if (id == CDI_UNDEFID) + zaxisptr->self = reshPut(zaxisptr, &zaxisOps); + else + { + zaxisptr->self = id; + reshReplace(id, zaxisptr, &zaxisOps); + } + + return zaxisptr; +} + +static void +zaxisInit(void) +{ + static bool zaxisInitialized = false; + if (zaxisInitialized) return; + zaxisInitialized = true; +} + +static void +zaxis_copy(zaxis_t *zaxisptr2, zaxis_t *zaxisptr1) +{ + int zaxisID2 = zaxisptr2->self; + memcpy(zaxisptr2, zaxisptr1, sizeof(zaxis_t)); + zaxisptr2->self = zaxisID2; + cdiInitKeys(&zaxisptr2->keys); + cdiCopyVarKeys(&zaxisptr1->keys, &zaxisptr2->keys); +} + +unsigned +cdiZaxisCount(void) +{ + return reshCountType(&zaxisOps); +} + +static int +zaxisCreate_(int zaxistype, int size, int id) +{ + zaxis_t *zaxisptr = zaxisNewEntry(id); + + xassert(size >= 0); + zaxisptr->type = zaxistype; + zaxisptr->size = size; + + if (zaxistype >= CDI_NumZaxistype || zaxistype < 0) + Error("Internal problem! zaxistype=%d out of range (min=0/max=%d)!", zaxistype, CDI_NumZaxistype - 1); + + int zaxisID = zaxisptr->self; + cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, ZaxistypeEntry[zaxistype].name); + if (zaxistype != ZAXIS_GENERIC) zaxisDefLongname(zaxisID, ZaxistypeEntry[zaxistype].longname); + cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, ZaxistypeEntry[zaxistype].units); + + const char *stdname = ZaxistypeEntry[zaxistype].stdname; + if (*stdname) cdiDefVarKeyBytes(&zaxisptr->keys, CDI_KEY_STDNAME, (const unsigned char *) stdname, (int) strlen(stdname) + 1); + + zaxisptr->positive = ZaxistypeEntry[zaxistype].positive; + + return zaxisID; +} + +/* +@Function zaxisCreate +@Title Create a vertical Z-axis + +@Prototype int zaxisCreate(int zaxistype, int size) +@Parameter + @Item zaxistype The type of the Z-axis, one of the set of predefined CDI Z-axis types. + The valid CDI Z-axis types are @func{ZAXIS_GENERIC}, @func{ZAXIS_SURFACE}, + @func{ZAXIS_HYBRID}, @func{ZAXIS_SIGMA}, @func{ZAXIS_PRESSURE}, @func{ZAXIS_HEIGHT}, + @func{ZAXIS_ISENTROPIC}, @func{ZAXIS_ALTITUDE}, @func{ZAXIS_MEANSEA}, @func{ZAXIS_TOA}, + @func{ZAXIS_SEA_BOTTOM}, @func{ZAXIS_ATMOSPHERE}, @func{ZAXIS_CLOUD_BASE}, + @func{ZAXIS_CLOUD_TOP}, @func{ZAXIS_ISOTHERM_ZERO}, @func{ZAXIS_SNOW}, + @func{ZAXIS_LAKE_BOTTOM}, @func{ZAXIS_SEDIMENT_BOTTOM}, @func{ZAXIS_SEDIMENT_BOTTOM_TA}, + @func{ZAXIS_SEDIMENT_BOTTOM_TW}, @func{ZAXIS_MIX_LAYER}, + @func{ZAXIS_DEPTH_BELOW_SEA} and @func{ZAXIS_DEPTH_BELOW_LAND}. + @Item size Number of levels. + +@Description +The function @func{zaxisCreate} creates a vertical Z-axis. + +@Result +@func{zaxisCreate} returns an identifier to the Z-axis. + +@Example +Here is an example using @func{zaxisCreate} to create a pressure level Z-axis: + +@Source + ... +#define nlev 5 + ... +double levs[nlev] = {101300, 92500, 85000, 50000, 20000}; +int zaxisID; + ... +zaxisID = zaxisCreate(ZAXIS_PRESSURE, nlev); +zaxisDefLevels(zaxisID, levs); + ... +@EndSource +@EndFunction +*/ +int +zaxisCreate(int zaxistype, int size) +{ + if (CDI_Debug) Message("zaxistype: %d size: %d ", zaxistype, size); + + xassert(size); + zaxisInit(); + + return zaxisCreate_(zaxistype, size, CDI_UNDEFID); +} + +static void +zaxisDestroyKernel(zaxis_t *zaxisptr) +{ + xassert(zaxisptr); + + if (zaxisptr->vals) Free(zaxisptr->vals); +#ifndef USE_MPI + if (zaxisptr->cvals) + { + for (int i = 0; i < zaxisptr->size; i++) Free(zaxisptr->cvals[i]); + Free(zaxisptr->cvals); + } +#endif + if (zaxisptr->lbounds) Free(zaxisptr->lbounds); + if (zaxisptr->ubounds) Free(zaxisptr->ubounds); + if (zaxisptr->weights) Free(zaxisptr->weights); + if (zaxisptr->vct) Free(zaxisptr->vct); + + int zaxisID = zaxisptr->self; + cdiDeleteKeys(zaxisID, CDI_GLOBAL); + cdiDeleteAtts(zaxisID, CDI_GLOBAL); + + Free(zaxisptr); +} + +/* +@Function zaxisDestroy +@Title Destroy a vertical Z-axis + +@Prototype void zaxisDestroy(int zaxisID) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + +@EndFunction +*/ +void +zaxisDestroy(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + zaxisDestroyKernel(zaxisptr); + reshRemove(zaxisID, &zaxisOps); +} + +static void +zaxisDestroyP(void *zaxisptr) +{ + zaxisDestroyKernel((zaxis_t *) zaxisptr); +} + +const char * +zaxisNamePtr(int zaxistype) +{ + const char *name = (zaxistype >= 0 && zaxistype < CDI_NumZaxistype) ? ZaxistypeEntry[zaxistype].longname + : ZaxistypeEntry[ZAXIS_GENERIC].longname; + return name; +} + +void +zaxisName(int zaxistype, char *zaxisname) +{ + strcpy(zaxisname, zaxisNamePtr(zaxistype)); +} + +// obsolete function +void +zaxisDefLtype(int zaxisID, int ltype) +{ + static bool printInfo = true; + if (printInfo) printInfo = cdiObsoleteInfo(__func__, "cdiDefKeyInt"); + + (void) cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, ltype); +} + +/* +@Function zaxisDefName +@Title Define the name of a Z-axis + +@Prototype void zaxisDefName(int zaxisID, const char *name) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + @Item name Name of the Z-axis. + +@Description +The function @func{zaxisDefName} defines the name of a Z-axis. + +@EndFunction +*/ +void +zaxisDefName(int zaxisID, const char *name) +{ + (void) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, name); +} + +/* +@Function zaxisDefLongname +@Title Define the longname of a Z-axis + +@Prototype void zaxisDefLongname(int zaxisID, const char *longname) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + @Item longname Longname of the Z-axis. + +@Description +The function @func{zaxisDefLongname} defines the longname of a Z-axis. + +@EndFunction +*/ +void +zaxisDefLongname(int zaxisID, const char *longname) +{ + (void) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, longname); +} + +/* +@Function zaxisDefUnits +@Title Define the units of a Z-axis + +@Prototype void zaxisDefUnits(int zaxisID, const char *units) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + @Item units Units of the Z-axis. + +@Description +The function @func{zaxisDefUnits} defines the units of a Z-axis. + +@EndFunction +*/ +void +zaxisDefUnits(int zaxisID, const char *units) +{ + (void) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units); +} + +/* +@Function zaxisInqName +@Title Get the name of a Z-axis + +@Prototype void zaxisInqName(int zaxisID, char *name) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + @Item name Name of the Z-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{zaxisInqName} returns the name of a Z-axis. + +@Result +@func{zaxisInqName} returns the name of the Z-axis to the parameter name. + +@EndFunction +*/ +void +zaxisInqName(int zaxisID, char *name) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, name, &length); +} + +const char * +zaxisInqNamePtr(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return cdiInqVarKeyString(&zaxisptr->keys, CDI_KEY_NAME); +} + +/* +@Function zaxisInqLongname +@Title Get the longname of a Z-axis + +@Prototype void zaxisInqLongname(int zaxisID, char *longname) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + @Item longname Longname of the Z-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{zaxisInqLongname} returns the longname of a Z-axis. + +@Result +@func{zaxisInqLongname} returns the longname of the Z-axis to the parameter longname. + +@EndFunction +*/ +void +zaxisInqLongname(int zaxisID, char *longname) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, longname, &length); +} + +/* +@Function zaxisInqUnits +@Title Get the units of a Z-axis + +@Prototype void zaxisInqUnits(int zaxisID, char *units) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + @Item units Units of the Z-axis. The caller must allocate space for the + returned string. The maximum possible length, in characters, of + the string is given by the predefined constant @func{CDI_MAX_NAME}. + +@Description +The function @func{zaxisInqUnits} returns the units of a Z-axis. + +@Result +@func{zaxisInqUnits} returns the units of the Z-axis to the parameter units. + +@EndFunction +*/ +void +zaxisInqUnits(int zaxisID, char *units) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units, &length); +} + +void +zaxisInqStdname(int zaxisID, char *stdname) +{ + int length = CDI_MAX_NAME; + (void) cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_STDNAME, stdname, &length); +} + +void +zaxisDefDatatype(int zaxisID, int datatype) +{ + cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_DATATYPE, datatype); +} + +int +zaxisInqDatatype(int zaxisID) +{ + int datatype = 0; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); + return datatype; +} + +void +zaxisDefPositive(int zaxisID, int positive) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + if (zaxisptr->positive != (unsigned) positive) + { + zaxisptr->positive = (unsigned) positive; + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); + } +} + +int +zaxisInqPositive(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return (int) zaxisptr->positive; +} + +void +zaxisDefScalar(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + zaxisptr->scalar = 1; + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); +} + +int +zaxisInqScalar(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return zaxisptr->scalar; +} + +/* +@Function zaxisDefLevels +@Title Define the levels of a Z-axis + +@Prototype void zaxisDefLevels(int zaxisID, const double *levels) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + @Item levels All levels of the Z-axis. + +@Description +The function @func{zaxisDefLevels} defines the levels of a Z-axis. + +@EndFunction +*/ +void +zaxisDefLevels(int zaxisID, const double *levels) +{ + if (levels) + { + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + const size_t size = (size_t) zaxisptr->size; + xassert(size); + + if (zaxisptr->vals == NULL && size) zaxisptr->vals = (double *) Malloc(size * sizeof(double)); + + double *vals = zaxisptr->vals; + + for (size_t ilev = 0; ilev < size; ++ilev) vals[ilev] = levels[ilev]; + + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); + } +} + +void +zaxisDefCvals(int zaxisID, const char **cvals, int clen) +{ +#ifndef USE_MPI + if (cvals && clen) + { + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + const size_t size = zaxisptr->size; + xassert(size); + + zaxisptr->clength = clen; + if (size) zaxisptr->cvals = (char **) Malloc(size * sizeof(char *)); + + for (size_t ilev = 0; ilev < size; ++ilev) + { + zaxisptr->cvals[ilev] = (char *) Malloc(clen * sizeof(char)); + memcpy(zaxisptr->cvals[ilev], cvals[ilev], clen * sizeof(char)); + } + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); + } +#else + Error("This function was disabled!"); +#endif +} + +/* +@Function zaxisDefLevel +@Title Define one level of a Z-axis + +@Prototype void zaxisDefLevel(int zaxisID, int levelID, double level) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + @Item levelID Level identifier. + @Item level Level. + +@Description +The function @func{zaxisDefLevel} defines one level of a Z-axis. + +@EndFunction +*/ +void +zaxisDefLevel(int zaxisID, int levelID, double level) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + int size = zaxisptr->size; + xassert(size); + xassert(levelID >= 0 && levelID < size); + + if (zaxisptr->vals == NULL && size) zaxisptr->vals = (double *) Malloc((size_t) size * sizeof(double)); + + if (levelID >= 0 && levelID < size) zaxisptr->vals[levelID] = level; + + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); +} + +void +zaxisDefNlevRef(int zaxisID, int nlev) +{ + cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NLEV, nlev); +} + +int +zaxisInqNlevRef(int zaxisID) +{ + int nlev = 0; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NLEV, &nlev); + return nlev; +} + +/* +@Function zaxisDefNumber +@Title Define the reference number for a generalized Z-axis + +@Prototype void zaxisDefNumber(int zaxisID, int number) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + @Item number Reference number for a generalized Z-axis. + +@Description +The function @func{zaxisDefNumber} defines the reference number for a generalized Z-axis. + +@EndFunction +*/ +void +zaxisDefNumber(int zaxisID, int number) +{ + cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NUMBEROFVGRIDUSED, number); +} + +/* +@Function zaxisInqNumber +@Title Get the reference number to a generalized Z-axis + +@Prototype int zaxisInqNumber(int zaxisID) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + +@Description +The function @func{zaxisInqNumber} returns the reference number to a generalized Z-axis. + +@Result +@func{zaxisInqNumber} returns the reference number to a generalized Z-axis. +@EndFunction +*/ +int +zaxisInqNumber(int zaxisID) +{ + int referenceNumber = 0; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NUMBEROFVGRIDUSED, &referenceNumber); + return referenceNumber; +} + +/* +@Function zaxisDefUUID +@Title Define the UUID for a genralized Z-axis + +@Prototype void zaxisDefUUID(int zaxisID, const char *uuid) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate}. + @Item uuid UUID for a generalized Z-axis. + +@Description +The function @func{zaxisDefUUID} defines the UUID for a generalized Z-axis. + +@EndFunction +*/ +void +zaxisDefUUID(int zaxisID, const unsigned char uuid[CDI_UUID_SIZE]) +{ + cdiDefKeyBytes(zaxisID, CDI_GLOBAL, CDI_KEY_UUID, uuid, CDI_UUID_SIZE); + + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); +} + +/* +@Function zaxisInqUUID +@Title Get the uuid to a generalized Z-axis + +@Prototype void zaxisInqUUID(int zaxisID, char *uuid) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + @Item uuid A user supplied buffer of at least 16 bytes. + +@Description +The function @func{zaxisInqUUID} returns the UUID to a generalized Z-axis. + +@Result +@func{zaxisInqUUID} returns the UUID to a generalized Z-axis to the parameter uuid. +@EndFunction +*/ +void +zaxisInqUUID(int zaxisID, unsigned char uuid[CDI_UUID_SIZE]) +{ + memset(uuid, 0, CDI_UUID_SIZE); + int length = CDI_UUID_SIZE; + cdiInqKeyBytes(zaxisID, CDI_GLOBAL, CDI_KEY_UUID, uuid, &length); +} + +/* +@Function zaxisInqLevel +@Title Get one level of a Z-axis + +@Prototype double zaxisInqLevel(int zaxisID, int levelID) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + @Item levelID Level index (range: 0 to nlevel-1). + +@Description +The function @func{zaxisInqLevel} returns one level of a Z-axis. + +@Result +@func{zaxisInqLevel} returns the level of a Z-axis. +@EndFunction +*/ +double +zaxisInqLevel(int zaxisID, int levelID) +{ + double level = 0; + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->vals && levelID >= 0 && levelID < zaxisptr->size) level = zaxisptr->vals[levelID]; + + return level; +} + +double +zaxisInqLbound(int zaxisID, int levelID) +{ + double level = 0; + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->lbounds && levelID >= 0 && levelID < zaxisptr->size) level = zaxisptr->lbounds[levelID]; + + return level; +} + +double +zaxisInqUbound(int zaxisID, int levelID) +{ + double level = 0; + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->ubounds && levelID >= 0 && levelID < zaxisptr->size) level = zaxisptr->ubounds[levelID]; + + return level; +} + +const double * +zaxisInqLevelsPtr(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return zaxisptr->vals; +} + +#ifndef USE_MPI +char ** +zaxisInqCValsPtr(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return zaxisptr->cvals; +} +#endif + +/* +@Function zaxisInqLevels +@Title Get all levels of a Z-axis + +@Prototype void zaxisInqLevels(int zaxisID, double *levels) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + @Item levels Pointer to the location into which the levels are read. + The caller must allocate space for the returned values. + +@Description +The function @func{zaxisInqLevels} returns all levels of a Z-axis. + +@Result +@func{zaxisInqLevels} saves all levels to the parameter @func{levels}. +@EndFunction +*/ +int +zaxisInqLevels(int zaxisID, double *levels) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + int size = 0; + if (zaxisptr->vals) + { + size = zaxisptr->size; + + if (levels) + for (int i = 0; i < size; i++) levels[i] = zaxisptr->vals[i]; + } + + return size; +} + +int +zaxisInqCLen(int zaxisID) +{ + int clen = 0; +#ifndef USE_MPI + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->cvals && zaxisptr->clength) clen = zaxisptr->clength; +#endif + + return clen; +} + +int +zaxisInqCVals(int zaxisID, char ***clevels) +{ + int size = 0; +#ifndef USE_MPI + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->cvals) + { + size = zaxisptr->size; + const size_t clen = zaxisptr->clength; + if (size && clen) + { + (*clevels) = (char **) Malloc(size * sizeof(char *)); + for (int i = 0; i < size; i++) + { + (*clevels)[i] = (char *) Malloc(clen * sizeof(char)); + memcpy((*clevels)[i], zaxisptr->cvals[i], clen * sizeof(char)); + } + } + } +#endif + + return size; +} + +int +zaxisInqLbounds(int zaxisID, double *lbounds) +{ + int size = 0; + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->lbounds) + { + size = zaxisptr->size; + + if (lbounds) + for (int i = 0; i < size; i++) lbounds[i] = zaxisptr->lbounds[i]; + } + + return size; +} + +int +zaxisInqUbounds(int zaxisID, double *ubounds) +{ + int size = 0; + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->ubounds) + { + size = zaxisptr->size; + + if (ubounds) + for (int i = 0; i < size; i++) ubounds[i] = zaxisptr->ubounds[i]; + } + + return size; +} + +int +zaxisInqWeights(int zaxisID, double *weights) +{ + int size = 0; + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->weights) + { + size = zaxisptr->size; + + if (weights) + for (int i = 0; i < size; i++) weights[i] = zaxisptr->weights[i]; + } + + return size; +} + +int +zaxisInqLevelID(int zaxisID, double level) +{ + int levelID = CDI_UNDEFID; + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + if (zaxisptr->vals) + { + int size = zaxisptr->size; + for (int i = 0; i < size; i++) + if (fabs(level - zaxisptr->vals[i]) < DBL_EPSILON) + { + levelID = i; + break; + } + } + + return levelID; +} + +/* +@Function zaxisInqType +@Title Get the type of a Z-axis + +@Prototype int zaxisInqType(int zaxisID) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + +@Description +The function @func{zaxisInqType} returns the type of a Z-axis. + +@Result +@func{zaxisInqType} returns the type of the Z-axis, +one of the set of predefined CDI Z-axis types. +The valid CDI Z-axis types are @func{ZAXIS_GENERIC}, @func{ZAXIS_SURFACE}, +@func{ZAXIS_HYBRID}, @func{ZAXIS_SIGMA}, @func{ZAXIS_PRESSURE}, @func{ZAXIS_HEIGHT}, +@func{ZAXIS_ISENTROPIC}, @func{ZAXIS_ALTITUDE}, @func{ZAXIS_MEANSEA}, @func{ZAXIS_TOA}, +@func{ZAXIS_SEA_BOTTOM}, @func{ZAXIS_ATMOSPHERE}, @func{ZAXIS_CLOUD_BASE}, +@func{ZAXIS_CLOUD_TOP}, @func{ZAXIS_ISOTHERM_ZERO}, @func{ZAXIS_SNOW}, +@func{ZAXIS_LAKE_BOTTOM}, @func{ZAXIS_SEDIMENT_BOTTOM}, @func{ZAXIS_SEDIMENT_BOTTOM_TA}, +@func{ZAXIS_SEDIMENT_BOTTOM_TW}, @func{ZAXIS_MIX_LAYER}, +@func{ZAXIS_DEPTH_BELOW_SEA} and @func{ZAXIS_DEPTH_BELOW_LAND}. + +@EndFunction +*/ +int +zaxisInqType(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return zaxisptr->type; +} + +/* +@Function zaxisInqSize +@Title Get the size of a Z-axis + +@Prototype int zaxisInqSize(int zaxisID) +@Parameter + @Item zaxisID Z-axis ID, from a previous call to @fref{zaxisCreate} or @fref{vlistInqVarZaxis}. + +@Description +The function @func{zaxisInqSize} returns the size of a Z-axis. + +@Result +@func{zaxisInqSize} returns the number of levels of a Z-axis. + +@EndFunction +*/ +int +zaxisInqSize(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return zaxisptr->size; +} + +void +cdiCheckZaxis(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + if (zaxisInqType(zaxisID) == ZAXIS_GENERIC && zaxisptr->vals) + { + int size = zaxisptr->size; + if (size > 1) + { + /* check direction */ + if (!zaxisptr->direction) + { + int ups = 0, downs = 0; + for (int i = 1; i < size; i++) + { + ups += (zaxisptr->vals[i] > zaxisptr->vals[i - 1]); + downs += (zaxisptr->vals[i] < zaxisptr->vals[i - 1]); + } + if (ups == size - 1) + { + zaxisptr->direction = LevelUp; + } + else if (downs == size - 1) + { + zaxisptr->direction = LevelDown; + } + else /* !zaxisptr->direction */ + { + Warning("Direction undefined for zaxisID %d", zaxisID); + } + } + } + } +} + +void +zaxisDefVct(int zaxisID, int size, const double *vct) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + if (zaxisptr->vct == 0 || zaxisptr->vctsize != size) + { + zaxisptr->vctsize = size; + zaxisptr->vct = (double *) Realloc(zaxisptr->vct, (size_t) size * sizeof(double)); + } + + if (vct) memcpy(zaxisptr->vct, vct, (size_t) size * sizeof(double)); + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); +} + +void +zaxisInqVct(int zaxisID, double *vct) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + memcpy(vct, zaxisptr->vct, (size_t) zaxisptr->vctsize * sizeof(double)); +} + +int +zaxisInqVctSize(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return zaxisptr->vctsize; +} + +const double * +zaxisInqVctPtr(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + return zaxisptr->vct; +} + +void +zaxisDefLbounds(int zaxisID, const double *lbounds) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + const size_t size = (size_t) zaxisptr->size; + + if (CDI_Debug) + if (zaxisptr->lbounds) Warning("Lower bounds already defined for zaxisID = %d", zaxisID); + + if (zaxisptr->lbounds == NULL) zaxisptr->lbounds = (double *) Malloc(size * sizeof(double)); + + if (lbounds) memcpy(zaxisptr->lbounds, lbounds, size * sizeof(double)); + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); +} + +void +zaxisDefUbounds(int zaxisID, const double *ubounds) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + const size_t size = (size_t) zaxisptr->size; + + if (CDI_Debug) + if (zaxisptr->ubounds) Warning("Upper bounds already defined for zaxisID = %d", zaxisID); + + if (zaxisptr->ubounds == NULL) zaxisptr->ubounds = (double *) Malloc(size * sizeof(double)); + + if (ubounds) memcpy(zaxisptr->ubounds, ubounds, size * sizeof(double)); + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); +} + +void +zaxisDefWeights(int zaxisID, const double *weights) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + const size_t size = (size_t) zaxisptr->size; + + if (CDI_Debug) + if (zaxisptr->weights != NULL) Warning("Weights already defined for zaxisID = %d", zaxisID); + + if (zaxisptr->weights == NULL) zaxisptr->weights = (double *) Malloc(size * sizeof(double)); + + memcpy(zaxisptr->weights, weights, size * sizeof(double)); + reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE); +} + +void +zaxisChangeType(int zaxisID, int zaxistype) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + zaxisptr->type = zaxistype; +} + +void +zaxisResize(int zaxisID, int size) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + xassert(size >= 0); + + zaxisptr->size = size; + + if (zaxisptr->vals) zaxisptr->vals = (double *) Realloc(zaxisptr->vals, (size_t) size * sizeof(double)); +} + +static inline void +zaxisCopyKeyStr(zaxis_t *zaxisptr1, zaxis_t *zaxisptr2, int key) +{ + cdi_key_t *keyp = find_key(&zaxisptr1->keys, key); + if (keyp && keyp->type == KEY_BYTES) + cdiDefVarKeyBytes(&zaxisptr2->keys, key, (const unsigned char *) keyp->v.s, (int) keyp->length); +} + +int +zaxisDuplicate(int zaxisID) +{ + zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID); + + int zaxistype = zaxisInqType(zaxisID); + int zaxissize = zaxisInqSize(zaxisID); + + int zaxisIDnew = zaxisCreate(zaxistype, zaxissize); + zaxis_t *zaxisptrnew = zaxis_to_pointer(zaxisIDnew); + + zaxis_copy(zaxisptrnew, zaxisptr); + + zaxisCopyKeyStr(zaxisptr, zaxisptrnew, CDI_KEY_NAME); + zaxisCopyKeyStr(zaxisptr, zaxisptrnew, CDI_KEY_LONGNAME); + zaxisCopyKeyStr(zaxisptr, zaxisptrnew, CDI_KEY_UNITS); + + if (zaxisptr->vals) + { + const size_t size = (size_t) zaxissize; + zaxisptrnew->vals = (double *) Malloc(size * sizeof(double)); + memcpy(zaxisptrnew->vals, zaxisptr->vals, size * sizeof(double)); + } + + if (zaxisptr->lbounds) + { + const size_t size = (size_t) zaxissize; + zaxisptrnew->lbounds = (double *) Malloc(size * sizeof(double)); + memcpy(zaxisptrnew->lbounds, zaxisptr->lbounds, size * sizeof(double)); + } + + if (zaxisptr->ubounds) + { + const size_t size = (size_t) zaxissize; + zaxisptrnew->ubounds = (double *) Malloc(size * sizeof(double)); + memcpy(zaxisptrnew->ubounds, zaxisptr->ubounds, size * sizeof(double)); + } + + if (zaxisptr->vct) + { + const size_t size = (size_t) zaxisptr->vctsize; + if (size) + { + zaxisptrnew->vctsize = (int) size; + zaxisptrnew->vct = (double *) Malloc(size * sizeof(double)); + memcpy(zaxisptrnew->vct, zaxisptr->vct, size * sizeof(double)); + } + } + + zaxisptrnew->atts.nelems = 0; + cdiCopyAtts(zaxisID, CDI_GLOBAL, zaxisIDnew, CDI_GLOBAL); + + return zaxisIDnew; +} + +static void +zaxisPrintKernel(zaxis_t *zaxisptr, FILE *fp) +{ + xassert(zaxisptr); + + int zaxisID = zaxisptr->self; + int datatype = CDI_UNDEFID; + cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); + + int type = zaxisptr->type; + int nlevels = zaxisptr->size; + + int dig = (datatype == CDI_DATATYPE_FLT64) ? 15 : 7; + + fprintf(fp, "zaxistype = %s\n", zaxisNamePtr(type)); + fprintf(fp, "size = %d\n", nlevels); + if (nlevels == 1) + { + const bool zscalar = (bool) zaxisptr->scalar; + if (zscalar) fprintf(fp, "scalar = true\n"); + } + + const char *string = cdiInqVarKeyString(&zaxisptr->keys, CDI_KEY_NAME); + if (string[0]) fprintf(fp, "name = %s\n", string); + string = cdiInqVarKeyString(&zaxisptr->keys, CDI_KEY_LONGNAME); + if (string[0]) fprintf(fp, "longname = %s\n", string); + string = cdiInqVarKeyString(&zaxisptr->keys, CDI_KEY_UNITS); + if (string[0]) fprintf(fp, "units = %s\n", string); + + if (zaxisptr->vals) + { + int nbyte0 = fprintf(fp, "levels = "); + int nbyte = nbyte0; + for (int levelID = 0; levelID < nlevels; levelID++) + { + if (nbyte > 80) + { + fprintf(fp, "\n"); + fprintf(fp, "%*s", nbyte0, ""); + nbyte = nbyte0; + } + nbyte += fprintf(fp, "%.*g ", dig, zaxisptr->vals[levelID]); + } + fprintf(fp, "\n"); + } + + if (zaxisptr->lbounds && zaxisptr->ubounds) + { + int nbyte0 = fprintf(fp, "lbounds = "); + int nbyte = nbyte0; + for (int levelID = 0; levelID < nlevels; levelID++) + { + if (nbyte > 80) + { + fprintf(fp, "\n"); + fprintf(fp, "%*s", nbyte0, ""); + nbyte = nbyte0; + } + nbyte += fprintf(fp, "%.*g ", dig, zaxisptr->lbounds[levelID]); + } + fprintf(fp, "\n"); + + nbyte0 = fprintf(fp, "ubounds = "); + nbyte = nbyte0; + for (int levelID = 0; levelID < nlevels; levelID++) + { + if (nbyte > 80) + { + fprintf(fp, "\n"); + fprintf(fp, "%*s", nbyte0, ""); + nbyte = nbyte0; + } + nbyte += fprintf(fp, "%.*g ", dig, zaxisptr->ubounds[levelID]); + } + fprintf(fp, "\n"); + } + + if (type == ZAXIS_HYBRID || type == ZAXIS_HYBRID_HALF) + { + int vctsize = zaxisptr->vctsize; + const double *vct = zaxisptr->vct; + fprintf(fp, "vctsize = %d\n", vctsize); + if (vctsize) + { + int nbyte0 = fprintf(fp, "vct = "); + int nbyte = nbyte0; + for (int i = 0; i < vctsize; i++) + { + if (nbyte > 70 || i == vctsize / 2) + { + fprintf(fp, "\n%*s", nbyte0, ""); + nbyte = nbyte0; + } + nbyte += fprintf(fp, "%.15g ", vct[i]); + } + fprintf(fp, "\n"); + } + } +} + +static void +zaxisPrintP(void *voidptr, FILE *fp) +{ + zaxis_t *zaxisptr = (zaxis_t *) voidptr; + + xassert(zaxisptr); + + zaxisPrintKernel(zaxisptr, fp); +} + +static int +zaxisCompareP(zaxis_t *z1, zaxis_t *z2) +{ + enum + { + differ = 1 + }; + int diff = 0; + xassert(z1 && z2); + + diff |= (z1->type != z2->type) + | (cdiInqVarKeyInt(&z1->keys, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE) + != cdiInqVarKeyInt(&z2->keys, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE)) + | (cdiInqVarKeyInt(&z1->keys, CDI_KEY_DATATYPE) != cdiInqVarKeyInt(&z2->keys, CDI_KEY_DATATYPE)) + | (z1->direction != z2->direction) | (z1->size != z2->size) | (z1->vctsize != z2->vctsize) + | (z1->positive != z2->positive); + + if (diff) return differ; + + int size = z1->size; + int anyPresent = 0; + int present = (z1->vals != NULL); + diff |= (present ^ (z2->vals != NULL)); + anyPresent |= present; + if (!diff && present) + { + const double *p = z1->vals, *q = z2->vals; + for (int i = 0; i < size; i++) diff |= IS_NOT_EQUAL(p[i], q[i]); + } + + present = (z1->lbounds != NULL); + diff |= (present ^ (z2->lbounds != NULL)); + anyPresent |= present; + if (!diff && present) + { + const double *p = z1->lbounds, *q = z2->lbounds; + for (int i = 0; i < size; i++) diff |= IS_NOT_EQUAL(p[i], q[i]); + } + + present = (z1->ubounds != NULL); + diff |= (present ^ (z2->ubounds != NULL)); + anyPresent |= present; + if (!diff && present) + { + const double *p = z1->ubounds, *q = z2->ubounds; + for (int i = 0; i < size; ++i) diff |= IS_NOT_EQUAL(p[i], q[i]); + } + + present = (z1->weights != NULL); + diff |= (present ^ (z2->weights != NULL)); + anyPresent |= present; + if (!diff && present) + { + const double *p = z1->weights, *q = z2->weights; + for (int i = 0; i < size; ++i) diff |= IS_NOT_EQUAL(p[i], q[i]); + } + + present = (z1->vct != NULL); + diff |= (present ^ (z2->vct != NULL)); + if (!diff && present) + { + int vctsize = z1->vctsize; + xassert(vctsize); + const double *p = z1->vct, *q = z2->vct; + for (int i = 0; i < vctsize; ++i) diff |= IS_NOT_EQUAL(p[i], q[i]); + } + + if (anyPresent) xassert(size); + + diff |= strcmp(cdiInqVarKeyString(&z1->keys, CDI_KEY_NAME), cdiInqVarKeyString(&z2->keys, CDI_KEY_NAME)) + | strcmp(cdiInqVarKeyString(&z1->keys, CDI_KEY_LONGNAME), cdiInqVarKeyString(&z2->keys, CDI_KEY_LONGNAME)) + | strcmp(cdiInqVarKeyString(&z1->keys, CDI_KEY_STDNAME), cdiInqVarKeyString(&z2->keys, CDI_KEY_STDNAME)) + | strcmp(cdiInqVarKeyString(&z1->keys, CDI_KEY_UNITS), cdiInqVarKeyString(&z2->keys, CDI_KEY_UNITS)); + + return diff != 0; +} + +static int +zaxisTxCode(void *zaxisPtr) +{ + (void) zaxisPtr; + return ZAXIS; +} + +enum +{ + ZAXIS_PACK_INT_SELF, + ZAXIS_PACK_INT_TYPE, + ZAXIS_PACK_INT_SIZE, + ZAXIS_PACK_INT_DIRECTION, + ZAXIS_PACK_INT_VCTSIZE, + ZAXIS_PACK_INT_MEMBERMASK, + zaxisNint +}; + +enum +{ + vals = 1 << 0, + lbounds = 1 << 1, + ubounds = 1 << 2, + weights = 1 << 3, + vct = 1 << 4, +}; + +static int +zaxisGetMemberMask(zaxis_t *zaxisP) +{ + int memberMask = 0; + + if (zaxisP->vals) memberMask |= vals; + if (zaxisP->lbounds) memberMask |= lbounds; + if (zaxisP->ubounds) memberMask |= ubounds; + if (zaxisP->weights) memberMask |= weights; + if (zaxisP->vct) memberMask |= vct; + + return memberMask; +} + +static int +zaxisGetPackSize(void *voidP, void *context) +{ + zaxis_t *zaxisP = (zaxis_t *) voidP; + int packBufferSize = serializeGetSize(zaxisNint, CDI_DATATYPE_INT, context) + serializeGetSize(1, CDI_DATATYPE_UINT32, context); + + if (zaxisP->vals || zaxisP->lbounds || zaxisP->ubounds || zaxisP->weights) xassert(zaxisP->size); + + if (zaxisP->vals) + packBufferSize + += serializeGetSize(zaxisP->size, CDI_DATATYPE_FLT64, context) + serializeGetSize(1, CDI_DATATYPE_UINT32, context); + + if (zaxisP->lbounds) + packBufferSize + += serializeGetSize(zaxisP->size, CDI_DATATYPE_FLT64, context) + serializeGetSize(1, CDI_DATATYPE_UINT32, context); + + if (zaxisP->ubounds) + packBufferSize + += serializeGetSize(zaxisP->size, CDI_DATATYPE_FLT64, context) + serializeGetSize(1, CDI_DATATYPE_UINT32, context); + + if (zaxisP->weights) + packBufferSize + += serializeGetSize(zaxisP->size, CDI_DATATYPE_FLT64, context) + serializeGetSize(1, CDI_DATATYPE_UINT32, context); + + if (zaxisP->vct) + { + xassert(zaxisP->vctsize); + packBufferSize + += serializeGetSize(zaxisP->vctsize, CDI_DATATYPE_FLT64, context) + serializeGetSize(1, CDI_DATATYPE_UINT32, context); + } + + packBufferSize += serializeKeysGetPackSize(&zaxisP->keys, context); + + packBufferSize += serializeGetSize(1, CDI_DATATYPE_UINT, context); + + return packBufferSize; +} + +int +zaxisUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos, int originNamespace, void *context, int force_id) +{ + int intBuffer[zaxisNint], memberMask; + uint32_t d; + + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, intBuffer, zaxisNint, CDI_DATATYPE_INT, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + + xassert(cdiCheckSum(CDI_DATATYPE_INT, zaxisNint, intBuffer) == d); + + zaxisInit(); + + zaxis_t *zaxisP = zaxisNewEntry(force_id ? namespaceAdaptKey(intBuffer[ZAXIS_PACK_INT_SELF], originNamespace) : CDI_UNDEFID); + + zaxisP->type = intBuffer[ZAXIS_PACK_INT_TYPE]; + zaxisP->size = intBuffer[ZAXIS_PACK_INT_SIZE]; + zaxisP->direction = intBuffer[ZAXIS_PACK_INT_DIRECTION]; + zaxisP->vctsize = intBuffer[ZAXIS_PACK_INT_VCTSIZE]; + memberMask = intBuffer[ZAXIS_PACK_INT_MEMBERMASK]; + + if (memberMask & vals) + { + int size = zaxisP->size; + xassert(size >= 0); + + zaxisP->vals = (double *) Malloc((size_t) size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, zaxisP->vals, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, zaxisP->vals) == d); + } + + if (memberMask & lbounds) + { + int size = zaxisP->size; + xassert(size >= 0); + + zaxisP->lbounds = (double *) Malloc((size_t) size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, zaxisP->lbounds, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, zaxisP->lbounds) == d); + } + + if (memberMask & ubounds) + { + int size = zaxisP->size; + xassert(size >= 0); + + zaxisP->ubounds = (double *) Malloc((size_t) size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, zaxisP->ubounds, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, zaxisP->ubounds) == d); + } + + if (memberMask & weights) + { + int size = zaxisP->size; + xassert(size >= 0); + + zaxisP->weights = (double *) Malloc((size_t) size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, zaxisP->weights, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT, size, zaxisP->weights) == d); + } + + if (memberMask & vct) + { + int size = zaxisP->vctsize; + xassert(size >= 0); + + zaxisP->vct = (double *) Malloc((size_t) size * sizeof(double)); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, zaxisP->vct, size, CDI_DATATYPE_FLT64, context); + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &d, 1, CDI_DATATYPE_UINT32, context); + xassert(cdiCheckSum(CDI_DATATYPE_FLT64, size, zaxisP->vct) == d); + } + + serializeKeysUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &zaxisP->keys, context); + + serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos, &zaxisP->positive, 1, CDI_DATATYPE_UINT, context); + + reshSetStatus(zaxisP->self, &zaxisOps, reshGetStatus(zaxisP->self, &zaxisOps) & ~RESH_SYNC_BIT); + return zaxisP->self; +} + +static void +zaxisPack(void *voidP, void *packBuffer, int packBufferSize, int *packBufferPos, void *context) +{ + zaxis_t *zaxisP = (zaxis_t *) voidP; + int intBuffer[zaxisNint]; + int memberMask; + uint32_t d; + + intBuffer[ZAXIS_PACK_INT_SELF] = zaxisP->self; + intBuffer[ZAXIS_PACK_INT_TYPE] = zaxisP->type; + intBuffer[ZAXIS_PACK_INT_SIZE] = zaxisP->size; + intBuffer[ZAXIS_PACK_INT_DIRECTION] = zaxisP->direction; + intBuffer[ZAXIS_PACK_INT_VCTSIZE] = zaxisP->vctsize; + intBuffer[ZAXIS_PACK_INT_MEMBERMASK] = memberMask = zaxisGetMemberMask(zaxisP); + + serializePack(intBuffer, zaxisNint, CDI_DATATYPE_INT, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_INT, zaxisNint, intBuffer); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + + if (memberMask & vals) + { + xassert(zaxisP->size); + serializePack(zaxisP->vals, zaxisP->size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, zaxisP->size, zaxisP->vals); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & lbounds) + { + xassert(zaxisP->size); + serializePack(zaxisP->lbounds, zaxisP->size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, zaxisP->size, zaxisP->lbounds); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & ubounds) + { + xassert(zaxisP->size); + + serializePack(zaxisP->ubounds, zaxisP->size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, zaxisP->size, zaxisP->ubounds); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & weights) + { + xassert(zaxisP->size); + + serializePack(zaxisP->weights, zaxisP->size, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT, zaxisP->size, zaxisP->weights); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + if (memberMask & vct) + { + xassert(zaxisP->vctsize); + + serializePack(zaxisP->vct, zaxisP->vctsize, CDI_DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context); + d = cdiCheckSum(CDI_DATATYPE_FLT64, zaxisP->vctsize, zaxisP->vct); + serializePack(&d, 1, CDI_DATATYPE_UINT32, packBuffer, packBufferSize, packBufferPos, context); + } + + serializeKeysPack(&zaxisP->keys, packBuffer, packBufferSize, packBufferPos, context); + + serializePack(&zaxisP->positive, 1, CDI_DATATYPE_UINT, packBuffer, packBufferSize, packBufferPos, context); +} + +void +cdiZaxisGetIndexList(unsigned nzaxis, int *zaxisResHs) +{ + reshGetResHListOfType(nzaxis, zaxisResHs, &zaxisOps); +} + +/* + * Local Variables: + * c-file-style: "Java" + * c-basic-offset: 2 + * indent-tabs-mode: nil + * show-trailing-whitespace: t + * require-trailing-newline: t + * End: + */ +static const char cdi_libvers[] = "2.2.0"; +const char * +cdiLibraryVersion(void) +{ + return cdi_libvers; +} +#if defined (HAVE_CF_INTERFACE) +#undef realloc +#undef malloc +#undef calloc +#undef free +#undef DOUBLE_PRECISION +/* cfortran.h 4.4 */ +/* http://www-zeus.desy.de/~burow/cfortran/ */ +/* Burkhard Burow burow@desy.de 1990 - 2002. */ + +#ifndef __CFORTRAN_LOADED +#define __CFORTRAN_LOADED + +// clang-format off + +/* + 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. +*/ + +/* 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 +(AT YOUR CHOICE) EITHER TO THE GNU LIBRARY GENERAL PUBLIC LICENSE +AT http://www.gnu.org/licenses/lgpl.html OR 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 +*/ + +/* The following modifications were made by the authors of CFITSIO or by me. + * They are flagged below with CFITSIO, the author's initials, or KMCCARTY. + * PDW = Peter Wilson + * DM = Doug Mink + * LEB = Lee E Brotzman + * MR = Martin Reinecke + * WDP = William D Pence + * BR = Bastien ROUCARIES + * -- Kevin McCarty, for Debian (19 Dec. 2005) */ + +/******* + 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) + Feb 1998: Let VMS see the NUM_ELEMS code. Lets programs treat + single strings as vectors with single elements + Nov 1999: If macintoxh defined, also define f2cfortran (for Mac OS-X) + Apr 2000: If WIN32 defined, also define PowerStationFortran and + VISUAL_CPLUSPLUS (Visual C++) + Jun 2000: If __GNUC__ and linux defined, also define f2cFortran + (linux/gcc environment detection) + Apr 2002: If __CYGWIN__ is defined, also define f2cFortran + Nov 2002: If __APPLE__ defined, also define f2cfortran (for Mac OS-X) + + Nov 2003: If __INTEL_COMPILER or INTEL_COMPILER defined, also define + f2cFortran (KMCCARTY) + Dec 2005: If f2cFortran is defined, enforce REAL functions in FORTRAN + returning "double" in C. This was one of the items on + Burkhard's TODO list. (KMCCARTY) + Dec 2005: Modifications to support 8-byte integers. (MR) + USE AT YOUR OWN RISK! + Feb 2006 Added logic to typedef the symbol 'LONGLONG' to an appropriate + intrinsic 8-byte integer datatype (WDP) + Apr 2006: Modifications to support gfortran (and g77 with -fno-f2c flag) + since by default it returns "float" for FORTRAN REAL function. + (KMCCARTY) + May 2008: Revert commenting out of "extern" in COMMON_BLOCK_DEF macro. + Add braces around do-nothing ";" in 3 empty while blocks to + get rid of compiler warnings. Thanks to ROOT developers + Jacek Holeczek and Rene Brun for these suggestions. (KMCCARTY) + Aug 2008: If __GNUC__ is defined and no FORTRAN compiler is specified + via a #define or -D, default to gfortran behavior rather than + g77 behavior. (KMCCARTY) + Oct 2009: Add warning if guessing default fortran. Move g77 above guessing bloc + *******/ + +/* + Avoid symbols already used by compilers and system *.h: + __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c + +*/ + +/* + Determine what 8-byte integer data type is available. + 'long long' is now supported by most compilers, but older + MS Visual C++ compilers before V7.0 use '__int64' instead. (WDP) +*/ + +#ifndef LONGLONG_TYPE /* this may have been previously defined */ +#if defined(_MSC_VER) /* Microsoft Visual C++ */ + +#if (_MSC_VER < 1300) /* versions earlier than V7.0 do not have 'long long' */ + typedef __int64 LONGLONG; +#else /* newer versions do support 'long long' */ + typedef long long LONGLONG; +#endif + +#else + typedef long long LONGLONG; +#endif + +#define LONGLONG_TYPE +#endif + + +/* 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. */ + +/* 11/29/2003 (KMCCARTY): add *INTEL_COMPILER symbols here */ +/* 04/05/2006 (KMCCARTY): add gFortran symbol here */ +#if defined(CLIPPERFortran) || defined(pgiFortran) || defined(__INTEL_COMPILER) || defined(INTEL_COMPILER) || defined(gFortran) +#define f2cFortran +#endif + +#if defined(g77Fortran) /* 11/03/97 PDW (CFITSIO) */ +#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(__GNUC__) || defined(WIN32) /* 10/2009 BR: warm if guess */ +#warning "Please specify the fortran compiler using -D flags. Try to guess the compiler used" +#endif +#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 +/* 04/13/00 DM (CFITSIO): Add these lines for NT */ +/* with PowerStationFortran and and Visual C++ */ +#if defined(WIN32) && !defined(__CYGWIN__) +#define PowerStationFortran +#define VISUAL_CPLUSPLUS +#endif +#if defined(__CYGWIN__) /* 04/11/02 LEB (CFITSIO) */ +#define f2cFortran +#define gFortran /* 8/26/08 (KMCCARTY) */ +#endif +#if defined(__GNUC__) && defined(linux) /* 06/21/00 PDW (CFITSIO) */ +#define f2cFortran +#define gFortran /* 8/26/08 (KMCCARTY) */ +#endif +#if defined(macintosh) /* 11/1999 (CFITSIO) */ +#define f2cFortran +#define gFortran /* 8/26/08 (KMCCARTY) */ +#endif +#if defined(__APPLE__) /* 11/2002 (CFITSIO) */ +#define f2cFortran +#define gFortran /* 8/26/08 (KMCCARTY) */ +#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(__NEC__) +#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:\ + - GNU gcc (gfortran) on Linux. \ + - 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/g77: Use #define f2cFortran, or cc -Df2cFortran \ + - gfortran: Use #define gFortran, or cc -DgFortran \ + (also necessary for g77 with -fno-f2c option) \ + - 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 \ + - Intel Fortran: Use #define INTEL_COMPILER" +/* 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. */ + +/* "extname" changed to "appendus" below (CFITSIO) */ +#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(appendus) +#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; } + +#ifndef __CF__KnR +static int num_elem(const char *strv, unsigned elem_len, int term_char, int num_term); +#endif +/* 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. */ +} +(void)num_elem; /* to prevent not used warnings in gcc (added by TJ) */ + + 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 (CFITSIO) -- 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(const 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; +} +/* to prevent not used warnings in gcc (added by ROOT, changed by TJ + * because of unreachable warnings from clang) */ +(void)c2fstrv; (void)f2cstrv; (void)kill_trailing; +(void)vkill_trailing; (void)num_elem; +return (int)num; +} +/* #endif removed 2/10/98 (CFITSIO) */ + +/*-------------------------------------------------------------------------*/ + +/* 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; char *nombre;} B; +#define STRINGV_cfV(T,A,B,F) struct {char *s, *fs; unsigned flen; char *nombre;} 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) (B.nombre=A,B.nombre[B.clen]!='\0'?B.nombre[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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PLUSPLUS +#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 (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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,T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,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 LONGLONGVVVVVVV_cfTYPE LONGLONG /* added by MR December 2005 */ +#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 PLONGLONG_cfTYPE LONGLONG /* added by MR December 2005 */ +#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 LONGLONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#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 PLONGLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#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 LONGLONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#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) const 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)) +#if defined (f2cFortran) && ! defined (gFortran) +/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */ +#define FLOAT_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A +#else +#define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A +#endif +#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 LONGLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#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 LONGLONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#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 PLONGLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#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), \ + (unsigned)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.nombre=A,B.clen=(unsigned)strlen(A), \ + C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \ + (unsigned)(memset(B.nombre+B.clen,' ',C-B.clen-1),B.nombre[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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,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 LONGLONG_cfT(M,I,A,B,D) *A /* added by MR December 2005 */ +#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 LONGLONGV_cfT(M,I,A,B,D) A /* added by MR December 2005 */ +#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 LONGLONGVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVVVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVVVVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#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 PLONGLONG_cfT(M,I,A,B,D) A /* added by MR December 2005 */ +#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) ((void)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 LONGLONG_cfFZ(UN,LN) LONGLONG FCALLSC_QUALIFIER fcallsc(UN,LN)( /* added by MR December 2005 */ +#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. */ +#if defined (f2cFortran) && ! defined (gFortran) +/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */ +#define FLOAT_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(void +#else +#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void +#endif +#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)) +#if defined (f2cFortran) && ! defined (gFortran) +/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */ +#define FLOAT_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)( +#else +#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)( +#endif +#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 +#if defined (f2cFortran) && ! defined (gFortran) +/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */ +#define FLOAT_cfF(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)( +#else +#define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)( +#endif +#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 LONGLONG_cfF(UN,LN) LONGLONG_cfFZ(UN,LN) /* added by MR December 2005 */ +#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 LONGLONG_cfI return A0; /* added by MR December 2005 */ +#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(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G,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,C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+ 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,T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A,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI)} + +#endif + +// clang-format on + +#endif /* __CFORTRAN_LOADED */ +#endif +// Automatically generated by make_fint.c, don't edit! + +// clang-format off + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef CDI_H_ +#include "cdi.h" +#endif + +#ifdef HAVE_CF_INTERFACE + +#include <limits.h> +#include <assert.h> + +#ifndef __CFORTRAN_LOADED +# if defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wreserved-id-macro" +# endif +# include "cfortran.h" +# if defined __clang__ +# pragma GCC diagnostic pop +# endif +#endif +/* These functions are meant to be called from Fortran and don't + * need an interface declaration in a C header. */ +#ifdef __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmissing-prototypes" +#endif + +#ifdef CDI_H_ + +static inline +int SizeType_c2f(SizeType value_SizeType) +{ + assert(value_SizeType < INT_MAX); + return (int) value_SizeType; +} + +#endif + +/* Start of fortran interface for the following routines (make_fint.c) */ + + +/* Byte order */ + + +/* Error identifier */ + + +/* File types */ + + +/* Compatibility defines for release 1.8.3 (obsolete defines) */ + + +/* Protocols (in filename/URI) */ + + +/* Compress types */ + + +/* external data types */ + + +/* Compatibility defines for release 1.8.3 (obsolete defines) */ + + +/* internal data types */ + + +/* Chunk types */ + + +/* GRID types */ + + +/* ZAXIS types */ + + +/* SUBTYPE types */ + + +/* Data structure defining a key-value search, possibly with multiple + key-value pairs in combination. + + Currently, only multiple pairs combined by AND are supported. */ + + +/* TIME types */ + + +/* TSTEP types */ + + +/* TAXIS types */ + + +/* TUNIT types */ + + +/* CALENDAR types */ + + +/* number of unsigned char needed to store UUID */ + + +/* Structs that are used to return data to the user */ + + +/* Opaque types */ + + +/* CDI control routines */ + +FCALLSCSUB0 (cdiReset, CDIRESET, cdireset) +FCALLSCFUN1 (STRING, cdiStringError, CDISTRINGERROR, cdistringerror, INT) +FCALLSCSUB1 (cdiDebug, CDIDEBUG, cdidebug, INT) +FCALLSCFUN0 (STRING, cdiLibraryVersion, CDILIBRARYVERSION, cdilibraryversion) +FCALLSCSUB0 (cdiPrintVersion, CDIPRINTVERSION, cdiprintversion) +FCALLSCFUN1 (INT, cdiHaveFiletype, CDIHAVEFILETYPE, cdihavefiletype, INT) +FCALLSCSUB1 (cdiDefMissval, CDIDEFMISSVAL, cdidefmissval, DOUBLE) +FCALLSCFUN0 (DOUBLE, cdiInqMissval, CDIINQMISSVAL, cdiinqmissval) +FCALLSCSUB2 (cdiDefGlobal, CDIDEFGLOBAL, cdidefglobal, STRING, INT) +FCALLSCFUN0 (INT, namespaceNew, NAMESPACENEW, namespacenew) +FCALLSCSUB1 (namespaceSetActive, NAMESPACESETACTIVE, namespacesetactive, INT) +FCALLSCFUN0 (INT, namespaceGetActive, NAMESPACEGETACTIVE, namespacegetactive) +FCALLSCSUB1 (namespaceDelete, NAMESPACEDELETE, namespacedelete, INT) + +/* CDI converter routines */ + + +/* parameter */ + +FCALLSCSUB3 (cdiParamToString, CDIPARAMTOSTRING, cdiparamtostring, INT, PSTRING, INT) +FCALLSCSUB4 (cdiDecodeParam, CDIDECODEPARAM, cdidecodeparam, INT, PINT, PINT, PINT) +FCALLSCFUN3 (INT, cdiEncodeParam, CDIENCODEPARAM, cdiencodeparam, INT, INT, INT) + +/* date format: YYYYMMDD */ + + +/* time format: hhmmss */ + +FCALLSCSUB4 (cdiDecodeDate, CDIDECODEDATE, cdidecodedate, INT, PINT, PINT, PINT) +FCALLSCFUN3 (INT, cdiEncodeDate, CDIENCODEDATE, cdiencodedate, INT, INT, INT) +FCALLSCSUB4 (cdiDecodeTime, CDIDECODETIME, cdidecodetime, INT, PINT, PINT, PINT) +FCALLSCFUN3 (INT, cdiEncodeTime, CDIENCODETIME, cdiencodetime, INT, INT, INT) + +/* STREAM control routines */ + +FCALLSCFUN2 (INT, cdiGetFiletype, CDIGETFILETYPE, cdigetfiletype, STRING, PINT) +FCALLSCFUN1 (INT, streamOpenRead, STREAMOPENREAD, streamopenread, STRING) +FCALLSCFUN2 (INT, streamOpenWrite, STREAMOPENWRITE, streamopenwrite, STRING, INT) +FCALLSCFUN1 (INT, streamOpenAppend, STREAMOPENAPPEND, streamopenappend, STRING) +FCALLSCSUB1 (streamClose, STREAMCLOSE, streamclose, INT) +FCALLSCSUB1 (streamSync, STREAMSYNC, streamsync, INT) +FCALLSCSUB2 (streamDefMaxSteps, STREAMDEFMAXSTEPS, streamdefmaxsteps, INT, INT) +FCALLSCSUB2 (streamDefNumWorker, STREAMDEFNUMWORKER, streamdefnumworker, INT, INT) +FCALLSCSUB2 (streamDefVlist, STREAMDEFVLIST, streamdefvlist, INT, INT) +FCALLSCFUN1 (INT, streamInqVlist, STREAMINQVLIST, streaminqvlist, INT) +FCALLSCFUN1 (INT, streamInqFiletype, STREAMINQFILETYPE, streaminqfiletype, INT) +FCALLSCSUB2 (streamDefByteorder, STREAMDEFBYTEORDER, streamdefbyteorder, INT, INT) +FCALLSCFUN1 (INT, streamInqByteorder, STREAMINQBYTEORDER, streaminqbyteorder, INT) +FCALLSCSUB4 (streamDefFilter, STREAMDEFFILTER, streamdeffilter, INT, INT, INT, PINT) +FCALLSCSUB2 (streamDefCompType, STREAMDEFCOMPTYPE, streamdefcomptype, INT, INT) +FCALLSCFUN1 (INT, streamInqCompType, STREAMINQCOMPTYPE, streaminqcomptype, INT) +FCALLSCSUB2 (streamDefCompLevel, STREAMDEFCOMPLEVEL, streamdefcomplevel, INT, INT) +FCALLSCFUN1 (INT, streamInqCompLevel, STREAMINQCOMPLEVEL, streaminqcomplevel, INT) +FCALLSCFUN2 (INT, streamDefTimestep, STREAMDEFTIMESTEP, streamdeftimestep, INT, INT) +FCALLSCFUN2 (INT, streamInqTimestep, STREAMINQTIMESTEP, streaminqtimestep, INT, INT) +FCALLSCFUN1 (INT, streamInqCurTimestepID, STREAMINQCURTIMESTEPID, streaminqcurtimestepid, INT) +FCALLSCFUN1 (STRING, streamFilename, STREAMFILENAME, streamfilename, INT) +FCALLSCFUN1 (STRING, streamFilesuffix, STREAMFILESUFFIX, streamfilesuffix, INT) +static int streamNvals_fwrap(int streamID) +{ + SizeType v; + v = streamNvals(streamID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, streamNvals_fwrap, STREAMNVALS, streamnvals, INT) +FCALLSCFUN1 (INT, streamInqNvars, STREAMINQNVARS, streaminqnvars, INT) + +/* STREAM var I/O routines (random access) */ + +static void streamWriteVar_fwrap(int streamID, int varID, const double data[], int nmiss) +{ + streamWriteVar(streamID, varID, data, (SizeType)nmiss); +} +FCALLSCSUB4 (streamWriteVar_fwrap, STREAMWRITEVAR, streamwritevar, INT, INT, DOUBLEV, INT) +static void streamWriteVarF_fwrap(int streamID, int varID, const float data[], int nmiss) +{ + streamWriteVarF(streamID, varID, data, (SizeType)nmiss); +} +FCALLSCSUB4 (streamWriteVarF_fwrap, STREAMWRITEVARF, streamwritevarf, INT, INT, FLOATV, INT) +static void streamReadVar_fwrap(int streamID, int varID, double data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadVar(streamID, varID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB4 (streamReadVar_fwrap, STREAMREADVAR, streamreadvar, INT, INT, DOUBLEV, PINT) +static void streamReadVarF_fwrap(int streamID, int varID, float data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadVarF(streamID, varID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB4 (streamReadVarF_fwrap, STREAMREADVARF, streamreadvarf, INT, INT, FLOATV, PINT) +static void streamWriteVarSlice_fwrap(int streamID, int varID, int levelID, const double data[], int nmiss) +{ + streamWriteVarSlice(streamID, varID, levelID, data, (SizeType)nmiss); +} +FCALLSCSUB5 (streamWriteVarSlice_fwrap, STREAMWRITEVARSLICE, streamwritevarslice, INT, INT, INT, DOUBLEV, INT) +static void streamWriteVarSliceF_fwrap(int streamID, int varID, int levelID, const float data[], int nmiss) +{ + streamWriteVarSliceF(streamID, varID, levelID, data, (SizeType)nmiss); +} +FCALLSCSUB5 (streamWriteVarSliceF_fwrap, STREAMWRITEVARSLICEF, streamwritevarslicef, INT, INT, INT, FLOATV, INT) +static void streamReadVarSlice_fwrap(int streamID, int varID, int levelID, double data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadVarSlice(streamID, varID, levelID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB5 (streamReadVarSlice_fwrap, STREAMREADVARSLICE, streamreadvarslice, INT, INT, INT, DOUBLEV, PINT) +static void streamReadVarSliceF_fwrap(int streamID, int varID, int levelID, float data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadVarSliceF(streamID, varID, levelID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB5 (streamReadVarSliceF_fwrap, STREAMREADVARSLICEF, streamreadvarslicef, INT, INT, INT, FLOATV, PINT) +static void streamWriteVarChunk_fwrap(int streamID, int varID, const int rect[][2], const double data[], int nmiss) +{ + streamWriteVarChunk(streamID, varID, rect, data, (SizeType)nmiss); +} +FCALLSCSUB5 (streamWriteVarChunk_fwrap, STREAMWRITEVARCHUNK, streamwritevarchunk, INT, INT, INTVV, DOUBLEV, INT) +static void streamWriteVarChunkF_fwrap(int streamID, int varID, const int rect[][2], const float data[], int nmiss) +{ + streamWriteVarChunkF(streamID, varID, rect, data, (SizeType)nmiss); +} +FCALLSCSUB5 (streamWriteVarChunkF_fwrap, STREAMWRITEVARCHUNKF, streamwritevarchunkf, INT, INT, INTVV, FLOATV, INT) + +/* STREAM record I/O routines (sequential access) */ + +FCALLSCSUB3 (streamDefRecord, STREAMDEFRECORD, streamdefrecord, INT, INT, INT) +FCALLSCSUB3 (streamInqRecord, STREAMINQRECORD, streaminqrecord, INT, PINT, PINT) +static void streamWriteRecord_fwrap(int streamID, const double data[], int nmiss) +{ + streamWriteRecord(streamID, data, (SizeType)nmiss); +} +FCALLSCSUB3 (streamWriteRecord_fwrap, STREAMWRITERECORD, streamwriterecord, INT, DOUBLEV, INT) +static void streamWriteRecordF_fwrap(int streamID, const float data[], int nmiss) +{ + streamWriteRecordF(streamID, data, (SizeType)nmiss); +} +FCALLSCSUB3 (streamWriteRecordF_fwrap, STREAMWRITERECORDF, streamwriterecordf, INT, FLOATV, INT) +static void streamReadRecord_fwrap(int streamID, double data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadRecord(streamID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB3 (streamReadRecord_fwrap, STREAMREADRECORD, streamreadrecord, INT, DOUBLEV, PINT) +static void streamReadRecordF_fwrap(int streamID, float data[], int *nmiss) +{ + SizeType nmiss_SizeType; + streamReadRecordF(streamID, data, &nmiss_SizeType); + assert(nmiss_SizeType < INT_MAX); + *nmiss = nmiss_SizeType; +} +FCALLSCSUB3 (streamReadRecordF_fwrap, STREAMREADRECORDF, streamreadrecordf, INT, FLOATV, PINT) +FCALLSCSUB2 (streamCopyRecord, STREAMCOPYRECORD, streamcopyrecord, INT, INT) + +/* File driven I/O (may yield better performance than using the streamXXX functions) */ + + +/* Creation & Destruction */ + + +/* Advancing an iterator */ + + +/* Introspecting metadata */ + + +/* All outXXX arguments to these functions may be NULL. */ + + +/* Reading data */ + + +/* TODO[NH]: Add functions to read partial fields. */ + + +/* Direct access to grib fields */ + + +/* Callthroughs to GRIB-API */ + + +/* Convenience functions for accessing GRIB-API keys */ + + +/* VLIST routines */ + +FCALLSCFUN0 (INT, vlistCreate, VLISTCREATE, vlistcreate) +FCALLSCSUB1 (vlistDestroy, VLISTDESTROY, vlistdestroy, INT) +FCALLSCFUN1 (INT, vlistDuplicate, VLISTDUPLICATE, vlistduplicate, INT) +FCALLSCSUB2 (vlistCopy, VLISTCOPY, vlistcopy, INT, INT) +FCALLSCSUB2 (vlistCopyFlag, VLISTCOPYFLAG, vlistcopyflag, INT, INT) +FCALLSCSUB1 (vlistClearFlag, VLISTCLEARFLAG, vlistclearflag, INT) +FCALLSCSUB2 (vlistCat, VLISTCAT, vlistcat, INT, INT) +FCALLSCSUB2 (vlistMerge, VLISTMERGE, vlistmerge, INT, INT) +FCALLSCSUB1 (vlistPrint, VLISTPRINT, vlistprint, INT) +FCALLSCFUN1 (INT, vlistNumber, VLISTNUMBER, vlistnumber, INT) +FCALLSCFUN1 (INT, vlistNvars, VLISTNVARS, vlistnvars, INT) +FCALLSCFUN1 (INT, vlistNgrids, VLISTNGRIDS, vlistngrids, INT) +FCALLSCFUN1 (INT, vlistNzaxis, VLISTNZAXIS, vlistnzaxis, INT) +FCALLSCFUN1 (INT, vlistNsubtypes, VLISTNSUBTYPES, vlistnsubtypes, INT) +FCALLSCSUB2 (vlistDefNtsteps, VLISTDEFNTSTEPS, vlistdefntsteps, INT, INT) +FCALLSCFUN1 (INT, vlistNtsteps, VLISTNTSTEPS, vlistntsteps, INT) +static int vlistGridsizeMax_fwrap(int vlistID) +{ + SizeType v; + v = vlistGridsizeMax(vlistID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, vlistGridsizeMax_fwrap, VLISTGRIDSIZEMAX, vlistgridsizemax, INT) +FCALLSCFUN2 (INT, vlistGrid, VLISTGRID, vlistgrid, INT, INT) +FCALLSCFUN2 (INT, vlistGridIndex, VLISTGRIDINDEX, vlistgridindex, INT, INT) +FCALLSCSUB3 (vlistChangeGridIndex, VLISTCHANGEGRIDINDEX, vlistchangegridindex, INT, INT, INT) +FCALLSCSUB3 (vlistChangeGrid, VLISTCHANGEGRID, vlistchangegrid, INT, INT, INT) +FCALLSCFUN2 (INT, vlistZaxis, VLISTZAXIS, vlistzaxis, INT, INT) +FCALLSCFUN2 (INT, vlistZaxisIndex, VLISTZAXISINDEX, vlistzaxisindex, INT, INT) +FCALLSCSUB3 (vlistChangeZaxisIndex, VLISTCHANGEZAXISINDEX, vlistchangezaxisindex, INT, INT, INT) +FCALLSCSUB3 (vlistChangeZaxis, VLISTCHANGEZAXIS, vlistchangezaxis, INT, INT, INT) +FCALLSCFUN1 (INT, vlistNrecs, VLISTNRECS, vlistnrecs, INT) +FCALLSCFUN2 (INT, vlistSubtype, VLISTSUBTYPE, vlistsubtype, INT, INT) +FCALLSCFUN2 (INT, vlistSubtypeIndex, VLISTSUBTYPEINDEX, vlistsubtypeindex, INT, INT) +FCALLSCSUB2 (vlistDefTaxis, VLISTDEFTAXIS, vlistdeftaxis, INT, INT) +FCALLSCFUN1 (INT, vlistInqTaxis, VLISTINQTAXIS, vlistinqtaxis, INT) +FCALLSCSUB2 (vlistDefTable, VLISTDEFTABLE, vlistdeftable, INT, INT) +FCALLSCFUN1 (INT, vlistInqTable, VLISTINQTABLE, vlistinqtable, INT) +FCALLSCSUB2 (vlistDefInstitut, VLISTDEFINSTITUT, vlistdefinstitut, INT, INT) +FCALLSCFUN1 (INT, vlistInqInstitut, VLISTINQINSTITUT, vlistinqinstitut, INT) +FCALLSCSUB2 (vlistDefModel, VLISTDEFMODEL, vlistdefmodel, INT, INT) +FCALLSCFUN1 (INT, vlistInqModel, VLISTINQMODEL, vlistinqmodel, INT) + +/* VLIST VAR routines */ + +FCALLSCFUN5 (INT, vlistDefVarTiles, VLISTDEFVARTILES, vlistdefvartiles, INT, INT, INT, INT, INT) +FCALLSCFUN4 (INT, vlistDefVar, VLISTDEFVAR, vlistdefvar, INT, INT, INT, INT) +FCALLSCSUB3 (vlistChangeVarGrid, VLISTCHANGEVARGRID, vlistchangevargrid, INT, INT, INT) +FCALLSCSUB3 (vlistChangeVarZaxis, VLISTCHANGEVARZAXIS, vlistchangevarzaxis, INT, INT, INT) +FCALLSCSUB5 (vlistInqVar, VLISTINQVAR, vlistinqvar, INT, INT, PINT, PINT, PINT) +FCALLSCFUN2 (INT, vlistInqVarGrid, VLISTINQVARGRID, vlistinqvargrid, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarZaxis, VLISTINQVARZAXIS, vlistinqvarzaxis, INT, INT) + +/* used in MPIOM */ + +FCALLSCFUN2 (INT, vlistInqVarID, VLISTINQVARID, vlistinqvarid, INT, INT) +FCALLSCSUB3 (vlistDefVarTimetype, VLISTDEFVARTIMETYPE, vlistdefvartimetype, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarTimetype, VLISTINQVARTIMETYPE, vlistinqvartimetype, INT, INT) +FCALLSCSUB3 (vlistDefVarTsteptype, VLISTDEFVARTSTEPTYPE, vlistdefvartsteptype, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarTsteptype, VLISTINQVARTSTEPTYPE, vlistinqvartsteptype, INT, INT) +FCALLSCSUB3 (vlistDefVarCompType, VLISTDEFVARCOMPTYPE, vlistdefvarcomptype, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarCompType, VLISTINQVARCOMPTYPE, vlistinqvarcomptype, INT, INT) +FCALLSCSUB3 (vlistDefVarCompLevel, VLISTDEFVARCOMPLEVEL, vlistdefvarcomplevel, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarCompLevel, VLISTINQVARCOMPLEVEL, vlistinqvarcomplevel, INT, INT) +FCALLSCSUB3 (vlistDefVarParam, VLISTDEFVARPARAM, vlistdefvarparam, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarParam, VLISTINQVARPARAM, vlistinqvarparam, INT, INT) +FCALLSCSUB3 (vlistDefVarCode, VLISTDEFVARCODE, vlistdefvarcode, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarCode, VLISTINQVARCODE, vlistinqvarcode, INT, INT) +FCALLSCSUB3 (vlistDefVarDatatype, VLISTDEFVARDATATYPE, vlistdefvardatatype, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarDatatype, VLISTINQVARDATATYPE, vlistinqvardatatype, INT, INT) +FCALLSCSUB3 (vlistDefVarXYZ, VLISTDEFVARXYZ, vlistdefvarxyz, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarXYZ, VLISTINQVARXYZ, vlistinqvarxyz, INT, INT) +FCALLSCSUB3 (vlistDefVarNSB, VLISTDEFVARNSB, vlistdefvarnsb, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarNSB, VLISTINQVARNSB, vlistinqvarnsb, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarNumber, VLISTINQVARNUMBER, vlistinqvarnumber, INT, INT) +FCALLSCSUB3 (vlistDefVarInstitut, VLISTDEFVARINSTITUT, vlistdefvarinstitut, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarInstitut, VLISTINQVARINSTITUT, vlistinqvarinstitut, INT, INT) +FCALLSCSUB3 (vlistDefVarModel, VLISTDEFVARMODEL, vlistdefvarmodel, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarModel, VLISTINQVARMODEL, vlistinqvarmodel, INT, INT) +FCALLSCSUB3 (vlistDefVarTable, VLISTDEFVARTABLE, vlistdefvartable, INT, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarTable, VLISTINQVARTABLE, vlistinqvartable, INT, INT) +FCALLSCSUB3 (vlistDefVarName, VLISTDEFVARNAME, vlistdefvarname, INT, INT, STRING) +FCALLSCSUB3 (vlistInqVarName, VLISTINQVARNAME, vlistinqvarname, INT, INT, PSTRING) +FCALLSCFUN2 (STRING, vlistCopyVarName, VLISTCOPYVARNAME, vlistcopyvarname, INT, INT) +FCALLSCSUB3 (vlistDefVarStdname, VLISTDEFVARSTDNAME, vlistdefvarstdname, INT, INT, STRING) +FCALLSCSUB3 (vlistInqVarStdname, VLISTINQVARSTDNAME, vlistinqvarstdname, INT, INT, PSTRING) +FCALLSCSUB3 (vlistDefVarLongname, VLISTDEFVARLONGNAME, vlistdefvarlongname, INT, INT, STRING) +FCALLSCSUB3 (vlistInqVarLongname, VLISTINQVARLONGNAME, vlistinqvarlongname, INT, INT, PSTRING) +FCALLSCSUB3 (vlistDefVarUnits, VLISTDEFVARUNITS, vlistdefvarunits, INT, INT, STRING) +FCALLSCSUB3 (vlistInqVarUnits, VLISTINQVARUNITS, vlistinqvarunits, INT, INT, PSTRING) +FCALLSCSUB3 (vlistDefVarMissval, VLISTDEFVARMISSVAL, vlistdefvarmissval, INT, INT, DOUBLE) +FCALLSCFUN2 (DOUBLE, vlistInqVarMissval, VLISTINQVARMISSVAL, vlistinqvarmissval, INT, INT) +static int vlistInqVarSize_fwrap(int vlistID, int varID) +{ + SizeType v; + v = vlistInqVarSize(vlistID, varID); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, vlistInqVarSize_fwrap, VLISTINQVARSIZE, vlistinqvarsize, INT, INT) +FCALLSCSUB4 (vlistDefIndex, VLISTDEFINDEX, vlistdefindex, INT, INT, INT, INT) +FCALLSCFUN3 (INT, vlistInqIndex, VLISTINQINDEX, vlistinqindex, INT, INT, INT) +FCALLSCSUB4 (vlistDefFlag, VLISTDEFFLAG, vlistdefflag, INT, INT, INT, INT) +FCALLSCFUN3 (INT, vlistInqFlag, VLISTINQFLAG, vlistinqflag, INT, INT, INT) +FCALLSCFUN2 (INT, vlistFindVar, VLISTFINDVAR, vlistfindvar, INT, INT) +FCALLSCFUN3 (INT, vlistFindLevel, VLISTFINDLEVEL, vlistfindlevel, INT, INT, INT) +FCALLSCFUN2 (INT, vlistMergedVar, VLISTMERGEDVAR, vlistmergedvar, INT, INT) +FCALLSCFUN3 (INT, vlistMergedLevel, VLISTMERGEDLEVEL, vlistmergedlevel, INT, INT, INT) +FCALLSCSUB0 (cdiClearAdditionalKeys, CDICLEARADDITIONALKEYS, cdiclearadditionalkeys) +FCALLSCSUB1 (cdiDefAdditionalKey, CDIDEFADDITIONALKEY, cdidefadditionalkey, STRING) +FCALLSCSUB4 (vlistDefVarIntKey, VLISTDEFVARINTKEY, vlistdefvarintkey, INT, INT, STRING, INT) +FCALLSCSUB4 (vlistDefVarDblKey, VLISTDEFVARDBLKEY, vlistdefvardblkey, INT, INT, STRING, DOUBLE) +FCALLSCFUN3 (INT, vlistHasVarKey, VLISTHASVARKEY, vlisthasvarkey, INT, INT, STRING) +FCALLSCFUN3 (DOUBLE, vlistInqVarDblKey, VLISTINQVARDBLKEY, vlistinqvardblkey, INT, INT, STRING) +FCALLSCFUN3 (INT, vlistInqVarIntKey, VLISTINQVARINTKEY, vlistinqvarintkey, INT, INT, STRING) + +/* CDI attributes */ + +FCALLSCFUN3 (INT, cdiInqNatts, CDIINQNATTS, cdiinqnatts, INT, INT, PINT) +FCALLSCFUN6 (INT, cdiInqAtt, CDIINQATT, cdiinqatt, INT, INT, INT, PSTRING, PINT, PINT) +FCALLSCFUN3 (INT, cdiInqAttLen, CDIINQATTLEN, cdiinqattlen, INT, INT, STRING) +FCALLSCFUN3 (INT, cdiInqAttType, CDIINQATTTYPE, cdiinqatttype, INT, INT, STRING) +FCALLSCFUN3 (INT, cdiDelAtt, CDIDELATT, cdidelatt, INT, INT, STRING) +FCALLSCFUN4 (INT, cdiCopyAtts, CDICOPYATTS, cdicopyatts, INT, INT, INT, INT) +FCALLSCFUN6 (INT, cdiDefAttInt, CDIDEFATTINT, cdidefattint, INT, INT, STRING, INT, INT, INTV) +FCALLSCFUN6 (INT, cdiDefAttFlt, CDIDEFATTFLT, cdidefattflt, INT, INT, STRING, INT, INT, DOUBLEV) +FCALLSCFUN5 (INT, cdiDefAttTxt, CDIDEFATTTXT, cdidefatttxt, INT, INT, STRING, INT, PPSTRING) +FCALLSCFUN5 (INT, cdiInqAttInt, CDIINQATTINT, cdiinqattint, INT, INT, STRING, INT, INTV) +FCALLSCFUN5 (INT, cdiInqAttFlt, CDIINQATTFLT, cdiinqattflt, INT, INT, STRING, INT, DOUBLEV) +FCALLSCFUN5 (INT, cdiInqAttTxt, CDIINQATTTXT, cdiinqatttxt, INT, INT, STRING, INT, PPSTRING) + +/* GRID routines */ + +FCALLSCSUB2 (gridName, GRIDNAME, gridname, INT, PSTRING) +FCALLSCFUN1 (STRING, gridNamePtr, GRIDNAMEPTR, gridnameptr, INT) +FCALLSCSUB1 (gridCompress, GRIDCOMPRESS, gridcompress, INT) +FCALLSCSUB2 (gridDefMaskGME, GRIDDEFMASKGME, griddefmaskgme, INT, INTV) +FCALLSCFUN2 (INT, gridInqMaskGME, GRIDINQMASKGME, gridinqmaskgme, INT, INTV) +FCALLSCSUB2 (gridDefMask, GRIDDEFMASK, griddefmask, INT, INTV) +FCALLSCFUN2 (INT, gridInqMask, GRIDINQMASK, gridinqmask, INT, INTV) +static int gridCreate_fwrap(int gridtype, int size) +{ + int v; + v = gridCreate(gridtype, (SizeType)size); + return v; +} +FCALLSCFUN2 (INT, gridCreate_fwrap, GRIDCREATE, gridcreate, INT, INT) +FCALLSCSUB1 (gridDestroy, GRIDDESTROY, griddestroy, INT) +FCALLSCFUN1 (INT, gridDuplicate, GRIDDUPLICATE, gridduplicate, INT) +FCALLSCSUB2 (gridDefProj, GRIDDEFPROJ, griddefproj, INT, INT) +FCALLSCFUN1 (INT, gridInqProj, GRIDINQPROJ, gridinqproj, INT) +FCALLSCFUN1 (INT, gridInqProjType, GRIDINQPROJTYPE, gridinqprojtype, INT) +FCALLSCFUN1 (INT, gridInqType, GRIDINQTYPE, gridinqtype, INT) +static int gridInqSize_fwrap(int gridID) +{ + SizeType v; + v = gridInqSize(gridID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, gridInqSize_fwrap, GRIDINQSIZE, gridinqsize, INT) +static void gridDefXsize_fwrap(int gridID, int xsize) +{ + gridDefXsize(gridID, (SizeType)xsize); +} +FCALLSCSUB2 (gridDefXsize_fwrap, GRIDDEFXSIZE, griddefxsize, INT, INT) +static int gridInqXsize_fwrap(int gridID) +{ + SizeType v; + v = gridInqXsize(gridID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, gridInqXsize_fwrap, GRIDINQXSIZE, gridinqxsize, INT) +static void gridDefYsize_fwrap(int gridID, int ysize) +{ + gridDefYsize(gridID, (SizeType)ysize); +} +FCALLSCSUB2 (gridDefYsize_fwrap, GRIDDEFYSIZE, griddefysize, INT, INT) +static int gridInqYsize_fwrap(int gridID) +{ + SizeType v; + v = gridInqYsize(gridID); + return SizeType_c2f(v); +} +FCALLSCFUN1 (INT, gridInqYsize_fwrap, GRIDINQYSIZE, gridinqysize, INT) +FCALLSCSUB2 (gridDefNP, GRIDDEFNP, griddefnp, INT, INT) +FCALLSCFUN1 (INT, gridInqNP, GRIDINQNP, gridinqnp, INT) +FCALLSCSUB2 (gridDefXvals, GRIDDEFXVALS, griddefxvals, INT, DOUBLEV) +static int gridInqXvals_fwrap(int gridID, double xvals[]) +{ + SizeType v; + v = gridInqXvals(gridID, xvals); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, gridInqXvals_fwrap, GRIDINQXVALS, gridinqxvals, INT, DOUBLEV) +static int gridInqXvalsPart_fwrap(int gridID, int start, int size, double xvals[]) +{ + SizeType v; + v = gridInqXvalsPart(gridID, start, (SizeType)size, xvals); + return SizeType_c2f(v); +} +FCALLSCFUN4 (INT, gridInqXvalsPart_fwrap, GRIDINQXVALSPART, gridinqxvalspart, INT, INT, INT, DOUBLEV) +FCALLSCFUN1 (INT, gridInqXIsc, GRIDINQXISC, gridinqxisc, INT) +FCALLSCSUB2 (gridDefYvals, GRIDDEFYVALS, griddefyvals, INT, DOUBLEV) +static int gridInqYvals_fwrap(int gridID, double yvals[]) +{ + SizeType v; + v = gridInqYvals(gridID, yvals); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, gridInqYvals_fwrap, GRIDINQYVALS, gridinqyvals, INT, DOUBLEV) +static int gridInqYvalsPart_fwrap(int gridID, int start, int size, double yvals[]) +{ + SizeType v; + v = gridInqYvalsPart(gridID, start, (SizeType)size, yvals); + return SizeType_c2f(v); +} +FCALLSCFUN4 (INT, gridInqYvalsPart_fwrap, GRIDINQYVALSPART, gridinqyvalspart, INT, INT, INT, DOUBLEV) +FCALLSCFUN1 (INT, gridInqYIsc, GRIDINQYISC, gridinqyisc, INT) + +/* CDI var keys */ + + +/* String keys */ + + +/* Integer keys */ + + +/* Floating point keys */ + + +/* Byte array keys */ + +FCALLSCFUN4 (INT, cdiDefKeyInt, CDIDEFKEYINT, cdidefkeyint, INT, INT, INT, INT) +FCALLSCFUN4 (INT, cdiInqKeyInt, CDIINQKEYINT, cdiinqkeyint, INT, INT, INT, PINT) +FCALLSCFUN4 (INT, cdiDefKeyFloat, CDIDEFKEYFLOAT, cdidefkeyfloat, INT, INT, INT, DOUBLE) + +/* cdiInqKeyFloat Get a float value from a key */ + +FCALLSCFUN4 (INT, cdiInqKeyFloat, CDIINQKEYFLOAT, cdiinqkeyfloat, INT, INT, INT, PDOUBLE) +FCALLSCFUN4 (INT, cdiDefKeyString, CDIDEFKEYSTRING, cdidefkeystring, INT, INT, INT, STRING) +FCALLSCFUN5 (INT, cdiInqKeyString, CDIINQKEYSTRING, cdiinqkeystring, INT, INT, INT, PSTRING, PINT) +FCALLSCFUN4 (INT, cdiInqKeyLen, CDIINQKEYLEN, cdiinqkeylen, INT, INT, INT, PINT) +FCALLSCFUN4 (INT, cdiCopyKeys, CDICOPYKEYS, cdicopykeys, INT, INT, INT, INT) +FCALLSCFUN4 (INT, cdiCopyKey, CDICOPYKEY, cdicopykey, INT, INT, INT, INT) +FCALLSCFUN3 (INT, cdiDeleteKey, CDIDELETEKEY, cdideletekey, INT, INT, INT) + +/* GRID routines */ + +FCALLSCSUB2 (gridDefXname, GRIDDEFXNAME, griddefxname, INT, STRING) +FCALLSCSUB2 (gridInqXname, GRIDINQXNAME, gridinqxname, INT, PSTRING) +FCALLSCSUB2 (gridDefXlongname, GRIDDEFXLONGNAME, griddefxlongname, INT, STRING) +FCALLSCSUB2 (gridInqXlongname, GRIDINQXLONGNAME, gridinqxlongname, INT, PSTRING) +FCALLSCSUB2 (gridDefXunits, GRIDDEFXUNITS, griddefxunits, INT, STRING) +FCALLSCSUB2 (gridInqXunits, GRIDINQXUNITS, gridinqxunits, INT, PSTRING) +FCALLSCSUB2 (gridDefYname, GRIDDEFYNAME, griddefyname, INT, STRING) +FCALLSCSUB2 (gridInqYname, GRIDINQYNAME, gridinqyname, INT, PSTRING) +FCALLSCSUB2 (gridDefYlongname, GRIDDEFYLONGNAME, griddefylongname, INT, STRING) +FCALLSCSUB2 (gridInqYlongname, GRIDINQYLONGNAME, gridinqylongname, INT, PSTRING) +FCALLSCSUB2 (gridDefYunits, GRIDDEFYUNITS, griddefyunits, INT, STRING) +FCALLSCSUB2 (gridInqYunits, GRIDINQYUNITS, gridinqyunits, INT, PSTRING) +FCALLSCSUB2 (gridDefDatatype, GRIDDEFDATATYPE, griddefdatatype, INT, INT) +FCALLSCFUN1 (INT, gridInqDatatype, GRIDINQDATATYPE, gridinqdatatype, INT) +static double gridInqXval_fwrap(int gridID, int index) +{ + double v; + v = gridInqXval(gridID, (SizeType)index); + return v; +} +FCALLSCFUN2 (DOUBLE, gridInqXval_fwrap, GRIDINQXVAL, gridinqxval, INT, INT) +static double gridInqYval_fwrap(int gridID, int index) +{ + double v; + v = gridInqYval(gridID, (SizeType)index); + return v; +} +FCALLSCFUN2 (DOUBLE, gridInqYval_fwrap, GRIDINQYVAL, gridinqyval, INT, INT) +FCALLSCFUN1 (DOUBLE, gridInqXinc, GRIDINQXINC, gridinqxinc, INT) +FCALLSCFUN1 (DOUBLE, gridInqYinc, GRIDINQYINC, gridinqyinc, INT) +FCALLSCFUN1 (INT, gridIsCircular, GRIDISCIRCULAR, gridiscircular, INT) +FCALLSCFUN1 (INT, gridInqTrunc, GRIDINQTRUNC, gridinqtrunc, INT) +FCALLSCSUB2 (gridDefTrunc, GRIDDEFTRUNC, griddeftrunc, INT, INT) + +/* Reference of an unstructured grid */ + +FCALLSCSUB2 (gridDefNumber, GRIDDEFNUMBER, griddefnumber, INT, INT) +FCALLSCFUN1 (INT, gridInqNumber, GRIDINQNUMBER, gridinqnumber, INT) +FCALLSCSUB2 (gridDefPosition, GRIDDEFPOSITION, griddefposition, INT, INT) +FCALLSCFUN1 (INT, gridInqPosition, GRIDINQPOSITION, gridinqposition, INT) +FCALLSCSUB2 (gridDefReference, GRIDDEFREFERENCE, griddefreference, INT, STRING) +FCALLSCFUN2 (INT, gridInqReference, GRIDINQREFERENCE, gridinqreference, INT, PSTRING) +FCALLSCSUB2 (gridDefUUID, GRIDDEFUUID, griddefuuid, INT, PVOID) +FCALLSCSUB2 (gridInqUUID, GRIDINQUUID, gridinquuid, INT, PVOID) + +/* Rotated Lon/Lat grid */ + +FCALLSCSUB4 (gridDefParamRLL, GRIDDEFPARAMRLL, griddefparamrll, INT, DOUBLE, DOUBLE, DOUBLE) +FCALLSCSUB4 (gridInqParamRLL, GRIDINQPARAMRLL, gridinqparamrll, INT, PDOUBLE, PDOUBLE, PDOUBLE) + +/* Hexagonal GME grid */ + +FCALLSCSUB5 (gridDefParamGME, GRIDDEFPARAMGME, griddefparamgme, INT, INT, INT, INT, INT) +FCALLSCSUB5 (gridInqParamGME, GRIDINQPARAMGME, gridinqparamgme, INT, PINT, PINT, PINT, PINT) +FCALLSCSUB2 (gridDefArea, GRIDDEFAREA, griddefarea, INT, DOUBLEV) +FCALLSCSUB2 (gridInqArea, GRIDINQAREA, gridinqarea, INT, DOUBLEV) +FCALLSCFUN1 (INT, gridHasArea, GRIDHASAREA, gridhasarea, INT) +FCALLSCSUB2 (gridDefNvertex, GRIDDEFNVERTEX, griddefnvertex, INT, INT) +FCALLSCFUN1 (INT, gridInqNvertex, GRIDINQNVERTEX, gridinqnvertex, INT) +FCALLSCSUB2 (gridDefXbounds, GRIDDEFXBOUNDS, griddefxbounds, INT, DOUBLEV) +static int gridInqXbounds_fwrap(int gridID, double xbounds[]) +{ + SizeType v; + v = gridInqXbounds(gridID, xbounds); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, gridInqXbounds_fwrap, GRIDINQXBOUNDS, gridinqxbounds, INT, DOUBLEV) +static int gridInqXboundsPart_fwrap(int gridID, int start, int size, double xbounds[]) +{ + SizeType v; + v = gridInqXboundsPart(gridID, start, (SizeType)size, xbounds); + return SizeType_c2f(v); +} +FCALLSCFUN4 (INT, gridInqXboundsPart_fwrap, GRIDINQXBOUNDSPART, gridinqxboundspart, INT, INT, INT, DOUBLEV) +FCALLSCSUB2 (gridDefYbounds, GRIDDEFYBOUNDS, griddefybounds, INT, DOUBLEV) +static int gridInqYbounds_fwrap(int gridID, double ybounds[]) +{ + SizeType v; + v = gridInqYbounds(gridID, ybounds); + return SizeType_c2f(v); +} +FCALLSCFUN2 (INT, gridInqYbounds_fwrap, GRIDINQYBOUNDS, gridinqybounds, INT, DOUBLEV) +static int gridInqYboundsPart_fwrap(int gridID, int start, int size, double ybounds[]) +{ + SizeType v; + v = gridInqYboundsPart(gridID, start, (SizeType)size, ybounds); + return SizeType_c2f(v); +} +FCALLSCFUN4 (INT, gridInqYboundsPart_fwrap, GRIDINQYBOUNDSPART, gridinqyboundspart, INT, INT, INT, DOUBLEV) +FCALLSCSUB3 (gridDefReducedPoints, GRIDDEFREDUCEDPOINTS, griddefreducedpoints, INT, INT, INTV) +FCALLSCSUB2 (gridInqReducedPoints, GRIDINQREDUCEDPOINTS, gridinqreducedpoints, INT, INTV) +FCALLSCSUB2 (gridChangeType, GRIDCHANGETYPE, gridchangetype, INT, INT) +FCALLSCSUB2 (gridDefComplexPacking, GRIDDEFCOMPLEXPACKING, griddefcomplexpacking, INT, INT) +FCALLSCFUN1 (INT, gridInqComplexPacking, GRIDINQCOMPLEXPACKING, gridinqcomplexpacking, INT) + +/* ZAXIS routines */ + +FCALLSCSUB2 (zaxisName, ZAXISNAME, zaxisname, INT, PSTRING) +FCALLSCFUN1 (STRING, zaxisNamePtr, ZAXISNAMEPTR, zaxisnameptr, INT) +FCALLSCFUN2 (INT, zaxisCreate, ZAXISCREATE, zaxiscreate, INT, INT) +FCALLSCSUB1 (zaxisDestroy, ZAXISDESTROY, zaxisdestroy, INT) +FCALLSCFUN1 (INT, zaxisInqType, ZAXISINQTYPE, zaxisinqtype, INT) +FCALLSCFUN1 (INT, zaxisInqSize, ZAXISINQSIZE, zaxisinqsize, INT) +FCALLSCFUN1 (INT, zaxisDuplicate, ZAXISDUPLICATE, zaxisduplicate, INT) +FCALLSCSUB2 (zaxisDefLevels, ZAXISDEFLEVELS, zaxisdeflevels, INT, DOUBLEV) +FCALLSCFUN2 (INT, zaxisInqLevels, ZAXISINQLEVELS, zaxisinqlevels, INT, DOUBLEV) +FCALLSCFUN1 (INT, zaxisInqCLen, ZAXISINQCLEN, zaxisinqclen, INT) +FCALLSCSUB3 (zaxisDefLevel, ZAXISDEFLEVEL, zaxisdeflevel, INT, INT, DOUBLE) +FCALLSCFUN2 (DOUBLE, zaxisInqLevel, ZAXISINQLEVEL, zaxisinqlevel, INT, INT) +FCALLSCSUB2 (zaxisDefNlevRef, ZAXISDEFNLEVREF, zaxisdefnlevref, INT, INT) +FCALLSCFUN1 (INT, zaxisInqNlevRef, ZAXISINQNLEVREF, zaxisinqnlevref, INT) +FCALLSCSUB2 (zaxisDefNumber, ZAXISDEFNUMBER, zaxisdefnumber, INT, INT) +FCALLSCFUN1 (INT, zaxisInqNumber, ZAXISINQNUMBER, zaxisinqnumber, INT) +FCALLSCSUB2 (zaxisDefUUID, ZAXISDEFUUID, zaxisdefuuid, INT, PVOID) +FCALLSCSUB2 (zaxisInqUUID, ZAXISINQUUID, zaxisinquuid, INT, PVOID) +FCALLSCSUB2 (zaxisDefName, ZAXISDEFNAME, zaxisdefname, INT, STRING) +FCALLSCSUB2 (zaxisInqName, ZAXISINQNAME, zaxisinqname, INT, PSTRING) +FCALLSCSUB2 (zaxisDefLongname, ZAXISDEFLONGNAME, zaxisdeflongname, INT, STRING) +FCALLSCSUB2 (zaxisInqLongname, ZAXISINQLONGNAME, zaxisinqlongname, INT, PSTRING) +FCALLSCSUB2 (zaxisDefUnits, ZAXISDEFUNITS, zaxisdefunits, INT, STRING) +FCALLSCSUB2 (zaxisInqUnits, ZAXISINQUNITS, zaxisinqunits, INT, PSTRING) +FCALLSCSUB2 (zaxisInqStdname, ZAXISINQSTDNAME, zaxisinqstdname, INT, PSTRING) +FCALLSCSUB2 (zaxisDefDatatype, ZAXISDEFDATATYPE, zaxisdefdatatype, INT, INT) +FCALLSCFUN1 (INT, zaxisInqDatatype, ZAXISINQDATATYPE, zaxisinqdatatype, INT) +FCALLSCSUB2 (zaxisDefPositive, ZAXISDEFPOSITIVE, zaxisdefpositive, INT, INT) +FCALLSCFUN1 (INT, zaxisInqPositive, ZAXISINQPOSITIVE, zaxisinqpositive, INT) +FCALLSCSUB1 (zaxisDefScalar, ZAXISDEFSCALAR, zaxisdefscalar, INT) +FCALLSCFUN1 (INT, zaxisInqScalar, ZAXISINQSCALAR, zaxisinqscalar, INT) +FCALLSCSUB3 (zaxisDefVct, ZAXISDEFVCT, zaxisdefvct, INT, INT, DOUBLEV) +FCALLSCSUB2 (zaxisInqVct, ZAXISINQVCT, zaxisinqvct, INT, DOUBLEV) +FCALLSCFUN1 (INT, zaxisInqVctSize, ZAXISINQVCTSIZE, zaxisinqvctsize, INT) +FCALLSCSUB2 (zaxisDefLbounds, ZAXISDEFLBOUNDS, zaxisdeflbounds, INT, DOUBLEV) +FCALLSCFUN2 (INT, zaxisInqLbounds, ZAXISINQLBOUNDS, zaxisinqlbounds, INT, DOUBLEV) +FCALLSCFUN2 (DOUBLE, zaxisInqLbound, ZAXISINQLBOUND, zaxisinqlbound, INT, INT) +FCALLSCSUB2 (zaxisDefUbounds, ZAXISDEFUBOUNDS, zaxisdefubounds, INT, DOUBLEV) +FCALLSCFUN2 (INT, zaxisInqUbounds, ZAXISINQUBOUNDS, zaxisinqubounds, INT, DOUBLEV) +FCALLSCFUN2 (DOUBLE, zaxisInqUbound, ZAXISINQUBOUND, zaxisinqubound, INT, INT) +FCALLSCSUB2 (zaxisDefWeights, ZAXISDEFWEIGHTS, zaxisdefweights, INT, DOUBLEV) +FCALLSCFUN2 (INT, zaxisInqWeights, ZAXISINQWEIGHTS, zaxisinqweights, INT, DOUBLEV) +FCALLSCSUB2 (zaxisChangeType, ZAXISCHANGETYPE, zaxischangetype, INT, INT) + +/* TAXIS routines */ + +FCALLSCFUN1 (INT, taxisCreate, TAXISCREATE, taxiscreate, INT) +FCALLSCSUB1 (taxisDestroy, TAXISDESTROY, taxisdestroy, INT) +FCALLSCFUN1 (INT, taxisDuplicate, TAXISDUPLICATE, taxisduplicate, INT) +FCALLSCSUB2 (taxisCopyTimestep, TAXISCOPYTIMESTEP, taxiscopytimestep, INT, INT) +FCALLSCSUB2 (taxisDefType, TAXISDEFTYPE, taxisdeftype, INT, INT) +FCALLSCFUN1 (INT, taxisInqType, TAXISINQTYPE, taxisinqtype, INT) +FCALLSCSUB2 (taxisDefVdate, TAXISDEFVDATE, taxisdefvdate, INT, INT) +FCALLSCSUB2 (taxisDefVtime, TAXISDEFVTIME, taxisdefvtime, INT, INT) +FCALLSCFUN1 (INT, taxisInqVdate, TAXISINQVDATE, taxisinqvdate, INT) +FCALLSCFUN1 (INT, taxisInqVtime, TAXISINQVTIME, taxisinqvtime, INT) +FCALLSCSUB2 (taxisDefRdate, TAXISDEFRDATE, taxisdefrdate, INT, INT) +FCALLSCSUB2 (taxisDefRtime, TAXISDEFRTIME, taxisdefrtime, INT, INT) +FCALLSCFUN1 (INT, taxisInqRdate, TAXISINQRDATE, taxisinqrdate, INT) +FCALLSCFUN1 (INT, taxisInqRtime, TAXISINQRTIME, taxisinqrtime, INT) +FCALLSCFUN1 (INT, taxisHasBounds, TAXISHASBOUNDS, taxishasbounds, INT) +FCALLSCSUB1 (taxisWithBounds, TAXISWITHBOUNDS, taxiswithbounds, INT) +FCALLSCSUB1 (taxisDeleteBounds, TAXISDELETEBOUNDS, taxisdeletebounds, INT) +FCALLSCSUB3 (taxisDefVdateBounds, TAXISDEFVDATEBOUNDS, taxisdefvdatebounds, INT, INT, INT) +FCALLSCSUB3 (taxisDefVtimeBounds, TAXISDEFVTIMEBOUNDS, taxisdefvtimebounds, INT, INT, INT) +FCALLSCSUB3 (taxisInqVdateBounds, TAXISINQVDATEBOUNDS, taxisinqvdatebounds, INT, PINT, PINT) +FCALLSCSUB3 (taxisInqVtimeBounds, TAXISINQVTIMEBOUNDS, taxisinqvtimebounds, INT, PINT, PINT) +FCALLSCSUB2 (taxisDefCalendar, TAXISDEFCALENDAR, taxisdefcalendar, INT, INT) +FCALLSCFUN1 (INT, taxisInqCalendar, TAXISINQCALENDAR, taxisinqcalendar, INT) +FCALLSCSUB2 (taxisDefTunit, TAXISDEFTUNIT, taxisdeftunit, INT, INT) +FCALLSCFUN1 (INT, taxisInqTunit, TAXISINQTUNIT, taxisinqtunit, INT) +FCALLSCSUB2 (taxisDefForecastTunit, TAXISDEFFORECASTTUNIT, taxisdefforecasttunit, INT, INT) +FCALLSCFUN1 (INT, taxisInqForecastTunit, TAXISINQFORECASTTUNIT, taxisinqforecasttunit, INT) +FCALLSCSUB2 (taxisDefForecastPeriod, TAXISDEFFORECASTPERIOD, taxisdefforecastperiod, INT, DOUBLE) +FCALLSCFUN1 (DOUBLE, taxisInqForecastPeriod, TAXISINQFORECASTPERIOD, taxisinqforecastperiod, INT) +FCALLSCSUB2 (taxisDefNumavg, TAXISDEFNUMAVG, taxisdefnumavg, INT, INT) +FCALLSCFUN1 (INT, taxisInqNumavg, TAXISINQNUMAVG, taxisinqnumavg, INT) +FCALLSCFUN1 (STRING, taxisNamePtr, TAXISNAMEPTR, taxisnameptr, INT) +FCALLSCFUN1 (STRING, tunitNamePtr, TUNITNAMEPTR, tunitnameptr, INT) + +/* Institut routines */ + +FCALLSCFUN4 (INT, institutDef, INSTITUTDEF, institutdef, INT, INT, STRING, STRING) +FCALLSCFUN4 (INT, institutInq, INSTITUTINQ, institutinq, INT, INT, STRING, STRING) +FCALLSCFUN0 (INT, institutInqNumber, INSTITUTINQNUMBER, institutinqnumber) +FCALLSCFUN1 (INT, institutInqCenter, INSTITUTINQCENTER, institutinqcenter, INT) +FCALLSCFUN1 (INT, institutInqSubcenter, INSTITUTINQSUBCENTER, institutinqsubcenter, INT) +FCALLSCFUN1 (STRING, institutInqNamePtr, INSTITUTINQNAMEPTR, institutinqnameptr, INT) +FCALLSCFUN1 (STRING, institutInqLongnamePtr, INSTITUTINQLONGNAMEPTR, institutinqlongnameptr, INT) + +/* Model routines */ + +FCALLSCFUN3 (INT, modelDef, MODELDEF, modeldef, INT, INT, STRING) +FCALLSCFUN3 (INT, modelInq, MODELINQ, modelinq, INT, INT, STRING) +FCALLSCFUN1 (INT, modelInqInstitut, MODELINQINSTITUT, modelinqinstitut, INT) +FCALLSCFUN1 (INT, modelInqGribID, MODELINQGRIBID, modelinqgribid, INT) +FCALLSCFUN1 (STRING, modelInqNamePtr, MODELINQNAMEPTR, modelinqnameptr, INT) + +/* Table routines */ + +FCALLSCSUB2 (tableWrite, TABLEWRITE, tablewrite, STRING, INT) +FCALLSCFUN1 (INT, tableRead, TABLEREAD, tableread, STRING) +FCALLSCFUN3 (INT, tableDef, TABLEDEF, tabledef, INT, INT, STRING) +FCALLSCFUN1 (STRING, tableInqNamePtr, TABLEINQNAMEPTR, tableinqnameptr, INT) +FCALLSCFUN3 (INT, tableInq, TABLEINQ, tableinq, INT, INT, STRING) +FCALLSCFUN0 (INT, tableInqNumber, TABLEINQNUMBER, tableinqnumber) +FCALLSCFUN1 (INT, tableInqNum, TABLEINQNUM, tableinqnum, INT) +FCALLSCFUN1 (INT, tableInqModel, TABLEINQMODEL, tableinqmodel, INT) +FCALLSCSUB6 (tableInqEntry, TABLEINQENTRY, tableinqentry, INT, INT, INT, PSTRING, PSTRING, PSTRING) + +/* Subtype routines */ + +FCALLSCFUN1 (INT, subtypeCreate, SUBTYPECREATE, subtypecreate, INT) + +/* Gives a textual summary of the variable subtype */ + +FCALLSCSUB1 (subtypePrint, SUBTYPEPRINT, subtypeprint, INT) + +/* Compares two subtype data structures */ + +FCALLSCFUN2 (INT, subtypeCompare, SUBTYPECOMPARE, subtypecompare, INT, INT) +FCALLSCFUN1 (INT, subtypeInqSize, SUBTYPEINQSIZE, subtypeinqsize, INT) +FCALLSCFUN1 (INT, subtypeInqActiveIndex, SUBTYPEINQACTIVEINDEX, subtypeinqactiveindex, INT) +FCALLSCSUB2 (subtypeDefActiveIndex, SUBTYPEDEFACTIVEINDEX, subtypedefactiveindex, INT, INT) + +/* Generate a "query object" out of a key-value pair */ + + +/* Generate an AND-combined "query object" out of two previous query objects */ + +FCALLSCFUN3 (INT, subtypeInqTile, SUBTYPEINQTILE, subtypeinqtile, INT, INT, INT) +FCALLSCFUN4 (INT, subtypeInqAttribute, SUBTYPEINQATTRIBUTE, subtypeinqattribute, INT, INT, STRING, PINT) +FCALLSCFUN2 (INT, vlistInqVarSubtype, VLISTINQVARSUBTYPE, vlistinqvarsubtype, INT, INT) +FCALLSCSUB3 (gribapiLibraryVersion, GRIBAPILIBRARYVERSION, gribapilibraryversion, PINT, PINT, PINT) + +/* Compatibility functions for release 1.8.3 (obsolete functions) */ + +FCALLSCSUB2 (zaxisDefLtype, ZAXISDEFLTYPE, zaxisdefltype, INT, INT) +FCALLSCFUN2 (INT, vlistInqVarTypeOfGeneratingProcess, VLISTINQVARTYPEOFGENERATINGPROCESS, vlistinqvartypeofgeneratingprocess, INT, INT) +FCALLSCSUB3 (vlistDefVarTypeOfGeneratingProcess, VLISTDEFVARTYPEOFGENERATINGPROCESS, vlistdefvartypeofgeneratingprocess, INT, INT, INT) +FCALLSCSUB3 (vlistDefVarProductDefinitionTemplate, VLISTDEFVARPRODUCTDEFINITIONTEMPLATE, vlistdefvarproductdefinitiontemplate, INT, INT, INT) + +/* End of fortran interface */ + + +#if defined __clang__ +# pragma GCC diagnostic pop +#endif + +// clang-format on + +#endif diff --git a/src/cdipio.inc b/src/cdipio.inc new file mode 100644 index 000000000..b1b2e7ec8 --- /dev/null +++ b/src/cdipio.inc @@ -0,0 +1,318 @@ +! This file was automatically generated, don't edit! +! +! Fortran interface for CDI library version 2.2.0 +! +! Author: +! ------- +! Uwe Schulzweida, MPI-MET, Hamburg, February 2023 +! + +! +! Start of fortran interface for the following routines (make_fint.c) +! +! +! parallel IO IOMode +! + INTEGER PIO_NONE + PARAMETER (PIO_NONE = 0) + INTEGER PIO_MPI + PARAMETER (PIO_MPI = 1) + INTEGER PIO_WRITER + PARAMETER (PIO_WRITER = 2) + INTEGER PIO_ASYNCH + PARAMETER (PIO_ASYNCH = 3) + INTEGER PIO_FPGUARD + PARAMETER (PIO_FPGUARD = 4) + INTEGER PIO_MPI_FW_ORDERED + PARAMETER (PIO_MPI_FW_ORDERED = 5) + INTEGER PIO_MPI_FW_AT_ALL + PARAMETER (PIO_MPI_FW_AT_ALL = 6) + INTEGER PIO_MPI_FW_AT_REBLOCK + PARAMETER (PIO_MPI_FW_AT_REBLOCK = 7) + INTEGER PIO_MINIOMODE + PARAMETER (PIO_MINIOMODE = PIO_NONE) + INTEGER PIO_MAXIOMODE + PARAMETER (PIO_MAXIOMODE = PIO_MPI_FW_AT_REBLOCK) + INTEGER PIO_ROLE_CLIENT + PARAMETER (PIO_ROLE_CLIENT = 0) + INTEGER PIO_ROLE_COLLECTOR + PARAMETER (PIO_ROLE_COLLECTOR = 1) + INTEGER PIO_ROLE_WRITER + PARAMETER (PIO_ROLE_WRITER = 2) + INTEGER PIO_ROLE_WRITER_COLLECTOR + PARAMETER (PIO_ROLE_WRITER_COLLECTOR = 3) + INTEGER PIO_ROLE_FPGUARD + PARAMETER (PIO_ROLE_FPGUARD = 4) +! +! parallel IO routines +! +! pioEndDef + EXTERNAL pioEndDef + +! pioEndTimestepping + EXTERNAL pioEndTimestepping + +! pioFinalize + EXTERNAL pioFinalize + +! cdiPioNoPostCommSetup + EXTERNAL cdiPioNoPostCommSetup + + INTEGER pioInit +! (INTEGER commSuper, +! INTEGER nProcsIO, +! INTEGER IOMode, +! INTEGER pioNamespace, +! REAL partInflate, +! PROCEDURE postCommSetupActions) + EXTERNAL pioInit + + INTEGER cdiPioInit +! (INTEGER commSuper, +! INTEGER confResH, +! INTEGER pioNamespace) + EXTERNAL cdiPioInit + +! pioWriteTimestep + EXTERNAL pioWriteTimestep + +! cdiPioRDMAProgress + EXTERNAL cdiPioRDMAProgress + +! cdiPioStreamDefDecomposedVlist +! (INTEGER streamID, +! INTEGER vlistID, +! TYPE(XT_IDXLIST)partDesc(*), +! INTEGER conversion(*)) + EXTERNAL cdiPioStreamDefDecomposedVlist + +! streamWriteVarPart +! (INTEGER streamID, +! INTEGER varID, +! DOUBLEPRECISION data, +! INTEGER nmiss, +! TYPE(XT_IDXLIST)partDesc) + EXTERNAL streamWriteVarPart + +! streamWriteVarPartF +! (INTEGER streamID, +! INTEGER varID, +! REAL data, +! INTEGER nmiss, +! TYPE(XT_IDXLIST)partDesc) + EXTERNAL streamWriteVarPartF + +! streamWriteScatteredVarPart +! (INTEGER streamID, +! INTEGER varID, +! DOUBLEPRECISION data, +! INTEGER numBlocks, +! INTEGER blocklengths(*), +! INTEGER displacements(*), +! INTEGER nmiss, +! TYPE(XT_IDXLIST)partDesc) + EXTERNAL streamWriteScatteredVarPart + +! streamWriteScatteredVarPartF +! (INTEGER streamID, +! INTEGER varID, +! REAL data, +! INTEGER numBlocks, +! INTEGER blocklengths(*), +! INTEGER displacements(*), +! INTEGER nmiss, +! TYPE(XT_IDXLIST)partDesc) + EXTERNAL streamWriteScatteredVarPartF + + INTEGER cdiPioCSRLastN +! (INTEGER commSuper, +! INTEGER IOMode, +! INTEGER nProcsIO) + EXTERNAL cdiPioCSRLastN + + INTEGER cdiPioCSRFirstN +! (INTEGER commSuper, +! INTEGER IOMode, +! INTEGER nProcsIO) + EXTERNAL cdiPioCSRFirstN + + INTEGER cdiPioCSRBalanced +! (INTEGER commSuper, +! INTEGER IOMode, +! INTEGER nProcsIO) + EXTERNAL cdiPioCSRBalanced + + INTEGER cdiPioStr2IOMode +! (CHARACTER*(*) modeStr) + EXTERNAL cdiPioStr2IOMode + + CHARACTER(80) cdiPioIOMode2Str +! (INTEGER IOMode) + EXTERNAL cdiPioIOMode2Str + + INTEGER cdiPioConfCreate + EXTERNAL cdiPioConfCreate + +! cdiPioConfDestroy +! (INTEGER confResH) + EXTERNAL cdiPioConfDestroy + +! cdiPioConfSetPartInflate +! (INTEGER confResH, +! REAL partInflate) + EXTERNAL cdiPioConfSetPartInflate + + REAL cdiPioConfGetPartInflate +! (INTEGER confResH) + EXTERNAL cdiPioConfGetPartInflate + +! cdiPioConfSetIOMode +! (INTEGER confResH, +! INTEGER IOMode) + EXTERNAL cdiPioConfSetIOMode + + INTEGER cdiPioConfGetIOMode +! (INTEGER confResH) + EXTERNAL cdiPioConfGetIOMode + +! cdiPioConfSetCSRole +! (INTEGER confResH, +! INTEGER CSRole) + EXTERNAL cdiPioConfSetCSRole + + INTEGER cdiPioConfGetCSRole +! (INTEGER confResH) + EXTERNAL cdiPioConfGetCSRole + +! cdiPioConfSetPostCommSetupActions +! (INTEGER confResH, +! PROCEDURE postCommSetupActions) + EXTERNAL cdiPioConfSetPostCommSetupActions + + INTEGER CDIPIO_CALLBACK_POSTCOMMSETUP + PARAMETER (CDIPIO_CALLBACK_POSTCOMMSETUP = 0) + INTEGER CDIPIO_CALLBACK_POSTSTREAMCLOSE + PARAMETER (CDIPIO_CALLBACK_POSTSTREAMCLOSE = 1) + INTEGER CDIPIO_CALLBACK_POSTWRITEBATCH + PARAMETER (CDIPIO_CALLBACK_POSTWRITEBATCH = 2) +! cdiPioConfSetCallBackActions +! (INTEGER confResH, +! INTEGER trigger, +! PROCEDURE action) + EXTERNAL cdiPioConfSetCallBackActions + +! +! cdiPioConfSetLargePageAlign should block buffer be aligned to +! large pages instead of normal pages? +! +! cdiPioConfSetLargePageAlign +! (INTEGER confResH, +! INTEGER largePageAlign) + EXTERNAL cdiPioConfSetLargePageAlign + + INTEGER cdiPioConfGetLargePageAlign +! (INTEGER confResH) + EXTERNAL cdiPioConfGetLargePageAlign + +! cdiPioConfSetRecordAggBufLim +! (INTEGER confResH, +! INTEGER lim_mb) + EXTERNAL cdiPioConfSetRecordAggBufLim + + INTEGER cdiPioConfGetRecordAggBufLim +! (INTEGER confResH) + EXTERNAL cdiPioConfGetRecordAggBufLim + +! cdiPioConfSetWriteAggBufLim +! (INTEGER confResH, +! INTEGER lim_mb) + EXTERNAL cdiPioConfSetWriteAggBufLim + + INTEGER cdiPioConfGetWriteAggBufLim +! (INTEGER confResH) + EXTERNAL cdiPioConfGetWriteAggBufLim + +! cdiPioConfSetAioQueueDepth +! (INTEGER confResH, +! INTEGER queue_depth) + EXTERNAL cdiPioConfSetAioQueueDepth + + INTEGER cdiPioConfGetAioQueueDepth +! (INTEGER confResH) + EXTERNAL cdiPioConfGetAioQueueDepth + +! cdiPioConfSetMaxPathLen +! (INTEGER confResH, +! INTEGER max_path_len) + EXTERNAL cdiPioConfSetMaxPathLen + + INTEGER cdiPioConfGetMaxPathLen +! (INTEGER confResH) + EXTERNAL cdiPioConfGetMaxPathLen + +! cdiPioConfSetRedistCache +! (INTEGER confResH, +! INTEGER doCache) + EXTERNAL cdiPioConfSetRedistCache + + INTEGER cdiPioConfGetRedistCache +! (INTEGER confResH) + EXTERNAL cdiPioConfGetRedistCache + +! cdiPioConfSetXmapCache +! (INTEGER confResH, +! INTEGER doCache) + EXTERNAL cdiPioConfSetXmapCache + + INTEGER cdiPioConfGetXmapCache +! (INTEGER confResH) + EXTERNAL cdiPioConfGetXmapCache + +! cdiPioConfSetStripeConversion +! (INTEGER confResH, +! INTEGER doStripify) + EXTERNAL cdiPioConfSetStripeConversion + + INTEGER cdiPioConfGetStripeConversion +! (INTEGER confResH) + EXTERNAL cdiPioConfGetStripeConversion + +! cdiPioConfSetBatchedRMA +! (INTEGER confResH, +! INTEGER doBatchedRMA) + EXTERNAL cdiPioConfSetBatchedRMA + + INTEGER cdiPioConfGetBatchedRMA +! (INTEGER confResH) + EXTERNAL cdiPioConfGetBatchedRMA + + INTEGER cdiPioDistGridCreate +! (INTEGER gridtype, +! INTEGER size, +! INTEGER xsize, +! INTEGER ysize, +! INTEGER nvertex, +! INTEGER xy_decomposition_optional(2,*), +! TYPE(XT_IDXLIST)partDesc2D, +! TYPE(XT_IDXLIST)partDescX, +! TYPE(XT_IDXLIST)partDescY) + EXTERNAL cdiPioDistGridCreate + +! cdiPioDistGridEnableIndividualQueries +! (INTEGER gridID) + EXTERNAL cdiPioDistGridEnableIndividualQueries + +! cdiPioDistGridDisableIndividualQueries +! (INTEGER gridID) + EXTERNAL cdiPioDistGridDisableIndividualQueries + + LOGICAL cdiPioDistGridIndividualQueriesEnabled +! (INTEGER gridID) + EXTERNAL cdiPioDistGridIndividualQueriesEnabled + + INTEGER cdiPioInqInterComm + EXTERNAL cdiPioInqInterComm + +! +! End of fortran interface +! diff --git a/src/cdipioFortran.c b/src/cdipioFortran.c new file mode 100644 index 000000000..1fba0d22d --- /dev/null +++ b/src/cdipioFortran.c @@ -0,0 +1,186 @@ +// Automatically generated by make_fint.c, don't edit! + +// clang-format off + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef CDIPIO_H_ +#include "cdipio.h" +#endif + +#ifdef HAVE_CF_INTERFACE + +#include <limits.h> +#include <assert.h> + +#ifndef __CFORTRAN_LOADED +# if defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wreserved-id-macro" +# endif +# include "cfortran.h" +# if defined __clang__ +# pragma GCC diagnostic pop +# endif +#endif +/* These functions are meant to be called from Fortran and don't + * need an interface declaration in a C header. */ +#ifdef __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmissing-prototypes" +#endif + +#ifdef CDI_H_ + +static inline +int SizeType_c2f(SizeType value_SizeType) +{ + assert(value_SizeType < INT_MAX); + return (int) value_SizeType; +} + +#endif + +/* Start of fortran interface for the following routines (make_fint.c) */ + + +/* parallel IO IOMode */ + + +/* parallel IO routines */ + +FCALLSCSUB0 (pioEndDef, PIOENDDEF, pioenddef) +FCALLSCSUB0 (pioEndTimestepping, PIOENDTIMESTEPPING, pioendtimestepping) +FCALLSCSUB0 (pioFinalize, PIOFINALIZE, piofinalize) +FCALLSCSUB0 (cdiPioNoPostCommSetup, CDIPIONOPOSTCOMMSETUP, cdipionopostcommsetup) + +#undef ROUTINE_6 +#define ROUTINE_6 (void (*)(void)) +static int pioInit_fwrap(int commSuper, int nProcsIO, int IOMode, int *pioNamespace, float partInflate, void (*postCommSetupActions)(void)) +{ + MPI_Comm v; + v = pioInit(MPI_Comm_f2c(commSuper), nProcsIO, IOMode, pioNamespace, partInflate, postCommSetupActions); + return MPI_Comm_c2f(v); +} +FCALLSCFUN6 (INT, pioInit_fwrap, PIOINIT, pioinit, INT, INT, INT, PINT, FLOAT, ROUTINE) +static int cdiPioInit_fwrap(int commSuper, int confResH, int *pioNamespace) +{ + MPI_Comm v; + v = cdiPioInit(MPI_Comm_f2c(commSuper), confResH, pioNamespace); + return MPI_Comm_c2f(v); +} +FCALLSCFUN3 (INT, cdiPioInit_fwrap, CDIPIOINIT, cdipioinit, INT, INT, PINT) +FCALLSCSUB0 (pioWriteTimestep, PIOWRITETIMESTEP, piowritetimestep) +FCALLSCSUB0 (cdiPioRDMAProgress, CDIPIORDMAPROGRESS, cdipiordmaprogress) +FCALLSCSUB4 (cdiPioStreamDefDecomposedVlist, CDIPIOSTREAMDEFDECOMPOSEDVLIST, cdipiostreamdefdecomposedvlist, INT, INT, PVOID, INTV) +static void streamWriteVarPart_fwrap(int streamID, int varID, double *data, int nmiss, void *partDesc) +{ + streamWriteVarPart(streamID, varID, data, nmiss, (*(Xt_idxlist *)partDesc)); +} +FCALLSCSUB5 (streamWriteVarPart_fwrap, STREAMWRITEVARPART, streamwritevarpart, INT, INT, PDOUBLE, INT, PVOID) +static void streamWriteVarPartF_fwrap(int streamID, int varID, float *data, int nmiss, void *partDesc) +{ + streamWriteVarPartF(streamID, varID, data, nmiss, (*(Xt_idxlist *)partDesc)); +} +FCALLSCSUB5 (streamWriteVarPartF_fwrap, STREAMWRITEVARPARTF, streamwritevarpartf, INT, INT, PFLOAT, INT, PVOID) +static void streamWriteScatteredVarPart_fwrap(int streamID, int varID, double *data, int numBlocks, const int blocklengths[], const int displacements[], int nmiss, void *partDesc) +{ + streamWriteScatteredVarPart(streamID, varID, data, numBlocks, blocklengths, displacements, nmiss, (*(Xt_idxlist *)partDesc)); +} +FCALLSCSUB8 (streamWriteScatteredVarPart_fwrap, STREAMWRITESCATTEREDVARPART, streamwritescatteredvarpart, INT, INT, PDOUBLE, INT, INTV, INTV, INT, PVOID) +static void streamWriteScatteredVarPartF_fwrap(int streamID, int varID, float *data, int numBlocks, const int blocklengths[], const int displacements[], int nmiss, void *partDesc) +{ + streamWriteScatteredVarPartF(streamID, varID, data, numBlocks, blocklengths, displacements, nmiss, (*(Xt_idxlist *)partDesc)); +} +FCALLSCSUB8 (streamWriteScatteredVarPartF_fwrap, STREAMWRITESCATTEREDVARPARTF, streamwritescatteredvarpartf, INT, INT, PFLOAT, INT, INTV, INTV, INT, PVOID) +static int cdiPioCSRLastN_fwrap(int commSuper, int IOMode, int nProcsIO) +{ + int v; + v = cdiPioCSRLastN(MPI_Comm_f2c(commSuper), IOMode, nProcsIO); + return v; +} +FCALLSCFUN3 (INT, cdiPioCSRLastN_fwrap, CDIPIOCSRLASTN, cdipiocsrlastn, INT, INT, INT) +static int cdiPioCSRFirstN_fwrap(int commSuper, int IOMode, int nProcsIO) +{ + int v; + v = cdiPioCSRFirstN(MPI_Comm_f2c(commSuper), IOMode, nProcsIO); + return v; +} +FCALLSCFUN3 (INT, cdiPioCSRFirstN_fwrap, CDIPIOCSRFIRSTN, cdipiocsrfirstn, INT, INT, INT) +static int cdiPioCSRBalanced_fwrap(int commSuper, int IOMode, int nProcsIO) +{ + int v; + v = cdiPioCSRBalanced(MPI_Comm_f2c(commSuper), IOMode, nProcsIO); + return v; +} +FCALLSCFUN3 (INT, cdiPioCSRBalanced_fwrap, CDIPIOCSRBALANCED, cdipiocsrbalanced, INT, INT, INT) +FCALLSCFUN1 (INT, cdiPioStr2IOMode, CDIPIOSTR2IOMODE, cdipiostr2iomode, STRING) +FCALLSCFUN1 (STRING, cdiPioIOMode2Str, CDIPIOIOMODE2STR, cdipioiomode2str, INT) +FCALLSCFUN0 (INT, cdiPioConfCreate, CDIPIOCONFCREATE, cdipioconfcreate) +FCALLSCSUB1 (cdiPioConfDestroy, CDIPIOCONFDESTROY, cdipioconfdestroy, INT) +FCALLSCSUB2 (cdiPioConfSetPartInflate, CDIPIOCONFSETPARTINFLATE, cdipioconfsetpartinflate, INT, FLOAT) +FCALLSCFUN1 (FLOAT, cdiPioConfGetPartInflate, CDIPIOCONFGETPARTINFLATE, cdipioconfgetpartinflate, INT) +FCALLSCSUB2 (cdiPioConfSetIOMode, CDIPIOCONFSETIOMODE, cdipioconfsetiomode, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetIOMode, CDIPIOCONFGETIOMODE, cdipioconfgetiomode, INT) +FCALLSCSUB2 (cdiPioConfSetCSRole, CDIPIOCONFSETCSROLE, cdipioconfsetcsrole, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetCSRole, CDIPIOCONFGETCSROLE, cdipioconfgetcsrole, INT) + +#undef ROUTINE_2 +#define ROUTINE_2 (void (*)(void)) +FCALLSCSUB2 (cdiPioConfSetPostCommSetupActions, CDIPIOCONFSETPOSTCOMMSETUPACTIONS, cdipioconfsetpostcommsetupactions, INT, ROUTINE) + +#undef ROUTINE_3 +#define ROUTINE_3 (void (*)(void)) +FCALLSCSUB3 (cdiPioConfSetCallBackActions, CDIPIOCONFSETCALLBACKACTIONS, cdipioconfsetcallbackactions, INT, INT, ROUTINE) + +/* cdiPioConfSetLargePageAlign should block buffer be aligned to + * large pages instead of normal pages? */ + +FCALLSCSUB2 (cdiPioConfSetLargePageAlign, CDIPIOCONFSETLARGEPAGEALIGN, cdipioconfsetlargepagealign, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetLargePageAlign, CDIPIOCONFGETLARGEPAGEALIGN, cdipioconfgetlargepagealign, INT) +FCALLSCSUB2 (cdiPioConfSetRecordAggBufLim, CDIPIOCONFSETRECORDAGGBUFLIM, cdipioconfsetrecordaggbuflim, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetRecordAggBufLim, CDIPIOCONFGETRECORDAGGBUFLIM, cdipioconfgetrecordaggbuflim, INT) +FCALLSCSUB2 (cdiPioConfSetWriteAggBufLim, CDIPIOCONFSETWRITEAGGBUFLIM, cdipioconfsetwriteaggbuflim, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetWriteAggBufLim, CDIPIOCONFGETWRITEAGGBUFLIM, cdipioconfgetwriteaggbuflim, INT) +FCALLSCSUB2 (cdiPioConfSetAioQueueDepth, CDIPIOCONFSETAIOQUEUEDEPTH, cdipioconfsetaioqueuedepth, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetAioQueueDepth, CDIPIOCONFGETAIOQUEUEDEPTH, cdipioconfgetaioqueuedepth, INT) +FCALLSCSUB2 (cdiPioConfSetMaxPathLen, CDIPIOCONFSETMAXPATHLEN, cdipioconfsetmaxpathlen, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetMaxPathLen, CDIPIOCONFGETMAXPATHLEN, cdipioconfgetmaxpathlen, INT) +FCALLSCSUB2 (cdiPioConfSetRedistCache, CDIPIOCONFSETREDISTCACHE, cdipioconfsetredistcache, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetRedistCache, CDIPIOCONFGETREDISTCACHE, cdipioconfgetredistcache, INT) +FCALLSCSUB2 (cdiPioConfSetXmapCache, CDIPIOCONFSETXMAPCACHE, cdipioconfsetxmapcache, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetXmapCache, CDIPIOCONFGETXMAPCACHE, cdipioconfgetxmapcache, INT) +FCALLSCSUB2 (cdiPioConfSetStripeConversion, CDIPIOCONFSETSTRIPECONVERSION, cdipioconfsetstripeconversion, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetStripeConversion, CDIPIOCONFGETSTRIPECONVERSION, cdipioconfgetstripeconversion, INT) +FCALLSCSUB2 (cdiPioConfSetBatchedRMA, CDIPIOCONFSETBATCHEDRMA, cdipioconfsetbatchedrma, INT, INT) +FCALLSCFUN1 (INT, cdiPioConfGetBatchedRMA, CDIPIOCONFGETBATCHEDRMA, cdipioconfgetbatchedrma, INT) +static int cdiPioDistGridCreate_fwrap(int gridtype, int size, int xsize, int ysize, int nvertex, const int xy_decomposition_optional[][2], void *partDesc2D, void *partDescX, void *partDescY) +{ + int v; + v = cdiPioDistGridCreate(gridtype, size, xsize, ysize, nvertex, xy_decomposition_optional, (*(Xt_idxlist *)partDesc2D), (*(Xt_idxlist *)partDescX), (*(Xt_idxlist *)partDescY)); + return v; +} +FCALLSCFUN9 (INT, cdiPioDistGridCreate_fwrap, CDIPIODISTGRIDCREATE, cdipiodistgridcreate, INT, INT, INT, INT, INT, INTVV, PVOID, PVOID, PVOID) +FCALLSCSUB1 (cdiPioDistGridEnableIndividualQueries, CDIPIODISTGRIDENABLEINDIVIDUALQUERIES, cdipiodistgridenableindividualqueries, INT) +FCALLSCSUB1 (cdiPioDistGridDisableIndividualQueries, CDIPIODISTGRIDDISABLEINDIVIDUALQUERIES, cdipiodistgriddisableindividualqueries, INT) +FCALLSCFUN1 (LOGICAL, cdiPioDistGridIndividualQueriesEnabled, CDIPIODISTGRIDINDIVIDUALQUERIESENABLED, cdipiodistgridindividualqueriesenabled, INT) +static int cdiPioInqInterComm_fwrap() +{ + MPI_Comm v; + v = cdiPioInqInterComm(); + return MPI_Comm_c2f(v); +} +FCALLSCFUN0 (INT, cdiPioInqInterComm_fwrap, CDIPIOINQINTERCOMM, cdipioinqintercomm) + +/* End of fortran interface */ + + +#if defined __clang__ +# pragma GCC diagnostic pop +#endif + +// clang-format on + +#endif diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 000000000..f4b52aef0 --- /dev/null +++ b/src/config.h.in @@ -0,0 +1,337 @@ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* CDI version */ +#undef CDI + +/* Compiler */ +#undef COMPILER + +/* Compiler version */ +#undef COMP_VERSION + +/* Define to 1 for ACROSS support */ +#undef HAVE_ACROSS + +/* Defined if backtrace() could be fully identified. */ +#undef HAVE_BACKTRACE + +/* Defined to 1 if C / Fortran interface cfortran.h works */ +#undef HAVE_CF_INTERFACE + +/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. + */ +#undef HAVE_DECL_ISNAN + +/* Define to 1 if you have the declaration of `MPI_UNSIGNED_LONG_LONG', and to + 0 if you don't. */ +#undef HAVE_DECL_MPI_UNSIGNED_LONG_LONG + +/* Define to 1 if you have the declaration of `nc_inq_format_extended', and to + 0 if you don't. */ +#undef HAVE_DECL_NC_INQ_FORMAT_EXTENDED + +/* Define to 1 if you have the declaration of `PAGESIZE', and to 0 if you + don't. */ +#undef HAVE_DECL_PAGESIZE + +/* Define to 1 if you have the declaration of `PAGE_SIZE', and to 0 if you + don't. */ +#undef HAVE_DECL_PAGE_SIZE + +/* Define to 1 if you have the declaration of `POSIX_REC_XFER_ALIGN', and to 0 + if you don't. */ +#undef HAVE_DECL_POSIX_REC_XFER_ALIGN + +/* Define to 1 if you have the declaration of `uuid_create', and to 0 if you + don't. */ +#undef HAVE_DECL_UUID_CREATE + +/* Define to 1 if you have the declaration of `uuid_generate', and to 0 if you + don't. */ +#undef HAVE_DECL_UUID_GENERATE + +/* Define to 1 if you have the declaration of `UUID_MAKE_V5', and to 0 if you + don't. */ +#undef HAVE_DECL_UUID_MAKE_V5 + +/* Define to 1 if you have the declaration of `_PC_REC_XFER_ALIGN', and to 0 + if you don't. */ +#undef HAVE_DECL__PC_REC_XFER_ALIGN + +/* Define to 1 if you have the declaration of `_SC_LARGE_PAGESIZE', and to 0 + if you don't. */ +#undef HAVE_DECL__SC_LARGE_PAGESIZE + +/* Define to 1 if you have the declaration of `_SC_PAGESIZE', and to 0 if you + don't. */ +#undef HAVE_DECL__SC_PAGESIZE + +/* Define to 1 if you have the declaration of `_SC_PAGE_SIZE', and to 0 if you + don't. */ +#undef HAVE_DECL__SC_PAGE_SIZE + +/* Define to 1 if __builtin_ctz is available, 0 if not */ +#undef HAVE_DECL___BUILTIN_CTZ + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the <execinfo.h> header file. */ +#undef HAVE_EXECINFO_H + +/* Define to 1 if you have the <fdb5/api/fdb_c.h> header file. */ +#undef HAVE_FDB5_API_FDB_C_H + +/* Define to 1 if you have the `getline' function. */ +#undef HAVE_GETLINE + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the <grib_api.h> header file. */ +#undef HAVE_GRIB_API_H + +/* Define to 1 if you have the `grib_get_length' function. */ +#undef HAVE_GRIB_GET_LENGTH + +/* Define to 1 for H5get_libversion support */ +#undef HAVE_H5GET_LIBVERSION + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 for GRIB1 decoding/encoding with cgribex */ +#undef HAVE_LIBCGRIBEX + +/* Define to 1 for EXTRA interface */ +#undef HAVE_LIBEXTRA + +/* Define to 1 for FDB5 support */ +#undef HAVE_LIBFDB5 + +/* Define to 1 for GRIB support */ +#undef HAVE_LIBGRIB + +/* GRIB_API library is present if defined to 1 */ +#undef HAVE_LIBGRIB_API + +/* Define to 1 for IEG interface */ +#undef HAVE_LIBIEG + +/* Define to 1 for NetCDF OpenDAP */ +#undef HAVE_LIBNC_DAP + +/* Define to 1 for NetCDF support */ +#undef HAVE_LIBNETCDF + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#undef HAVE_LIBPTHREAD + +/* Define to 1 for SERVICE interface */ +#undef HAVE_LIBSERVICE + +/* Define to 1 for SZIP support */ +#undef HAVE_LIBSZ + +/* Define to 1 if you have the `mallinfo' function. */ +#undef HAVE_MALLINFO + +/* Define to 1 if you have the <malloc.h> header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 for NetCDF4/HDF5 support */ +#undef HAVE_NC4HDF5 + +/* Define to 1 for NetCDF4/HDF5 threadsafe support */ +#undef HAVE_NC4HDF5_THREADSAFE + +/* Define to 1 for NetCDF4/szlib support */ +#undef HAVE_NC4SZLIB + +/* Define to 1 for NetCDF Zarr */ +#undef HAVE_NCZARR + +/* Define to 1 for NetCDF4 nc_def_var_szip support */ +#undef HAVE_NC_DEF_VAR_SZIP + +/* Define to 1 for NetCDF2 support */ +#undef HAVE_NETCDF2 + +/* Define to 1 for NetCDF4 support */ +#undef HAVE_NETCDF4 + +/* Define to 1 if you have the <netcdf.h> header file. */ +#undef HAVE_NETCDF_H + +/* Define to 1 if you have the <netcdf_meta.h> header file. */ +#undef HAVE_NETCDF_META_H + +/* Define to 1 if you have the <netcdf_par.h> header file. */ +#undef HAVE_NETCDF_PAR_H + +/* Defined to 1 if NetCDF parallel open supports NC_PNETCDF */ +#undef HAVE_NETCDF_PAR_PNETCDF + +/* netCDF library does support MPI parallel invocations */ +#undef HAVE_PARALLEL_NC4 + +/* ScalES PPM C core library is available */ +#undef HAVE_PPM_CORE + +/* Define to 1 if you have the <ppm/dist_array.h> header file. */ +#undef HAVE_PPM_DIST_ARRAY_H + +/* Define to 1 if you have the <pthread.h> header file. */ +#undef HAVE_PTHREAD_H + +/* Have PTHREAD_PRIO_INHERIT. */ +#undef HAVE_PTHREAD_PRIO_INHERIT + +/* Define to 1 if you have the `pwrite' function. */ +#undef HAVE_PWRITE + +/* If available, contains the Python version number currently in use. */ +#undef HAVE_PYTHON + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BLKSIZE + +/* Define to 1 if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <szlib.h> header file. */ +#undef HAVE_SZLIB_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the <uuid.h> header file. */ +#undef HAVE_UUID_H + +/* Define to 1 if you have the <uuid/uuid.h> header file. */ +#undef HAVE_UUID_UUID_H + +/* Define to 1 for HIRLAM extensions */ +#undef HIRLAM_EXTENSIONS + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +#undef PTHREAD_CREATE_JOINABLE + +/* The size of `unsigned long', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_LONG + +/* The size of `unsigned long long', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_LONG_LONG + +/* The size of `Xt_uid', as computed by sizeof. */ +#undef SIZEOF_XT_UID + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* System type */ +#undef SYSTEM_TYPE + +/* If the compiler supports a TLS storage class, define it to that here */ +#undef TLS + +/* Version number of package */ +#undef VERSION + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Defined to MPI datatype to be used for Xt_uid */ +#undef YAXT_UID_DT + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Defined to return type of backtrace(). */ +#undef backtrace_size_t + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif diff --git a/src/mo_cdi.f90 b/src/mo_cdi.f90 new file mode 100644 index 000000000..b8489890d --- /dev/null +++ b/src/mo_cdi.f90 @@ -0,0 +1,6105 @@ +! >>> Warning: This is a generated file. If you modify it, you get what you deserve. <<< +! +! Generated by "../interfaces/f2003/bindGen.rb" from input file "cdi.h". + +module mo_cdi + use iso_c_binding + implicit none + private + + public ctrim + public c_len + + interface + integer(c_size_t) function lib_strlen(charPtr) bind(c, name = "strlen") + import c_size_t, c_ptr + type(c_ptr), value :: charPtr + end function lib_strlen + + subroutine lib_free(ptr) bind(c, name = "free") + import c_ptr + type(c_ptr), value, intent(in) :: ptr + end subroutine lib_free + end interface + + integer(c_int), public, parameter :: CDI_MAX_NAME = 256 + integer(c_int), public, parameter :: CDI_UNDEFID = -1 + integer(c_int), public, parameter :: CDI_GLOBAL = -1 + integer(c_int), public, parameter :: CDI_XAXIS = 1 + integer(c_int), public, parameter :: CDI_YAXIS = 2 + integer(c_int), public, parameter :: CDI_BIGENDIAN = 0 + integer(c_int), public, parameter :: CDI_LITTLEENDIAN = 1 + integer(c_int), public, parameter :: CDI_PDPENDIAN = 2 + integer(c_int), public, parameter :: CDI_REAL = 1 + integer(c_int), public, parameter :: CDI_COMP = 2 + integer(c_int), public, parameter :: CDI_BOTH = 3 + integer(c_int), public, parameter :: CDI_NOERR = 0 + integer(c_int), public, parameter :: CDI_EEOF = -1 + integer(c_int), public, parameter :: CDI_ETMOF = -9 + integer(c_int), public, parameter :: CDI_ESYSTEM = -10 + integer(c_int), public, parameter :: CDI_EINVAL = -20 + integer(c_int), public, parameter :: CDI_EISDIR = -21 + integer(c_int), public, parameter :: CDI_EISEMPTY = -22 + integer(c_int), public, parameter :: CDI_EUFTYPE = -23 + integer(c_int), public, parameter :: CDI_ELIBNAVAIL = -24 + integer(c_int), public, parameter :: CDI_EUFSTRUCT = -25 + integer(c_int), public, parameter :: CDI_EUNC4 = -26 + integer(c_int), public, parameter :: CDI_EDIMSIZE = -27 + integer(c_int), public, parameter :: CDI_EQENF = -50 + integer(c_int), public, parameter :: CDI_EQNAVAIL = -51 + integer(c_int), public, parameter :: CDI_ELIMIT = -99 + integer(c_int), public, parameter :: CDI_FILETYPE_GRB = 1 + integer(c_int), public, parameter :: CDI_FILETYPE_GRB2 = 2 + integer(c_int), public, parameter :: CDI_FILETYPE_NC = 3 + integer(c_int), public, parameter :: CDI_FILETYPE_NC2 = 4 + integer(c_int), public, parameter :: CDI_FILETYPE_NC4 = 5 + integer(c_int), public, parameter :: CDI_FILETYPE_NC4C = 6 + integer(c_int), public, parameter :: CDI_FILETYPE_NC5 = 7 + integer(c_int), public, parameter :: CDI_FILETYPE_SRV = 8 + integer(c_int), public, parameter :: CDI_FILETYPE_EXT = 9 + integer(c_int), public, parameter :: CDI_FILETYPE_IEG = 10 + integer(c_int), public, parameter :: CDI_FILETYPE_NCZARR = 11 + integer(c_int), public, parameter :: FILETYPE_GRB = 1 + integer(c_int), public, parameter :: FILETYPE_GRB2 = 2 + integer(c_int), public, parameter :: FILETYPE_NC = 3 + integer(c_int), public, parameter :: FILETYPE_NC2 = 4 + integer(c_int), public, parameter :: FILETYPE_NC4 = 5 + integer(c_int), public, parameter :: CDI_PROTOCOL_OTHER = 0 + integer(c_int), public, parameter :: CDI_PROTOCOL_FILE = 1 + integer(c_int), public, parameter :: CDI_PROTOCOL_FDB = 2 + integer(c_int), public, parameter :: CDI_PROTOCOL_ACROSS = 3 + integer(c_int), public, parameter :: CDI_COMPRESS_NONE = 0 + integer(c_int), public, parameter :: CDI_COMPRESS_SZIP = 1 + integer(c_int), public, parameter :: CDI_COMPRESS_AEC = 2 + integer(c_int), public, parameter :: CDI_COMPRESS_ZIP = 3 + integer(c_int), public, parameter :: CDI_COMPRESS_JPEG = 4 + integer(c_int), public, parameter :: CDI_COMPRESS_FILTER = 5 + integer(c_int), public, parameter :: DATATYPE_PACK16 = 16 + integer(c_int), public, parameter :: DATATYPE_PACK24 = 24 + integer(c_int), public, parameter :: DATATYPE_FLT32 = 132 + integer(c_int), public, parameter :: DATATYPE_FLT64 = 164 + integer(c_int), public, parameter :: DATATYPE_INT32 = 232 + integer(c_int), public, parameter :: DATATYPE_INT = 251 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK = 0 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK1 = 1 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK2 = 2 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK3 = 3 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK4 = 4 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK5 = 5 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK6 = 6 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK7 = 7 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK8 = 8 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK9 = 9 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK10 = 10 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK11 = 11 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK12 = 12 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK13 = 13 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK14 = 14 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK15 = 15 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK16 = 16 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK17 = 17 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK18 = 18 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK19 = 19 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK20 = 20 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK21 = 21 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK22 = 22 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK23 = 23 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK24 = 24 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK25 = 25 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK26 = 26 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK27 = 27 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK28 = 28 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK29 = 29 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK30 = 30 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK31 = 31 + integer(c_int), public, parameter :: CDI_DATATYPE_PACK32 = 32 + integer(c_int), public, parameter :: CDI_DATATYPE_CPX32 = 64 + integer(c_int), public, parameter :: CDI_DATATYPE_CPX64 = 128 + integer(c_int), public, parameter :: CDI_DATATYPE_FLT32 = 132 + integer(c_int), public, parameter :: CDI_DATATYPE_FLT64 = 164 + integer(c_int), public, parameter :: CDI_DATATYPE_INT8 = 208 + integer(c_int), public, parameter :: CDI_DATATYPE_INT16 = 216 + integer(c_int), public, parameter :: CDI_DATATYPE_INT32 = 232 + integer(c_int), public, parameter :: CDI_DATATYPE_UINT8 = 308 + integer(c_int), public, parameter :: CDI_DATATYPE_UINT16 = 316 + integer(c_int), public, parameter :: CDI_DATATYPE_UINT32 = 332 + integer(c_int), public, parameter :: CDI_DATATYPE_INT = 251 + integer(c_int), public, parameter :: CDI_DATATYPE_FLT = 252 + integer(c_int), public, parameter :: CDI_DATATYPE_TXT = 253 + integer(c_int), public, parameter :: CDI_DATATYPE_CPX = 254 + integer(c_int), public, parameter :: CDI_DATATYPE_UCHAR = 255 + integer(c_int), public, parameter :: CDI_DATATYPE_LONG = 256 + integer(c_int), public, parameter :: CDI_DATATYPE_UINT = 257 + integer(c_int), public, parameter :: CDI_CHUNK_AUTO = 1 + integer(c_int), public, parameter :: CDI_CHUNK_GRID = 2 + integer(c_int), public, parameter :: CDI_CHUNK_LINES = 3 + integer(c_int), public, parameter :: GRID_GENERIC = 1 + integer(c_int), public, parameter :: GRID_GAUSSIAN = 2 + integer(c_int), public, parameter :: GRID_GAUSSIAN_REDUCED = 3 + integer(c_int), public, parameter :: GRID_LONLAT = 4 + integer(c_int), public, parameter :: GRID_SPECTRAL = 5 + integer(c_int), public, parameter :: GRID_FOURIER = 6 + integer(c_int), public, parameter :: GRID_GME = 7 + integer(c_int), public, parameter :: GRID_TRAJECTORY = 8 + integer(c_int), public, parameter :: GRID_UNSTRUCTURED = 9 + integer(c_int), public, parameter :: GRID_CURVILINEAR = 10 + integer(c_int), public, parameter :: GRID_PROJECTION = 12 + integer(c_int), public, parameter :: GRID_CHARXY = 13 + integer(c_int), public, parameter :: CDI_PROJ_RLL = 21 + integer(c_int), public, parameter :: CDI_PROJ_LCC = 22 + integer(c_int), public, parameter :: CDI_PROJ_LAEA = 23 + integer(c_int), public, parameter :: CDI_PROJ_SINU = 24 + integer(c_int), public, parameter :: CDI_PROJ_STERE = 25 + integer(c_int), public, parameter :: CDI_PROJ_HEALPIX = 26 + integer(c_int), public, parameter :: ZAXIS_SURFACE = 0 + integer(c_int), public, parameter :: ZAXIS_GENERIC = 1 + integer(c_int), public, parameter :: ZAXIS_HYBRID = 2 + integer(c_int), public, parameter :: ZAXIS_HYBRID_HALF = 3 + integer(c_int), public, parameter :: ZAXIS_PRESSURE = 4 + integer(c_int), public, parameter :: ZAXIS_HEIGHT = 5 + integer(c_int), public, parameter :: ZAXIS_DEPTH_BELOW_SEA = 6 + integer(c_int), public, parameter :: ZAXIS_DEPTH_BELOW_LAND = 7 + integer(c_int), public, parameter :: ZAXIS_ISENTROPIC = 8 + integer(c_int), public, parameter :: ZAXIS_TRAJECTORY = 9 + integer(c_int), public, parameter :: ZAXIS_ALTITUDE = 10 + integer(c_int), public, parameter :: ZAXIS_SIGMA = 11 + integer(c_int), public, parameter :: ZAXIS_MEANSEA = 12 + integer(c_int), public, parameter :: ZAXIS_TOA = 13 + integer(c_int), public, parameter :: ZAXIS_SEA_BOTTOM = 14 + integer(c_int), public, parameter :: ZAXIS_ATMOSPHERE = 15 + integer(c_int), public, parameter :: ZAXIS_CLOUD_BASE = 16 + integer(c_int), public, parameter :: ZAXIS_CLOUD_TOP = 17 + integer(c_int), public, parameter :: ZAXIS_ISOTHERM_ZERO = 18 + integer(c_int), public, parameter :: ZAXIS_SNOW = 19 + integer(c_int), public, parameter :: ZAXIS_LAKE_BOTTOM = 20 + integer(c_int), public, parameter :: ZAXIS_SEDIMENT_BOTTOM = 21 + integer(c_int), public, parameter :: ZAXIS_SEDIMENT_BOTTOM_TA = 22 + integer(c_int), public, parameter :: ZAXIS_SEDIMENT_BOTTOM_TW = 23 + integer(c_int), public, parameter :: ZAXIS_MIX_LAYER = 24 + integer(c_int), public, parameter :: ZAXIS_REFERENCE = 25 + integer(c_int), public, parameter :: ZAXIS_CHAR = 26 + integer(c_int), public, parameter :: ZAXIS_TROPOPAUSE = 27 + integer(c_int), public, parameter :: MAX_KV_PAIRS_MATCH = 10 + integer(c_int), public, parameter :: TIME_CONSTANT = 0 + integer(c_int), public, parameter :: TIME_VARYING = 1 + integer(c_int), public, parameter :: TIME_VARIABLE = 1 + integer(c_int), public, parameter :: TSTEP_CONSTANT = 0 + integer(c_int), public, parameter :: TSTEP_INSTANT = 1 + integer(c_int), public, parameter :: TSTEP_AVG = 2 + integer(c_int), public, parameter :: TSTEP_ACCUM = 3 + integer(c_int), public, parameter :: TSTEP_MAX = 4 + integer(c_int), public, parameter :: TSTEP_MIN = 5 + integer(c_int), public, parameter :: TSTEP_DIFF = 6 + integer(c_int), public, parameter :: TSTEP_RMS = 7 + integer(c_int), public, parameter :: TSTEP_SD = 8 + integer(c_int), public, parameter :: TSTEP_COV = 9 + integer(c_int), public, parameter :: TSTEP_RATIO = 10 + integer(c_int), public, parameter :: TSTEP_SUM = 11 + integer(c_int), public, parameter :: TSTEP_RANGE = 12 + integer(c_int), public, parameter :: TSTEP_INSTANT2 = 13 + integer(c_int), public, parameter :: TSTEP_INSTANT3 = 14 + integer(c_int), public, parameter :: TAXIS_ABSOLUTE = 1 + integer(c_int), public, parameter :: TAXIS_RELATIVE = 2 + integer(c_int), public, parameter :: TAXIS_FORECAST = 3 + integer(c_int), public, parameter :: TUNIT_SECOND = 1 + integer(c_int), public, parameter :: TUNIT_MINUTE = 2 + integer(c_int), public, parameter :: TUNIT_QUARTER = 3 + integer(c_int), public, parameter :: TUNIT_30MINUTES = 4 + integer(c_int), public, parameter :: TUNIT_HOUR = 5 + integer(c_int), public, parameter :: TUNIT_3HOURS = 6 + integer(c_int), public, parameter :: TUNIT_6HOURS = 7 + integer(c_int), public, parameter :: TUNIT_12HOURS = 8 + integer(c_int), public, parameter :: TUNIT_DAY = 9 + integer(c_int), public, parameter :: TUNIT_MONTH = 10 + integer(c_int), public, parameter :: TUNIT_YEAR = 11 + integer(c_int), public, parameter :: CALENDAR_STANDARD = 0 + integer(c_int), public, parameter :: CALENDAR_GREGORIAN = 1 + integer(c_int), public, parameter :: CALENDAR_PROLEPTIC = 2 + integer(c_int), public, parameter :: CALENDAR_360DAYS = 3 + integer(c_int), public, parameter :: CALENDAR_365DAYS = 4 + integer(c_int), public, parameter :: CALENDAR_366DAYS = 5 + integer(c_int), public, parameter :: CALENDAR_NONE = 6 + integer(c_int), public, parameter :: CDI_UUID_SIZE = 16 + + public t_CdiParam + type, bind(c) :: t_CdiParam + integer(c_int) :: discipline + integer(c_int) :: category + integer(c_int) :: number + end type t_CdiParam + + public :: t_CdiIterator + type :: t_CdiIterator + type(c_ptr) :: ptr + end type t_CdiIterator + + public :: t_CdiGribIterator + type :: t_CdiGribIterator + type(c_ptr) :: ptr + end type t_CdiGribIterator + public :: cdiReset + public :: cdiStringError + public :: cdiDebug + public :: cdiLibraryVersion + public :: cdiPrintVersion + public :: cdiHaveFiletype + public :: cdiDefMissval + public :: cdiInqMissval + public :: cdiDefGlobal + public :: namespaceNew + public :: namespaceSetActive + public :: namespaceGetActive + public :: namespaceDelete + public :: cdiParamToString + public :: cdiDecodeParam + public :: cdiEncodeParam + public :: cdiDecodeDate + public :: cdiEncodeDate + public :: cdiDecodeTime + public :: cdiEncodeTime + public :: cdiGetFiletype + public :: streamOpenRead + public :: streamOpenWrite + public :: streamOpenAppend + public :: streamClose + public :: streamSync + public :: streamDefMaxSteps + public :: streamDefNumWorker + public :: streamDefVlist + public :: streamInqVlist + public :: streamInqFiletype + public :: streamDefByteorder + public :: streamInqByteorder + public :: streamDefCompType + public :: streamInqCompType + public :: streamDefCompLevel + public :: streamInqCompLevel + public :: streamDefTimestep + public :: streamInqTimestep + public :: streamInqCurTimestepID + public :: streamFilename + public :: streamFilesuffix + public :: streamNvals + public :: streamInqNvars + public :: streamWriteVar + public :: streamWriteVarF + public :: streamReadVar + public :: streamReadVarF + public :: streamWriteVarSlice + public :: streamWriteVarSliceF + public :: streamReadVarSlice + public :: streamReadVarSliceF + public :: streamWriteVarChunk + public :: streamWriteVarChunkF + public :: streamDefRecord + public :: streamInqRecord + public :: streamWriteRecord + public :: streamWriteRecordF + public :: streamReadRecord + public :: streamReadRecordF + public :: streamCopyRecord + public :: cdiIterator_new + public :: cdiIterator_clone + public :: cdiIterator_serialize + public :: cdiIterator_deserialize + public :: cdiIterator_delete + public :: cdiIterator_nextField + public :: cdiIterator_inqStartTime + public :: cdiIterator_inqEndTime + public :: cdiIterator_inqRTime + public :: cdiIterator_inqVTime + public :: cdiIterator_inqLevelType + public :: cdiIterator_inqLevel + public :: cdiIterator_inqLevelUuid + public :: cdiIterator_inqTile + public :: cdiIterator_inqTileCount + public :: cdiIterator_inqParam + public :: cdiIterator_inqParamParts + public :: cdiIterator_inqDatatype + public :: cdiIterator_inqFiletype + public :: cdiIterator_inqTsteptype + public :: cdiIterator_inqVariableName + public :: cdiIterator_inqGridId + public :: cdiIterator_readField + public :: cdiIterator_readFieldF + public :: cdiGribIterator_clone + public :: cdiGribIterator_delete + public :: cdiGribIterator_getLong + public :: cdiGribIterator_getDouble + public :: cdiGribIterator_getLength + public :: cdiGribIterator_getString + public :: cdiGribIterator_getSize + public :: cdiGribIterator_getLongArray + public :: cdiGribIterator_getDoubleArray + public :: cdiGribIterator_inqEdition + public :: cdiGribIterator_inqLongValue + public :: cdiGribIterator_inqLongDefaultValue + public :: cdiGribIterator_inqDoubleValue + public :: cdiGribIterator_inqDoubleDefaultValue + public :: cdiGribIterator_inqStringValue + public :: vlistCreate + public :: vlistDestroy + public :: vlistDuplicate + public :: vlistCopy + public :: vlistCopyFlag + public :: vlistClearFlag + public :: vlistCat + public :: vlistMerge + public :: vlistPrint + public :: vlistNumber + public :: vlistNvars + public :: vlistNgrids + public :: vlistNzaxis + public :: vlistNsubtypes + public :: vlistDefNtsteps + public :: vlistNtsteps + public :: vlistGridsizeMax + public :: vlistGrid + public :: vlistGridIndex + public :: vlistChangeGridIndex + public :: vlistChangeGrid + public :: vlistZaxis + public :: vlistZaxisIndex + public :: vlistChangeZaxisIndex + public :: vlistChangeZaxis + public :: vlistNrecs + public :: vlistSubtype + public :: vlistSubtypeIndex + public :: vlistDefTaxis + public :: vlistInqTaxis + public :: vlistDefTable + public :: vlistInqTable + public :: vlistDefInstitut + public :: vlistInqInstitut + public :: vlistDefModel + public :: vlistInqModel + public :: vlistDefVarTiles + public :: vlistDefVar + public :: vlistChangeVarGrid + public :: vlistChangeVarZaxis + public :: vlistInqVar + public :: vlistInqVarGrid + public :: vlistInqVarZaxis + public :: vlistInqVarID + public :: vlistDefVarTimetype + public :: vlistInqVarTimetype + public :: vlistDefVarTsteptype + public :: vlistInqVarTsteptype + public :: vlistDefVarCompType + public :: vlistInqVarCompType + public :: vlistDefVarCompLevel + public :: vlistInqVarCompLevel + public :: vlistDefVarParam + public :: vlistInqVarParam + public :: vlistDefVarCode + public :: vlistInqVarCode + public :: vlistDefVarDatatype + public :: vlistInqVarDatatype + public :: vlistDefVarXYZ + public :: vlistInqVarXYZ + public :: vlistDefVarNSB + public :: vlistInqVarNSB + public :: vlistInqVarNumber + public :: vlistDefVarInstitut + public :: vlistInqVarInstitut + public :: vlistDefVarModel + public :: vlistInqVarModel + public :: vlistDefVarTable + public :: vlistInqVarTable + public :: vlistDefVarName + public :: vlistInqVarName + public :: vlistCopyVarName + public :: vlistDefVarStdname + public :: vlistInqVarStdname + public :: vlistDefVarLongname + public :: vlistInqVarLongname + public :: vlistDefVarUnits + public :: vlistInqVarUnits + public :: vlistDefVarMissval + public :: vlistInqVarMissval + public :: vlistInqVarSize + public :: vlistDefIndex + public :: vlistInqIndex + public :: vlistDefFlag + public :: vlistInqFlag + public :: vlistFindVar + public :: vlistFindLevel + public :: vlistMergedVar + public :: vlistMergedLevel + public :: cdiClearAdditionalKeys + public :: cdiDefAdditionalKey + public :: vlistDefVarIntKey + public :: vlistDefVarDblKey + public :: vlistHasVarKey + public :: vlistInqVarDblKey + public :: vlistInqVarIntKey + public :: cdiInqNatts + public :: cdiInqAtt + public :: cdiInqAttLen + public :: cdiInqAttType + public :: cdiDelAtt + public :: cdiCopyAtts + public :: cdiDefAttInt + public :: cdiDefAttFlt + public :: cdiDefAttTxt + public :: cdiInqAttInt + public :: cdiInqAttFlt + public :: cdiInqAttTxt + public :: gridName + public :: gridNamePtr + public :: gridCompress + public :: gridDefMaskGME + public :: gridInqMaskGME + public :: gridDefMask + public :: gridInqMask + public :: gridCreate + public :: gridDestroy + public :: gridDuplicate + public :: gridDefProj + public :: gridInqProj + public :: gridInqProjType + public :: gridInqType + public :: gridInqSize + public :: gridDefXsize + public :: gridInqXsize + public :: gridDefYsize + public :: gridInqYsize + public :: gridDefNP + public :: gridInqNP + public :: gridDefXvals + public :: gridInqXvals + public :: gridInqXvalsPart + public :: gridInqXvalsPtr + public :: gridInqXIsc + public :: gridDefYvals + public :: gridInqYvals + public :: gridInqYvalsPart + public :: gridInqYvalsPtr + public :: gridInqYIsc + integer(c_int), public, parameter :: CDI_KEY_NAME = 942 + integer(c_int), public, parameter :: CDI_KEY_LONGNAME = 943 + integer(c_int), public, parameter :: CDI_KEY_STDNAME = 944 + integer(c_int), public, parameter :: CDI_KEY_UNITS = 945 + integer(c_int), public, parameter :: CDI_KEY_DATATYPE = 946 + integer(c_int), public, parameter :: CDI_KEY_REFERENCEURI = 947 + integer(c_int), public, parameter :: CDI_KEY_CHUNKS = 948 + integer(c_int), public, parameter :: CDI_KEY_NUMBEROFGRIDUSED = 961 + integer(c_int), public, parameter :: CDI_KEY_NUMBEROFGRIDINREFERENCE = 962 + integer(c_int), public, parameter :: CDI_KEY_NUMBEROFVGRIDUSED = 963 + integer(c_int), public, parameter :: CDI_KEY_NLEV = 964 + integer(c_int), public, parameter :: CDI_KEY_CHUNKTYPE = 965 + integer(c_int), public, parameter :: CDI_KEY_CHUNKSIZE = 966 + integer(c_int), public, parameter :: CDI_KEY_MISSVAL = 701 + integer(c_int), public, parameter :: CDI_KEY_ADDOFFSET = 702 + integer(c_int), public, parameter :: CDI_KEY_SCALEFACTOR = 703 + integer(c_int), public, parameter :: CDI_KEY_UUID = 960 + integer(c_int), public, parameter :: CDI_KEY_DIMNAME = 941 + integer(c_int), public, parameter :: CDI_KEY_PSNAME = 950 + integer(c_int), public, parameter :: CDI_KEY_P0NAME = 951 + integer(c_int), public, parameter :: CDI_KEY_P0VALUE = 952 + integer(c_int), public, parameter :: CDI_KEY_TABLESVERSION = 801 + integer(c_int), public, parameter :: CDI_KEY_LOCALTABLESVERSION = 802 + integer(c_int), public, parameter :: CDI_KEY_TYPEOFGENERATINGPROCESS = 803 + integer(c_int), public, parameter :: CDI_KEY_PRODUCTDEFINITIONTEMPLATE = 804 + integer(c_int), public, parameter :: CDI_KEY_TYPEOFPROCESSEDDATA = 805 + integer(c_int), public, parameter :: CDI_KEY_SHAPEOFTHEEARTH = 806 + integer(c_int), public, parameter :: CDI_KEY_BACKGROUNDPROCESS = 807 + integer(c_int), public, parameter :: CDI_KEY_TYPEOFENSEMBLEFORECAST = 808 + integer(c_int), public, parameter :: CDI_KEY_NUMBEROFFORECASTSINENSEMBLE =& + & 809 + integer(c_int), public, parameter :: CDI_KEY_PERTURBATIONNUMBER = 810 + integer(c_int), public, parameter :: CDI_KEY_CENTRE = 811 + integer(c_int), public, parameter :: CDI_KEY_SUBCENTRE = 812 + integer(c_int), public, parameter :: CDI_KEY_MPIMTYPE = 813 + integer(c_int), public, parameter :: CDI_KEY_MPIMCLASS = 814 + integer(c_int), public, parameter :: CDI_KEY_MPIMUSER = 815 + integer(c_int), public, parameter :: CDI_KEY_REVSTATUS = 816 + integer(c_int), public, parameter :: CDI_KEY_REVNUMBER = 817 + integer(c_int), public, parameter :: CDI_KEY_GRIB2LOCALSECTIONNUMBER = 818 + integer(c_int), public, parameter :: CDI_KEY_SECTION2PADDINGLENGTH = 819 + integer(c_int), public, parameter :: CDI_KEY_SECTION2PADDING = 820 + integer(c_int), public, parameter :: CDI_KEY_CONSTITUENTTYPE = 821 + integer(c_int), public, parameter :: CDI_KEY_TYPEOFTIMEINCREMENT = 822 + integer(c_int), public, parameter :: CDI_KEY_TYPEOFFIRSTFIXEDSURFACE = 823 + integer(c_int), public, parameter :: CDI_KEY_TYPEOFSECONDFIXEDSURFACE = 824 + integer(c_int), public, parameter :: CDI_KEY_UVRELATIVETOGRID = 825 + integer(c_int), public, parameter :: CDI_KEY_SCANNINGMODE = 826 + integer(c_int), public, parameter :: CDI_KEY_VDIMNAME = 920 + integer(c_int), public, parameter :: CDI_KEY_GRIDMAP_VARTYPE = 921 + integer(c_int), public, parameter :: CDI_KEY_GRIDMAP_VARNAME = 922 + integer(c_int), public, parameter :: CDI_KEY_GRIDMAP_NAME = 923 + public :: cdiDefKeyInt + public :: cdiInqKeyInt + public :: cdiDefKeyFloat + public :: cdiInqKeyFloat + public :: cdiDefKeyBytes + public :: cdiInqKeyBytes + public :: cdiDefKeyString + public :: cdiInqKeyString + public :: cdiInqKeyLen + public :: cdiCopyKeys + public :: cdiCopyKey + public :: cdiDeleteKey + public :: gridDefXname + public :: gridInqXname + public :: gridDefXlongname + public :: gridInqXlongname + public :: gridDefXunits + public :: gridInqXunits + public :: gridDefYname + public :: gridInqYname + public :: gridDefYlongname + public :: gridInqYlongname + public :: gridDefYunits + public :: gridInqYunits + public :: gridDefDatatype + public :: gridInqDatatype + public :: gridInqXval + public :: gridInqYval + public :: gridInqXinc + public :: gridInqYinc + public :: gridIsCircular + public :: gridInqTrunc + public :: gridDefTrunc + public :: gridDefNumber + public :: gridInqNumber + public :: gridDefPosition + public :: gridInqPosition + public :: gridDefReference + public :: gridInqReference + public :: gridDefUUID + public :: gridInqUUID + public :: gridDefParamRLL + public :: gridInqParamRLL + public :: gridDefParamGME + public :: gridInqParamGME + public :: gridDefArea + public :: gridInqArea + public :: gridHasArea + public :: gridDefNvertex + public :: gridInqNvertex + public :: gridDefXbounds + public :: gridInqXbounds + public :: gridInqXboundsPart + public :: gridInqXboundsPtr + public :: gridDefYbounds + public :: gridInqYbounds + public :: gridInqYboundsPart + public :: gridInqYboundsPtr + public :: gridDefReducedPoints + public :: gridInqReducedPoints + public :: gridChangeType + public :: gridDefComplexPacking + public :: gridInqComplexPacking + public :: zaxisName + public :: zaxisNamePtr + public :: zaxisCreate + public :: zaxisDestroy + public :: zaxisInqType + public :: zaxisInqSize + public :: zaxisDuplicate + public :: zaxisDefLevels + public :: zaxisInqLevels + public :: zaxisInqCLen + public :: zaxisDefLevel + public :: zaxisInqLevel + public :: zaxisDefNlevRef + public :: zaxisInqNlevRef + public :: zaxisDefNumber + public :: zaxisInqNumber + public :: zaxisDefUUID + public :: zaxisInqUUID + public :: zaxisDefName + public :: zaxisInqName + public :: zaxisDefLongname + public :: zaxisInqLongname + public :: zaxisDefUnits + public :: zaxisInqUnits + public :: zaxisInqStdname + public :: zaxisDefDatatype + public :: zaxisInqDatatype + public :: zaxisDefPositive + public :: zaxisInqPositive + public :: zaxisDefScalar + public :: zaxisInqScalar + public :: zaxisDefVct + public :: zaxisInqVct + public :: zaxisInqVctSize + public :: zaxisInqVctPtr + public :: zaxisDefLbounds + public :: zaxisInqLbounds + public :: zaxisInqLbound + public :: zaxisDefUbounds + public :: zaxisInqUbounds + public :: zaxisInqUbound + public :: zaxisDefWeights + public :: zaxisInqWeights + public :: zaxisChangeType + public :: taxisCreate + public :: taxisDestroy + public :: taxisDuplicate + public :: taxisCopyTimestep + public :: taxisDefType + public :: taxisInqType + public :: taxisDefVdate + public :: taxisDefVtime + public :: taxisInqVdate + public :: taxisInqVtime + public :: taxisDefRdate + public :: taxisDefRtime + public :: taxisInqRdate + public :: taxisInqRtime + public :: taxisHasBounds + public :: taxisWithBounds + public :: taxisDeleteBounds + public :: taxisDefVdateBounds + public :: taxisDefVtimeBounds + public :: taxisInqVdateBounds + public :: taxisInqVtimeBounds + public :: taxisDefCalendar + public :: taxisInqCalendar + public :: taxisDefTunit + public :: taxisInqTunit + public :: taxisDefForecastTunit + public :: taxisInqForecastTunit + public :: taxisDefForecastPeriod + public :: taxisInqForecastPeriod + public :: taxisDefNumavg + public :: taxisInqNumavg + public :: taxisNamePtr + public :: tunitNamePtr + public :: institutDef + public :: institutInq + public :: institutInqNumber + public :: institutInqCenter + public :: institutInqSubcenter + public :: institutInqNamePtr + public :: institutInqLongnamePtr + public :: modelDef + public :: modelInq + public :: modelInqInstitut + public :: modelInqGribID + public :: modelInqNamePtr + public :: tableWrite + public :: tableRead + public :: tableDef + public :: tableInqNamePtr + public :: tableInq + public :: tableInqNumber + public :: tableInqNum + public :: tableInqModel + public :: tableInqEntry + public :: subtypeCreate + public :: subtypePrint + public :: subtypeCompare + public :: subtypeInqSize + public :: subtypeInqActiveIndex + public :: subtypeDefActiveIndex + public :: subtypeInqTile + public :: subtypeInqAttribute + public :: vlistInqVarSubtype + public :: gribapiLibraryVersion + public :: zaxisDefLtype + public :: vlistInqVarTypeOfGeneratingProcess + public :: vlistDefVarTypeOfGeneratingProcess + public :: vlistDefVarProductDefinitionTemplate + public :: date_to_julday + public :: julday_to_date + public :: time_to_sec + public :: sec_to_time + integer(c_int), public, parameter :: HAVE_CDI_PROJ_FUNCS = 1 + + interface + subroutine cdiReset() bind(c, name = 'cdiReset') + end subroutine cdiReset + + subroutine cdiDebug(debug_dummy) bind(c, name = 'cdiDebug') + import c_int + integer(c_int), value :: debug_dummy + end subroutine cdiDebug + + subroutine cdiPrintVersion() bind(c, name = 'cdiPrintVersion') + end subroutine cdiPrintVersion + + function cdiHaveFiletype(filetype_dummy) bind(c, name = 'cdiHaveFiletype')& + & result(f_result) + import c_int + integer(c_int), value :: filetype_dummy + integer(c_int) :: f_result + end function cdiHaveFiletype + + subroutine cdiDefMissval(missval_dummy) bind(c, name = 'cdiDefMissval') + import c_double + real(c_double), value :: missval_dummy + end subroutine cdiDefMissval + + function cdiInqMissval() bind(c, name = 'cdiInqMissval') result(f_result) + import c_double + real(c_double) :: f_result + end function cdiInqMissval + + function namespaceNew() bind(c, name = 'namespaceNew') result(f_result) + import c_int + integer(c_int) :: f_result + end function namespaceNew + + subroutine namespaceSetActive(namespaceID_dummy) bind(c, name =& + & 'namespaceSetActive') + import c_int + integer(c_int), value :: namespaceID_dummy + end subroutine namespaceSetActive + + function namespaceGetActive() bind(c, name = 'namespaceGetActive')& + & result(f_result) + import c_int + integer(c_int) :: f_result + end function namespaceGetActive + + subroutine namespaceDelete(namespaceID_dummy) bind(c, name =& + & 'namespaceDelete') + import c_int + integer(c_int), value :: namespaceID_dummy + end subroutine namespaceDelete + + subroutine cdiDecodeParam(param_dummy, pnum_dummy, pcat_dummy, pdis_dummy)& + & bind(c, name = 'cdiDecodeParam') + import c_int + integer(c_int), value :: param_dummy + integer(c_int), intent(inout) :: pnum_dummy + integer(c_int), intent(inout) :: pcat_dummy + integer(c_int), intent(inout) :: pdis_dummy + end subroutine cdiDecodeParam + + function cdiEncodeParam(pnum_dummy, pcat_dummy, pdis_dummy) bind(c, name =& + & 'cdiEncodeParam') result(f_result) + import c_int + integer(c_int), value :: pnum_dummy + integer(c_int), value :: pcat_dummy + integer(c_int), value :: pdis_dummy + integer(c_int) :: f_result + end function cdiEncodeParam + + subroutine cdiDecodeDate(date_dummy, year_dummy, month_dummy, day_dummy)& + & bind(c, name = 'cdiDecodeDate') + import c_int + integer(c_int), value :: date_dummy + integer(c_int), intent(inout) :: year_dummy + integer(c_int), intent(inout) :: month_dummy + integer(c_int), intent(inout) :: day_dummy + end subroutine cdiDecodeDate + + function cdiEncodeDate(year_dummy, month_dummy, day_dummy) bind(c, name =& + & 'cdiEncodeDate') result(f_result) + import c_int + integer(c_int), value :: year_dummy + integer(c_int), value :: month_dummy + integer(c_int), value :: day_dummy + integer(c_int) :: f_result + end function cdiEncodeDate + + subroutine cdiDecodeTime(time_dummy, hour_dummy, minute_dummy,& + & second_dummy) bind(c, name = 'cdiDecodeTime') + import c_int + integer(c_int), value :: time_dummy + integer(c_int), intent(inout) :: hour_dummy + integer(c_int), intent(inout) :: minute_dummy + integer(c_int), intent(inout) :: second_dummy + end subroutine cdiDecodeTime + + function cdiEncodeTime(hour_dummy, minute_dummy, second_dummy) bind(c, name& + & = 'cdiEncodeTime') result(f_result) + import c_int + integer(c_int), value :: hour_dummy + integer(c_int), value :: minute_dummy + integer(c_int), value :: second_dummy + integer(c_int) :: f_result + end function cdiEncodeTime + + subroutine streamClose(streamID_dummy) bind(c, name = 'streamClose') + import c_int + integer(c_int), value :: streamID_dummy + end subroutine streamClose + + subroutine streamSync(streamID_dummy) bind(c, name = 'streamSync') + import c_int + integer(c_int), value :: streamID_dummy + end subroutine streamSync + + subroutine streamDefMaxSteps(streamID_dummy, maxSteps_dummy) bind(c, name =& + & 'streamDefMaxSteps') + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: maxSteps_dummy + end subroutine streamDefMaxSteps + + subroutine streamDefNumWorker(streamID_dummy, numWorker_dummy) bind(c, name& + & = 'streamDefNumWorker') + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: numWorker_dummy + end subroutine streamDefNumWorker + + subroutine streamDefVlist(streamID_dummy, vlistID_dummy) bind(c, name =& + & 'streamDefVlist') + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: vlistID_dummy + end subroutine streamDefVlist + + function streamInqVlist(streamID_dummy) bind(c, name = 'streamInqVlist')& + & result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int) :: f_result + end function streamInqVlist + + function streamInqFiletype(streamID_dummy) bind(c, name =& + & 'streamInqFiletype') result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int) :: f_result + end function streamInqFiletype + + subroutine streamDefByteorder(streamID_dummy, byteorder_dummy) bind(c, name& + & = 'streamDefByteorder') + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: byteorder_dummy + end subroutine streamDefByteorder + + function streamInqByteorder(streamID_dummy) bind(c, name =& + & 'streamInqByteorder') result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int) :: f_result + end function streamInqByteorder + + subroutine streamDefCompType(streamID_dummy, comptype_dummy) bind(c, name =& + & 'streamDefCompType') + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: comptype_dummy + end subroutine streamDefCompType + + function streamInqCompType(streamID_dummy) bind(c, name =& + & 'streamInqCompType') result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int) :: f_result + end function streamInqCompType + + subroutine streamDefCompLevel(streamID_dummy, complevel_dummy) bind(c, name& + & = 'streamDefCompLevel') + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: complevel_dummy + end subroutine streamDefCompLevel + + function streamInqCompLevel(streamID_dummy) bind(c, name =& + & 'streamInqCompLevel') result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int) :: f_result + end function streamInqCompLevel + + function streamDefTimestep(streamID_dummy, tsID_dummy) bind(c, name =& + & 'streamDefTimestep') result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: tsID_dummy + integer(c_int) :: f_result + end function streamDefTimestep + + function streamInqTimestep(streamID_dummy, tsID_dummy) bind(c, name =& + & 'streamInqTimestep') result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: tsID_dummy + integer(c_int) :: f_result + end function streamInqTimestep + + function streamInqCurTimestepID(streamID_dummy) bind(c, name =& + & 'streamInqCurTimestepID') result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int) :: f_result + end function streamInqCurTimestepID + + function streamNvals(streamID_dummy) bind(c, name = 'streamNvals')& + & result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int) :: f_result + end function streamNvals + + function streamInqNvars(streamID_dummy) bind(c, name = 'streamInqNvars')& + & result(f_result) + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int) :: f_result + end function streamInqNvars + + subroutine streamWriteVar(streamID_dummy, varID_dummy, data_dummy,& + & nmiss_dummy) bind(c, name = 'streamWriteVar') + import c_double, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + real(c_double), intent(in) :: data_dummy(*) + integer(c_int), value :: nmiss_dummy + end subroutine streamWriteVar + + subroutine streamWriteVarF(streamID_dummy, varID_dummy, data_dummy,& + & nmiss_dummy) bind(c, name = 'streamWriteVarF') + import c_float, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + real(c_float), intent(in) :: data_dummy(*) + integer(c_int), value :: nmiss_dummy + end subroutine streamWriteVarF + + subroutine streamReadVar(streamID_dummy, varID_dummy, data_dummy,& + & nmiss_dummy) bind(c, name = 'streamReadVar') + import c_double, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + real(c_double), intent(inout) :: data_dummy(*) + integer(c_int), intent(inout) :: nmiss_dummy + end subroutine streamReadVar + + subroutine streamReadVarF(streamID_dummy, varID_dummy, data_dummy,& + & nmiss_dummy) bind(c, name = 'streamReadVarF') + import c_float, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + real(c_float), intent(inout) :: data_dummy(*) + integer(c_int), intent(inout) :: nmiss_dummy + end subroutine streamReadVarF + + subroutine streamWriteVarSlice(streamID_dummy, varID_dummy, levelID_dummy,& + & data_dummy, nmiss_dummy) bind(c, name = 'streamWriteVarSlice') + import c_double, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levelID_dummy + real(c_double), intent(in) :: data_dummy(*) + integer(c_int), value :: nmiss_dummy + end subroutine streamWriteVarSlice + + subroutine streamWriteVarSliceF(streamID_dummy, varID_dummy, levelID_dummy,& + & data_dummy, nmiss_dummy) bind(c, name = 'streamWriteVarSliceF') + import c_float, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levelID_dummy + real(c_float), intent(in) :: data_dummy(*) + integer(c_int), value :: nmiss_dummy + end subroutine streamWriteVarSliceF + + subroutine streamReadVarSlice(streamID_dummy, varID_dummy, levelID_dummy,& + & data_dummy, nmiss_dummy) bind(c, name = 'streamReadVarSlice') + import c_double, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levelID_dummy + real(c_double), intent(inout) :: data_dummy(*) + integer(c_int), intent(inout) :: nmiss_dummy + end subroutine streamReadVarSlice + + subroutine streamReadVarSliceF(streamID_dummy, varID_dummy, levelID_dummy,& + & data_dummy, nmiss_dummy) bind(c, name = 'streamReadVarSliceF') + import c_float, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levelID_dummy + real(c_float), intent(inout) :: data_dummy(*) + integer(c_int), intent(inout) :: nmiss_dummy + end subroutine streamReadVarSliceF + + subroutine streamWriteVarChunk(streamID_dummy, varID_dummy, rect_dummy,& + & data_dummy, nmiss_dummy) bind(c, name = 'streamWriteVarChunk') + import c_double, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), intent(in) :: rect_dummy(2, *) + real(c_double), intent(in) :: data_dummy(*) + integer(c_int), value :: nmiss_dummy + end subroutine streamWriteVarChunk + + subroutine streamWriteVarChunkF(streamID_dummy, varID_dummy, rect_dummy,& + & data_dummy, nmiss_dummy) bind(c, name = 'streamWriteVarChunkF') + import c_float, c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), intent(in) :: rect_dummy(2, *) + real(c_float), intent(in) :: data_dummy(*) + integer(c_int), value :: nmiss_dummy + end subroutine streamWriteVarChunkF + + subroutine streamDefRecord(streamID_dummy, varID_dummy, levelID_dummy)& + & bind(c, name = 'streamDefRecord') + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levelID_dummy + end subroutine streamDefRecord + + subroutine streamInqRecord(streamID_dummy, varID_dummy, levelID_dummy)& + & bind(c, name = 'streamInqRecord') + import c_int + integer(c_int), value :: streamID_dummy + integer(c_int), intent(inout) :: varID_dummy + integer(c_int), intent(inout) :: levelID_dummy + end subroutine streamInqRecord + + subroutine streamWriteRecord(streamID_dummy, data_dummy, nmiss_dummy)& + & bind(c, name = 'streamWriteRecord') + import c_double, c_int + integer(c_int), value :: streamID_dummy + real(c_double), intent(in) :: data_dummy(*) + integer(c_int), value :: nmiss_dummy + end subroutine streamWriteRecord + + subroutine streamWriteRecordF(streamID_dummy, data_dummy, nmiss_dummy)& + & bind(c, name = 'streamWriteRecordF') + import c_float, c_int + integer(c_int), value :: streamID_dummy + real(c_float), intent(in) :: data_dummy(*) + integer(c_int), value :: nmiss_dummy + end subroutine streamWriteRecordF + + subroutine streamReadRecord(streamID_dummy, data_dummy, nmiss_dummy)& + & bind(c, name = 'streamReadRecord') + import c_double, c_int + integer(c_int), value :: streamID_dummy + real(c_double), intent(inout) :: data_dummy(*) + integer(c_int), intent(inout) :: nmiss_dummy + end subroutine streamReadRecord + + subroutine streamReadRecordF(streamID_dummy, data_dummy, nmiss_dummy)& + & bind(c, name = 'streamReadRecordF') + import c_float, c_int + integer(c_int), value :: streamID_dummy + real(c_float), intent(inout) :: data_dummy(*) + integer(c_int), intent(inout) :: nmiss_dummy + end subroutine streamReadRecordF + + subroutine streamCopyRecord(streamIDdest_dummy, streamIDsrc_dummy) bind(c,& + & name = 'streamCopyRecord') + import c_int + integer(c_int), value :: streamIDdest_dummy + integer(c_int), value :: streamIDsrc_dummy + end subroutine streamCopyRecord + + function vlistCreate() bind(c, name = 'vlistCreate') result(f_result) + import c_int + integer(c_int) :: f_result + end function vlistCreate + + subroutine vlistDestroy(vlistID_dummy) bind(c, name = 'vlistDestroy') + import c_int + integer(c_int), value :: vlistID_dummy + end subroutine vlistDestroy + + function vlistDuplicate(vlistID_dummy) bind(c, name = 'vlistDuplicate')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistDuplicate + + subroutine vlistCopy(vlistID2_dummy, vlistID1_dummy) bind(c, name =& + & 'vlistCopy') + import c_int + integer(c_int), value :: vlistID2_dummy + integer(c_int), value :: vlistID1_dummy + end subroutine vlistCopy + + subroutine vlistCopyFlag(vlistID2_dummy, vlistID1_dummy) bind(c, name =& + & 'vlistCopyFlag') + import c_int + integer(c_int), value :: vlistID2_dummy + integer(c_int), value :: vlistID1_dummy + end subroutine vlistCopyFlag + + subroutine vlistClearFlag(vlistID_dummy) bind(c, name = 'vlistClearFlag') + import c_int + integer(c_int), value :: vlistID_dummy + end subroutine vlistClearFlag + + subroutine vlistCat(vlistID2_dummy, vlistID1_dummy) bind(c, name =& + & 'vlistCat') + import c_int + integer(c_int), value :: vlistID2_dummy + integer(c_int), value :: vlistID1_dummy + end subroutine vlistCat + + subroutine vlistMerge(vlistID2_dummy, vlistID1_dummy) bind(c, name =& + & 'vlistMerge') + import c_int + integer(c_int), value :: vlistID2_dummy + integer(c_int), value :: vlistID1_dummy + end subroutine vlistMerge + + subroutine vlistPrint(vlistID_dummy) bind(c, name = 'vlistPrint') + import c_int + integer(c_int), value :: vlistID_dummy + end subroutine vlistPrint + + function vlistNumber(vlistID_dummy) bind(c, name = 'vlistNumber')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistNumber + + function vlistNvars(vlistID_dummy) bind(c, name = 'vlistNvars')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistNvars + + function vlistNgrids(vlistID_dummy) bind(c, name = 'vlistNgrids')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistNgrids + + function vlistNzaxis(vlistID_dummy) bind(c, name = 'vlistNzaxis')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistNzaxis + + function vlistNsubtypes(vlistID_dummy) bind(c, name = 'vlistNsubtypes')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistNsubtypes + + subroutine vlistDefNtsteps(vlistID_dummy, nts_dummy) bind(c, name =& + & 'vlistDefNtsteps') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: nts_dummy + end subroutine vlistDefNtsteps + + function vlistNtsteps(vlistID_dummy) bind(c, name = 'vlistNtsteps')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistNtsteps + + function vlistGridsizeMax(vlistID_dummy) bind(c, name = 'vlistGridsizeMax')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistGridsizeMax + + function vlistGrid(vlistID_dummy, index_dummy) bind(c, name = 'vlistGrid')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: index_dummy + integer(c_int) :: f_result + end function vlistGrid + + function vlistGridIndex(vlistID_dummy, gridID_dummy) bind(c, name =& + & 'vlistGridIndex') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function vlistGridIndex + + subroutine vlistChangeGridIndex(vlistID_dummy, index_dummy, gridID_dummy)& + & bind(c, name = 'vlistChangeGridIndex') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: index_dummy + integer(c_int), value :: gridID_dummy + end subroutine vlistChangeGridIndex + + subroutine vlistChangeGrid(vlistID_dummy, gridID1_dummy, gridID2_dummy)& + & bind(c, name = 'vlistChangeGrid') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: gridID1_dummy + integer(c_int), value :: gridID2_dummy + end subroutine vlistChangeGrid + + function vlistZaxis(vlistID_dummy, index_dummy) bind(c, name =& + & 'vlistZaxis') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: index_dummy + integer(c_int) :: f_result + end function vlistZaxis + + function vlistZaxisIndex(vlistID_dummy, zaxisID_dummy) bind(c, name =& + & 'vlistZaxisIndex') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function vlistZaxisIndex + + subroutine vlistChangeZaxisIndex(vlistID_dummy, index_dummy, zaxisID_dummy)& + & bind(c, name = 'vlistChangeZaxisIndex') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: index_dummy + integer(c_int), value :: zaxisID_dummy + end subroutine vlistChangeZaxisIndex + + subroutine vlistChangeZaxis(vlistID_dummy, zaxisID1_dummy, zaxisID2_dummy)& + & bind(c, name = 'vlistChangeZaxis') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: zaxisID1_dummy + integer(c_int), value :: zaxisID2_dummy + end subroutine vlistChangeZaxis + + function vlistNrecs(vlistID_dummy) bind(c, name = 'vlistNrecs')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistNrecs + + function vlistSubtype(vlistID_dummy, index_dummy) bind(c, name =& + & 'vlistSubtype') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: index_dummy + integer(c_int) :: f_result + end function vlistSubtype + + function vlistSubtypeIndex(vlistID_dummy, subtypeID_dummy) bind(c, name =& + & 'vlistSubtypeIndex') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: subtypeID_dummy + integer(c_int) :: f_result + end function vlistSubtypeIndex + + subroutine vlistDefTaxis(vlistID_dummy, taxisID_dummy) bind(c, name =& + & 'vlistDefTaxis') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: taxisID_dummy + end subroutine vlistDefTaxis + + function vlistInqTaxis(vlistID_dummy) bind(c, name = 'vlistInqTaxis')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistInqTaxis + + subroutine vlistDefTable(vlistID_dummy, tableID_dummy) bind(c, name =& + & 'vlistDefTable') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: tableID_dummy + end subroutine vlistDefTable + + function vlistInqTable(vlistID_dummy) bind(c, name = 'vlistInqTable')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistInqTable + + subroutine vlistDefInstitut(vlistID_dummy, instID_dummy) bind(c, name =& + & 'vlistDefInstitut') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: instID_dummy + end subroutine vlistDefInstitut + + function vlistInqInstitut(vlistID_dummy) bind(c, name = 'vlistInqInstitut')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistInqInstitut + + subroutine vlistDefModel(vlistID_dummy, modelID_dummy) bind(c, name =& + & 'vlistDefModel') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: modelID_dummy + end subroutine vlistDefModel + + function vlistInqModel(vlistID_dummy) bind(c, name = 'vlistInqModel')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int) :: f_result + end function vlistInqModel + + function vlistDefVarTiles(vlistID_dummy, gridID_dummy, zaxisID_dummy,& + & timetype_dummy, tilesetID_dummy) bind(c, name = 'vlistDefVarTiles')& + & result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: gridID_dummy + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: timetype_dummy + integer(c_int), value :: tilesetID_dummy + integer(c_int) :: f_result + end function vlistDefVarTiles + + function vlistDefVar(vlistID_dummy, gridID_dummy, zaxisID_dummy,& + & timetype_dummy) bind(c, name = 'vlistDefVar') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: gridID_dummy + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: timetype_dummy + integer(c_int) :: f_result + end function vlistDefVar + + subroutine vlistChangeVarGrid(vlistID_dummy, varID_dummy, gridID_dummy)& + & bind(c, name = 'vlistChangeVarGrid') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: gridID_dummy + end subroutine vlistChangeVarGrid + + subroutine vlistChangeVarZaxis(vlistID_dummy, varID_dummy, zaxisID_dummy)& + & bind(c, name = 'vlistChangeVarZaxis') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: zaxisID_dummy + end subroutine vlistChangeVarZaxis + + subroutine vlistInqVar(vlistID_dummy, varID_dummy, gridID_dummy,& + & zaxisID_dummy, timetype_dummy) bind(c, name = 'vlistInqVar') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), intent(inout) :: gridID_dummy + integer(c_int), intent(inout) :: zaxisID_dummy + integer(c_int), intent(inout) :: timetype_dummy + end subroutine vlistInqVar + + function vlistInqVarGrid(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarGrid') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarGrid + + function vlistInqVarZaxis(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarZaxis') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarZaxis + + function vlistInqVarID(vlistID_dummy, code_dummy) bind(c, name =& + & 'vlistInqVarID') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: code_dummy + integer(c_int) :: f_result + end function vlistInqVarID + + subroutine vlistDefVarTimetype(vlistID_dummy, varID_dummy, timetype_dummy)& + & bind(c, name = 'vlistDefVarTimetype') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: timetype_dummy + end subroutine vlistDefVarTimetype + + function vlistInqVarTimetype(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarTimetype') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarTimetype + + subroutine vlistDefVarTsteptype(vlistID_dummy, varID_dummy,& + & tsteptype_dummy) bind(c, name = 'vlistDefVarTsteptype') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: tsteptype_dummy + end subroutine vlistDefVarTsteptype + + function vlistInqVarTsteptype(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarTsteptype') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarTsteptype + + subroutine vlistDefVarCompType(vlistID_dummy, varID_dummy, comptype_dummy)& + & bind(c, name = 'vlistDefVarCompType') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: comptype_dummy + end subroutine vlistDefVarCompType + + function vlistInqVarCompType(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarCompType') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarCompType + + subroutine vlistDefVarCompLevel(vlistID_dummy, varID_dummy,& + & complevel_dummy) bind(c, name = 'vlistDefVarCompLevel') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: complevel_dummy + end subroutine vlistDefVarCompLevel + + function vlistInqVarCompLevel(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarCompLevel') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarCompLevel + + subroutine vlistDefVarParam(vlistID_dummy, varID_dummy, param_dummy)& + & bind(c, name = 'vlistDefVarParam') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: param_dummy + end subroutine vlistDefVarParam + + function vlistInqVarParam(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarParam') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarParam + + subroutine vlistDefVarCode(vlistID_dummy, varID_dummy, code_dummy) bind(c,& + & name = 'vlistDefVarCode') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: code_dummy + end subroutine vlistDefVarCode + + function vlistInqVarCode(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarCode') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarCode + + subroutine vlistDefVarDatatype(vlistID_dummy, varID_dummy, datatype_dummy)& + & bind(c, name = 'vlistDefVarDatatype') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: datatype_dummy + end subroutine vlistDefVarDatatype + + function vlistInqVarDatatype(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarDatatype') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarDatatype + + subroutine vlistDefVarXYZ(vlistID_dummy, varID_dummy, xyz_dummy) bind(c,& + & name = 'vlistDefVarXYZ') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: xyz_dummy + end subroutine vlistDefVarXYZ + + function vlistInqVarXYZ(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarXYZ') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarXYZ + + subroutine vlistDefVarNSB(vlistID_dummy, varID_dummy, nsb_dummy) bind(c,& + & name = 'vlistDefVarNSB') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: nsb_dummy + end subroutine vlistDefVarNSB + + function vlistInqVarNSB(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarNSB') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarNSB + + function vlistInqVarNumber(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarNumber') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarNumber + + subroutine vlistDefVarInstitut(vlistID_dummy, varID_dummy, instID_dummy)& + & bind(c, name = 'vlistDefVarInstitut') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: instID_dummy + end subroutine vlistDefVarInstitut + + function vlistInqVarInstitut(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarInstitut') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarInstitut + + subroutine vlistDefVarModel(vlistID_dummy, varID_dummy, modelID_dummy)& + & bind(c, name = 'vlistDefVarModel') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: modelID_dummy + end subroutine vlistDefVarModel + + function vlistInqVarModel(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarModel') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarModel + + subroutine vlistDefVarTable(vlistID_dummy, varID_dummy, tableID_dummy)& + & bind(c, name = 'vlistDefVarTable') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: tableID_dummy + end subroutine vlistDefVarTable + + function vlistInqVarTable(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarTable') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarTable + + subroutine vlistDefVarMissval(vlistID_dummy, varID_dummy, missval_dummy)& + & bind(c, name = 'vlistDefVarMissval') + import c_double, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + real(c_double), value :: missval_dummy + end subroutine vlistDefVarMissval + + function vlistInqVarMissval(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarMissval') result(f_result) + import c_double, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + real(c_double) :: f_result + end function vlistInqVarMissval + + function vlistInqVarSize(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarSize') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarSize + + subroutine vlistDefIndex(vlistID_dummy, varID_dummy, levID_dummy,& + & index_dummy) bind(c, name = 'vlistDefIndex') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levID_dummy + integer(c_int), value :: index_dummy + end subroutine vlistDefIndex + + function vlistInqIndex(vlistID_dummy, varID_dummy, levID_dummy) bind(c,& + & name = 'vlistInqIndex') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levID_dummy + integer(c_int) :: f_result + end function vlistInqIndex + + subroutine vlistDefFlag(vlistID_dummy, varID_dummy, levID_dummy,& + & flag_dummy) bind(c, name = 'vlistDefFlag') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levID_dummy + integer(c_int), value :: flag_dummy + end subroutine vlistDefFlag + + function vlistInqFlag(vlistID_dummy, varID_dummy, levID_dummy) bind(c, name& + & = 'vlistInqFlag') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levID_dummy + integer(c_int) :: f_result + end function vlistInqFlag + + function vlistFindVar(vlistID_dummy, fvarID_dummy) bind(c, name =& + & 'vlistFindVar') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: fvarID_dummy + integer(c_int) :: f_result + end function vlistFindVar + + function vlistFindLevel(vlistID_dummy, fvarID_dummy, flevelID_dummy)& + & bind(c, name = 'vlistFindLevel') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: fvarID_dummy + integer(c_int), value :: flevelID_dummy + integer(c_int) :: f_result + end function vlistFindLevel + + function vlistMergedVar(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistMergedVar') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistMergedVar + + function vlistMergedLevel(vlistID_dummy, varID_dummy, levelID_dummy)& + & bind(c, name = 'vlistMergedLevel') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: levelID_dummy + integer(c_int) :: f_result + end function vlistMergedLevel + + subroutine cdiClearAdditionalKeys() bind(c, name =& + & 'cdiClearAdditionalKeys') + end subroutine cdiClearAdditionalKeys + + function cdiInqNatts(cdiID_dummy, varID_dummy, nattsp_dummy) bind(c, name =& + & 'cdiInqNatts') result(f_result) + import c_int + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), intent(inout) :: nattsp_dummy + integer(c_int) :: f_result + end function cdiInqNatts + + function cdiCopyAtts(cdiID1_dummy, varID1_dummy, cdiID2_dummy,& + & varID2_dummy) bind(c, name = 'cdiCopyAtts') result(f_result) + import c_int + integer(c_int), value :: cdiID1_dummy + integer(c_int), value :: varID1_dummy + integer(c_int), value :: cdiID2_dummy + integer(c_int), value :: varID2_dummy + integer(c_int) :: f_result + end function cdiCopyAtts + + subroutine gridCompress(gridID_dummy) bind(c, name = 'gridCompress') + import c_int + integer(c_int), value :: gridID_dummy + end subroutine gridCompress + + subroutine gridDefMaskGME(gridID_dummy, mask_dummy) bind(c, name =& + & 'gridDefMaskGME') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), intent(in) :: mask_dummy(*) + end subroutine gridDefMaskGME + + function gridInqMaskGME(gridID_dummy, mask_dummy) bind(c, name =& + & 'gridInqMaskGME') result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), intent(inout) :: mask_dummy(*) + integer(c_int) :: f_result + end function gridInqMaskGME + + subroutine gridDefMask(gridID_dummy, mask_dummy) bind(c, name =& + & 'gridDefMask') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), intent(in) :: mask_dummy(*) + end subroutine gridDefMask + + function gridInqMask(gridID_dummy, mask_dummy) bind(c, name =& + & 'gridInqMask') result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), intent(inout) :: mask_dummy(*) + integer(c_int) :: f_result + end function gridInqMask + + function gridCreate(gridtype_dummy, size_dummy) bind(c, name =& + & 'gridCreate') result(f_result) + import c_int + integer(c_int), value :: gridtype_dummy + integer(c_int), value :: size_dummy + integer(c_int) :: f_result + end function gridCreate + + subroutine gridDestroy(gridID_dummy) bind(c, name = 'gridDestroy') + import c_int + integer(c_int), value :: gridID_dummy + end subroutine gridDestroy + + function gridDuplicate(gridID_dummy) bind(c, name = 'gridDuplicate')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridDuplicate + + subroutine gridDefProj(gridID_dummy, projID_dummy) bind(c, name =& + & 'gridDefProj') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: projID_dummy + end subroutine gridDefProj + + function gridInqProj(gridID_dummy) bind(c, name = 'gridInqProj')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqProj + + function gridInqProjType(gridID_dummy) bind(c, name = 'gridInqProjType')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqProjType + + function gridInqType(gridID_dummy) bind(c, name = 'gridInqType')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqType + + function gridInqSize(gridID_dummy) bind(c, name = 'gridInqSize')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqSize + + subroutine gridDefXsize(gridID_dummy, xsize_dummy) bind(c, name =& + & 'gridDefXsize') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: xsize_dummy + end subroutine gridDefXsize + + function gridInqXsize(gridID_dummy) bind(c, name = 'gridInqXsize')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqXsize + + subroutine gridDefYsize(gridID_dummy, ysize_dummy) bind(c, name =& + & 'gridDefYsize') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: ysize_dummy + end subroutine gridDefYsize + + function gridInqYsize(gridID_dummy) bind(c, name = 'gridInqYsize')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqYsize + + subroutine gridDefNP(gridID_dummy, np_dummy) bind(c, name = 'gridDefNP') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: np_dummy + end subroutine gridDefNP + + function gridInqNP(gridID_dummy) bind(c, name = 'gridInqNP')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqNP + + subroutine gridDefXvals(gridID_dummy, xvals_dummy) bind(c, name =& + & 'gridDefXvals') + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(in) :: xvals_dummy(*) + end subroutine gridDefXvals + + function gridInqXvals(gridID_dummy, xvals_dummy) bind(c, name =& + & 'gridInqXvals') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(inout) :: xvals_dummy(*) + integer(c_int) :: f_result + end function gridInqXvals + + function gridInqXvalsPart(gridID_dummy, start_dummy, size_dummy,& + & xvals_dummy) bind(c, name = 'gridInqXvalsPart') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: start_dummy + integer(c_int), value :: size_dummy + real(c_double), intent(inout) :: xvals_dummy(*) + integer(c_int) :: f_result + end function gridInqXvalsPart + + function gridInqXvalsPtr(gridID_dummy) bind(c, name = 'gridInqXvalsPtr')& + & result(f_result) + import c_int, c_ptr + integer(c_int), value :: gridID_dummy + type(c_ptr) :: f_result + end function gridInqXvalsPtr + + function gridInqXIsc(gridID_dummy) bind(c, name = 'gridInqXIsc')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqXIsc + + subroutine gridDefYvals(gridID_dummy, yvals_dummy) bind(c, name =& + & 'gridDefYvals') + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(in) :: yvals_dummy(*) + end subroutine gridDefYvals + + function gridInqYvals(gridID_dummy, yvals_dummy) bind(c, name =& + & 'gridInqYvals') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(inout) :: yvals_dummy(*) + integer(c_int) :: f_result + end function gridInqYvals + + function gridInqYvalsPart(gridID_dummy, start_dummy, size_dummy,& + & yvals_dummy) bind(c, name = 'gridInqYvalsPart') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: start_dummy + integer(c_int), value :: size_dummy + real(c_double), intent(inout) :: yvals_dummy(*) + integer(c_int) :: f_result + end function gridInqYvalsPart + + function gridInqYvalsPtr(gridID_dummy) bind(c, name = 'gridInqYvalsPtr')& + & result(f_result) + import c_int, c_ptr + integer(c_int), value :: gridID_dummy + type(c_ptr) :: f_result + end function gridInqYvalsPtr + + function gridInqYIsc(gridID_dummy) bind(c, name = 'gridInqYIsc')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqYIsc + + function cdiDefKeyInt(cdiID_dummy, varID_dummy, key_dummy, value_dummy)& + & bind(c, name = 'cdiDefKeyInt') result(f_result) + import c_int + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + integer(c_int), value :: value_dummy + integer(c_int) :: f_result + end function cdiDefKeyInt + + function cdiInqKeyInt(cdiID_dummy, varID_dummy, key_dummy, value_dummy)& + & bind(c, name = 'cdiInqKeyInt') result(f_result) + import c_int + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + integer(c_int), intent(inout) :: value_dummy + integer(c_int) :: f_result + end function cdiInqKeyInt + + function cdiDefKeyFloat(cdiID_dummy, varID_dummy, key_dummy, value_dummy)& + & bind(c, name = 'cdiDefKeyFloat') result(f_result) + import c_double, c_int + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + real(c_double), value :: value_dummy + integer(c_int) :: f_result + end function cdiDefKeyFloat + + function cdiInqKeyFloat(cdiID_dummy, varID_dummy, key_dummy, value_dummy)& + & bind(c, name = 'cdiInqKeyFloat') result(f_result) + import c_double, c_int + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + real(c_double), intent(inout) :: value_dummy + integer(c_int) :: f_result + end function cdiInqKeyFloat + + function cdiDefKeyBytes(cdiID_dummy, varID_dummy, key_dummy, bytes_dummy,& + & length_dummy) bind(c, name = 'cdiDefKeyBytes') result(f_result) + import c_int, c_signed_char + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + integer(kind = c_signed_char), intent(in) :: bytes_dummy(*) + integer(c_int), value :: length_dummy + integer(c_int) :: f_result + end function cdiDefKeyBytes + + function cdiInqKeyBytes(cdiID_dummy, varID_dummy, key_dummy, bytes_dummy,& + & length_dummy) bind(c, name = 'cdiInqKeyBytes') result(f_result) + import c_int, c_signed_char + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + integer(kind = c_signed_char), intent(inout) :: bytes_dummy(*) + integer(c_int), intent(inout) :: length_dummy + integer(c_int) :: f_result + end function cdiInqKeyBytes + + function cdiInqKeyLen(cdiID_dummy, varID_dummy, key_dummy, length_dummy)& + & bind(c, name = 'cdiInqKeyLen') result(f_result) + import c_int + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + integer(c_int), intent(inout) :: length_dummy + integer(c_int) :: f_result + end function cdiInqKeyLen + + function cdiCopyKeys(cdiID1_dummy, varID1_dummy, cdiID2_dummy,& + & varID2_dummy) bind(c, name = 'cdiCopyKeys') result(f_result) + import c_int + integer(c_int), value :: cdiID1_dummy + integer(c_int), value :: varID1_dummy + integer(c_int), value :: cdiID2_dummy + integer(c_int), value :: varID2_dummy + integer(c_int) :: f_result + end function cdiCopyKeys + + function cdiCopyKey(cdiID1_dummy, varID1_dummy, key_dummy, cdiID2_dummy)& + & bind(c, name = 'cdiCopyKey') result(f_result) + import c_int + integer(c_int), value :: cdiID1_dummy + integer(c_int), value :: varID1_dummy + integer(c_int), value :: key_dummy + integer(c_int), value :: cdiID2_dummy + integer(c_int) :: f_result + end function cdiCopyKey + + function cdiDeleteKey(cdiID_dummy, varID_dummy, key_dummy) bind(c, name =& + & 'cdiDeleteKey') result(f_result) + import c_int + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + integer(c_int) :: f_result + end function cdiDeleteKey + + subroutine gridDefDatatype(gridID_dummy, datatype_dummy) bind(c, name =& + & 'gridDefDatatype') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: datatype_dummy + end subroutine gridDefDatatype + + function gridInqDatatype(gridID_dummy) bind(c, name = 'gridInqDatatype')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqDatatype + + function gridInqXval(gridID_dummy, index_dummy) bind(c, name =& + & 'gridInqXval') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: index_dummy + real(c_double) :: f_result + end function gridInqXval + + function gridInqYval(gridID_dummy, index_dummy) bind(c, name =& + & 'gridInqYval') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: index_dummy + real(c_double) :: f_result + end function gridInqYval + + function gridInqXinc(gridID_dummy) bind(c, name = 'gridInqXinc')& + & result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double) :: f_result + end function gridInqXinc + + function gridInqYinc(gridID_dummy) bind(c, name = 'gridInqYinc')& + & result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double) :: f_result + end function gridInqYinc + + function gridIsCircular(gridID_dummy) bind(c, name = 'gridIsCircular')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridIsCircular + + function gridInqTrunc(gridID_dummy) bind(c, name = 'gridInqTrunc')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqTrunc + + subroutine gridDefTrunc(gridID_dummy, trunc_dummy) bind(c, name =& + & 'gridDefTrunc') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: trunc_dummy + end subroutine gridDefTrunc + + subroutine gridDefNumber(gridID_dummy, number_dummy) bind(c, name =& + & 'gridDefNumber') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: number_dummy + end subroutine gridDefNumber + + function gridInqNumber(gridID_dummy) bind(c, name = 'gridInqNumber')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqNumber + + subroutine gridDefPosition(gridID_dummy, position_dummy) bind(c, name =& + & 'gridDefPosition') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: position_dummy + end subroutine gridDefPosition + + function gridInqPosition(gridID_dummy) bind(c, name = 'gridInqPosition')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqPosition + + subroutine gridDefUUID(gridID_dummy, uuid_dummy) bind(c, name =& + & 'gridDefUUID') + import CDI_UUID_SIZE, c_int, c_signed_char + integer(c_int), value :: gridID_dummy + integer(kind = c_signed_char), intent(in) :: uuid_dummy(CDI_UUID_SIZE) + end subroutine gridDefUUID + + subroutine gridInqUUID(gridID_dummy, uuid_dummy) bind(c, name =& + & 'gridInqUUID') + import CDI_UUID_SIZE, c_int, c_signed_char + integer(c_int), value :: gridID_dummy + integer(kind = c_signed_char), intent(inout) :: uuid_dummy(CDI_UUID_SIZE) + end subroutine gridInqUUID + + subroutine gridDefParamRLL(gridID_dummy, xpole_dummy, ypole_dummy,& + & angle_dummy) bind(c, name = 'gridDefParamRLL') + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), value :: xpole_dummy + real(c_double), value :: ypole_dummy + real(c_double), value :: angle_dummy + end subroutine gridDefParamRLL + + subroutine gridInqParamRLL(gridID_dummy, xpole_dummy, ypole_dummy,& + & angle_dummy) bind(c, name = 'gridInqParamRLL') + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(inout) :: xpole_dummy + real(c_double), intent(inout) :: ypole_dummy + real(c_double), intent(inout) :: angle_dummy + end subroutine gridInqParamRLL + + subroutine gridDefParamGME(gridID_dummy, nd_dummy, ni_dummy, ni2_dummy,& + & ni3_dummy) bind(c, name = 'gridDefParamGME') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: nd_dummy + integer(c_int), value :: ni_dummy + integer(c_int), value :: ni2_dummy + integer(c_int), value :: ni3_dummy + end subroutine gridDefParamGME + + subroutine gridInqParamGME(gridID_dummy, nd_dummy, ni_dummy, ni2_dummy,& + & ni3_dummy) bind(c, name = 'gridInqParamGME') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), intent(inout) :: nd_dummy + integer(c_int), intent(inout) :: ni_dummy + integer(c_int), intent(inout) :: ni2_dummy + integer(c_int), intent(inout) :: ni3_dummy + end subroutine gridInqParamGME + + subroutine gridDefArea(gridID_dummy, area_dummy) bind(c, name =& + & 'gridDefArea') + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(in) :: area_dummy(*) + end subroutine gridDefArea + + subroutine gridInqArea(gridID_dummy, area_dummy) bind(c, name =& + & 'gridInqArea') + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(inout) :: area_dummy(*) + end subroutine gridInqArea + + function gridHasArea(gridID_dummy) bind(c, name = 'gridHasArea')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridHasArea + + subroutine gridDefNvertex(gridID_dummy, nvertex_dummy) bind(c, name =& + & 'gridDefNvertex') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: nvertex_dummy + end subroutine gridDefNvertex + + function gridInqNvertex(gridID_dummy) bind(c, name = 'gridInqNvertex')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqNvertex + + subroutine gridDefXbounds(gridID_dummy, xbounds_dummy) bind(c, name =& + & 'gridDefXbounds') + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(in) :: xbounds_dummy(*) + end subroutine gridDefXbounds + + function gridInqXbounds(gridID_dummy, xbounds_dummy) bind(c, name =& + & 'gridInqXbounds') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(inout) :: xbounds_dummy(*) + integer(c_int) :: f_result + end function gridInqXbounds + + function gridInqXboundsPart(gridID_dummy, start_dummy, size_dummy,& + & xbounds_dummy) bind(c, name = 'gridInqXboundsPart') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: start_dummy + integer(c_int), value :: size_dummy + real(c_double), intent(inout) :: xbounds_dummy(*) + integer(c_int) :: f_result + end function gridInqXboundsPart + + function gridInqXboundsPtr(gridID_dummy) bind(c, name =& + & 'gridInqXboundsPtr') result(f_result) + import c_int, c_ptr + integer(c_int), value :: gridID_dummy + type(c_ptr) :: f_result + end function gridInqXboundsPtr + + subroutine gridDefYbounds(gridID_dummy, ybounds_dummy) bind(c, name =& + & 'gridDefYbounds') + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(in) :: ybounds_dummy(*) + end subroutine gridDefYbounds + + function gridInqYbounds(gridID_dummy, ybounds_dummy) bind(c, name =& + & 'gridInqYbounds') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + real(c_double), intent(inout) :: ybounds_dummy(*) + integer(c_int) :: f_result + end function gridInqYbounds + + function gridInqYboundsPart(gridID_dummy, start_dummy, size_dummy,& + & ybounds_dummy) bind(c, name = 'gridInqYboundsPart') result(f_result) + import c_double, c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: start_dummy + integer(c_int), value :: size_dummy + real(c_double), intent(inout) :: ybounds_dummy(*) + integer(c_int) :: f_result + end function gridInqYboundsPart + + function gridInqYboundsPtr(gridID_dummy) bind(c, name =& + & 'gridInqYboundsPtr') result(f_result) + import c_int, c_ptr + integer(c_int), value :: gridID_dummy + type(c_ptr) :: f_result + end function gridInqYboundsPtr + + subroutine gridDefReducedPoints(gridID_dummy, reducedPointsSize_dummy,& + & reducedPoints_dummy) bind(c, name = 'gridDefReducedPoints') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: reducedPointsSize_dummy + integer(c_int), intent(in) :: reducedPoints_dummy(*) + end subroutine gridDefReducedPoints + + subroutine gridInqReducedPoints(gridID_dummy, reducedPoints_dummy) bind(c,& + & name = 'gridInqReducedPoints') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), intent(inout) :: reducedPoints_dummy(*) + end subroutine gridInqReducedPoints + + subroutine gridChangeType(gridID_dummy, gridtype_dummy) bind(c, name =& + & 'gridChangeType') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: gridtype_dummy + end subroutine gridChangeType + + subroutine gridDefComplexPacking(gridID_dummy, lpack_dummy) bind(c, name =& + & 'gridDefComplexPacking') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: lpack_dummy + end subroutine gridDefComplexPacking + + function gridInqComplexPacking(gridID_dummy) bind(c, name =& + & 'gridInqComplexPacking') result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function gridInqComplexPacking + + function zaxisCreate(zaxistype_dummy, size_dummy) bind(c, name =& + & 'zaxisCreate') result(f_result) + import c_int + integer(c_int), value :: zaxistype_dummy + integer(c_int), value :: size_dummy + integer(c_int) :: f_result + end function zaxisCreate + + subroutine zaxisDestroy(zaxisID_dummy) bind(c, name = 'zaxisDestroy') + import c_int + integer(c_int), value :: zaxisID_dummy + end subroutine zaxisDestroy + + function zaxisInqType(zaxisID_dummy) bind(c, name = 'zaxisInqType')& + & result(f_result) + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function zaxisInqType + + function zaxisInqSize(zaxisID_dummy) bind(c, name = 'zaxisInqSize')& + & result(f_result) + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function zaxisInqSize + + function zaxisDuplicate(zaxisID_dummy) bind(c, name = 'zaxisDuplicate')& + & result(f_result) + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function zaxisDuplicate + + subroutine zaxisDefLevels(zaxisID_dummy, levels_dummy) bind(c, name =& + & 'zaxisDefLevels') + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + real(c_double), intent(in) :: levels_dummy(*) + end subroutine zaxisDefLevels + + function zaxisInqLevels(zaxisID_dummy, levels_dummy) bind(c, name =& + & 'zaxisInqLevels') result(f_result) + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + real(c_double), intent(inout) :: levels_dummy(*) + integer(c_int) :: f_result + end function zaxisInqLevels + + function zaxisInqCLen(zaxisID_dummy) bind(c, name = 'zaxisInqCLen')& + & result(f_result) + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function zaxisInqCLen + + subroutine zaxisDefLevel(zaxisID_dummy, levelID_dummy, levels_dummy)& + & bind(c, name = 'zaxisDefLevel') + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: levelID_dummy + real(c_double), value :: levels_dummy + end subroutine zaxisDefLevel + + function zaxisInqLevel(zaxisID_dummy, levelID_dummy) bind(c, name =& + & 'zaxisInqLevel') result(f_result) + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: levelID_dummy + real(c_double) :: f_result + end function zaxisInqLevel + + subroutine zaxisDefNlevRef(gridID_dummy, nhlev_dummy) bind(c, name =& + & 'zaxisDefNlevRef') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: nhlev_dummy + end subroutine zaxisDefNlevRef + + function zaxisInqNlevRef(gridID_dummy) bind(c, name = 'zaxisInqNlevRef')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function zaxisInqNlevRef + + subroutine zaxisDefNumber(gridID_dummy, number_dummy) bind(c, name =& + & 'zaxisDefNumber') + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int), value :: number_dummy + end subroutine zaxisDefNumber + + function zaxisInqNumber(gridID_dummy) bind(c, name = 'zaxisInqNumber')& + & result(f_result) + import c_int + integer(c_int), value :: gridID_dummy + integer(c_int) :: f_result + end function zaxisInqNumber + + subroutine zaxisDefUUID(zaxisID_dummy, uuid_dummy) bind(c, name =& + & 'zaxisDefUUID') + import CDI_UUID_SIZE, c_int, c_signed_char + integer(c_int), value :: zaxisID_dummy + integer(kind = c_signed_char), intent(in) :: uuid_dummy(CDI_UUID_SIZE) + end subroutine zaxisDefUUID + + subroutine zaxisInqUUID(zaxisID_dummy, uuid_dummy) bind(c, name =& + & 'zaxisInqUUID') + import CDI_UUID_SIZE, c_int, c_signed_char + integer(c_int), value :: zaxisID_dummy + integer(kind = c_signed_char), intent(inout) :: uuid_dummy(CDI_UUID_SIZE) + end subroutine zaxisInqUUID + + subroutine zaxisDefDatatype(zaxisID_dummy, datatype_dummy) bind(c, name =& + & 'zaxisDefDatatype') + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: datatype_dummy + end subroutine zaxisDefDatatype + + function zaxisInqDatatype(zaxisID_dummy) bind(c, name = 'zaxisInqDatatype')& + & result(f_result) + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function zaxisInqDatatype + + subroutine zaxisDefPositive(zaxisID_dummy, positive_dummy) bind(c, name =& + & 'zaxisDefPositive') + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: positive_dummy + end subroutine zaxisDefPositive + + function zaxisInqPositive(zaxisID_dummy) bind(c, name = 'zaxisInqPositive')& + & result(f_result) + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function zaxisInqPositive + + subroutine zaxisDefScalar(zaxisID_dummy) bind(c, name = 'zaxisDefScalar') + import c_int + integer(c_int), value :: zaxisID_dummy + end subroutine zaxisDefScalar + + function zaxisInqScalar(zaxisID_dummy) bind(c, name = 'zaxisInqScalar')& + & result(f_result) + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function zaxisInqScalar + + subroutine zaxisDefVct(zaxisID_dummy, size_dummy, vct_dummy) bind(c, name =& + & 'zaxisDefVct') + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: size_dummy + real(c_double), intent(in) :: vct_dummy(*) + end subroutine zaxisDefVct + + subroutine zaxisInqVct(zaxisID_dummy, vct_dummy) bind(c, name =& + & 'zaxisInqVct') + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + real(c_double), intent(inout) :: vct_dummy(*) + end subroutine zaxisInqVct + + function zaxisInqVctSize(zaxisID_dummy) bind(c, name = 'zaxisInqVctSize')& + & result(f_result) + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int) :: f_result + end function zaxisInqVctSize + + function zaxisInqVctPtr(zaxisID_dummy) bind(c, name = 'zaxisInqVctPtr')& + & result(f_result) + import c_int, c_ptr + integer(c_int), value :: zaxisID_dummy + type(c_ptr) :: f_result + end function zaxisInqVctPtr + + subroutine zaxisDefLbounds(zaxisID_dummy, lbounds_dummy) bind(c, name =& + & 'zaxisDefLbounds') + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + real(c_double), intent(in) :: lbounds_dummy(*) + end subroutine zaxisDefLbounds + + function zaxisInqLbound(zaxisID_dummy, index_dummy) bind(c, name =& + & 'zaxisInqLbound') result(f_result) + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: index_dummy + real(c_double) :: f_result + end function zaxisInqLbound + + subroutine zaxisDefUbounds(zaxisID_dummy, ubounds_dummy) bind(c, name =& + & 'zaxisDefUbounds') + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + real(c_double), intent(in) :: ubounds_dummy(*) + end subroutine zaxisDefUbounds + + function zaxisInqUbound(zaxisID_dummy, index_dummy) bind(c, name =& + & 'zaxisInqUbound') result(f_result) + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: index_dummy + real(c_double) :: f_result + end function zaxisInqUbound + + subroutine zaxisDefWeights(zaxisID_dummy, weights_dummy) bind(c, name =& + & 'zaxisDefWeights') + import c_double, c_int + integer(c_int), value :: zaxisID_dummy + real(c_double), intent(in) :: weights_dummy(*) + end subroutine zaxisDefWeights + + subroutine zaxisChangeType(zaxisID_dummy, zaxistype_dummy) bind(c, name =& + & 'zaxisChangeType') + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: zaxistype_dummy + end subroutine zaxisChangeType + + function taxisCreate(taxistype_dummy) bind(c, name = 'taxisCreate')& + & result(f_result) + import c_int + integer(c_int), value :: taxistype_dummy + integer(c_int) :: f_result + end function taxisCreate + + subroutine taxisDestroy(taxisID_dummy) bind(c, name = 'taxisDestroy') + import c_int + integer(c_int), value :: taxisID_dummy + end subroutine taxisDestroy + + function taxisDuplicate(taxisID_dummy) bind(c, name = 'taxisDuplicate')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisDuplicate + + subroutine taxisCopyTimestep(taxisIDdes_dummy, taxisIDsrc_dummy) bind(c,& + & name = 'taxisCopyTimestep') + import c_int + integer(c_int), value :: taxisIDdes_dummy + integer(c_int), value :: taxisIDsrc_dummy + end subroutine taxisCopyTimestep + + subroutine taxisDefType(taxisID_dummy, taxistype_dummy) bind(c, name =& + & 'taxisDefType') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: taxistype_dummy + end subroutine taxisDefType + + function taxisInqType(taxisID_dummy) bind(c, name = 'taxisInqType')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqType + + subroutine taxisDefVdate(taxisID_dummy, date_dummy) bind(c, name =& + & 'taxisDefVdate') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: date_dummy + end subroutine taxisDefVdate + + subroutine taxisDefVtime(taxisID_dummy, time_dummy) bind(c, name =& + & 'taxisDefVtime') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: time_dummy + end subroutine taxisDefVtime + + function taxisInqVdate(taxisID_dummy) bind(c, name = 'taxisInqVdate')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqVdate + + function taxisInqVtime(taxisID_dummy) bind(c, name = 'taxisInqVtime')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqVtime + + subroutine taxisDefRdate(taxisID_dummy, date_dummy) bind(c, name =& + & 'taxisDefRdate') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: date_dummy + end subroutine taxisDefRdate + + subroutine taxisDefRtime(taxisID_dummy, time_dummy) bind(c, name =& + & 'taxisDefRtime') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: time_dummy + end subroutine taxisDefRtime + + function taxisInqRdate(taxisID_dummy) bind(c, name = 'taxisInqRdate')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqRdate + + function taxisInqRtime(taxisID_dummy) bind(c, name = 'taxisInqRtime')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqRtime + + function taxisHasBounds(taxisID_dummy) bind(c, name = 'taxisHasBounds')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisHasBounds + + subroutine taxisWithBounds(taxisID_dummy) bind(c, name = 'taxisWithBounds') + import c_int + integer(c_int), value :: taxisID_dummy + end subroutine taxisWithBounds + + subroutine taxisDeleteBounds(taxisID_dummy) bind(c, name =& + & 'taxisDeleteBounds') + import c_int + integer(c_int), value :: taxisID_dummy + end subroutine taxisDeleteBounds + + subroutine taxisDefVdateBounds(taxisID_dummy, vdate_lb_dummy,& + & vdate_ub_dummy) bind(c, name = 'taxisDefVdateBounds') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: vdate_lb_dummy + integer(c_int), value :: vdate_ub_dummy + end subroutine taxisDefVdateBounds + + subroutine taxisDefVtimeBounds(taxisID_dummy, vtime_lb_dummy,& + & vtime_ub_dummy) bind(c, name = 'taxisDefVtimeBounds') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: vtime_lb_dummy + integer(c_int), value :: vtime_ub_dummy + end subroutine taxisDefVtimeBounds + + subroutine taxisInqVdateBounds(taxisID_dummy, vdate_lb_dummy,& + & vdate_ub_dummy) bind(c, name = 'taxisInqVdateBounds') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), intent(inout) :: vdate_lb_dummy + integer(c_int), intent(inout) :: vdate_ub_dummy + end subroutine taxisInqVdateBounds + + subroutine taxisInqVtimeBounds(taxisID_dummy, vtime_lb_dummy,& + & vtime_ub_dummy) bind(c, name = 'taxisInqVtimeBounds') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), intent(inout) :: vtime_lb_dummy + integer(c_int), intent(inout) :: vtime_ub_dummy + end subroutine taxisInqVtimeBounds + + subroutine taxisDefCalendar(taxisID_dummy, calendar_dummy) bind(c, name =& + & 'taxisDefCalendar') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: calendar_dummy + end subroutine taxisDefCalendar + + function taxisInqCalendar(taxisID_dummy) bind(c, name = 'taxisInqCalendar')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqCalendar + + subroutine taxisDefTunit(taxisID_dummy, tunit_dummy) bind(c, name =& + & 'taxisDefTunit') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: tunit_dummy + end subroutine taxisDefTunit + + function taxisInqTunit(taxisID_dummy) bind(c, name = 'taxisInqTunit')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqTunit + + subroutine taxisDefForecastTunit(taxisID_dummy, tunit_dummy) bind(c, name =& + & 'taxisDefForecastTunit') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: tunit_dummy + end subroutine taxisDefForecastTunit + + function taxisInqForecastTunit(taxisID_dummy) bind(c, name =& + & 'taxisInqForecastTunit') result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqForecastTunit + + subroutine taxisDefForecastPeriod(taxisID_dummy, fc_period_dummy) bind(c,& + & name = 'taxisDefForecastPeriod') + import c_double, c_int + integer(c_int), value :: taxisID_dummy + real(c_double), value :: fc_period_dummy + end subroutine taxisDefForecastPeriod + + function taxisInqForecastPeriod(taxisID_dummy) bind(c, name =& + & 'taxisInqForecastPeriod') result(f_result) + import c_double, c_int + integer(c_int), value :: taxisID_dummy + real(c_double) :: f_result + end function taxisInqForecastPeriod + + subroutine taxisDefNumavg(taxisID_dummy, numavg_dummy) bind(c, name =& + & 'taxisDefNumavg') + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int), value :: numavg_dummy + end subroutine taxisDefNumavg + + function taxisInqNumavg(taxisID_dummy) bind(c, name = 'taxisInqNumavg')& + & result(f_result) + import c_int + integer(c_int), value :: taxisID_dummy + integer(c_int) :: f_result + end function taxisInqNumavg + + function institutInqNumber() bind(c, name = 'institutInqNumber')& + & result(f_result) + import c_int + integer(c_int) :: f_result + end function institutInqNumber + + function institutInqCenter(instID_dummy) bind(c, name =& + & 'institutInqCenter') result(f_result) + import c_int + integer(c_int), value :: instID_dummy + integer(c_int) :: f_result + end function institutInqCenter + + function institutInqSubcenter(instID_dummy) bind(c, name =& + & 'institutInqSubcenter') result(f_result) + import c_int + integer(c_int), value :: instID_dummy + integer(c_int) :: f_result + end function institutInqSubcenter + + function modelInqInstitut(modelID_dummy) bind(c, name = 'modelInqInstitut')& + & result(f_result) + import c_int + integer(c_int), value :: modelID_dummy + integer(c_int) :: f_result + end function modelInqInstitut + + function modelInqGribID(modelID_dummy) bind(c, name = 'modelInqGribID')& + & result(f_result) + import c_int + integer(c_int), value :: modelID_dummy + integer(c_int) :: f_result + end function modelInqGribID + + function tableInqNumber() bind(c, name = 'tableInqNumber') result(f_result) + import c_int + integer(c_int) :: f_result + end function tableInqNumber + + function tableInqNum(tableID_dummy) bind(c, name = 'tableInqNum')& + & result(f_result) + import c_int + integer(c_int), value :: tableID_dummy + integer(c_int) :: f_result + end function tableInqNum + + function tableInqModel(tableID_dummy) bind(c, name = 'tableInqModel')& + & result(f_result) + import c_int + integer(c_int), value :: tableID_dummy + integer(c_int) :: f_result + end function tableInqModel + + function subtypeCreate(subtype_dummy) bind(c, name = 'subtypeCreate')& + & result(f_result) + import c_int + integer(c_int), value :: subtype_dummy + integer(c_int) :: f_result + end function subtypeCreate + + subroutine subtypePrint(subtypeID_dummy) bind(c, name = 'subtypePrint') + import c_int + integer(c_int), value :: subtypeID_dummy + end subroutine subtypePrint + + function subtypeCompare(subtypeID1_dummy, subtypeID2_dummy) bind(c, name =& + & 'subtypeCompare') result(f_result) + import c_int + integer(c_int), value :: subtypeID1_dummy + integer(c_int), value :: subtypeID2_dummy + integer(c_int) :: f_result + end function subtypeCompare + + function subtypeInqSize(subtypeID_dummy) bind(c, name = 'subtypeInqSize')& + & result(f_result) + import c_int + integer(c_int), value :: subtypeID_dummy + integer(c_int) :: f_result + end function subtypeInqSize + + function subtypeInqActiveIndex(subtypeID_dummy) bind(c, name =& + & 'subtypeInqActiveIndex') result(f_result) + import c_int + integer(c_int), value :: subtypeID_dummy + integer(c_int) :: f_result + end function subtypeInqActiveIndex + + subroutine subtypeDefActiveIndex(subtypeID_dummy, index_dummy) bind(c, name& + & = 'subtypeDefActiveIndex') + import c_int + integer(c_int), value :: subtypeID_dummy + integer(c_int), value :: index_dummy + end subroutine subtypeDefActiveIndex + + function subtypeInqTile(subtypeID_dummy, tileindex_dummy, attribute_dummy)& + & bind(c, name = 'subtypeInqTile') result(f_result) + import c_int + integer(c_int), value :: subtypeID_dummy + integer(c_int), value :: tileindex_dummy + integer(c_int), value :: attribute_dummy + integer(c_int) :: f_result + end function subtypeInqTile + + function vlistInqVarSubtype(vlistID_dummy, varID_dummy) bind(c, name =& + & 'vlistInqVarSubtype') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarSubtype + + subroutine gribapiLibraryVersion(major_version_dummy, minor_version_dummy,& + & revision_version_dummy) bind(c, name = 'gribapiLibraryVersion') + import c_int + integer(c_int), intent(inout) :: major_version_dummy + integer(c_int), intent(inout) :: minor_version_dummy + integer(c_int), intent(inout) :: revision_version_dummy + end subroutine gribapiLibraryVersion + + subroutine zaxisDefLtype(zaxisID_dummy, ltype_dummy) bind(c, name =& + & 'zaxisDefLtype') + import c_int + integer(c_int), value :: zaxisID_dummy + integer(c_int), value :: ltype_dummy + end subroutine zaxisDefLtype + + function vlistInqVarTypeOfGeneratingProcess(vlistID_dummy, varID_dummy)& + & bind(c, name = 'vlistInqVarTypeOfGeneratingProcess') result(f_result) + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int) :: f_result + end function vlistInqVarTypeOfGeneratingProcess + + subroutine vlistDefVarTypeOfGeneratingProcess(vlistID_dummy, varID_dummy,& + & typeOfGeneratingProcess_dummy) bind(c, name =& + & 'vlistDefVarTypeOfGeneratingProcess') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: typeOfGeneratingProcess_dummy + end subroutine vlistDefVarTypeOfGeneratingProcess + + subroutine vlistDefVarProductDefinitionTemplate(vlistID_dummy, varID_dummy,& + & productDefinitionTemplate_dummy) bind(c, name =& + & 'vlistDefVarProductDefinitionTemplate') + import c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: productDefinitionTemplate_dummy + end subroutine vlistDefVarProductDefinitionTemplate + + function date_to_julday(calendar_dummy, date_dummy) bind(c, name =& + & 'date_to_julday') result(f_result) + import c_int, c_int64_t + integer(c_int), value :: calendar_dummy + integer(c_int64_t), value :: date_dummy + integer(c_int64_t) :: f_result + end function date_to_julday + + function julday_to_date(calendar_dummy, julday_dummy) bind(c, name =& + & 'julday_to_date') result(f_result) + import c_int, c_int64_t + integer(c_int), value :: calendar_dummy + integer(c_int64_t), value :: julday_dummy + integer(c_int64_t) :: f_result + end function julday_to_date + + function time_to_sec(time_dummy) bind(c, name = 'time_to_sec')& + & result(f_result) + import c_int + integer(c_int), value :: time_dummy + integer(c_int) :: f_result + end function time_to_sec + + function sec_to_time(secofday_dummy) bind(c, name = 'sec_to_time')& + & result(f_result) + import c_int + integer(c_int), value :: secofday_dummy + integer(c_int) :: f_result + end function sec_to_time + + end interface + +contains + + subroutine ctrim(str) + character(kind = c_char, len = *), intent(inout) :: str + integer :: i + + do i=1,len(str) + if (str(i:i) == c_null_char) then + str(i:len(str)) = ' ' + exit + end if + end do + end subroutine ctrim + + function c_len(s) result(i) + character(kind = c_char, len = *), intent(in) :: s + integer :: i + + do i = 1, len(s) + if (s(i:i) == c_null_char) exit + end do + i = i - 1 + end function + + function cdiStringError(cdiErrno_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: cdiErrno_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_cdiStringError(cdiErrno_dummy) bind(c, name =& + & 'cdiStringError') result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: cdiErrno_dummy + end function lib_cdiStringError + end interface + f_result => null() + ptr = lib_cdiStringError(cdiErrno_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function cdiStringError + + function cdiLibraryVersion() result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_cdiLibraryVersion() bind(c, name = 'cdiLibraryVersion')& + & result(c_result) + import c_ptr + type(c_ptr) :: c_result + end function lib_cdiLibraryVersion + end interface + f_result => null() + ptr = lib_cdiLibraryVersion() + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function cdiLibraryVersion + + subroutine cdiDefGlobal(string_dummy, val_dummy) + character(kind = c_char, len = *), intent(in) :: string_dummy + integer(c_int), value :: val_dummy + character(kind = c_char) :: string_temp(len(string_dummy) + 1) + integer :: string_i + interface + subroutine lib_cdiDefGlobal(string_dummy, val_dummy) bind(c, name =& + & 'cdiDefGlobal') + import c_char, c_int + character(kind = c_char) :: string_dummy(*) + integer(c_int), value :: val_dummy + end subroutine lib_cdiDefGlobal + end interface + do string_i = 1, len(string_dummy) + string_temp(string_i) = string_dummy(string_i:string_i) + end do + string_temp(len(string_dummy) + 1) = c_null_char + call lib_cdiDefGlobal(string_temp, val_dummy) + end subroutine cdiDefGlobal + + subroutine cdiParamToString(param_dummy, paramstr_dummy, maxlen_dummy) + integer(c_int), value :: param_dummy + character(kind = c_char, len = *), intent(inout) :: paramstr_dummy + integer(c_int), value :: maxlen_dummy + character(kind = c_char) :: paramstr_temp(len(paramstr_dummy) + 1) + integer :: paramstr_i + interface + subroutine lib_cdiParamToString(param_dummy, paramstr_dummy,& + & maxlen_dummy) bind(c, name = 'cdiParamToString') + import c_char, c_int + integer(c_int), value :: param_dummy + character(kind = c_char) :: paramstr_dummy(*) + integer(c_int), value :: maxlen_dummy + end subroutine lib_cdiParamToString + end interface + paramstr_temp(len(paramstr_dummy) + 1) = c_null_char + do paramstr_i = len(paramstr_dummy), 1, -1 + if(paramstr_dummy(paramstr_i:paramstr_i) /= ' ') exit + paramstr_temp(paramstr_i) = c_null_char + end do + do paramstr_i = paramstr_i, 1, -1 + paramstr_temp(paramstr_i) = paramstr_dummy(paramstr_i:paramstr_i) + end do + call lib_cdiParamToString(param_dummy, paramstr_temp, maxlen_dummy) + do paramstr_i = 1, len(paramstr_dummy) + if(paramstr_temp(paramstr_i) == c_null_char) exit + paramstr_dummy(paramstr_i:paramstr_i) = paramstr_temp(paramstr_i) + end do + do paramstr_i = paramstr_i, len(paramstr_dummy) + paramstr_dummy(paramstr_i:paramstr_i) = ' ' + end do + end subroutine cdiParamToString + + function cdiGetFiletype(uri_dummy, byteorder_dummy) result(f_result) + integer(c_int) :: f_result + character(kind = c_char, len = *), intent(in) :: uri_dummy + integer(c_int), intent(inout) :: byteorder_dummy + character(kind = c_char) :: uri_temp(len(uri_dummy) + 1) + integer :: uri_i + interface + function lib_cdiGetFiletype(uri_dummy, byteorder_dummy) bind(c, name =& + & 'cdiGetFiletype') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + character(kind = c_char) :: uri_dummy(*) + integer(c_int), intent(inout) :: byteorder_dummy + end function lib_cdiGetFiletype + end interface + do uri_i = 1, len(uri_dummy) + uri_temp(uri_i) = uri_dummy(uri_i:uri_i) + end do + uri_temp(len(uri_dummy) + 1) = c_null_char + f_result = lib_cdiGetFiletype(uri_temp, byteorder_dummy) + end function cdiGetFiletype + + function streamOpenRead(path_dummy) result(f_result) + integer(c_int) :: f_result + character(kind = c_char, len = *), intent(in) :: path_dummy + character(kind = c_char) :: path_temp(len(path_dummy) + 1) + integer :: path_i + interface + function lib_streamOpenRead(path_dummy) bind(c, name = 'streamOpenRead')& + & result(c_result) + import c_char, c_int + integer(c_int) :: c_result + character(kind = c_char) :: path_dummy(*) + end function lib_streamOpenRead + end interface + do path_i = 1, len(path_dummy) + path_temp(path_i) = path_dummy(path_i:path_i) + end do + path_temp(len(path_dummy) + 1) = c_null_char + f_result = lib_streamOpenRead(path_temp) + end function streamOpenRead + + function streamOpenWrite(path_dummy, filetype_dummy) result(f_result) + integer(c_int) :: f_result + character(kind = c_char, len = *), intent(in) :: path_dummy + integer(c_int), value :: filetype_dummy + character(kind = c_char) :: path_temp(len(path_dummy) + 1) + integer :: path_i + interface + function lib_streamOpenWrite(path_dummy, filetype_dummy) bind(c, name =& + & 'streamOpenWrite') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + character(kind = c_char) :: path_dummy(*) + integer(c_int), value :: filetype_dummy + end function lib_streamOpenWrite + end interface + do path_i = 1, len(path_dummy) + path_temp(path_i) = path_dummy(path_i:path_i) + end do + path_temp(len(path_dummy) + 1) = c_null_char + f_result = lib_streamOpenWrite(path_temp, filetype_dummy) + end function streamOpenWrite + + function streamOpenAppend(path_dummy) result(f_result) + integer(c_int) :: f_result + character(kind = c_char, len = *), intent(in) :: path_dummy + character(kind = c_char) :: path_temp(len(path_dummy) + 1) + integer :: path_i + interface + function lib_streamOpenAppend(path_dummy) bind(c, name =& + & 'streamOpenAppend') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + character(kind = c_char) :: path_dummy(*) + end function lib_streamOpenAppend + end interface + do path_i = 1, len(path_dummy) + path_temp(path_i) = path_dummy(path_i:path_i) + end do + path_temp(len(path_dummy) + 1) = c_null_char + f_result = lib_streamOpenAppend(path_temp) + end function streamOpenAppend + + function streamFilename(streamID_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: streamID_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_streamFilename(streamID_dummy) bind(c, name =& + & 'streamFilename') result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: streamID_dummy + end function lib_streamFilename + end interface + f_result => null() + ptr = lib_streamFilename(streamID_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function streamFilename + + function streamFilesuffix(filetype_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: filetype_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_streamFilesuffix(filetype_dummy) bind(c, name =& + & 'streamFilesuffix') result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: filetype_dummy + end function lib_streamFilesuffix + end interface + f_result => null() + ptr = lib_streamFilesuffix(filetype_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function streamFilesuffix + + function cdiIterator_new(path_dummy) result(f_result) + type(t_CdiIterator) :: f_result + character(kind = c_char, len = *), intent(in) :: path_dummy + character(kind = c_char) :: path_temp(len(path_dummy) + 1) + integer :: path_i + interface + function lib_cdiIterator_new(path_dummy) bind(c, name =& + & 'cdiIterator_new') result(c_result) + import c_char, c_ptr + type(c_ptr) :: c_result + character(kind = c_char) :: path_dummy(*) + end function lib_cdiIterator_new + end interface + do path_i = 1, len(path_dummy) + path_temp(path_i) = path_dummy(path_i:path_i) + end do + path_temp(len(path_dummy) + 1) = c_null_char + f_result%ptr = lib_cdiIterator_new(path_temp) + end function cdiIterator_new + + function cdiIterator_clone(me_dummy) result(f_result) + type(t_CdiIterator) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + interface + function lib_cdiIterator_clone(me_dummy) bind(c, name =& + & 'cdiIterator_clone') result(c_result) + import c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_clone + end interface + f_result%ptr = lib_cdiIterator_clone(me_dummy%ptr) + end function cdiIterator_clone + + function cdiIterator_serialize(me_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + type(c_ptr) :: cString + integer :: rv_shape(1) + character(kind = c_char), dimension(:), pointer :: temp + interface + function lib_cdiIterator_serialize(me_dummy) bind(c, name =& + & 'cdiIterator_serialize') result(c_result) + import c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_serialize + end interface + cString = lib_cdiIterator_serialize(me_dummy%ptr) + if(c_associated(cString)) then + rv_shape(1) = int(lib_strlen(cString)) + call c_f_pointer(cString, temp, rv_shape) + allocate(f_result(rv_shape(1))) + f_result = temp + call lib_free(cString) + else + f_result => null() + end if + end function cdiIterator_serialize + + function cdiIterator_deserialize(description_dummy) result(f_result) + type(t_CdiIterator) :: f_result + character(kind = c_char, len = *), intent(in) :: description_dummy + character(kind = c_char) :: description_temp(len(description_dummy) + 1) + integer :: description_i + interface + function lib_cdiIterator_deserialize(description_dummy) bind(c, name =& + & 'cdiIterator_deserialize') result(c_result) + import c_char, c_ptr + type(c_ptr) :: c_result + character(kind = c_char) :: description_dummy(*) + end function lib_cdiIterator_deserialize + end interface + do description_i = 1, len(description_dummy) + description_temp(description_i) =& + & description_dummy(description_i:description_i) + end do + description_temp(len(description_dummy) + 1) = c_null_char + f_result%ptr = lib_cdiIterator_deserialize(description_temp) + end function cdiIterator_deserialize + + subroutine cdiIterator_delete(me_dummy) + type(t_CdiIterator), intent(in) :: me_dummy + interface + subroutine lib_cdiIterator_delete(me_dummy) bind(c, name =& + & 'cdiIterator_delete') + import c_ptr + type(c_ptr), value :: me_dummy + end subroutine lib_cdiIterator_delete + end interface + call lib_cdiIterator_delete(me_dummy%ptr) + end subroutine cdiIterator_delete + + function cdiIterator_nextField(me_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + interface + function lib_cdiIterator_nextField(me_dummy) bind(c, name =& + & 'cdiIterator_nextField') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_nextField + end interface + f_result = lib_cdiIterator_nextField(me_dummy%ptr) + end function cdiIterator_nextField + + function cdiIterator_inqStartTime(me_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + type(c_ptr) :: cString + integer :: rv_shape(1) + character(kind = c_char), dimension(:), pointer :: temp + interface + function lib_cdiIterator_inqStartTime(me_dummy) bind(c, name =& + & 'cdiIterator_inqStartTime') result(c_result) + import c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqStartTime + end interface + cString = lib_cdiIterator_inqStartTime(me_dummy%ptr) + if(c_associated(cString)) then + rv_shape(1) = int(lib_strlen(cString)) + call c_f_pointer(cString, temp, rv_shape) + allocate(f_result(rv_shape(1))) + f_result = temp + call lib_free(cString) + else + f_result => null() + end if + end function cdiIterator_inqStartTime + + function cdiIterator_inqEndTime(me_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + type(c_ptr) :: cString + integer :: rv_shape(1) + character(kind = c_char), dimension(:), pointer :: temp + interface + function lib_cdiIterator_inqEndTime(me_dummy) bind(c, name =& + & 'cdiIterator_inqEndTime') result(c_result) + import c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqEndTime + end interface + cString = lib_cdiIterator_inqEndTime(me_dummy%ptr) + if(c_associated(cString)) then + rv_shape(1) = int(lib_strlen(cString)) + call c_f_pointer(cString, temp, rv_shape) + allocate(f_result(rv_shape(1))) + f_result = temp + call lib_free(cString) + else + f_result => null() + end if + end function cdiIterator_inqEndTime + + function cdiIterator_inqRTime(me_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + type(c_ptr) :: cString + integer :: rv_shape(1) + character(kind = c_char), dimension(:), pointer :: temp + interface + function lib_cdiIterator_inqRTime(me_dummy) bind(c, name =& + & 'cdiIterator_inqRTime') result(c_result) + import c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqRTime + end interface + cString = lib_cdiIterator_inqRTime(me_dummy%ptr) + if(c_associated(cString)) then + rv_shape(1) = int(lib_strlen(cString)) + call c_f_pointer(cString, temp, rv_shape) + allocate(f_result(rv_shape(1))) + f_result = temp + call lib_free(cString) + else + f_result => null() + end if + end function cdiIterator_inqRTime + + function cdiIterator_inqVTime(me_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + type(c_ptr) :: cString + integer :: rv_shape(1) + character(kind = c_char), dimension(:), pointer :: temp + interface + function lib_cdiIterator_inqVTime(me_dummy) bind(c, name =& + & 'cdiIterator_inqVTime') result(c_result) + import c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqVTime + end interface + cString = lib_cdiIterator_inqVTime(me_dummy%ptr) + if(c_associated(cString)) then + rv_shape(1) = int(lib_strlen(cString)) + call c_f_pointer(cString, temp, rv_shape) + allocate(f_result(rv_shape(1))) + f_result = temp + call lib_free(cString) + else + f_result => null() + end if + end function cdiIterator_inqVTime + + function cdiIterator_inqLevelType(me_dummy, levelSelector_dummy, outName,& + & outLongName, outStdName, outUnit) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + integer(c_int), value :: levelSelector_dummy + character(kind = c_char), pointer, optional, intent(inout) :: outName(:) + character(kind = c_char), pointer, optional, intent(inout) ::& + & outLongName(:) + character(kind = c_char), pointer, optional, intent(inout) :: outStdName(:) + character(kind = c_char), pointer, optional, intent(inout) :: outUnit(:) + type(c_ptr), target :: outName_cptr + type(c_ptr) :: outName_handle + integer :: outName_shape(1) + character(kind = c_char), pointer :: outName_fptr(:) + type(c_ptr), target :: outLongName_cptr + type(c_ptr) :: outLongName_handle + integer :: outLongName_shape(1) + character(kind = c_char), pointer :: outLongName_fptr(:) + type(c_ptr), target :: outStdName_cptr + type(c_ptr) :: outStdName_handle + integer :: outStdName_shape(1) + character(kind = c_char), pointer :: outStdName_fptr(:) + type(c_ptr), target :: outUnit_cptr + type(c_ptr) :: outUnit_handle + integer :: outUnit_shape(1) + character(kind = c_char), pointer :: outUnit_fptr(:) + interface + function lib_cdiIterator_inqLevelType(me_dummy, levelSelector_dummy,& + & outName, outLongName, outStdName, outUnit) bind(c, name =& + & 'cdiIterator_inqLevelType') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + integer(c_int), value :: levelSelector_dummy + type(c_ptr), value :: outName + type(c_ptr), value :: outLongName + type(c_ptr), value :: outStdName + type(c_ptr), value :: outUnit + end function lib_cdiIterator_inqLevelType + end interface + outName_handle = c_null_ptr + if(present(outName)) outName_handle = c_loc(outName_cptr) + outLongName_handle = c_null_ptr + if(present(outLongName)) outLongName_handle = c_loc(outLongName_cptr) + outStdName_handle = c_null_ptr + if(present(outStdName)) outStdName_handle = c_loc(outStdName_cptr) + outUnit_handle = c_null_ptr + if(present(outUnit)) outUnit_handle = c_loc(outUnit_cptr) + f_result = lib_cdiIterator_inqLevelType(me_dummy%ptr, levelSelector_dummy,& + & outName_handle, outLongName_handle, outStdName_handle, outUnit_handle) + if(present(outName)) then + if(c_associated(outName_cptr)) then + outName_shape(1) = int(lib_strlen(outName_cptr)) + call c_f_pointer(outName_cptr, outName_fptr, outName_shape) + allocate(outName(outName_shape(1))) + outName = outName_fptr + call lib_free(outName_cptr) + else + outName => null() + end if + end if + if(present(outLongName)) then + if(c_associated(outLongName_cptr)) then + outLongName_shape(1) = int(lib_strlen(outLongName_cptr)) + call c_f_pointer(outLongName_cptr, outLongName_fptr, outLongName_shape) + allocate(outLongName(outLongName_shape(1))) + outLongName = outLongName_fptr + call lib_free(outLongName_cptr) + else + outLongName => null() + end if + end if + if(present(outStdName)) then + if(c_associated(outStdName_cptr)) then + outStdName_shape(1) = int(lib_strlen(outStdName_cptr)) + call c_f_pointer(outStdName_cptr, outStdName_fptr, outStdName_shape) + allocate(outStdName(outStdName_shape(1))) + outStdName = outStdName_fptr + call lib_free(outStdName_cptr) + else + outStdName => null() + end if + end if + if(present(outUnit)) then + if(c_associated(outUnit_cptr)) then + outUnit_shape(1) = int(lib_strlen(outUnit_cptr)) + call c_f_pointer(outUnit_cptr, outUnit_fptr, outUnit_shape) + allocate(outUnit(outUnit_shape(1))) + outUnit = outUnit_fptr + call lib_free(outUnit_cptr) + else + outUnit => null() + end if + end if + end function cdiIterator_inqLevelType + + function cdiIterator_inqLevel(me_dummy, levelSelector_dummy, outValue1,& + & outValue2) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + integer(c_int), value :: levelSelector_dummy + real(c_double), target, optional, intent(inout) :: outValue1 + real(c_double), target, optional, intent(inout) :: outValue2 + type(c_ptr) :: outValue1_cptr + type(c_ptr) :: outValue2_cptr + interface + function lib_cdiIterator_inqLevel(me_dummy, levelSelector_dummy,& + & outValue1, outValue2) bind(c, name = 'cdiIterator_inqLevel')& + & result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + integer(c_int), value :: levelSelector_dummy + type(c_ptr), value :: outValue1 + type(c_ptr), value :: outValue2 + end function lib_cdiIterator_inqLevel + end interface + outValue1_cptr = c_null_ptr + if(present(outValue1)) outValue1_cptr = c_loc(outValue1) + outValue2_cptr = c_null_ptr + if(present(outValue2)) outValue2_cptr = c_loc(outValue2) + f_result = lib_cdiIterator_inqLevel(me_dummy%ptr, levelSelector_dummy,& + & outValue1_cptr, outValue2_cptr) + end function cdiIterator_inqLevel + + function cdiIterator_inqLevelUuid(me_dummy, outVgridNumber, outLevelCount,& + & outUuid) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + integer(c_int), optional, target, intent(inout) :: outVgridNumber + integer(c_int), optional, target, intent(inout) :: outLevelCount + integer(kind = c_signed_char), target, optional, intent(inout) ::& + & outUuid(CDI_UUID_SIZE) + type(c_ptr) :: outVgridNumber_cptr + type(c_ptr) :: outLevelCount_cptr + type(c_ptr) :: outUuid_cptr + interface + function lib_cdiIterator_inqLevelUuid(me_dummy, outVgridNumber,& + & outLevelCount, outUuid) bind(c, name = 'cdiIterator_inqLevelUuid')& + & result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + type(c_ptr), value :: outVgridNumber + type(c_ptr), value :: outLevelCount + type(c_ptr), value :: outUuid + end function lib_cdiIterator_inqLevelUuid + end interface + outVgridNumber_cptr = c_null_ptr + if(present(outVgridNumber)) outVgridNumber_cptr = c_loc(outVgridNumber) + outLevelCount_cptr = c_null_ptr + if(present(outLevelCount)) outLevelCount_cptr = c_loc(outLevelCount) + outUuid_cptr = c_null_ptr + if(present(outUuid)) outUuid_cptr = c_loc(outUuid) + f_result = lib_cdiIterator_inqLevelUuid(me_dummy%ptr, outVgridNumber_cptr,& + & outLevelCount_cptr, outUuid_cptr) + end function cdiIterator_inqLevelUuid + + function cdiIterator_inqTile(me_dummy, outTileIndex_dummy,& + & outTileAttribute_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + integer(c_int), intent(inout) :: outTileIndex_dummy + integer(c_int), intent(inout) :: outTileAttribute_dummy + interface + function lib_cdiIterator_inqTile(me_dummy, outTileIndex_dummy,& + & outTileAttribute_dummy) bind(c, name = 'cdiIterator_inqTile')& + & result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + integer(c_int), intent(inout) :: outTileIndex_dummy + integer(c_int), intent(inout) :: outTileAttribute_dummy + end function lib_cdiIterator_inqTile + end interface + f_result = lib_cdiIterator_inqTile(me_dummy%ptr, outTileIndex_dummy,& + & outTileAttribute_dummy) + end function cdiIterator_inqTile + + function cdiIterator_inqTileCount(me_dummy, outTileCount_dummy,& + & outTileAttributeCount_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + integer(c_int), intent(inout) :: outTileCount_dummy + integer(c_int), intent(inout) :: outTileAttributeCount_dummy + interface + function lib_cdiIterator_inqTileCount(me_dummy, outTileCount_dummy,& + & outTileAttributeCount_dummy) bind(c, name = 'cdiIterator_inqTileCount')& + & result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + integer(c_int), intent(inout) :: outTileCount_dummy + integer(c_int), intent(inout) :: outTileAttributeCount_dummy + end function lib_cdiIterator_inqTileCount + end interface + f_result = lib_cdiIterator_inqTileCount(me_dummy%ptr, outTileCount_dummy,& + & outTileAttributeCount_dummy) + end function cdiIterator_inqTileCount + + function cdiIterator_inqParam(me_dummy) result(f_result) + type(t_CdiParam) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + interface + function lib_cdiIterator_inqParam(me_dummy) bind(c, name =& + & 'cdiIterator_inqParam') result(c_result) + import c_ptr, t_CdiParam + type(t_CdiParam) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqParam + end interface + f_result = lib_cdiIterator_inqParam(me_dummy%ptr) + end function cdiIterator_inqParam + + subroutine cdiIterator_inqParamParts(me_dummy, outDiscipline_dummy,& + & outCategory_dummy, outNumber_dummy) + type(t_CdiIterator), intent(in) :: me_dummy + integer(c_int), intent(inout) :: outDiscipline_dummy + integer(c_int), intent(inout) :: outCategory_dummy + integer(c_int), intent(inout) :: outNumber_dummy + interface + subroutine lib_cdiIterator_inqParamParts(me_dummy, outDiscipline_dummy,& + & outCategory_dummy, outNumber_dummy) bind(c, name =& + & 'cdiIterator_inqParamParts') + import c_int, c_ptr + type(c_ptr), value :: me_dummy + integer(c_int), intent(inout) :: outDiscipline_dummy + integer(c_int), intent(inout) :: outCategory_dummy + integer(c_int), intent(inout) :: outNumber_dummy + end subroutine lib_cdiIterator_inqParamParts + end interface + call lib_cdiIterator_inqParamParts(me_dummy%ptr, outDiscipline_dummy,& + & outCategory_dummy, outNumber_dummy) + end subroutine cdiIterator_inqParamParts + + function cdiIterator_inqDatatype(me_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + interface + function lib_cdiIterator_inqDatatype(me_dummy) bind(c, name =& + & 'cdiIterator_inqDatatype') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqDatatype + end interface + f_result = lib_cdiIterator_inqDatatype(me_dummy%ptr) + end function cdiIterator_inqDatatype + + function cdiIterator_inqFiletype(me_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + interface + function lib_cdiIterator_inqFiletype(me_dummy) bind(c, name =& + & 'cdiIterator_inqFiletype') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqFiletype + end interface + f_result = lib_cdiIterator_inqFiletype(me_dummy%ptr) + end function cdiIterator_inqFiletype + + function cdiIterator_inqTsteptype(me_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + interface + function lib_cdiIterator_inqTsteptype(me_dummy) bind(c, name =& + & 'cdiIterator_inqTsteptype') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqTsteptype + end interface + f_result = lib_cdiIterator_inqTsteptype(me_dummy%ptr) + end function cdiIterator_inqTsteptype + + function cdiIterator_inqVariableName(me_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + type(c_ptr) :: cString + integer :: rv_shape(1) + character(kind = c_char), dimension(:), pointer :: temp + interface + function lib_cdiIterator_inqVariableName(me_dummy) bind(c, name =& + & 'cdiIterator_inqVariableName') result(c_result) + import c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqVariableName + end interface + cString = lib_cdiIterator_inqVariableName(me_dummy%ptr) + if(c_associated(cString)) then + rv_shape(1) = int(lib_strlen(cString)) + call c_f_pointer(cString, temp, rv_shape) + allocate(f_result(rv_shape(1))) + f_result = temp + call lib_free(cString) + else + f_result => null() + end if + end function cdiIterator_inqVariableName + + function cdiIterator_inqGridId(me_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + interface + function lib_cdiIterator_inqGridId(me_dummy) bind(c, name =& + & 'cdiIterator_inqGridId') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiIterator_inqGridId + end interface + f_result = lib_cdiIterator_inqGridId(me_dummy%ptr) + end function cdiIterator_inqGridId + + subroutine cdiIterator_readField(me_dummy, data_dummy, nmiss) + type(t_CdiIterator), intent(in) :: me_dummy + real(c_double), intent(inout) :: data_dummy(*) + integer(c_int), optional, target, intent(inout) :: nmiss + type(c_ptr) :: nmiss_cptr + interface + subroutine lib_cdiIterator_readField(me_dummy, data_dummy, nmiss) bind(c,& + & name = 'cdiIterator_readField') + import c_double, c_ptr + type(c_ptr), value :: me_dummy + real(c_double), intent(inout) :: data_dummy(*) + type(c_ptr), value :: nmiss + end subroutine lib_cdiIterator_readField + end interface + nmiss_cptr = c_null_ptr + if(present(nmiss)) nmiss_cptr = c_loc(nmiss) + call lib_cdiIterator_readField(me_dummy%ptr, data_dummy, nmiss_cptr) + end subroutine cdiIterator_readField + + subroutine cdiIterator_readFieldF(me_dummy, data_dummy, nmiss) + type(t_CdiIterator), intent(in) :: me_dummy + real(c_float), intent(inout) :: data_dummy(*) + integer(c_int), optional, target, intent(inout) :: nmiss + type(c_ptr) :: nmiss_cptr + interface + subroutine lib_cdiIterator_readFieldF(me_dummy, data_dummy, nmiss)& + & bind(c, name = 'cdiIterator_readFieldF') + import c_float, c_ptr + type(c_ptr), value :: me_dummy + real(c_float), intent(inout) :: data_dummy(*) + type(c_ptr), value :: nmiss + end subroutine lib_cdiIterator_readFieldF + end interface + nmiss_cptr = c_null_ptr + if(present(nmiss)) nmiss_cptr = c_loc(nmiss) + call lib_cdiIterator_readFieldF(me_dummy%ptr, data_dummy, nmiss_cptr) + end subroutine cdiIterator_readFieldF + + function cdiGribIterator_clone(me_dummy) result(f_result) + type(t_CdiGribIterator) :: f_result + type(t_CdiIterator), intent(in) :: me_dummy + interface + function lib_cdiGribIterator_clone(me_dummy) bind(c, name =& + & 'cdiGribIterator_clone') result(c_result) + import c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiGribIterator_clone + end interface + f_result%ptr = lib_cdiGribIterator_clone(me_dummy%ptr) + end function cdiGribIterator_clone + + subroutine cdiGribIterator_delete(me_dummy) + type(t_CdiGribIterator), intent(in) :: me_dummy + interface + subroutine lib_cdiGribIterator_delete(me_dummy) bind(c, name =& + & 'cdiGribIterator_delete') + import c_ptr + type(c_ptr), value :: me_dummy + end subroutine lib_cdiGribIterator_delete + end interface + call lib_cdiGribIterator_delete(me_dummy%ptr) + end subroutine cdiGribIterator_delete + + function cdiGribIterator_getLong(me_dummy, key_dummy, value_dummy)& + & result(f_result) + integer(c_int) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + integer(c_long), intent(inout) :: value_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_getLong(me_dummy, key_dummy, value_dummy)& + & bind(c, name = 'cdiGribIterator_getLong') result(c_result) + import c_char, c_int, c_long, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + integer(c_long), intent(inout) :: value_dummy + end function lib_cdiGribIterator_getLong + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_getLong(me_dummy%ptr, key_temp, value_dummy) + end function cdiGribIterator_getLong + + function cdiGribIterator_getDouble(me_dummy, key_dummy, value_dummy)& + & result(f_result) + integer(c_int) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + real(c_double), intent(inout) :: value_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_getDouble(me_dummy, key_dummy, value_dummy)& + & bind(c, name = 'cdiGribIterator_getDouble') result(c_result) + import c_char, c_double, c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + real(c_double), intent(inout) :: value_dummy + end function lib_cdiGribIterator_getDouble + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_getDouble(me_dummy%ptr, key_temp,& + & value_dummy) + end function cdiGribIterator_getDouble + + function cdiGribIterator_getLength(me_dummy, key_dummy, value_dummy)& + & result(f_result) + integer(c_int) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + integer(c_size_t), intent(inout) :: value_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_getLength(me_dummy, key_dummy, value_dummy)& + & bind(c, name = 'cdiGribIterator_getLength') result(c_result) + import c_char, c_int, c_ptr, c_size_t + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + integer(c_size_t), intent(inout) :: value_dummy + end function lib_cdiGribIterator_getLength + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_getLength(me_dummy%ptr, key_temp,& + & value_dummy) + end function cdiGribIterator_getLength + + function cdiGribIterator_getString(me_dummy, key_dummy, value_dummy,& + & length_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + character(kind = c_char, len = *), intent(inout) :: value_dummy + integer(c_size_t), intent(inout) :: length_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + character(kind = c_char) :: value_temp(len(value_dummy) + 1) + integer :: value_i + interface + function lib_cdiGribIterator_getString(me_dummy, key_dummy, value_dummy,& + & length_dummy) bind(c, name = 'cdiGribIterator_getString')& + & result(c_result) + import c_char, c_int, c_ptr, c_size_t + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + character(kind = c_char) :: value_dummy(*) + integer(c_size_t), intent(inout) :: length_dummy + end function lib_cdiGribIterator_getString + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + value_temp(len(value_dummy) + 1) = c_null_char + do value_i = len(value_dummy), 1, -1 + if(value_dummy(value_i:value_i) /= ' ') exit + value_temp(value_i) = c_null_char + end do + do value_i = value_i, 1, -1 + value_temp(value_i) = value_dummy(value_i:value_i) + end do + f_result = lib_cdiGribIterator_getString(me_dummy%ptr, key_temp,& + & value_temp, length_dummy) + do value_i = 1, len(value_dummy) + if(value_temp(value_i) == c_null_char) exit + value_dummy(value_i:value_i) = value_temp(value_i) + end do + do value_i = value_i, len(value_dummy) + value_dummy(value_i:value_i) = ' ' + end do + end function cdiGribIterator_getString + + function cdiGribIterator_getSize(me_dummy, key_dummy, value_dummy)& + & result(f_result) + integer(c_int) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + integer(c_size_t), intent(inout) :: value_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_getSize(me_dummy, key_dummy, value_dummy)& + & bind(c, name = 'cdiGribIterator_getSize') result(c_result) + import c_char, c_int, c_ptr, c_size_t + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + integer(c_size_t), intent(inout) :: value_dummy + end function lib_cdiGribIterator_getSize + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_getSize(me_dummy%ptr, key_temp, value_dummy) + end function cdiGribIterator_getSize + + function cdiGribIterator_getLongArray(me_dummy, key_dummy, value_dummy,& + & array_size_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + integer(c_long), intent(inout) :: value_dummy + integer(c_size_t), intent(inout) :: array_size_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_getLongArray(me_dummy, key_dummy,& + & value_dummy, array_size_dummy) bind(c, name =& + & 'cdiGribIterator_getLongArray') result(c_result) + import c_char, c_int, c_long, c_ptr, c_size_t + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + integer(c_long), intent(inout) :: value_dummy + integer(c_size_t), intent(inout) :: array_size_dummy + end function lib_cdiGribIterator_getLongArray + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_getLongArray(me_dummy%ptr, key_temp,& + & value_dummy, array_size_dummy) + end function cdiGribIterator_getLongArray + + function cdiGribIterator_getDoubleArray(me_dummy, key_dummy, value_dummy,& + & array_size_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + real(c_double), intent(inout) :: value_dummy + integer(c_size_t), intent(inout) :: array_size_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_getDoubleArray(me_dummy, key_dummy,& + & value_dummy, array_size_dummy) bind(c, name =& + & 'cdiGribIterator_getDoubleArray') result(c_result) + import c_char, c_double, c_int, c_ptr, c_size_t + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + real(c_double), intent(inout) :: value_dummy + integer(c_size_t), intent(inout) :: array_size_dummy + end function lib_cdiGribIterator_getDoubleArray + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_getDoubleArray(me_dummy%ptr, key_temp,& + & value_dummy, array_size_dummy) + end function cdiGribIterator_getDoubleArray + + function cdiGribIterator_inqEdition(me_dummy) result(f_result) + integer(c_int) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + interface + function lib_cdiGribIterator_inqEdition(me_dummy) bind(c, name =& + & 'cdiGribIterator_inqEdition') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + type(c_ptr), value :: me_dummy + end function lib_cdiGribIterator_inqEdition + end interface + f_result = lib_cdiGribIterator_inqEdition(me_dummy%ptr) + end function cdiGribIterator_inqEdition + + function cdiGribIterator_inqLongValue(me_dummy, key_dummy) result(f_result) + integer(c_long) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_inqLongValue(me_dummy, key_dummy) bind(c,& + & name = 'cdiGribIterator_inqLongValue') result(c_result) + import c_char, c_long, c_ptr + integer(c_long) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + end function lib_cdiGribIterator_inqLongValue + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_inqLongValue(me_dummy%ptr, key_temp) + end function cdiGribIterator_inqLongValue + + function cdiGribIterator_inqLongDefaultValue(me_dummy, key_dummy,& + & defaultValue_dummy) result(f_result) + integer(c_long) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + integer(c_long), value :: defaultValue_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_inqLongDefaultValue(me_dummy, key_dummy,& + & defaultValue_dummy) bind(c, name =& + & 'cdiGribIterator_inqLongDefaultValue') result(c_result) + import c_char, c_long, c_ptr + integer(c_long) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + integer(c_long), value :: defaultValue_dummy + end function lib_cdiGribIterator_inqLongDefaultValue + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_inqLongDefaultValue(me_dummy%ptr, key_temp,& + & defaultValue_dummy) + end function cdiGribIterator_inqLongDefaultValue + + function cdiGribIterator_inqDoubleValue(me_dummy, key_dummy) result(f_result) + real(c_double) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_inqDoubleValue(me_dummy, key_dummy) bind(c,& + & name = 'cdiGribIterator_inqDoubleValue') result(c_result) + import c_char, c_double, c_ptr + real(c_double) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + end function lib_cdiGribIterator_inqDoubleValue + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_inqDoubleValue(me_dummy%ptr, key_temp) + end function cdiGribIterator_inqDoubleValue + + function cdiGribIterator_inqDoubleDefaultValue(me_dummy, key_dummy,& + & defaultValue_dummy) result(f_result) + real(c_double) :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + real(c_double), value :: defaultValue_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_cdiGribIterator_inqDoubleDefaultValue(me_dummy, key_dummy,& + & defaultValue_dummy) bind(c, name =& + & 'cdiGribIterator_inqDoubleDefaultValue') result(c_result) + import c_char, c_double, c_ptr + real(c_double) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + real(c_double), value :: defaultValue_dummy + end function lib_cdiGribIterator_inqDoubleDefaultValue + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_cdiGribIterator_inqDoubleDefaultValue(me_dummy%ptr,& + & key_temp, defaultValue_dummy) + end function cdiGribIterator_inqDoubleDefaultValue + + function cdiGribIterator_inqStringValue(me_dummy, key_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + type(t_CdiGribIterator), intent(in) :: me_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + type(c_ptr) :: cString + integer :: rv_shape(1) + character(kind = c_char), dimension(:), pointer :: temp + interface + function lib_cdiGribIterator_inqStringValue(me_dummy, key_dummy) bind(c,& + & name = 'cdiGribIterator_inqStringValue') result(c_result) + import c_char, c_ptr + type(c_ptr) :: c_result + type(c_ptr), value :: me_dummy + character(kind = c_char) :: key_dummy(*) + end function lib_cdiGribIterator_inqStringValue + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + cString = lib_cdiGribIterator_inqStringValue(me_dummy%ptr, key_temp) + if(c_associated(cString)) then + rv_shape(1) = int(lib_strlen(cString)) + call c_f_pointer(cString, temp, rv_shape) + allocate(f_result(rv_shape(1))) + f_result = temp + call lib_free(cString) + else + f_result => null() + end if + end function cdiGribIterator_inqStringValue + + subroutine vlistDefVarName(vlistID_dummy, varID_dummy, name_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + subroutine lib_vlistDefVarName(vlistID_dummy, varID_dummy, name_dummy)& + & bind(c, name = 'vlistDefVarName') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + end subroutine lib_vlistDefVarName + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + call lib_vlistDefVarName(vlistID_dummy, varID_dummy, name_temp) + end subroutine vlistDefVarName + + subroutine vlistInqVarName(vlistID_dummy, varID_dummy, name_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(inout) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + subroutine lib_vlistInqVarName(vlistID_dummy, varID_dummy, name_dummy)& + & bind(c, name = 'vlistInqVarName') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + end subroutine lib_vlistInqVarName + end interface + name_temp(len(name_dummy) + 1) = c_null_char + do name_i = len(name_dummy), 1, -1 + if(name_dummy(name_i:name_i) /= ' ') exit + name_temp(name_i) = c_null_char + end do + do name_i = name_i, 1, -1 + name_temp(name_i) = name_dummy(name_i:name_i) + end do + call lib_vlistInqVarName(vlistID_dummy, varID_dummy, name_temp) + do name_i = 1, len(name_dummy) + if(name_temp(name_i) == c_null_char) exit + name_dummy(name_i:name_i) = name_temp(name_i) + end do + do name_i = name_i, len(name_dummy) + name_dummy(name_i:name_i) = ' ' + end do + end subroutine vlistInqVarName + + function vlistCopyVarName(vlistId_dummy, varId_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: vlistId_dummy + integer(c_int), value :: varId_dummy + type(c_ptr) :: cString + integer :: rv_shape(1) + character(kind = c_char), dimension(:), pointer :: temp + interface + function lib_vlistCopyVarName(vlistId_dummy, varId_dummy) bind(c, name =& + & 'vlistCopyVarName') result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: vlistId_dummy + integer(c_int), value :: varId_dummy + end function lib_vlistCopyVarName + end interface + cString = lib_vlistCopyVarName(vlistId_dummy, varId_dummy) + if(c_associated(cString)) then + rv_shape(1) = int(lib_strlen(cString)) + call c_f_pointer(cString, temp, rv_shape) + allocate(f_result(rv_shape(1))) + f_result = temp + call lib_free(cString) + else + f_result => null() + end if + end function vlistCopyVarName + + subroutine vlistDefVarStdname(vlistID_dummy, varID_dummy, stdname_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: stdname_dummy + character(kind = c_char) :: stdname_temp(len(stdname_dummy) + 1) + integer :: stdname_i + interface + subroutine lib_vlistDefVarStdname(vlistID_dummy, varID_dummy,& + & stdname_dummy) bind(c, name = 'vlistDefVarStdname') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: stdname_dummy(*) + end subroutine lib_vlistDefVarStdname + end interface + do stdname_i = 1, len(stdname_dummy) + stdname_temp(stdname_i) = stdname_dummy(stdname_i:stdname_i) + end do + stdname_temp(len(stdname_dummy) + 1) = c_null_char + call lib_vlistDefVarStdname(vlistID_dummy, varID_dummy, stdname_temp) + end subroutine vlistDefVarStdname + + subroutine vlistInqVarStdname(vlistID_dummy, varID_dummy, stdname_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(inout) :: stdname_dummy + character(kind = c_char) :: stdname_temp(len(stdname_dummy) + 1) + integer :: stdname_i + interface + subroutine lib_vlistInqVarStdname(vlistID_dummy, varID_dummy,& + & stdname_dummy) bind(c, name = 'vlistInqVarStdname') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: stdname_dummy(*) + end subroutine lib_vlistInqVarStdname + end interface + stdname_temp(len(stdname_dummy) + 1) = c_null_char + do stdname_i = len(stdname_dummy), 1, -1 + if(stdname_dummy(stdname_i:stdname_i) /= ' ') exit + stdname_temp(stdname_i) = c_null_char + end do + do stdname_i = stdname_i, 1, -1 + stdname_temp(stdname_i) = stdname_dummy(stdname_i:stdname_i) + end do + call lib_vlistInqVarStdname(vlistID_dummy, varID_dummy, stdname_temp) + do stdname_i = 1, len(stdname_dummy) + if(stdname_temp(stdname_i) == c_null_char) exit + stdname_dummy(stdname_i:stdname_i) = stdname_temp(stdname_i) + end do + do stdname_i = stdname_i, len(stdname_dummy) + stdname_dummy(stdname_i:stdname_i) = ' ' + end do + end subroutine vlistInqVarStdname + + subroutine vlistDefVarLongname(vlistID_dummy, varID_dummy, longname_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: longname_dummy + character(kind = c_char) :: longname_temp(len(longname_dummy) + 1) + integer :: longname_i + interface + subroutine lib_vlistDefVarLongname(vlistID_dummy, varID_dummy,& + & longname_dummy) bind(c, name = 'vlistDefVarLongname') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: longname_dummy(*) + end subroutine lib_vlistDefVarLongname + end interface + do longname_i = 1, len(longname_dummy) + longname_temp(longname_i) = longname_dummy(longname_i:longname_i) + end do + longname_temp(len(longname_dummy) + 1) = c_null_char + call lib_vlistDefVarLongname(vlistID_dummy, varID_dummy, longname_temp) + end subroutine vlistDefVarLongname + + subroutine vlistInqVarLongname(vlistID_dummy, varID_dummy, longname_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(inout) :: longname_dummy + character(kind = c_char) :: longname_temp(len(longname_dummy) + 1) + integer :: longname_i + interface + subroutine lib_vlistInqVarLongname(vlistID_dummy, varID_dummy,& + & longname_dummy) bind(c, name = 'vlistInqVarLongname') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: longname_dummy(*) + end subroutine lib_vlistInqVarLongname + end interface + longname_temp(len(longname_dummy) + 1) = c_null_char + do longname_i = len(longname_dummy), 1, -1 + if(longname_dummy(longname_i:longname_i) /= ' ') exit + longname_temp(longname_i) = c_null_char + end do + do longname_i = longname_i, 1, -1 + longname_temp(longname_i) = longname_dummy(longname_i:longname_i) + end do + call lib_vlistInqVarLongname(vlistID_dummy, varID_dummy, longname_temp) + do longname_i = 1, len(longname_dummy) + if(longname_temp(longname_i) == c_null_char) exit + longname_dummy(longname_i:longname_i) = longname_temp(longname_i) + end do + do longname_i = longname_i, len(longname_dummy) + longname_dummy(longname_i:longname_i) = ' ' + end do + end subroutine vlistInqVarLongname + + subroutine vlistDefVarUnits(vlistID_dummy, varID_dummy, units_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: units_dummy + character(kind = c_char) :: units_temp(len(units_dummy) + 1) + integer :: units_i + interface + subroutine lib_vlistDefVarUnits(vlistID_dummy, varID_dummy, units_dummy)& + & bind(c, name = 'vlistDefVarUnits') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: units_dummy(*) + end subroutine lib_vlistDefVarUnits + end interface + do units_i = 1, len(units_dummy) + units_temp(units_i) = units_dummy(units_i:units_i) + end do + units_temp(len(units_dummy) + 1) = c_null_char + call lib_vlistDefVarUnits(vlistID_dummy, varID_dummy, units_temp) + end subroutine vlistDefVarUnits + + subroutine vlistInqVarUnits(vlistID_dummy, varID_dummy, units_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(inout) :: units_dummy + character(kind = c_char) :: units_temp(len(units_dummy) + 1) + integer :: units_i + interface + subroutine lib_vlistInqVarUnits(vlistID_dummy, varID_dummy, units_dummy)& + & bind(c, name = 'vlistInqVarUnits') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: units_dummy(*) + end subroutine lib_vlistInqVarUnits + end interface + units_temp(len(units_dummy) + 1) = c_null_char + do units_i = len(units_dummy), 1, -1 + if(units_dummy(units_i:units_i) /= ' ') exit + units_temp(units_i) = c_null_char + end do + do units_i = units_i, 1, -1 + units_temp(units_i) = units_dummy(units_i:units_i) + end do + call lib_vlistInqVarUnits(vlistID_dummy, varID_dummy, units_temp) + do units_i = 1, len(units_dummy) + if(units_temp(units_i) == c_null_char) exit + units_dummy(units_i:units_i) = units_temp(units_i) + end do + do units_i = units_i, len(units_dummy) + units_dummy(units_i:units_i) = ' ' + end do + end subroutine vlistInqVarUnits + + subroutine cdiDefAdditionalKey(string_dummy) + character(kind = c_char, len = *), intent(in) :: string_dummy + character(kind = c_char) :: string_temp(len(string_dummy) + 1) + integer :: string_i + interface + subroutine lib_cdiDefAdditionalKey(string_dummy) bind(c, name =& + & 'cdiDefAdditionalKey') + import c_char + character(kind = c_char) :: string_dummy(*) + end subroutine lib_cdiDefAdditionalKey + end interface + do string_i = 1, len(string_dummy) + string_temp(string_i) = string_dummy(string_i:string_i) + end do + string_temp(len(string_dummy) + 1) = c_null_char + call lib_cdiDefAdditionalKey(string_temp) + end subroutine cdiDefAdditionalKey + + subroutine vlistDefVarIntKey(vlistID_dummy, varID_dummy, name_dummy,& + & value_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + integer(c_int), value :: value_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + subroutine lib_vlistDefVarIntKey(vlistID_dummy, varID_dummy, name_dummy,& + & value_dummy) bind(c, name = 'vlistDefVarIntKey') + import c_char, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + integer(c_int), value :: value_dummy + end subroutine lib_vlistDefVarIntKey + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + call lib_vlistDefVarIntKey(vlistID_dummy, varID_dummy, name_temp,& + & value_dummy) + end subroutine vlistDefVarIntKey + + subroutine vlistDefVarDblKey(vlistID_dummy, varID_dummy, name_dummy,& + & value_dummy) + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + real(c_double), value :: value_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + subroutine lib_vlistDefVarDblKey(vlistID_dummy, varID_dummy, name_dummy,& + & value_dummy) bind(c, name = 'vlistDefVarDblKey') + import c_char, c_double, c_int + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + real(c_double), value :: value_dummy + end subroutine lib_vlistDefVarDblKey + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + call lib_vlistDefVarDblKey(vlistID_dummy, varID_dummy, name_temp,& + & value_dummy) + end subroutine vlistDefVarDblKey + + function vlistHasVarKey(vlistID_dummy, varID_dummy, name_dummy)& + & result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_vlistHasVarKey(vlistID_dummy, varID_dummy, name_dummy)& + & bind(c, name = 'vlistHasVarKey') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + end function lib_vlistHasVarKey + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_vlistHasVarKey(vlistID_dummy, varID_dummy, name_temp) + end function vlistHasVarKey + + function vlistInqVarDblKey(vlistID_dummy, varID_dummy, name_dummy)& + & result(f_result) + real(c_double) :: f_result + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_vlistInqVarDblKey(vlistID_dummy, varID_dummy, name_dummy)& + & bind(c, name = 'vlistInqVarDblKey') result(c_result) + import c_char, c_double, c_int + real(c_double) :: c_result + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + end function lib_vlistInqVarDblKey + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_vlistInqVarDblKey(vlistID_dummy, varID_dummy, name_temp) + end function vlistInqVarDblKey + + function vlistInqVarIntKey(vlistID_dummy, varID_dummy, name_dummy)& + & result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_vlistInqVarIntKey(vlistID_dummy, varID_dummy, name_dummy)& + & bind(c, name = 'vlistInqVarIntKey') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: vlistID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + end function lib_vlistInqVarIntKey + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_vlistInqVarIntKey(vlistID_dummy, varID_dummy, name_temp) + end function vlistInqVarIntKey + + function cdiInqAtt(cdiID_dummy, varID_dummy, attrnum_dummy, name_dummy,& + & typep_dummy, lenp_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: attrnum_dummy + character(kind = c_char, len = *), intent(inout) :: name_dummy + integer(c_int), intent(inout) :: typep_dummy + integer(c_int), intent(inout) :: lenp_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_cdiInqAtt(cdiID_dummy, varID_dummy, attrnum_dummy,& + & name_dummy, typep_dummy, lenp_dummy) bind(c, name = 'cdiInqAtt')& + & result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: attrnum_dummy + character(kind = c_char) :: name_dummy(*) + integer(c_int), intent(inout) :: typep_dummy + integer(c_int), intent(inout) :: lenp_dummy + end function lib_cdiInqAtt + end interface + name_temp(len(name_dummy) + 1) = c_null_char + do name_i = len(name_dummy), 1, -1 + if(name_dummy(name_i:name_i) /= ' ') exit + name_temp(name_i) = c_null_char + end do + do name_i = name_i, 1, -1 + name_temp(name_i) = name_dummy(name_i:name_i) + end do + f_result = lib_cdiInqAtt(cdiID_dummy, varID_dummy, attrnum_dummy,& + & name_temp, typep_dummy, lenp_dummy) + do name_i = 1, len(name_dummy) + if(name_temp(name_i) == c_null_char) exit + name_dummy(name_i:name_i) = name_temp(name_i) + end do + do name_i = name_i, len(name_dummy) + name_dummy(name_i:name_i) = ' ' + end do + end function cdiInqAtt + + function cdiInqAttLen(cdiID_dummy, varID_dummy, name_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_cdiInqAttLen(cdiID_dummy, varID_dummy, name_dummy) bind(c,& + & name = 'cdiInqAttLen') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + end function lib_cdiInqAttLen + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_cdiInqAttLen(cdiID_dummy, varID_dummy, name_temp) + end function cdiInqAttLen + + function cdiInqAttType(cdiID_dummy, varID_dummy, name_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_cdiInqAttType(cdiID_dummy, varID_dummy, name_dummy) bind(c,& + & name = 'cdiInqAttType') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + end function lib_cdiInqAttType + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_cdiInqAttType(cdiID_dummy, varID_dummy, name_temp) + end function cdiInqAttType + + function cdiDelAtt(cdiID_dummy, varID_dummy, name_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_cdiDelAtt(cdiID_dummy, varID_dummy, name_dummy) bind(c, name& + & = 'cdiDelAtt') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + end function lib_cdiDelAtt + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_cdiDelAtt(cdiID_dummy, varID_dummy, name_temp) + end function cdiDelAtt + + function cdiDefAttInt(cdiID_dummy, varID_dummy, name_dummy, type_dummy,& + & len_dummy, ip_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + integer(c_int), value :: type_dummy + integer(c_int), value :: len_dummy + integer(c_int), intent(in) :: ip_dummy(*) + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_cdiDefAttInt(cdiID_dummy, varID_dummy, name_dummy,& + & type_dummy, len_dummy, ip_dummy) bind(c, name = 'cdiDefAttInt')& + & result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + integer(c_int), value :: type_dummy + integer(c_int), value :: len_dummy + integer(c_int), intent(in) :: ip_dummy(*) + end function lib_cdiDefAttInt + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_cdiDefAttInt(cdiID_dummy, varID_dummy, name_temp,& + & type_dummy, len_dummy, ip_dummy) + end function cdiDefAttInt + + function cdiDefAttFlt(cdiID_dummy, varID_dummy, name_dummy, type_dummy,& + & len_dummy, dp_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + integer(c_int), value :: type_dummy + integer(c_int), value :: len_dummy + real(c_double), intent(in) :: dp_dummy(*) + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_cdiDefAttFlt(cdiID_dummy, varID_dummy, name_dummy,& + & type_dummy, len_dummy, dp_dummy) bind(c, name = 'cdiDefAttFlt')& + & result(c_result) + import c_char, c_double, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + integer(c_int), value :: type_dummy + integer(c_int), value :: len_dummy + real(c_double), intent(in) :: dp_dummy(*) + end function lib_cdiDefAttFlt + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_cdiDefAttFlt(cdiID_dummy, varID_dummy, name_temp,& + & type_dummy, len_dummy, dp_dummy) + end function cdiDefAttFlt + + function cdiDefAttTxt(cdiID_dummy, varID_dummy, name_dummy, len_dummy,& + & tp_cbuf_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + integer(c_int), value :: len_dummy + character(kind = c_char, len = *), intent(in) :: tp_cbuf_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + character(kind = c_char) :: tp_cbuf_temp(len(tp_cbuf_dummy) + 1) + integer :: tp_cbuf_i + interface + function lib_cdiDefAttTxt(cdiID_dummy, varID_dummy, name_dummy,& + & len_dummy, tp_cbuf_dummy) bind(c, name = 'cdiDefAttTxt')& + & result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + integer(c_int), value :: len_dummy + character(kind = c_char) :: tp_cbuf_dummy(*) + end function lib_cdiDefAttTxt + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + do tp_cbuf_i = 1, len(tp_cbuf_dummy) + tp_cbuf_temp(tp_cbuf_i) = tp_cbuf_dummy(tp_cbuf_i:tp_cbuf_i) + end do + tp_cbuf_temp(len(tp_cbuf_dummy) + 1) = c_null_char + f_result = lib_cdiDefAttTxt(cdiID_dummy, varID_dummy, name_temp, len_dummy,& + & tp_cbuf_temp) + end function cdiDefAttTxt + + function cdiInqAttInt(cdiID_dummy, varID_dummy, name_dummy, mlen_dummy,& + & ip_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + integer(c_int), value :: mlen_dummy + integer(c_int), intent(inout) :: ip_dummy(*) + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_cdiInqAttInt(cdiID_dummy, varID_dummy, name_dummy,& + & mlen_dummy, ip_dummy) bind(c, name = 'cdiInqAttInt') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + integer(c_int), value :: mlen_dummy + integer(c_int), intent(inout) :: ip_dummy(*) + end function lib_cdiInqAttInt + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_cdiInqAttInt(cdiID_dummy, varID_dummy, name_temp,& + & mlen_dummy, ip_dummy) + end function cdiInqAttInt + + function cdiInqAttFlt(cdiID_dummy, varID_dummy, name_dummy, mlen_dummy,& + & dp_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + integer(c_int), value :: mlen_dummy + real(c_double), intent(inout) :: dp_dummy(*) + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_cdiInqAttFlt(cdiID_dummy, varID_dummy, name_dummy,& + & mlen_dummy, dp_dummy) bind(c, name = 'cdiInqAttFlt') result(c_result) + import c_char, c_double, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + integer(c_int), value :: mlen_dummy + real(c_double), intent(inout) :: dp_dummy(*) + end function lib_cdiInqAttFlt + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_cdiInqAttFlt(cdiID_dummy, varID_dummy, name_temp,& + & mlen_dummy, dp_dummy) + end function cdiInqAttFlt + + function cdiInqAttTxt(cdiID_dummy, varID_dummy, name_dummy, mlen_dummy,& + & tp_cbuf_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + integer(c_int), value :: mlen_dummy + character(kind = c_char, len = *), intent(inout) :: tp_cbuf_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + character(kind = c_char) :: tp_cbuf_temp(len(tp_cbuf_dummy) + 1) + integer :: tp_cbuf_i + interface + function lib_cdiInqAttTxt(cdiID_dummy, varID_dummy, name_dummy,& + & mlen_dummy, tp_cbuf_dummy) bind(c, name = 'cdiInqAttTxt')& + & result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + character(kind = c_char) :: name_dummy(*) + integer(c_int), value :: mlen_dummy + character(kind = c_char) :: tp_cbuf_dummy(*) + end function lib_cdiInqAttTxt + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + tp_cbuf_temp(len(tp_cbuf_dummy) + 1) = c_null_char + do tp_cbuf_i = len(tp_cbuf_dummy), 1, -1 + if(tp_cbuf_dummy(tp_cbuf_i:tp_cbuf_i) /= ' ') exit + tp_cbuf_temp(tp_cbuf_i) = c_null_char + end do + do tp_cbuf_i = tp_cbuf_i, 1, -1 + tp_cbuf_temp(tp_cbuf_i) = tp_cbuf_dummy(tp_cbuf_i:tp_cbuf_i) + end do + f_result = lib_cdiInqAttTxt(cdiID_dummy, varID_dummy, name_temp,& + & mlen_dummy, tp_cbuf_temp) + do tp_cbuf_i = 1, len(tp_cbuf_dummy) + if(tp_cbuf_temp(tp_cbuf_i) == c_null_char) exit + tp_cbuf_dummy(tp_cbuf_i:tp_cbuf_i) = tp_cbuf_temp(tp_cbuf_i) + end do + do tp_cbuf_i = tp_cbuf_i, len(tp_cbuf_dummy) + tp_cbuf_dummy(tp_cbuf_i:tp_cbuf_i) = ' ' + end do + end function cdiInqAttTxt + + subroutine gridName(gridtype_dummy, gridname_dummy) + integer(c_int), value :: gridtype_dummy + character(kind = c_char, len = *), intent(inout) :: gridname_dummy + character(kind = c_char) :: gridname_temp(len(gridname_dummy) + 1) + integer :: gridname_i + interface + subroutine lib_gridName(gridtype_dummy, gridname_dummy) bind(c, name =& + & 'gridName') + import c_char, c_int + integer(c_int), value :: gridtype_dummy + character(kind = c_char) :: gridname_dummy(*) + end subroutine lib_gridName + end interface + gridname_temp(len(gridname_dummy) + 1) = c_null_char + do gridname_i = len(gridname_dummy), 1, -1 + if(gridname_dummy(gridname_i:gridname_i) /= ' ') exit + gridname_temp(gridname_i) = c_null_char + end do + do gridname_i = gridname_i, 1, -1 + gridname_temp(gridname_i) = gridname_dummy(gridname_i:gridname_i) + end do + call lib_gridName(gridtype_dummy, gridname_temp) + do gridname_i = 1, len(gridname_dummy) + if(gridname_temp(gridname_i) == c_null_char) exit + gridname_dummy(gridname_i:gridname_i) = gridname_temp(gridname_i) + end do + do gridname_i = gridname_i, len(gridname_dummy) + gridname_dummy(gridname_i:gridname_i) = ' ' + end do + end subroutine gridName + + function gridNamePtr(gridtype_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: gridtype_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_gridNamePtr(gridtype_dummy) bind(c, name = 'gridNamePtr')& + & result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: gridtype_dummy + end function lib_gridNamePtr + end interface + f_result => null() + ptr = lib_gridNamePtr(gridtype_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function gridNamePtr + + function cdiDefKeyString(cdiID_dummy, varID_dummy, key_dummy, string_dummy)& + & result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + character(kind = c_char, len = *), intent(in) :: string_dummy + character(kind = c_char) :: string_temp(len(string_dummy) + 1) + integer :: string_i + interface + function lib_cdiDefKeyString(cdiID_dummy, varID_dummy, key_dummy,& + & string_dummy) bind(c, name = 'cdiDefKeyString') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + character(kind = c_char) :: string_dummy(*) + end function lib_cdiDefKeyString + end interface + do string_i = 1, len(string_dummy) + string_temp(string_i) = string_dummy(string_i:string_i) + end do + string_temp(len(string_dummy) + 1) = c_null_char + f_result = lib_cdiDefKeyString(cdiID_dummy, varID_dummy, key_dummy,& + & string_temp) + end function cdiDefKeyString + + function cdiInqKeyString(cdiID_dummy, varID_dummy, key_dummy, string_dummy,& + & length_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + character(kind = c_char, len = *), intent(inout) :: string_dummy + integer(c_int), intent(inout) :: length_dummy + character(kind = c_char) :: string_temp(len(string_dummy) + 1) + integer :: string_i + interface + function lib_cdiInqKeyString(cdiID_dummy, varID_dummy, key_dummy,& + & string_dummy, length_dummy) bind(c, name = 'cdiInqKeyString')& + & result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: cdiID_dummy + integer(c_int), value :: varID_dummy + integer(c_int), value :: key_dummy + character(kind = c_char) :: string_dummy(*) + integer(c_int), intent(inout) :: length_dummy + end function lib_cdiInqKeyString + end interface + string_temp(len(string_dummy) + 1) = c_null_char + do string_i = len(string_dummy), 1, -1 + if(string_dummy(string_i:string_i) /= ' ') exit + string_temp(string_i) = c_null_char + end do + do string_i = string_i, 1, -1 + string_temp(string_i) = string_dummy(string_i:string_i) + end do + f_result = lib_cdiInqKeyString(cdiID_dummy, varID_dummy, key_dummy,& + & string_temp, length_dummy) + do string_i = 1, len(string_dummy) + if(string_temp(string_i) == c_null_char) exit + string_dummy(string_i:string_i) = string_temp(string_i) + end do + do string_i = string_i, len(string_dummy) + string_dummy(string_i:string_i) = ' ' + end do + end function cdiInqKeyString + + subroutine gridDefXname(gridID_dummy, xname_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(in) :: xname_dummy + character(kind = c_char) :: xname_temp(len(xname_dummy) + 1) + integer :: xname_i + interface + subroutine lib_gridDefXname(gridID_dummy, xname_dummy) bind(c, name =& + & 'gridDefXname') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: xname_dummy(*) + end subroutine lib_gridDefXname + end interface + do xname_i = 1, len(xname_dummy) + xname_temp(xname_i) = xname_dummy(xname_i:xname_i) + end do + xname_temp(len(xname_dummy) + 1) = c_null_char + call lib_gridDefXname(gridID_dummy, xname_temp) + end subroutine gridDefXname + + subroutine gridInqXname(gridID_dummy, xname_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(inout) :: xname_dummy + character(kind = c_char) :: xname_temp(len(xname_dummy) + 1) + integer :: xname_i + interface + subroutine lib_gridInqXname(gridID_dummy, xname_dummy) bind(c, name =& + & 'gridInqXname') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: xname_dummy(*) + end subroutine lib_gridInqXname + end interface + xname_temp(len(xname_dummy) + 1) = c_null_char + do xname_i = len(xname_dummy), 1, -1 + if(xname_dummy(xname_i:xname_i) /= ' ') exit + xname_temp(xname_i) = c_null_char + end do + do xname_i = xname_i, 1, -1 + xname_temp(xname_i) = xname_dummy(xname_i:xname_i) + end do + call lib_gridInqXname(gridID_dummy, xname_temp) + do xname_i = 1, len(xname_dummy) + if(xname_temp(xname_i) == c_null_char) exit + xname_dummy(xname_i:xname_i) = xname_temp(xname_i) + end do + do xname_i = xname_i, len(xname_dummy) + xname_dummy(xname_i:xname_i) = ' ' + end do + end subroutine gridInqXname + + subroutine gridDefXlongname(gridID_dummy, xlongname_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(in) :: xlongname_dummy + character(kind = c_char) :: xlongname_temp(len(xlongname_dummy) + 1) + integer :: xlongname_i + interface + subroutine lib_gridDefXlongname(gridID_dummy, xlongname_dummy) bind(c,& + & name = 'gridDefXlongname') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: xlongname_dummy(*) + end subroutine lib_gridDefXlongname + end interface + do xlongname_i = 1, len(xlongname_dummy) + xlongname_temp(xlongname_i) = xlongname_dummy(xlongname_i:xlongname_i) + end do + xlongname_temp(len(xlongname_dummy) + 1) = c_null_char + call lib_gridDefXlongname(gridID_dummy, xlongname_temp) + end subroutine gridDefXlongname + + subroutine gridInqXlongname(gridID_dummy, xlongname_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(inout) :: xlongname_dummy + character(kind = c_char) :: xlongname_temp(len(xlongname_dummy) + 1) + integer :: xlongname_i + interface + subroutine lib_gridInqXlongname(gridID_dummy, xlongname_dummy) bind(c,& + & name = 'gridInqXlongname') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: xlongname_dummy(*) + end subroutine lib_gridInqXlongname + end interface + xlongname_temp(len(xlongname_dummy) + 1) = c_null_char + do xlongname_i = len(xlongname_dummy), 1, -1 + if(xlongname_dummy(xlongname_i:xlongname_i) /= ' ') exit + xlongname_temp(xlongname_i) = c_null_char + end do + do xlongname_i = xlongname_i, 1, -1 + xlongname_temp(xlongname_i) = xlongname_dummy(xlongname_i:xlongname_i) + end do + call lib_gridInqXlongname(gridID_dummy, xlongname_temp) + do xlongname_i = 1, len(xlongname_dummy) + if(xlongname_temp(xlongname_i) == c_null_char) exit + xlongname_dummy(xlongname_i:xlongname_i) = xlongname_temp(xlongname_i) + end do + do xlongname_i = xlongname_i, len(xlongname_dummy) + xlongname_dummy(xlongname_i:xlongname_i) = ' ' + end do + end subroutine gridInqXlongname + + subroutine gridDefXunits(gridID_dummy, xunits_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(in) :: xunits_dummy + character(kind = c_char) :: xunits_temp(len(xunits_dummy) + 1) + integer :: xunits_i + interface + subroutine lib_gridDefXunits(gridID_dummy, xunits_dummy) bind(c, name =& + & 'gridDefXunits') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: xunits_dummy(*) + end subroutine lib_gridDefXunits + end interface + do xunits_i = 1, len(xunits_dummy) + xunits_temp(xunits_i) = xunits_dummy(xunits_i:xunits_i) + end do + xunits_temp(len(xunits_dummy) + 1) = c_null_char + call lib_gridDefXunits(gridID_dummy, xunits_temp) + end subroutine gridDefXunits + + subroutine gridInqXunits(gridID_dummy, xunits_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(inout) :: xunits_dummy + character(kind = c_char) :: xunits_temp(len(xunits_dummy) + 1) + integer :: xunits_i + interface + subroutine lib_gridInqXunits(gridID_dummy, xunits_dummy) bind(c, name =& + & 'gridInqXunits') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: xunits_dummy(*) + end subroutine lib_gridInqXunits + end interface + xunits_temp(len(xunits_dummy) + 1) = c_null_char + do xunits_i = len(xunits_dummy), 1, -1 + if(xunits_dummy(xunits_i:xunits_i) /= ' ') exit + xunits_temp(xunits_i) = c_null_char + end do + do xunits_i = xunits_i, 1, -1 + xunits_temp(xunits_i) = xunits_dummy(xunits_i:xunits_i) + end do + call lib_gridInqXunits(gridID_dummy, xunits_temp) + do xunits_i = 1, len(xunits_dummy) + if(xunits_temp(xunits_i) == c_null_char) exit + xunits_dummy(xunits_i:xunits_i) = xunits_temp(xunits_i) + end do + do xunits_i = xunits_i, len(xunits_dummy) + xunits_dummy(xunits_i:xunits_i) = ' ' + end do + end subroutine gridInqXunits + + subroutine gridDefYname(gridID_dummy, yname_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(in) :: yname_dummy + character(kind = c_char) :: yname_temp(len(yname_dummy) + 1) + integer :: yname_i + interface + subroutine lib_gridDefYname(gridID_dummy, yname_dummy) bind(c, name =& + & 'gridDefYname') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: yname_dummy(*) + end subroutine lib_gridDefYname + end interface + do yname_i = 1, len(yname_dummy) + yname_temp(yname_i) = yname_dummy(yname_i:yname_i) + end do + yname_temp(len(yname_dummy) + 1) = c_null_char + call lib_gridDefYname(gridID_dummy, yname_temp) + end subroutine gridDefYname + + subroutine gridInqYname(gridID_dummy, yname_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(inout) :: yname_dummy + character(kind = c_char) :: yname_temp(len(yname_dummy) + 1) + integer :: yname_i + interface + subroutine lib_gridInqYname(gridID_dummy, yname_dummy) bind(c, name =& + & 'gridInqYname') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: yname_dummy(*) + end subroutine lib_gridInqYname + end interface + yname_temp(len(yname_dummy) + 1) = c_null_char + do yname_i = len(yname_dummy), 1, -1 + if(yname_dummy(yname_i:yname_i) /= ' ') exit + yname_temp(yname_i) = c_null_char + end do + do yname_i = yname_i, 1, -1 + yname_temp(yname_i) = yname_dummy(yname_i:yname_i) + end do + call lib_gridInqYname(gridID_dummy, yname_temp) + do yname_i = 1, len(yname_dummy) + if(yname_temp(yname_i) == c_null_char) exit + yname_dummy(yname_i:yname_i) = yname_temp(yname_i) + end do + do yname_i = yname_i, len(yname_dummy) + yname_dummy(yname_i:yname_i) = ' ' + end do + end subroutine gridInqYname + + subroutine gridDefYlongname(gridID_dummy, ylongname_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(in) :: ylongname_dummy + character(kind = c_char) :: ylongname_temp(len(ylongname_dummy) + 1) + integer :: ylongname_i + interface + subroutine lib_gridDefYlongname(gridID_dummy, ylongname_dummy) bind(c,& + & name = 'gridDefYlongname') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: ylongname_dummy(*) + end subroutine lib_gridDefYlongname + end interface + do ylongname_i = 1, len(ylongname_dummy) + ylongname_temp(ylongname_i) = ylongname_dummy(ylongname_i:ylongname_i) + end do + ylongname_temp(len(ylongname_dummy) + 1) = c_null_char + call lib_gridDefYlongname(gridID_dummy, ylongname_temp) + end subroutine gridDefYlongname + + subroutine gridInqYlongname(gridID_dummy, ylongname_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(inout) :: ylongname_dummy + character(kind = c_char) :: ylongname_temp(len(ylongname_dummy) + 1) + integer :: ylongname_i + interface + subroutine lib_gridInqYlongname(gridID_dummy, ylongname_dummy) bind(c,& + & name = 'gridInqYlongname') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: ylongname_dummy(*) + end subroutine lib_gridInqYlongname + end interface + ylongname_temp(len(ylongname_dummy) + 1) = c_null_char + do ylongname_i = len(ylongname_dummy), 1, -1 + if(ylongname_dummy(ylongname_i:ylongname_i) /= ' ') exit + ylongname_temp(ylongname_i) = c_null_char + end do + do ylongname_i = ylongname_i, 1, -1 + ylongname_temp(ylongname_i) = ylongname_dummy(ylongname_i:ylongname_i) + end do + call lib_gridInqYlongname(gridID_dummy, ylongname_temp) + do ylongname_i = 1, len(ylongname_dummy) + if(ylongname_temp(ylongname_i) == c_null_char) exit + ylongname_dummy(ylongname_i:ylongname_i) = ylongname_temp(ylongname_i) + end do + do ylongname_i = ylongname_i, len(ylongname_dummy) + ylongname_dummy(ylongname_i:ylongname_i) = ' ' + end do + end subroutine gridInqYlongname + + subroutine gridDefYunits(gridID_dummy, yunits_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(in) :: yunits_dummy + character(kind = c_char) :: yunits_temp(len(yunits_dummy) + 1) + integer :: yunits_i + interface + subroutine lib_gridDefYunits(gridID_dummy, yunits_dummy) bind(c, name =& + & 'gridDefYunits') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: yunits_dummy(*) + end subroutine lib_gridDefYunits + end interface + do yunits_i = 1, len(yunits_dummy) + yunits_temp(yunits_i) = yunits_dummy(yunits_i:yunits_i) + end do + yunits_temp(len(yunits_dummy) + 1) = c_null_char + call lib_gridDefYunits(gridID_dummy, yunits_temp) + end subroutine gridDefYunits + + subroutine gridInqYunits(gridID_dummy, yunits_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(inout) :: yunits_dummy + character(kind = c_char) :: yunits_temp(len(yunits_dummy) + 1) + integer :: yunits_i + interface + subroutine lib_gridInqYunits(gridID_dummy, yunits_dummy) bind(c, name =& + & 'gridInqYunits') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: yunits_dummy(*) + end subroutine lib_gridInqYunits + end interface + yunits_temp(len(yunits_dummy) + 1) = c_null_char + do yunits_i = len(yunits_dummy), 1, -1 + if(yunits_dummy(yunits_i:yunits_i) /= ' ') exit + yunits_temp(yunits_i) = c_null_char + end do + do yunits_i = yunits_i, 1, -1 + yunits_temp(yunits_i) = yunits_dummy(yunits_i:yunits_i) + end do + call lib_gridInqYunits(gridID_dummy, yunits_temp) + do yunits_i = 1, len(yunits_dummy) + if(yunits_temp(yunits_i) == c_null_char) exit + yunits_dummy(yunits_i:yunits_i) = yunits_temp(yunits_i) + end do + do yunits_i = yunits_i, len(yunits_dummy) + yunits_dummy(yunits_i:yunits_i) = ' ' + end do + end subroutine gridInqYunits + + subroutine gridDefReference(gridID_dummy, reference_dummy) + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(in) :: reference_dummy + character(kind = c_char) :: reference_temp(len(reference_dummy) + 1) + integer :: reference_i + interface + subroutine lib_gridDefReference(gridID_dummy, reference_dummy) bind(c,& + & name = 'gridDefReference') + import c_char, c_int + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: reference_dummy(*) + end subroutine lib_gridDefReference + end interface + do reference_i = 1, len(reference_dummy) + reference_temp(reference_i) = reference_dummy(reference_i:reference_i) + end do + reference_temp(len(reference_dummy) + 1) = c_null_char + call lib_gridDefReference(gridID_dummy, reference_temp) + end subroutine gridDefReference + + function gridInqReference(gridID_dummy, reference_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: gridID_dummy + character(kind = c_char, len = *), intent(inout) :: reference_dummy + character(kind = c_char) :: reference_temp(len(reference_dummy) + 1) + integer :: reference_i + interface + function lib_gridInqReference(gridID_dummy, reference_dummy) bind(c, name& + & = 'gridInqReference') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: gridID_dummy + character(kind = c_char) :: reference_dummy(*) + end function lib_gridInqReference + end interface + reference_temp(len(reference_dummy) + 1) = c_null_char + do reference_i = len(reference_dummy), 1, -1 + if(reference_dummy(reference_i:reference_i) /= ' ') exit + reference_temp(reference_i) = c_null_char + end do + do reference_i = reference_i, 1, -1 + reference_temp(reference_i) = reference_dummy(reference_i:reference_i) + end do + f_result = lib_gridInqReference(gridID_dummy, reference_temp) + do reference_i = 1, len(reference_dummy) + if(reference_temp(reference_i) == c_null_char) exit + reference_dummy(reference_i:reference_i) = reference_temp(reference_i) + end do + do reference_i = reference_i, len(reference_dummy) + reference_dummy(reference_i:reference_i) = ' ' + end do + end function gridInqReference + + subroutine zaxisName(zaxistype_dummy, zaxisname_dummy) + integer(c_int), value :: zaxistype_dummy + character(kind = c_char, len = *), intent(inout) :: zaxisname_dummy + character(kind = c_char) :: zaxisname_temp(len(zaxisname_dummy) + 1) + integer :: zaxisname_i + interface + subroutine lib_zaxisName(zaxistype_dummy, zaxisname_dummy) bind(c, name =& + & 'zaxisName') + import c_char, c_int + integer(c_int), value :: zaxistype_dummy + character(kind = c_char) :: zaxisname_dummy(*) + end subroutine lib_zaxisName + end interface + zaxisname_temp(len(zaxisname_dummy) + 1) = c_null_char + do zaxisname_i = len(zaxisname_dummy), 1, -1 + if(zaxisname_dummy(zaxisname_i:zaxisname_i) /= ' ') exit + zaxisname_temp(zaxisname_i) = c_null_char + end do + do zaxisname_i = zaxisname_i, 1, -1 + zaxisname_temp(zaxisname_i) = zaxisname_dummy(zaxisname_i:zaxisname_i) + end do + call lib_zaxisName(zaxistype_dummy, zaxisname_temp) + do zaxisname_i = 1, len(zaxisname_dummy) + if(zaxisname_temp(zaxisname_i) == c_null_char) exit + zaxisname_dummy(zaxisname_i:zaxisname_i) = zaxisname_temp(zaxisname_i) + end do + do zaxisname_i = zaxisname_i, len(zaxisname_dummy) + zaxisname_dummy(zaxisname_i:zaxisname_i) = ' ' + end do + end subroutine zaxisName + + function zaxisNamePtr(leveltype_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: leveltype_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_zaxisNamePtr(leveltype_dummy) bind(c, name = 'zaxisNamePtr')& + & result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: leveltype_dummy + end function lib_zaxisNamePtr + end interface + f_result => null() + ptr = lib_zaxisNamePtr(leveltype_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function zaxisNamePtr + + subroutine zaxisDefName(zaxisID_dummy, name) + integer(c_int), value :: zaxisID_dummy + character(kind = c_char, len = *), optional, intent(in) :: name + character(kind = c_char), allocatable, target :: name_temp(:) + integer :: name_i + type(c_ptr) :: name_cptr + interface + subroutine lib_zaxisDefName(zaxisID_dummy, name) bind(c, name =& + & 'zaxisDefName') + import c_int, c_ptr + integer(c_int), value :: zaxisID_dummy + type(c_ptr), value :: name + end subroutine lib_zaxisDefName + end interface + if (present(name)) then + allocate(name_temp(len(name) + 1)) + name_temp(len(name) + 1) = c_null_char + do name_i = len(name), 1, -1 + if(name(name_i:name_i) /= ' ') exit + name_temp(name_i) = c_null_char + end do + do name_i = name_i, 1, -1 + name_temp(name_i) = name(name_i:name_i) + end do + name_cptr = c_loc(name_temp) + else + name_cptr = c_null_ptr + end if + call lib_zaxisDefName(zaxisID_dummy, name_cptr) + end subroutine zaxisDefName + + subroutine zaxisInqName(zaxisID_dummy, name_dummy) + integer(c_int), value :: zaxisID_dummy + character(kind = c_char, len = *), intent(inout) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + subroutine lib_zaxisInqName(zaxisID_dummy, name_dummy) bind(c, name =& + & 'zaxisInqName') + import c_char, c_int + integer(c_int), value :: zaxisID_dummy + character(kind = c_char) :: name_dummy(*) + end subroutine lib_zaxisInqName + end interface + name_temp(len(name_dummy) + 1) = c_null_char + do name_i = len(name_dummy), 1, -1 + if(name_dummy(name_i:name_i) /= ' ') exit + name_temp(name_i) = c_null_char + end do + do name_i = name_i, 1, -1 + name_temp(name_i) = name_dummy(name_i:name_i) + end do + call lib_zaxisInqName(zaxisID_dummy, name_temp) + do name_i = 1, len(name_dummy) + if(name_temp(name_i) == c_null_char) exit + name_dummy(name_i:name_i) = name_temp(name_i) + end do + do name_i = name_i, len(name_dummy) + name_dummy(name_i:name_i) = ' ' + end do + end subroutine zaxisInqName + + subroutine zaxisDefLongname(zaxisID_dummy, longname) + integer(c_int), value :: zaxisID_dummy + character(kind = c_char, len = *), optional, intent(in) :: longname + character(kind = c_char), allocatable, target :: longname_temp(:) + integer :: longname_i + type(c_ptr) :: longname_cptr + interface + subroutine lib_zaxisDefLongname(zaxisID_dummy, longname) bind(c, name =& + & 'zaxisDefLongname') + import c_int, c_ptr + integer(c_int), value :: zaxisID_dummy + type(c_ptr), value :: longname + end subroutine lib_zaxisDefLongname + end interface + if (present(longname)) then + allocate(longname_temp(len(longname) + 1)) + longname_temp(len(longname) + 1) = c_null_char + do longname_i = len(longname), 1, -1 + if(longname(longname_i:longname_i) /= ' ') exit + longname_temp(longname_i) = c_null_char + end do + do longname_i = longname_i, 1, -1 + longname_temp(longname_i) = longname(longname_i:longname_i) + end do + longname_cptr = c_loc(longname_temp) + else + longname_cptr = c_null_ptr + end if + call lib_zaxisDefLongname(zaxisID_dummy, longname_cptr) + end subroutine zaxisDefLongname + + subroutine zaxisInqLongname(zaxisID_dummy, longname_dummy) + integer(c_int), value :: zaxisID_dummy + character(kind = c_char, len = *), intent(inout) :: longname_dummy + character(kind = c_char) :: longname_temp(len(longname_dummy) + 1) + integer :: longname_i + interface + subroutine lib_zaxisInqLongname(zaxisID_dummy, longname_dummy) bind(c,& + & name = 'zaxisInqLongname') + import c_char, c_int + integer(c_int), value :: zaxisID_dummy + character(kind = c_char) :: longname_dummy(*) + end subroutine lib_zaxisInqLongname + end interface + longname_temp(len(longname_dummy) + 1) = c_null_char + do longname_i = len(longname_dummy), 1, -1 + if(longname_dummy(longname_i:longname_i) /= ' ') exit + longname_temp(longname_i) = c_null_char + end do + do longname_i = longname_i, 1, -1 + longname_temp(longname_i) = longname_dummy(longname_i:longname_i) + end do + call lib_zaxisInqLongname(zaxisID_dummy, longname_temp) + do longname_i = 1, len(longname_dummy) + if(longname_temp(longname_i) == c_null_char) exit + longname_dummy(longname_i:longname_i) = longname_temp(longname_i) + end do + do longname_i = longname_i, len(longname_dummy) + longname_dummy(longname_i:longname_i) = ' ' + end do + end subroutine zaxisInqLongname + + subroutine zaxisDefUnits(zaxisID_dummy, units) + integer(c_int), value :: zaxisID_dummy + character(kind = c_char, len = *), optional, intent(in) :: units + character(kind = c_char), allocatable, target :: units_temp(:) + integer :: units_i + type(c_ptr) :: units_cptr + interface + subroutine lib_zaxisDefUnits(zaxisID_dummy, units) bind(c, name =& + & 'zaxisDefUnits') + import c_int, c_ptr + integer(c_int), value :: zaxisID_dummy + type(c_ptr), value :: units + end subroutine lib_zaxisDefUnits + end interface + if (present(units)) then + allocate(units_temp(len(units) + 1)) + units_temp(len(units) + 1) = c_null_char + do units_i = len(units), 1, -1 + if(units(units_i:units_i) /= ' ') exit + units_temp(units_i) = c_null_char + end do + do units_i = units_i, 1, -1 + units_temp(units_i) = units(units_i:units_i) + end do + units_cptr = c_loc(units_temp) + else + units_cptr = c_null_ptr + end if + call lib_zaxisDefUnits(zaxisID_dummy, units_cptr) + end subroutine zaxisDefUnits + + subroutine zaxisInqUnits(zaxisID_dummy, units_dummy) + integer(c_int), value :: zaxisID_dummy + character(kind = c_char, len = *), intent(inout) :: units_dummy + character(kind = c_char) :: units_temp(len(units_dummy) + 1) + integer :: units_i + interface + subroutine lib_zaxisInqUnits(zaxisID_dummy, units_dummy) bind(c, name =& + & 'zaxisInqUnits') + import c_char, c_int + integer(c_int), value :: zaxisID_dummy + character(kind = c_char) :: units_dummy(*) + end subroutine lib_zaxisInqUnits + end interface + units_temp(len(units_dummy) + 1) = c_null_char + do units_i = len(units_dummy), 1, -1 + if(units_dummy(units_i:units_i) /= ' ') exit + units_temp(units_i) = c_null_char + end do + do units_i = units_i, 1, -1 + units_temp(units_i) = units_dummy(units_i:units_i) + end do + call lib_zaxisInqUnits(zaxisID_dummy, units_temp) + do units_i = 1, len(units_dummy) + if(units_temp(units_i) == c_null_char) exit + units_dummy(units_i:units_i) = units_temp(units_i) + end do + do units_i = units_i, len(units_dummy) + units_dummy(units_i:units_i) = ' ' + end do + end subroutine zaxisInqUnits + + subroutine zaxisInqStdname(zaxisID_dummy, stdname_dummy) + integer(c_int), value :: zaxisID_dummy + character(kind = c_char, len = *), intent(inout) :: stdname_dummy + character(kind = c_char) :: stdname_temp(len(stdname_dummy) + 1) + integer :: stdname_i + interface + subroutine lib_zaxisInqStdname(zaxisID_dummy, stdname_dummy) bind(c, name& + & = 'zaxisInqStdname') + import c_char, c_int + integer(c_int), value :: zaxisID_dummy + character(kind = c_char) :: stdname_dummy(*) + end subroutine lib_zaxisInqStdname + end interface + stdname_temp(len(stdname_dummy) + 1) = c_null_char + do stdname_i = len(stdname_dummy), 1, -1 + if(stdname_dummy(stdname_i:stdname_i) /= ' ') exit + stdname_temp(stdname_i) = c_null_char + end do + do stdname_i = stdname_i, 1, -1 + stdname_temp(stdname_i) = stdname_dummy(stdname_i:stdname_i) + end do + call lib_zaxisInqStdname(zaxisID_dummy, stdname_temp) + do stdname_i = 1, len(stdname_dummy) + if(stdname_temp(stdname_i) == c_null_char) exit + stdname_dummy(stdname_i:stdname_i) = stdname_temp(stdname_i) + end do + do stdname_i = stdname_i, len(stdname_dummy) + stdname_dummy(stdname_i:stdname_i) = ' ' + end do + end subroutine zaxisInqStdname + + function zaxisInqLbounds(zaxisID_dummy, lbounds) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: zaxisID_dummy + real(c_double), target, optional, intent(inout) :: lbounds(*) + type(c_ptr) :: lbounds_cptr + interface + function lib_zaxisInqLbounds(zaxisID_dummy, lbounds) bind(c, name =& + & 'zaxisInqLbounds') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + integer(c_int), value :: zaxisID_dummy + type(c_ptr), value :: lbounds + end function lib_zaxisInqLbounds + end interface + lbounds_cptr = c_null_ptr + if(present(lbounds)) lbounds_cptr = c_loc(lbounds) + f_result = lib_zaxisInqLbounds(zaxisID_dummy, lbounds_cptr) + end function zaxisInqLbounds + + function zaxisInqUbounds(zaxisID_dummy, ubounds) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: zaxisID_dummy + real(c_double), target, optional, intent(inout) :: ubounds(*) + type(c_ptr) :: ubounds_cptr + interface + function lib_zaxisInqUbounds(zaxisID_dummy, ubounds) bind(c, name =& + & 'zaxisInqUbounds') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + integer(c_int), value :: zaxisID_dummy + type(c_ptr), value :: ubounds + end function lib_zaxisInqUbounds + end interface + ubounds_cptr = c_null_ptr + if(present(ubounds)) ubounds_cptr = c_loc(ubounds) + f_result = lib_zaxisInqUbounds(zaxisID_dummy, ubounds_cptr) + end function zaxisInqUbounds + + function zaxisInqWeights(zaxisID_dummy, weights) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: zaxisID_dummy + real(c_double), target, optional, intent(inout) :: weights(*) + type(c_ptr) :: weights_cptr + interface + function lib_zaxisInqWeights(zaxisID_dummy, weights) bind(c, name =& + & 'zaxisInqWeights') result(c_result) + import c_int, c_ptr + integer(c_int) :: c_result + integer(c_int), value :: zaxisID_dummy + type(c_ptr), value :: weights + end function lib_zaxisInqWeights + end interface + weights_cptr = c_null_ptr + if(present(weights)) weights_cptr = c_loc(weights) + f_result = lib_zaxisInqWeights(zaxisID_dummy, weights_cptr) + end function zaxisInqWeights + + function taxisNamePtr(taxisID_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: taxisID_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_taxisNamePtr(taxisID_dummy) bind(c, name = 'taxisNamePtr')& + & result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: taxisID_dummy + end function lib_taxisNamePtr + end interface + f_result => null() + ptr = lib_taxisNamePtr(taxisID_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function taxisNamePtr + + function tunitNamePtr(tunitID_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: tunitID_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_tunitNamePtr(tunitID_dummy) bind(c, name = 'tunitNamePtr')& + & result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: tunitID_dummy + end function lib_tunitNamePtr + end interface + f_result => null() + ptr = lib_tunitNamePtr(tunitID_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function tunitNamePtr + + function institutDef(center_dummy, subcenter_dummy, name_dummy,& + & longname_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: center_dummy + integer(c_int), value :: subcenter_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char, len = *), intent(in) :: longname_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + character(kind = c_char) :: longname_temp(len(longname_dummy) + 1) + integer :: longname_i + interface + function lib_institutDef(center_dummy, subcenter_dummy, name_dummy,& + & longname_dummy) bind(c, name = 'institutDef') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: center_dummy + integer(c_int), value :: subcenter_dummy + character(kind = c_char) :: name_dummy(*) + character(kind = c_char) :: longname_dummy(*) + end function lib_institutDef + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + do longname_i = 1, len(longname_dummy) + longname_temp(longname_i) = longname_dummy(longname_i:longname_i) + end do + longname_temp(len(longname_dummy) + 1) = c_null_char + f_result = lib_institutDef(center_dummy, subcenter_dummy, name_temp,& + & longname_temp) + end function institutDef + + function institutInq(center_dummy, subcenter_dummy, name_dummy,& + & longname_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: center_dummy + integer(c_int), value :: subcenter_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char, len = *), intent(in) :: longname_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + character(kind = c_char) :: longname_temp(len(longname_dummy) + 1) + integer :: longname_i + interface + function lib_institutInq(center_dummy, subcenter_dummy, name_dummy,& + & longname_dummy) bind(c, name = 'institutInq') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: center_dummy + integer(c_int), value :: subcenter_dummy + character(kind = c_char) :: name_dummy(*) + character(kind = c_char) :: longname_dummy(*) + end function lib_institutInq + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + do longname_i = 1, len(longname_dummy) + longname_temp(longname_i) = longname_dummy(longname_i:longname_i) + end do + longname_temp(len(longname_dummy) + 1) = c_null_char + f_result = lib_institutInq(center_dummy, subcenter_dummy, name_temp,& + & longname_temp) + end function institutInq + + function institutInqNamePtr(instID_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: instID_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_institutInqNamePtr(instID_dummy) bind(c, name =& + & 'institutInqNamePtr') result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: instID_dummy + end function lib_institutInqNamePtr + end interface + f_result => null() + ptr = lib_institutInqNamePtr(instID_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function institutInqNamePtr + + function institutInqLongnamePtr(instID_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: instID_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_institutInqLongnamePtr(instID_dummy) bind(c, name =& + & 'institutInqLongnamePtr') result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: instID_dummy + end function lib_institutInqLongnamePtr + end interface + f_result => null() + ptr = lib_institutInqLongnamePtr(instID_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function institutInqLongnamePtr + + function modelDef(instID_dummy, modelgribID_dummy, name_dummy)& + & result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: instID_dummy + integer(c_int), value :: modelgribID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_modelDef(instID_dummy, modelgribID_dummy, name_dummy)& + & bind(c, name = 'modelDef') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: instID_dummy + integer(c_int), value :: modelgribID_dummy + character(kind = c_char) :: name_dummy(*) + end function lib_modelDef + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_modelDef(instID_dummy, modelgribID_dummy, name_temp) + end function modelDef + + function modelInq(instID_dummy, modelgribID_dummy, name_dummy)& + & result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: instID_dummy + integer(c_int), value :: modelgribID_dummy + character(kind = c_char, len = *), intent(in) :: name_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + interface + function lib_modelInq(instID_dummy, modelgribID_dummy, name_dummy)& + & bind(c, name = 'modelInq') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: instID_dummy + integer(c_int), value :: modelgribID_dummy + character(kind = c_char) :: name_dummy(*) + end function lib_modelInq + end interface + do name_i = 1, len(name_dummy) + name_temp(name_i) = name_dummy(name_i:name_i) + end do + name_temp(len(name_dummy) + 1) = c_null_char + f_result = lib_modelInq(instID_dummy, modelgribID_dummy, name_temp) + end function modelInq + + function modelInqNamePtr(modelID_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: modelID_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_modelInqNamePtr(modelID_dummy) bind(c, name =& + & 'modelInqNamePtr') result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: modelID_dummy + end function lib_modelInqNamePtr + end interface + f_result => null() + ptr = lib_modelInqNamePtr(modelID_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function modelInqNamePtr + + subroutine tableWrite(filename_dummy, tableID_dummy) + character(kind = c_char, len = *), intent(in) :: filename_dummy + integer(c_int), value :: tableID_dummy + character(kind = c_char) :: filename_temp(len(filename_dummy) + 1) + integer :: filename_i + interface + subroutine lib_tableWrite(filename_dummy, tableID_dummy) bind(c, name =& + & 'tableWrite') + import c_char, c_int + character(kind = c_char) :: filename_dummy(*) + integer(c_int), value :: tableID_dummy + end subroutine lib_tableWrite + end interface + do filename_i = 1, len(filename_dummy) + filename_temp(filename_i) = filename_dummy(filename_i:filename_i) + end do + filename_temp(len(filename_dummy) + 1) = c_null_char + call lib_tableWrite(filename_temp, tableID_dummy) + end subroutine tableWrite + + function tableRead(tablefile_dummy) result(f_result) + integer(c_int) :: f_result + character(kind = c_char, len = *), intent(in) :: tablefile_dummy + character(kind = c_char) :: tablefile_temp(len(tablefile_dummy) + 1) + integer :: tablefile_i + interface + function lib_tableRead(tablefile_dummy) bind(c, name = 'tableRead')& + & result(c_result) + import c_char, c_int + integer(c_int) :: c_result + character(kind = c_char) :: tablefile_dummy(*) + end function lib_tableRead + end interface + do tablefile_i = 1, len(tablefile_dummy) + tablefile_temp(tablefile_i) = tablefile_dummy(tablefile_i:tablefile_i) + end do + tablefile_temp(len(tablefile_dummy) + 1) = c_null_char + f_result = lib_tableRead(tablefile_temp) + end function tableRead + + function tableDef(modelID_dummy, tablenum_dummy, tablename_dummy)& + & result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: modelID_dummy + integer(c_int), value :: tablenum_dummy + character(kind = c_char, len = *), intent(in) :: tablename_dummy + character(kind = c_char) :: tablename_temp(len(tablename_dummy) + 1) + integer :: tablename_i + interface + function lib_tableDef(modelID_dummy, tablenum_dummy, tablename_dummy)& + & bind(c, name = 'tableDef') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: modelID_dummy + integer(c_int), value :: tablenum_dummy + character(kind = c_char) :: tablename_dummy(*) + end function lib_tableDef + end interface + do tablename_i = 1, len(tablename_dummy) + tablename_temp(tablename_i) = tablename_dummy(tablename_i:tablename_i) + end do + tablename_temp(len(tablename_dummy) + 1) = c_null_char + f_result = lib_tableDef(modelID_dummy, tablenum_dummy, tablename_temp) + end function tableDef + + function tableInqNamePtr(tableID_dummy) result(f_result) + character(kind = c_char), dimension(:), pointer :: f_result + integer(c_int), value :: tableID_dummy + type(c_ptr) :: ptr + integer :: rv_shape(1) + interface + function lib_tableInqNamePtr(tableID_dummy) bind(c, name =& + & 'tableInqNamePtr') result(c_result) + import c_int, c_ptr + type(c_ptr) :: c_result + integer(c_int), value :: tableID_dummy + end function lib_tableInqNamePtr + end interface + f_result => null() + ptr = lib_tableInqNamePtr(tableID_dummy) + if(c_associated(ptr)) then + rv_shape(1) = int(lib_strlen(ptr)) + call c_f_pointer(ptr, f_result, rv_shape) + end if + end function tableInqNamePtr + + function tableInq(modelID_dummy, tablenum_dummy, tablename_dummy)& + & result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: modelID_dummy + integer(c_int), value :: tablenum_dummy + character(kind = c_char, len = *), intent(in) :: tablename_dummy + character(kind = c_char) :: tablename_temp(len(tablename_dummy) + 1) + integer :: tablename_i + interface + function lib_tableInq(modelID_dummy, tablenum_dummy, tablename_dummy)& + & bind(c, name = 'tableInq') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: modelID_dummy + integer(c_int), value :: tablenum_dummy + character(kind = c_char) :: tablename_dummy(*) + end function lib_tableInq + end interface + do tablename_i = 1, len(tablename_dummy) + tablename_temp(tablename_i) = tablename_dummy(tablename_i:tablename_i) + end do + tablename_temp(len(tablename_dummy) + 1) = c_null_char + f_result = lib_tableInq(modelID_dummy, tablenum_dummy, tablename_temp) + end function tableInq + + subroutine tableInqEntry(tableID_dummy, id_dummy, ltype_dummy, name_dummy,& + & longname_dummy, units_dummy) + integer(c_int), value :: tableID_dummy + integer(c_int), value :: id_dummy + integer(c_int), value :: ltype_dummy + character(kind = c_char, len = *), intent(inout) :: name_dummy + character(kind = c_char, len = *), intent(inout) :: longname_dummy + character(kind = c_char, len = *), intent(inout) :: units_dummy + character(kind = c_char) :: name_temp(len(name_dummy) + 1) + integer :: name_i + character(kind = c_char) :: longname_temp(len(longname_dummy) + 1) + integer :: longname_i + character(kind = c_char) :: units_temp(len(units_dummy) + 1) + integer :: units_i + interface + subroutine lib_tableInqEntry(tableID_dummy, id_dummy, ltype_dummy,& + & name_dummy, longname_dummy, units_dummy) bind(c, name =& + & 'tableInqEntry') + import c_char, c_int + integer(c_int), value :: tableID_dummy + integer(c_int), value :: id_dummy + integer(c_int), value :: ltype_dummy + character(kind = c_char) :: name_dummy(*) + character(kind = c_char) :: longname_dummy(*) + character(kind = c_char) :: units_dummy(*) + end subroutine lib_tableInqEntry + end interface + name_temp(len(name_dummy) + 1) = c_null_char + do name_i = len(name_dummy), 1, -1 + if(name_dummy(name_i:name_i) /= ' ') exit + name_temp(name_i) = c_null_char + end do + do name_i = name_i, 1, -1 + name_temp(name_i) = name_dummy(name_i:name_i) + end do + longname_temp(len(longname_dummy) + 1) = c_null_char + do longname_i = len(longname_dummy), 1, -1 + if(longname_dummy(longname_i:longname_i) /= ' ') exit + longname_temp(longname_i) = c_null_char + end do + do longname_i = longname_i, 1, -1 + longname_temp(longname_i) = longname_dummy(longname_i:longname_i) + end do + units_temp(len(units_dummy) + 1) = c_null_char + do units_i = len(units_dummy), 1, -1 + if(units_dummy(units_i:units_i) /= ' ') exit + units_temp(units_i) = c_null_char + end do + do units_i = units_i, 1, -1 + units_temp(units_i) = units_dummy(units_i:units_i) + end do + call lib_tableInqEntry(tableID_dummy, id_dummy, ltype_dummy, name_temp,& + & longname_temp, units_temp) + do name_i = 1, len(name_dummy) + if(name_temp(name_i) == c_null_char) exit + name_dummy(name_i:name_i) = name_temp(name_i) + end do + do name_i = name_i, len(name_dummy) + name_dummy(name_i:name_i) = ' ' + end do + do longname_i = 1, len(longname_dummy) + if(longname_temp(longname_i) == c_null_char) exit + longname_dummy(longname_i:longname_i) = longname_temp(longname_i) + end do + do longname_i = longname_i, len(longname_dummy) + longname_dummy(longname_i:longname_i) = ' ' + end do + do units_i = 1, len(units_dummy) + if(units_temp(units_i) == c_null_char) exit + units_dummy(units_i:units_i) = units_temp(units_i) + end do + do units_i = units_i, len(units_dummy) + units_dummy(units_i:units_i) = ' ' + end do + end subroutine tableInqEntry + + function subtypeInqAttribute(subtypeID_dummy, index_dummy, key_dummy,& + & outValue_dummy) result(f_result) + integer(c_int) :: f_result + integer(c_int), value :: subtypeID_dummy + integer(c_int), value :: index_dummy + character(kind = c_char, len = *), intent(in) :: key_dummy + integer(c_int), intent(inout) :: outValue_dummy + character(kind = c_char) :: key_temp(len(key_dummy) + 1) + integer :: key_i + interface + function lib_subtypeInqAttribute(subtypeID_dummy, index_dummy, key_dummy,& + & outValue_dummy) bind(c, name = 'subtypeInqAttribute') result(c_result) + import c_char, c_int + integer(c_int) :: c_result + integer(c_int), value :: subtypeID_dummy + integer(c_int), value :: index_dummy + character(kind = c_char) :: key_dummy(*) + integer(c_int), intent(inout) :: outValue_dummy + end function lib_subtypeInqAttribute + end interface + do key_i = 1, len(key_dummy) + key_temp(key_i) = key_dummy(key_i:key_i) + end do + key_temp(len(key_dummy) + 1) = c_null_char + f_result = lib_subtypeInqAttribute(subtypeID_dummy, index_dummy, key_temp,& + & outValue_dummy) + end function subtypeInqAttribute + +end module mo_cdi diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 000000000..670712ed9 --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,1680 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + 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@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +TESTS = calendar_test1$(EXEEXT) cksum_verify$(EXEEXT) pio_write.run \ + pio_write_deco2d.run test_byteswap.run test_cdf_const.run \ + test_cdf_transformation.run test_cksum_ext.run \ + test_cksum_grb.run test_cksum_grb2.run test_cksum_ieg.run \ + test_cksum_nc.run test_cksum_nc2.run test_cksum_nc4.run \ + test_cksum_nc_chunk.run test_cksum_srv.run test_f2003.run \ + test_grib.run test_month_adjust$(EXEEXT) \ + test_resource_copy.run test_table.run pio_cksum_asynch.run \ + pio_cksum_fpguard.run pio_cksum_grb2.run \ + pio_cksum_mpi_fw_at_all.run pio_cksum_mpi_fw_at_reblock.run \ + pio_cksum_mpi_fw_ordered.run pio_cksum_mpinonb.run \ + pio_cksum_nc.run pio_cksum_nc2.run pio_cksum_nc4.run \ + pio_cksum_writer.run pio_write.parallel.run \ + pio_write_deco2d.parallel.run pio_write_dist_array.run \ + test_resource_copy.parallel.run +@ENABLE_NETCDF_TRUE@am__append_1 = \ +@ENABLE_NETCDF_TRUE@ test_cdf_read \ +@ENABLE_NETCDF_TRUE@ test_cdf_write + +@ENABLE_MPI_TRUE@am__append_2 = \ +@ENABLE_MPI_TRUE@ pio_write.parallel \ +@ENABLE_MPI_TRUE@ pio_write_deco2d.parallel \ +@ENABLE_MPI_TRUE@ test_resource_copy.parallel + +@with_on_demand_check_programs_TRUE@check_PROGRAMS = $(am__EXEEXT_3) +@with_on_demand_check_programs_FALSE@noinst_PROGRAMS = \ +@with_on_demand_check_programs_FALSE@ $(am__EXEEXT_3) +@ENABLE_ALL_STATIC_TRUE@am__append_3 = -all-static +subdir = tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \ + $(top_srcdir)/m4/acx_c_package.m4 \ + $(top_srcdir)/m4/acx_cfortran_flags.m4 \ + $(top_srcdir)/m4/acx_check_cfortran.m4 \ + $(top_srcdir)/m4/acx_check_strptr_convert.m4 \ + $(top_srcdir)/m4/acx_execinfo.m4 \ + $(top_srcdir)/m4/acx_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_fortran_include_flag.m4 \ + $(top_srcdir)/m4/acx_fortran_package.m4 \ + $(top_srcdir)/m4/acx_lang_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_package.m4 \ + $(top_srcdir)/m4/acx_lt_problems.m4 \ + $(top_srcdir)/m4/acx_m4_list_to_quoted_strings.m4 \ + $(top_srcdir)/m4/acx_mpirun.m4 $(top_srcdir)/m4/acx_mv_obj.m4 \ + $(top_srcdir)/m4/acx_option_search_libs.m4 \ + $(top_srcdir)/m4/acx_options.m4 \ + $(top_srcdir)/m4/acx_prog_cc_posix.m4 \ + $(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \ + $(top_srcdir)/m4/acx_sl_mod_suffix.m4 \ + $(top_srcdir)/m4/acx_tls_xlc_retry.m4 \ + $(top_srcdir)/m4/acx_use_libtool_configuration.m4 \ + $(top_srcdir)/m4/acx_uuid.m4 $(top_srcdir)/m4/asx_tr_arg.m4 \ + $(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/kpse_libtool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/ac_lang_program_fortran.m4 \ + $(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \ + $(top_srcdir)/m4/acx_lang_c_check_include.m4 \ + $(top_srcdir)/configure.ac +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)/src/config.h +CONFIG_CLEAN_FILES = test_cksum_base pio_cksum_asynch.run \ + pio_cksum_fpguard.run pio_cksum_grb2.run \ + pio_cksum_mpi_fw_at_all.run pio_cksum_mpi_fw_at_reblock.run \ + pio_cksum_mpi_fw_ordered.run pio_cksum_mpinonb.run \ + pio_cksum_nc.run pio_cksum_nc2.run pio_cksum_nc4.run \ + pio_cksum_writer.run pio_write.parallel.run pio_write.run \ + pio_write_deco2d.parallel.run pio_write_deco2d.run \ + pio_write_dist_array.run test_byteswap.run test_cdf_const.run \ + test_cdf_transformation.run test_cksum_ext.run \ + test_cksum_grb.run test_cksum_grb2.run test_cksum_ieg.run \ + test_cksum_nc.run test_cksum_nc2.run test_cksum_nc4.run \ + test_cksum_nc_chunk.run test_cksum_srv.run test_f2003.run \ + test_grib.run test_resource_copy.parallel.run \ + test_resource_copy.run test_table.run +CONFIG_CLEAN_VPATH_FILES = +@ENABLE_NETCDF_TRUE@am__EXEEXT_1 = test_cdf_read$(EXEEXT) \ +@ENABLE_NETCDF_TRUE@ test_cdf_write$(EXEEXT) +@ENABLE_MPI_TRUE@am__EXEEXT_2 = pio_write.parallel$(EXEEXT) \ +@ENABLE_MPI_TRUE@ pio_write_deco2d.parallel$(EXEEXT) \ +@ENABLE_MPI_TRUE@ test_resource_copy.parallel$(EXEEXT) +am__EXEEXT_3 = calendar_test1$(EXEEXT) cksum_read$(EXEEXT) \ + cksum_verify$(EXEEXT) cksum_write$(EXEEXT) \ + cksum_write_chunk$(EXEEXT) pio_write$(EXEEXT) \ + pio_write_deco2d$(EXEEXT) test_byteswap$(EXEEXT) \ + test_grib$(EXEEXT) test_month_adjust$(EXEEXT) \ + test_resource_copy$(EXEEXT) test_table$(EXEEXT) \ + $(am__EXEEXT_1) $(am__EXEEXT_2) +PROGRAMS = $(noinst_PROGRAMS) +am_calendar_test1_OBJECTS = calendar_test1.$(OBJEXT) +calendar_test1_OBJECTS = $(am_calendar_test1_OBJECTS) +calendar_test1_LDADD = $(LDADD) +calendar_test1_DEPENDENCIES = $(top_builddir)/src/libcdi.la +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 = +am_cksum_read_OBJECTS = cksum_read.$(OBJEXT) \ + ensure_array_size.$(OBJEXT) stream_cksum.$(OBJEXT) \ + var_cksum.$(OBJEXT) +cksum_read_OBJECTS = $(am_cksum_read_OBJECTS) +cksum_read_LDADD = $(LDADD) +cksum_read_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cksum_verify_OBJECTS = cksum_verify.$(OBJEXT) +cksum_verify_OBJECTS = $(am_cksum_verify_OBJECTS) +cksum_verify_LDADD = $(LDADD) +cksum_verify_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cksum_write_OBJECTS = cksum_write.$(OBJEXT) \ + simple_model_helper.$(OBJEXT) +cksum_write_OBJECTS = $(am_cksum_write_OBJECTS) +cksum_write_LDADD = $(LDADD) +cksum_write_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_cksum_write_chunk_OBJECTS = cksum_write_chunk.$(OBJEXT) \ + simple_model_helper.$(OBJEXT) +cksum_write_chunk_OBJECTS = $(am_cksum_write_chunk_OBJECTS) +cksum_write_chunk_LDADD = $(LDADD) +cksum_write_chunk_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_pio_write_OBJECTS = pio_write.$(OBJEXT) \ + pio_write_setup_grid.$(OBJEXT) simple_model.$(OBJEXT) \ + simple_model_helper.$(OBJEXT) +pio_write_OBJECTS = $(am_pio_write_OBJECTS) +pio_write_LDADD = $(LDADD) +pio_write_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am__objects_1 = pio_write.parallel.$(OBJEXT) \ + pio_write_setup_grid.parallel.$(OBJEXT) \ + simple_model.parallel.$(OBJEXT) \ + simple_model_helper.parallel.$(OBJEXT) +nodist_pio_write_parallel_OBJECTS = $(am__objects_1) +pio_write_parallel_OBJECTS = $(nodist_pio_write_parallel_OBJECTS) +am__DEPENDENCIES_1 = +pio_write_parallel_DEPENDENCIES = $(top_builddir)/src/libcdipio.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(LDADD) +am_pio_write_deco2d_OBJECTS = deco2d_model.$(OBJEXT) \ + pio_write.$(OBJEXT) pio_write_setup_grid.$(OBJEXT) \ + simple_model_helper.$(OBJEXT) +pio_write_deco2d_OBJECTS = $(am_pio_write_deco2d_OBJECTS) +pio_write_deco2d_LDADD = $(LDADD) +pio_write_deco2d_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am__objects_2 = deco2d_model.parallel.$(OBJEXT) \ + pio_write.parallel.$(OBJEXT) \ + pio_write_setup_grid.parallel.$(OBJEXT) \ + simple_model_helper.parallel.$(OBJEXT) +nodist_pio_write_deco2d_parallel_OBJECTS = $(am__objects_2) +pio_write_deco2d_parallel_OBJECTS = \ + $(nodist_pio_write_deco2d_parallel_OBJECTS) +pio_write_deco2d_parallel_DEPENDENCIES = \ + $(top_builddir)/src/libcdipio.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(LDADD) +am_test_byteswap_OBJECTS = test_byteswap.$(OBJEXT) +test_byteswap_OBJECTS = $(am_test_byteswap_OBJECTS) +test_byteswap_LDADD = $(LDADD) +test_byteswap_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_test_cdf_read_OBJECTS = test_cdf_read.$(OBJEXT) +test_cdf_read_OBJECTS = $(am_test_cdf_read_OBJECTS) +test_cdf_read_LDADD = $(LDADD) +test_cdf_read_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_test_cdf_write_OBJECTS = simple_model_helper.$(OBJEXT) \ + test_cdf_write.$(OBJEXT) +test_cdf_write_OBJECTS = $(am_test_cdf_write_OBJECTS) +test_cdf_write_LDADD = $(LDADD) +test_cdf_write_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_test_grib_OBJECTS = test_grib.$(OBJEXT) +test_grib_OBJECTS = $(am_test_grib_OBJECTS) +test_grib_LDADD = $(LDADD) +test_grib_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_test_month_adjust_OBJECTS = test_month_adjust.$(OBJEXT) +test_month_adjust_OBJECTS = $(am_test_month_adjust_OBJECTS) +test_month_adjust_LDADD = $(LDADD) +test_month_adjust_DEPENDENCIES = $(top_builddir)/src/libcdi.la +am_test_resource_copy_OBJECTS = test_resource_copy.$(OBJEXT) +test_resource_copy_OBJECTS = $(am_test_resource_copy_OBJECTS) +test_resource_copy_DEPENDENCIES = \ + $(top_builddir)/src/libcdiresunpack.la +am__objects_3 = test_resource_copy.parallel.$(OBJEXT) +nodist_test_resource_copy_parallel_OBJECTS = $(am__objects_3) +test_resource_copy_parallel_OBJECTS = \ + $(nodist_test_resource_copy_parallel_OBJECTS) +test_resource_copy_parallel_DEPENDENCIES = \ + $(top_builddir)/src/libcdipio.la $(LDADD) +am_test_table_OBJECTS = test_table.$(OBJEXT) +test_table_OBJECTS = $(am_test_table_OBJECTS) +test_table_LDADD = $(LDADD) +test_table_DEPENDENCIES = $(top_builddir)/src/libcdi.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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)/src +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/calendar_test1.Po \ + ./$(DEPDIR)/cksum_read.Po ./$(DEPDIR)/cksum_verify.Po \ + ./$(DEPDIR)/cksum_write.Po ./$(DEPDIR)/cksum_write_chunk.Po \ + ./$(DEPDIR)/deco2d_model.Po \ + ./$(DEPDIR)/deco2d_model.parallel.Po \ + ./$(DEPDIR)/ensure_array_size.Po ./$(DEPDIR)/pio_write.Po \ + ./$(DEPDIR)/pio_write.parallel.Po \ + ./$(DEPDIR)/pio_write_setup_grid.Po \ + ./$(DEPDIR)/pio_write_setup_grid.parallel.Po \ + ./$(DEPDIR)/simple_model.Po \ + ./$(DEPDIR)/simple_model.parallel.Po \ + ./$(DEPDIR)/simple_model_helper.Po \ + ./$(DEPDIR)/simple_model_helper.parallel.Po \ + ./$(DEPDIR)/stream_cksum.Po ./$(DEPDIR)/test_byteswap.Po \ + ./$(DEPDIR)/test_cdf_read.Po ./$(DEPDIR)/test_cdf_write.Po \ + ./$(DEPDIR)/test_grib.Po ./$(DEPDIR)/test_month_adjust.Po \ + ./$(DEPDIR)/test_resource_copy.Po \ + ./$(DEPDIR)/test_resource_copy.parallel.Po \ + ./$(DEPDIR)/test_table.Po ./$(DEPDIR)/var_cksum.Po +am__mv = mv -f +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(calendar_test1_SOURCES) $(cksum_read_SOURCES) \ + $(cksum_verify_SOURCES) $(cksum_write_SOURCES) \ + $(cksum_write_chunk_SOURCES) $(pio_write_SOURCES) \ + $(nodist_pio_write_parallel_SOURCES) \ + $(pio_write_deco2d_SOURCES) \ + $(nodist_pio_write_deco2d_parallel_SOURCES) \ + $(test_byteswap_SOURCES) $(test_cdf_read_SOURCES) \ + $(test_cdf_write_SOURCES) $(test_grib_SOURCES) \ + $(test_month_adjust_SOURCES) $(test_resource_copy_SOURCES) \ + $(nodist_test_resource_copy_parallel_SOURCES) \ + $(test_table_SOURCES) +DIST_SOURCES = $(calendar_test1_SOURCES) $(cksum_read_SOURCES) \ + $(cksum_verify_SOURCES) $(cksum_write_SOURCES) \ + $(cksum_write_chunk_SOURCES) $(pio_write_SOURCES) \ + $(pio_write_deco2d_SOURCES) $(test_byteswap_SOURCES) \ + $(test_cdf_read_SOURCES) $(test_cdf_write_SOURCES) \ + $(test_grib_SOURCES) $(test_month_adjust_SOURCES) \ + $(test_resource_copy_SOURCES) $(test_table_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = examples-recursive +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)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.run.log=.log) +RUN_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +RUN_LOG_COMPILE = $(RUN_LOG_COMPILER) $(AM_RUN_LOG_FLAGS) \ + $(RUN_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(srcdir)/pio_cksum_asynch.run.in \ + $(srcdir)/pio_cksum_fpguard.run.in \ + $(srcdir)/pio_cksum_grb2.run.in \ + $(srcdir)/pio_cksum_mpi_fw_at_all.run.in \ + $(srcdir)/pio_cksum_mpi_fw_at_reblock.run.in \ + $(srcdir)/pio_cksum_mpi_fw_ordered.run.in \ + $(srcdir)/pio_cksum_mpinonb.run.in \ + $(srcdir)/pio_cksum_nc.run.in $(srcdir)/pio_cksum_nc2.run.in \ + $(srcdir)/pio_cksum_nc4.run.in \ + $(srcdir)/pio_cksum_writer.run.in \ + $(srcdir)/pio_write.parallel.run.in $(srcdir)/pio_write.run.in \ + $(srcdir)/pio_write_deco2d.parallel.run.in \ + $(srcdir)/pio_write_deco2d.run.in \ + $(srcdir)/pio_write_dist_array.run.in \ + $(srcdir)/test_byteswap.run.in $(srcdir)/test_cdf_const.run.in \ + $(srcdir)/test_cdf_transformation.run.in \ + $(srcdir)/test_cksum_base.in $(srcdir)/test_cksum_ext.run.in \ + $(srcdir)/test_cksum_grb.run.in \ + $(srcdir)/test_cksum_grb2.run.in \ + $(srcdir)/test_cksum_ieg.run.in $(srcdir)/test_cksum_nc.run.in \ + $(srcdir)/test_cksum_nc2.run.in \ + $(srcdir)/test_cksum_nc4.run.in \ + $(srcdir)/test_cksum_nc_chunk.run.in \ + $(srcdir)/test_cksum_srv.run.in $(srcdir)/test_f2003.run.in \ + $(srcdir)/test_grib.run.in \ + $(srcdir)/test_resource_copy.parallel.run.in \ + $(srcdir)/test_resource_copy.run.in \ + $(srcdir)/test_table.run.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCE_UUIDROOT = @DCE_UUIDROOT@ +DCE_UUID_C_INCLUDE = @DCE_UUID_C_INCLUDE@ +DCE_UUID_C_LIB = @DCE_UUID_C_LIB@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECCODES_INCLUDE = @ECCODES_INCLUDE@ +ECCODES_LIBS = @ECCODES_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_ACROSS = @ENABLE_ACROSS@ +ENABLE_CDI_LIB = @ENABLE_CDI_LIB@ +ENABLE_CGRIBEX = @ENABLE_CGRIBEX@ +ENABLE_EXTRA = @ENABLE_EXTRA@ +ENABLE_GRIB = @ENABLE_GRIB@ +ENABLE_IEG = @ENABLE_IEG@ +ENABLE_MPI = @ENABLE_MPI@ +ENABLE_NC2 = @ENABLE_NC2@ +ENABLE_NC4 = @ENABLE_NC4@ +ENABLE_NC4HDF5 = @ENABLE_NC4HDF5@ +ENABLE_NC4SZLIB = @ENABLE_NC4SZLIB@ +ENABLE_NETCDF = @ENABLE_NETCDF@ +ENABLE_SERVICE = @ENABLE_SERVICE@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCMODCASE = @FCMODCASE@ +FCMODEXT = @FCMODEXT@ +FC_DEFINE = @FC_DEFINE@ +FC_MOD_FLAG = @FC_MOD_FLAG@ +FC_OPTINC = @FC_OPTINC@ +FDB5_INCLUDE = @FDB5_INCLUDE@ +FDB5_LIBS = @FDB5_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GRIB_API_INCLUDE = @GRIB_API_INCLUDE@ +GRIB_API_LIBS = @GRIB_API_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPIROOT = @MPIROOT@ +MPI_C_INCLUDE = @MPI_C_INCLUDE@ +MPI_C_LIB = @MPI_C_LIB@ +MPI_FC_LIB = @MPI_FC_LIB@ +MPI_FC_MOD = @MPI_FC_MOD@ +MPI_LAUNCH = @MPI_LAUNCH@ +NC_CONFIG = @NC_CONFIG@ +NETCDF_INCLUDE = @NETCDF_INCLUDE@ +NETCDF_LIBS = @NETCDF_LIBS@ +NETCDF_ROOT = @NETCDF_ROOT@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OSSP_UUIDROOT = @OSSP_UUIDROOT@ +OSSP_UUID_C_INCLUDE = @OSSP_UUID_C_INCLUDE@ +OSSP_UUID_C_LIB = @OSSP_UUID_C_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PPM_CORE_C_INCLUDE = @PPM_CORE_C_INCLUDE@ +PPM_CORE_C_LIB = @PPM_CORE_C_LIB@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PLATFORM_SITE_PKG = @PYTHON_PLATFORM_SITE_PKG@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SYSTEM_TYPE = @SYSTEM_TYPE@ +SZLIB_INCLUDE = @SZLIB_INCLUDE@ +SZLIB_LIBS = @SZLIB_LIBS@ +THREADS_INCLUDE = @THREADS_INCLUDE@ +THREADS_LIBS = @THREADS_LIBS@ +UTIL_LINUX_UUIDROOT = @UTIL_LINUX_UUIDROOT@ +UTIL_LINUX_UUID_C_INCLUDE = @UTIL_LINUX_UUID_C_INCLUDE@ +UTIL_LINUX_UUID_C_LIB = @UTIL_LINUX_UUID_C_LIB@ +UUID_C_INCLUDE = @UUID_C_INCLUDE@ +UUID_C_LIB = @UUID_C_LIB@ +VERSION = @VERSION@ +YAXT_C_INCLUDE = @YAXT_C_INCLUDE@ +YAXT_C_LIB = @YAXT_C_LIB@ +YAXT_FC_LIB = @YAXT_FC_LIB@ +YAXT_FC_MOD = @YAXT_FC_MOD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +TEST_EXTENSIONS = @EXEEXT@ .run + +# Update test_cksum_base before running tests that source it: +test_cksum_TEST_LOGS_ = \ + test_cksum_ext.log \ + test_cksum_grb.log \ + test_cksum_grb2.log \ + test_cksum_ieg.log \ + test_cksum_nc.log \ + test_cksum_nc2.log \ + test_cksum_nc4.log \ + test_cksum_srv.log + + +# Update pio_write_dist_array.run before running tests that source it: +pio_write_dist_array_TEST_LOGS_ = \ + pio_cksum_asynch.log \ + pio_cksum_fpguard.log \ + pio_cksum_grb2.log \ + pio_cksum_mpi_fw_at_all.log \ + pio_cksum_mpi_fw_at_reblock.log \ + pio_cksum_mpi_fw_ordered.log \ + pio_cksum_mpinonb.log \ + pio_cksum_nc.log \ + pio_cksum_nc2.log \ + pio_cksum_nc4.log \ + pio_cksum_writer.log + + +# Update pio_write.run before running tests that source it: +pio_write_TEST_LOGS_ = \ + $(pio_write_dist_array_TEST_LOGS_) \ + pio_write.parallel.log \ + pio_write_deco2d.log \ + pio_write_deco2d.parallel.log \ + pio_write_dist_array.log + +test_PROGRAMS_ = calendar_test1 cksum_read cksum_verify cksum_write \ + cksum_write_chunk pio_write pio_write_deco2d test_byteswap \ + test_grib test_month_adjust test_resource_copy test_table \ + $(am__append_1) $(am__append_2) +AM_CPPFLAGS = -I$(top_srcdir)/src + +# Avoid compiling twice by running Libtool with '-static' +# This is safe because all Libtool libraries in this directory are +# static-only and contain PIC objects: +AM_CFLAGS = $(PPM_CORE_C_INCLUDE) $(YAXT_C_INCLUDE) $(MPI_C_INCLUDE) \ + -static +AM_LDFLAGS = $(am__append_3) +LDADD = $(top_builddir)/src/libcdi.la +calendar_test1_SOURCES = calendar_test1.c +cksum_read_SOURCES = \ + cksum_read.c \ + ensure_array_size.c \ + ensure_array_size.h \ + stream_cksum.c \ + stream_cksum.h \ + var_cksum.c \ + var_cksum.h + +cksum_verify_SOURCES = cksum_verify.c +cksum_write_SOURCES = \ + cksum_write.c \ + simple_model_helper.c \ + simple_model_helper.h + +cksum_write_chunk_SOURCES = \ + cksum_write_chunk.c \ + simple_model_helper.c \ + simple_model_helper.h + +pio_write_SOURCES = \ + pio_write.c \ + pio_write.h \ + pio_write_setup_grid.c \ + pio_write_setup_grid.h \ + simple_model.c \ + simple_model_helper.c \ + simple_model_helper.h + +nodist_pio_write_parallel_SOURCES = $(pio_write_SOURCES:.c=.parallel.c) +pio_write_parallel_LDADD = $(top_builddir)/src/libcdipio.la $(PPM_CORE_C_LIB) $(YAXT_C_LIB) $(LDADD) +pio_write_deco2d_SOURCES = \ + deco2d_model.c \ + pio_write.c \ + pio_write.h \ + pio_write_setup_grid.c \ + pio_write_setup_grid.h \ + simple_model_helper.c \ + simple_model_helper.h + +nodist_pio_write_deco2d_parallel_SOURCES = $(pio_write_deco2d_SOURCES:.c=.parallel.c) +pio_write_deco2d_parallel_LDADD = $(top_builddir)/src/libcdipio.la $(PPM_CORE_C_LIB) $(YAXT_C_LIB) $(LDADD) +test_byteswap_SOURCES = test_byteswap.c +test_grib_SOURCES = test_grib.c +test_month_adjust_SOURCES = test_month_adjust.c +test_resource_copy_SOURCES = test_resource_copy.c +test_resource_copy_LDADD = $(top_builddir)/src/libcdiresunpack.la +nodist_test_resource_copy_parallel_SOURCES = $(test_resource_copy_SOURCES:.c=.parallel.c) +test_resource_copy_parallel_LDADD = $(top_builddir)/src/libcdipio.la $(LDADD) +test_table_SOURCES = test_table.c +test_cdf_read_SOURCES = test_cdf_read.c +test_cdf_write_SOURCES = \ + simple_model_helper.c \ + simple_model_helper.h \ + test_cdf_write.c + +AUTOMAKE_OPTIONS = color-tests + +# Compile programs using Libtool: +COMPILE = $(LTCOMPILE) +FCCOMPILE = $(LTFCCOMPILE) +PPFCCOMPILE = $(LTPPFCCOMPILE) +CXXCOMPILE = $(LTCXXCOMPILE) + +# Compile *.F90 without CPPFLAGS, which are normally meant for the C compiler +# and might not be compatible with the Fortran compiler: +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) + +AM_FCFLAGS = -static +AM_CXXFLAGS = -static + +# Generate source files for parallel versions of the programs. We do this to +# avoid target-specific flags, which result into rules that do not use the +# compilation commands above. +SUFFIXES = .parallel.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .parallel.c .c .lo .log .o .obj .run .run$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +test_cksum_base: $(top_builddir)/config.status $(srcdir)/test_cksum_base.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_asynch.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_asynch.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_fpguard.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_fpguard.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_grb2.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_grb2.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_mpi_fw_at_all.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_mpi_fw_at_all.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_mpi_fw_at_reblock.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_mpi_fw_at_reblock.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_mpi_fw_ordered.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_mpi_fw_ordered.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_mpinonb.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_mpinonb.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_nc.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_nc.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_nc2.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_nc2.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_nc4.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_nc4.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_cksum_writer.run: $(top_builddir)/config.status $(srcdir)/pio_cksum_writer.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_write.parallel.run: $(top_builddir)/config.status $(srcdir)/pio_write.parallel.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_write.run: $(top_builddir)/config.status $(srcdir)/pio_write.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_write_deco2d.parallel.run: $(top_builddir)/config.status $(srcdir)/pio_write_deco2d.parallel.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_write_deco2d.run: $(top_builddir)/config.status $(srcdir)/pio_write_deco2d.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +pio_write_dist_array.run: $(top_builddir)/config.status $(srcdir)/pio_write_dist_array.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_byteswap.run: $(top_builddir)/config.status $(srcdir)/test_byteswap.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cdf_const.run: $(top_builddir)/config.status $(srcdir)/test_cdf_const.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cdf_transformation.run: $(top_builddir)/config.status $(srcdir)/test_cdf_transformation.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_ext.run: $(top_builddir)/config.status $(srcdir)/test_cksum_ext.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_grb.run: $(top_builddir)/config.status $(srcdir)/test_cksum_grb.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_grb2.run: $(top_builddir)/config.status $(srcdir)/test_cksum_grb2.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_ieg.run: $(top_builddir)/config.status $(srcdir)/test_cksum_ieg.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_nc.run: $(top_builddir)/config.status $(srcdir)/test_cksum_nc.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_nc2.run: $(top_builddir)/config.status $(srcdir)/test_cksum_nc2.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_nc4.run: $(top_builddir)/config.status $(srcdir)/test_cksum_nc4.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_nc_chunk.run: $(top_builddir)/config.status $(srcdir)/test_cksum_nc_chunk.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_cksum_srv.run: $(top_builddir)/config.status $(srcdir)/test_cksum_srv.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_f2003.run: $(top_builddir)/config.status $(srcdir)/test_f2003.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_grib.run: $(top_builddir)/config.status $(srcdir)/test_grib.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_resource_copy.parallel.run: $(top_builddir)/config.status $(srcdir)/test_resource_copy.parallel.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_resource_copy.run: $(top_builddir)/config.status $(srcdir)/test_resource_copy.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test_table.run: $(top_builddir)/config.status $(srcdir)/test_table.run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +calendar_test1$(EXEEXT): $(calendar_test1_OBJECTS) $(calendar_test1_DEPENDENCIES) $(EXTRA_calendar_test1_DEPENDENCIES) + @rm -f calendar_test1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(calendar_test1_OBJECTS) $(calendar_test1_LDADD) $(LIBS) + +cksum_read$(EXEEXT): $(cksum_read_OBJECTS) $(cksum_read_DEPENDENCIES) $(EXTRA_cksum_read_DEPENDENCIES) + @rm -f cksum_read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cksum_read_OBJECTS) $(cksum_read_LDADD) $(LIBS) + +cksum_verify$(EXEEXT): $(cksum_verify_OBJECTS) $(cksum_verify_DEPENDENCIES) $(EXTRA_cksum_verify_DEPENDENCIES) + @rm -f cksum_verify$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cksum_verify_OBJECTS) $(cksum_verify_LDADD) $(LIBS) + +cksum_write$(EXEEXT): $(cksum_write_OBJECTS) $(cksum_write_DEPENDENCIES) $(EXTRA_cksum_write_DEPENDENCIES) + @rm -f cksum_write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cksum_write_OBJECTS) $(cksum_write_LDADD) $(LIBS) + +cksum_write_chunk$(EXEEXT): $(cksum_write_chunk_OBJECTS) $(cksum_write_chunk_DEPENDENCIES) $(EXTRA_cksum_write_chunk_DEPENDENCIES) + @rm -f cksum_write_chunk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cksum_write_chunk_OBJECTS) $(cksum_write_chunk_LDADD) $(LIBS) + +pio_write$(EXEEXT): $(pio_write_OBJECTS) $(pio_write_DEPENDENCIES) $(EXTRA_pio_write_DEPENDENCIES) + @rm -f pio_write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pio_write_OBJECTS) $(pio_write_LDADD) $(LIBS) + +pio_write.parallel$(EXEEXT): $(pio_write_parallel_OBJECTS) $(pio_write_parallel_DEPENDENCIES) $(EXTRA_pio_write_parallel_DEPENDENCIES) + @rm -f pio_write.parallel$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pio_write_parallel_OBJECTS) $(pio_write_parallel_LDADD) $(LIBS) + +pio_write_deco2d$(EXEEXT): $(pio_write_deco2d_OBJECTS) $(pio_write_deco2d_DEPENDENCIES) $(EXTRA_pio_write_deco2d_DEPENDENCIES) + @rm -f pio_write_deco2d$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pio_write_deco2d_OBJECTS) $(pio_write_deco2d_LDADD) $(LIBS) + +pio_write_deco2d.parallel$(EXEEXT): $(pio_write_deco2d_parallel_OBJECTS) $(pio_write_deco2d_parallel_DEPENDENCIES) $(EXTRA_pio_write_deco2d_parallel_DEPENDENCIES) + @rm -f pio_write_deco2d.parallel$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pio_write_deco2d_parallel_OBJECTS) $(pio_write_deco2d_parallel_LDADD) $(LIBS) + +test_byteswap$(EXEEXT): $(test_byteswap_OBJECTS) $(test_byteswap_DEPENDENCIES) $(EXTRA_test_byteswap_DEPENDENCIES) + @rm -f test_byteswap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_byteswap_OBJECTS) $(test_byteswap_LDADD) $(LIBS) + +test_cdf_read$(EXEEXT): $(test_cdf_read_OBJECTS) $(test_cdf_read_DEPENDENCIES) $(EXTRA_test_cdf_read_DEPENDENCIES) + @rm -f test_cdf_read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_cdf_read_OBJECTS) $(test_cdf_read_LDADD) $(LIBS) + +test_cdf_write$(EXEEXT): $(test_cdf_write_OBJECTS) $(test_cdf_write_DEPENDENCIES) $(EXTRA_test_cdf_write_DEPENDENCIES) + @rm -f test_cdf_write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_cdf_write_OBJECTS) $(test_cdf_write_LDADD) $(LIBS) + +test_grib$(EXEEXT): $(test_grib_OBJECTS) $(test_grib_DEPENDENCIES) $(EXTRA_test_grib_DEPENDENCIES) + @rm -f test_grib$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_grib_OBJECTS) $(test_grib_LDADD) $(LIBS) + +test_month_adjust$(EXEEXT): $(test_month_adjust_OBJECTS) $(test_month_adjust_DEPENDENCIES) $(EXTRA_test_month_adjust_DEPENDENCIES) + @rm -f test_month_adjust$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_month_adjust_OBJECTS) $(test_month_adjust_LDADD) $(LIBS) + +test_resource_copy$(EXEEXT): $(test_resource_copy_OBJECTS) $(test_resource_copy_DEPENDENCIES) $(EXTRA_test_resource_copy_DEPENDENCIES) + @rm -f test_resource_copy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_resource_copy_OBJECTS) $(test_resource_copy_LDADD) $(LIBS) + +test_resource_copy.parallel$(EXEEXT): $(test_resource_copy_parallel_OBJECTS) $(test_resource_copy_parallel_DEPENDENCIES) $(EXTRA_test_resource_copy_parallel_DEPENDENCIES) + @rm -f test_resource_copy.parallel$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_resource_copy_parallel_OBJECTS) $(test_resource_copy_parallel_LDADD) $(LIBS) + +test_table$(EXEEXT): $(test_table_OBJECTS) $(test_table_DEPENDENCIES) $(EXTRA_test_table_DEPENDENCIES) + @rm -f test_table$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_table_OBJECTS) $(test_table_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar_test1.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cksum_read.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cksum_verify.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cksum_write.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cksum_write_chunk.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deco2d_model.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deco2d_model.parallel.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ensure_array_size.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_write.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_write.parallel.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_write_setup_grid.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_write_setup_grid.parallel.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_model.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_model.parallel.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_model_helper.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_model_helper.parallel.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_cksum.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_byteswap.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cdf_read.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cdf_write.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_grib.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_month_adjust.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_resource_copy.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_resource_copy.parallel.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_table.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/var_cksum.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +examples-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(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-am + +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-am + +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 + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +calendar_test1.log: calendar_test1$(EXEEXT) + @p='calendar_test1$(EXEEXT)'; \ + b='calendar_test1'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +cksum_verify.log: cksum_verify$(EXEEXT) + @p='cksum_verify$(EXEEXT)'; \ + b='cksum_verify'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_month_adjust.log: test_month_adjust$(EXEEXT) + @p='test_month_adjust$(EXEEXT)'; \ + b='test_month_adjust'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.run.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(RUN_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_RUN_LOG_DRIVER_FLAGS) $(RUN_LOG_DRIVER_FLAGS) -- $(RUN_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.run$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(RUN_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_RUN_LOG_DRIVER_FLAGS) $(RUN_LOG_DRIVER_FLAGS) -- $(RUN_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +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-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/calendar_test1.Po + -rm -f ./$(DEPDIR)/cksum_read.Po + -rm -f ./$(DEPDIR)/cksum_verify.Po + -rm -f ./$(DEPDIR)/cksum_write.Po + -rm -f ./$(DEPDIR)/cksum_write_chunk.Po + -rm -f ./$(DEPDIR)/deco2d_model.Po + -rm -f ./$(DEPDIR)/deco2d_model.parallel.Po + -rm -f ./$(DEPDIR)/ensure_array_size.Po + -rm -f ./$(DEPDIR)/pio_write.Po + -rm -f ./$(DEPDIR)/pio_write.parallel.Po + -rm -f ./$(DEPDIR)/pio_write_setup_grid.Po + -rm -f ./$(DEPDIR)/pio_write_setup_grid.parallel.Po + -rm -f ./$(DEPDIR)/simple_model.Po + -rm -f ./$(DEPDIR)/simple_model.parallel.Po + -rm -f ./$(DEPDIR)/simple_model_helper.Po + -rm -f ./$(DEPDIR)/simple_model_helper.parallel.Po + -rm -f ./$(DEPDIR)/stream_cksum.Po + -rm -f ./$(DEPDIR)/test_byteswap.Po + -rm -f ./$(DEPDIR)/test_cdf_read.Po + -rm -f ./$(DEPDIR)/test_cdf_write.Po + -rm -f ./$(DEPDIR)/test_grib.Po + -rm -f ./$(DEPDIR)/test_month_adjust.Po + -rm -f ./$(DEPDIR)/test_resource_copy.Po + -rm -f ./$(DEPDIR)/test_resource_copy.parallel.Po + -rm -f ./$(DEPDIR)/test_table.Po + -rm -f ./$(DEPDIR)/var_cksum.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +examples: examples-am + +examples-am: examples-local + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/calendar_test1.Po + -rm -f ./$(DEPDIR)/cksum_read.Po + -rm -f ./$(DEPDIR)/cksum_verify.Po + -rm -f ./$(DEPDIR)/cksum_write.Po + -rm -f ./$(DEPDIR)/cksum_write_chunk.Po + -rm -f ./$(DEPDIR)/deco2d_model.Po + -rm -f ./$(DEPDIR)/deco2d_model.parallel.Po + -rm -f ./$(DEPDIR)/ensure_array_size.Po + -rm -f ./$(DEPDIR)/pio_write.Po + -rm -f ./$(DEPDIR)/pio_write.parallel.Po + -rm -f ./$(DEPDIR)/pio_write_setup_grid.Po + -rm -f ./$(DEPDIR)/pio_write_setup_grid.parallel.Po + -rm -f ./$(DEPDIR)/simple_model.Po + -rm -f ./$(DEPDIR)/simple_model.parallel.Po + -rm -f ./$(DEPDIR)/simple_model_helper.Po + -rm -f ./$(DEPDIR)/simple_model_helper.parallel.Po + -rm -f ./$(DEPDIR)/stream_cksum.Po + -rm -f ./$(DEPDIR)/test_byteswap.Po + -rm -f ./$(DEPDIR)/test_cdf_read.Po + -rm -f ./$(DEPDIR)/test_cdf_write.Po + -rm -f ./$(DEPDIR)/test_grib.Po + -rm -f ./$(DEPDIR)/test_month_adjust.Po + -rm -f ./$(DEPDIR)/test_resource_copy.Po + -rm -f ./$(DEPDIR)/test_resource_copy.parallel.Po + -rm -f ./$(DEPDIR)/test_table.Po + -rm -f ./$(DEPDIR)/var_cksum.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + clean-local clean-noinstPROGRAMS cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am \ + examples-am examples-local 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am recheck tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + +$(test_cksum_TEST_LOGS_): test_cksum_base +$(pio_write_dist_array_TEST_LOGS_): pio_write_dist_array.run +$(pio_write_TEST_LOGS_): pio_write.run + +@with_concurrent_mpi_checks_FALSE@pio_cksum_fpguard.log: pio_cksum_asynch.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_grb2.log: pio_cksum_fpguard.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_mpi_fw_at_all.log: pio_cksum_grb2.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_mpi_fw_at_reblock.log: pio_cksum_mpi_fw_at_all.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_mpi_fw_ordered.log: pio_cksum_mpi_fw_at_reblock.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_mpinonb.log: pio_cksum_mpi_fw_ordered.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_nc.log: pio_cksum_mpinonb.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_nc2.log: pio_cksum_nc.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_nc4.log: pio_cksum_nc2.log +@with_concurrent_mpi_checks_FALSE@pio_cksum_writer.log: pio_cksum_nc4.log +@with_concurrent_mpi_checks_FALSE@pio_write.parallel.log: pio_cksum_writer.log +@with_concurrent_mpi_checks_FALSE@pio_write_deco2d.parallel.log: pio_write.parallel.log +@with_concurrent_mpi_checks_FALSE@pio_write_dist_array.log: pio_write_deco2d.parallel.log +@with_concurrent_mpi_checks_FALSE@test_resource_copy.parallel.log: pio_write_dist_array.log + +clean-local: + -rm -f *.parallel.c + -rm -f *.grb *.grb2 *.nc *.nc2 *.nc4 *.srv *.ext *.cksum *.ieg *.stderr *.stdout + -rm -rf *.dSYM + +.c.parallel.c: + $(AM_V_GEN):;{ \ + echo '#define USE_MPI 1'; \ + echo '#include "$<"'; \ + } >$@ + +# 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: -- GitLab