debian/0000755000000000000000000000000012263216341007166 5ustar debian/cpl-plugin-doc.doc-base.in0000644000000000000000000000150112260545160014005 0ustar Document: cpl-plugin-__PIPELINE__ Title: __PIPELINE__ pipeline documentation Section: Science/Astronomy Abstract: The __PIPELINE__ pipeline is a subsystem of the Data Flow System for handling data taken with the Very Large Telescope (VLT) of the European Southern Observatory (ESO). It provides the standard algorithms for the quick-look assessment of data, the generation of master calibration data, the reduction of scientific exposures, in the data quality control. The FORS pipeline recipes are made public to the user community, to enable a more personalised processing of the data from the instrument. . This document describes the Python interface for the __PIPELINE__ pipeline. Format: HTML Index: /usr/share/doc/cpl-plugin-__PIPELINE__-doc/html/index.html Files: /usr/share/doc/cpl-plugin-__PIPELINE__-doc/html/* debian/source/0000755000000000000000000000000012260545160010467 5ustar debian/source/format0000644000000000000000000000001412260545160011675 0ustar 3.0 (quilt) debian/cpl-plugin-doc.docs.in0000644000000000000000000000001412260545160013256 0ustar sphinx/html debian/cpl-plugin-calib.prerm.in0000644000000000000000000000013512260545160013764 0ustar #!/bin/sh set -e rm -rfd /usr/share/cpl-plugins/__PIPELINE__-__VERSION__/cal/ #DEBHELPER# debian/changelog0000644000000000000000000000025012260546426011044 0ustar cpl-plugin-amber (4.2.2+dfsg-1) unstable; urgency=low * Initial release. (Closes: #709329) -- Ole Streicher Tue, 31 Dec 2013 14:56:29 +0100 debian/rules0000755000000000000000000000437112260545160010254 0ustar #!/usr/bin/make -f # -*- makefile -*- #export DH_VERBOSE=1 DEBVERS ?= $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') VERSION ?= $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/+.*//') DEBPKGNAME ?= $(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2) PIPELINE ?= $(shell echo '$(DEBPKGNAME)' | sed -e 's/cpl-plugin-//') get-orig-source: sh ./debian/repackage.sh %: dh $@ --with autoreconf,sphinxdoc debian_files: if [ -d calib/cal ] ; then \ dfiles=".install -doc.manpages -doc.docs -doc.doc-base -calib.install" ; \ else \ cp -f debian/README.Debian.in debian/README.Debian ; \ dfiles=".install -doc.manpages -doc.docs -doc.doc-base -calib.postinst -calib.prerm -calib.lintian-overrides" ; \ fi ; \ for f in $$dfiles ; do \ sed "s/__VERSION__/$(VERSION)/g;s/__PIPELINE__/${PIPELINE}/g" \ < debian/cpl-plugin$$f.in \ > debian/${DEBPKGNAME}$$f ; \ done override_dh_install: debian_files dh_install override_dh_installman-indep: mkdir -p man python debian/create_manpage.py ${PIPELINE} dh_installman override_dh_installdocs-indep: mkdir -p sphinx python debian/create_sphinx.py ${PIPELINE} sphinx-build sphinx sphinx/html dh_installdocs override_dh_sphinxdoc: if [ -d sphinx ] ; then \ dh_sphinxdoc ; \ fi override_dh_clean: dh_clean rm -rf debian/${DEBPKGNAME}.install \ debian/${DEBPKGNAME}-doc.manpages \ debian/${DEBPKGNAME}-doc.docs \ debian/${DEBPKGNAME}-doc.doc-base \ debian/${DEBPKGNAME}-calib.lintian-overrides \ debian/${DEBPKGNAME}-calib.install \ debian/${DEBPKGNAME}-calib.postinst \ debian/${DEBPKGNAME}-calib.prerm \ debian/README.Debian \ man sphinx override_dh_auto_configure: dh_auto_configure -- --prefix=/usr/ override_dh_makeshlibs: sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'` override_dh_installchangelogs: if [ -s ChangeLog ] ; then \ dh_installchangelogs ChangeLog ; \ else \ dh_installchangelogs ; \ fi override_dh_gencontrol-indep: dh_gencontrol if [ ! -d calib/cal ] ; then \ sed "s/Installed-Size:.*/Installed-Size: $(shell cat calib/cal_size)/" -i debian/${DEBPKGNAME}-calib/DEBIAN/control ; \ fi debian/create_sphinx.py0000644000000000000000000001516012260545160012400 0ustar #!/usr/bin/env python import cpl import os import sys import re rst_template = '''The {recipe} recipe =============================================================== .. data:: {recipe} Synopsis -------- {synopsis} Description ----------- {description} Constructor ----------- .. method:: cpl.Recipe("{recipe}") :noindex: Create an object for the recipe {recipe}. :: import cpl {recipe} = cpl.Recipe("{recipe}") {parameters} .. seealso:: `cpl.Recipe `_ for more information about the recipe object. Bug reports ----------- Please report any problems to `{author} <{email}>`_. Alternatively, you may send a report to the `ESO User Support Department `_. Copyright --------- {license} .. codeauthor:: {author} <{email}> ''' par_template = '''.. py:attribute:: {recipe}.param.{par} {description} [default={default}]. ''' fname_template ="{recipe}.rst" index_template = '''.. title:: Overview The {PIPELINE} {version} pipeline ################################### These pages describe the python interface for the {PIPELINE} pipeline recipes. {recipes} .. toctree:: :hidden: {toctree} .. seealso:: * The `{PIPELINE} Pipeline User Manual `_ in PDF format, * an `overview `_ over the existing ESO pipelines, * the `python-cpl `_ package. Bug reports =========== If you experience an unexpected behavior of any component of the {PIPELINE} pipeline recipes package, please, first refer to the list of known problems and limitations in the pipeline manual of the current {PIPELINE} pipeline release. For any other issues or requests, please, send a report to the `ESO User Support Department `_, describing: * the {PIPELINE} pipeline version, * the version of your OS and C compiler, * the exact sequence of actions that were performed before the problem occurred, * what were precisely the symptoms and the possible error message(s), * whether the problem is repeatable. ''' rst_partemplate = '''Parameters ---------- {pars} The following code snippet shows the default settings for the available parameters. :: import cpl {recipe} = cpl.Recipe("{recipe}") {pars_example1} You may also set or overwrite some or all parameters by the recipe parameter `param`, as shown in the following example: :: import cpl {recipe} = cpl.Recipe("{recipe}") [...] res = {recipe}( ..., param = {{{pars_example2}}}) ''' conf_template = '''project = u'{PIPELINE} pipeline' version = '{version}' release = '{version}' master_doc = 'index' show_authors = True html_theme = 'sphinxdoc' ''' pipeline = sys.argv[1] cpl.Recipe.path = "recipes" recipes = [ cpl.Recipe(name) for name, version in cpl.Recipe.list() ] oca = file(os.path.join("calib", "gasgano", "config", pipeline + ".oca")).read() oca = oca[oca.find("action"):] recipes_oca = [recipe for recipe in recipes if recipe.__name__ in oca] index = [ oca.find(recipe.__name__) for recipe in recipes_oca ] recipes_oca = [r for (i, r) in sorted(zip(index, recipes_oca))] recipes_x = [recipe for recipe in recipes if not recipe.__name__ in oca] recipes_x.sort() def par(recipe, template, delimiter = "", count = None): return delimiter.join(template.format( recipe = recipe.__name__, par = p.name.replace("-","_"), type = p.type.__name__, description = p.__doc__.replace("\n", " "), default = '"{0}"'.format(p.default) if p.type is str else p.default ) for i, p in enumerate(recipe.param) if count is None or i < count) def get_description(s): o = [] l = s.splitlines() enabled = True for i, s in enumerate(l): if "BASIC PARAMETERS" in s: enabled = False elif "Examples:" in s: enabled = False elif "Input files" in s: enabled = True o += ["Input files", "^^^^^^^^^^^^", "::"] if len(l[i+1]) != 0: o += [""] elif "Output files" in s: enabled = True o += ["Output files", "^^^^^^^^^^^^", "::"] if len(l[i+1]) != 0: o += [""] elif not enabled: continue elif "-"*40 in s: pass elif len(s) == 0: o += [ s ] elif s[-1] == ".": o += [ s, "" ] else: o += [ s ] return "\n".join(o) def rstpage(recipe, template, partemplate): return template.format( recipe = recipe.__name__, version = recipe.__version__, synopsis = recipe.description[0], description = get_description(recipe.description[1]), email = recipe.__email__, author = recipe.__author__, license = recipe.__copyright__, pipeline = pipeline, parameters = partemplate.format( recipe = recipe.__name__, pars = par(recipe, par_template), pars_example1 = par(recipe, ' {recipe}.param.{par} = {default}\n'), pars_example2 = par(recipe, '"{par}":{default}', ', ', 2) ) if len(recipe.param) > 0 else '' ) for recipe in recipes_oca + recipes_x: f = open(os.path.join("sphinx", fname_template.format(recipe = recipe.__name__)), "w") f.write(rstpage(recipe, rst_template, rst_partemplate)) f.close() if len(recipes_oca) > 0 and len(recipes_x) > 0: toc_recipes = "Standard recipes\n----------------\n" toc_recipes += "\n\n".join(":data:`{recipe}`\n {synopsis}".format( recipe = recipe.__name__, synopsis = recipe.description[0] ) for recipe in recipes_oca) if len(recipes_oca) > 0 and len(recipes_x) > 0: toc_recipes += "\n\nAdditional recipes\n--------------------\n" toc_recipes += "\n\n".join(":data:`{recipe}`\n {synopsis}".format( recipe = recipe.__name__, synopsis = recipe.description[0] ) for recipe in recipes_x) toc = "\n".join(" {recipe}".format( recipe = recipe.__name__ ) for recipe in recipes_oca + recipes_x) f = open(os.path.join("sphinx", "index.rst"), "w") f.write(index_template.format(toctree = toc, recipes = toc_recipes, pipeline = pipeline, PIPELINE = pipeline.upper(), version = recipes[0].__version__)) f.close() f = open(os.path.join("sphinx", "conf.py"), "w") f.write(conf_template.format(PIPELINE = pipeline.upper(), version = recipes[0].__version__)) f.close() debian/create_manpage.py0000644000000000000000000000710012260545160012472 0ustar #!/usr/bin/env python import cpl import os import sys import re man_template = '''.TH {NAME} "{section}" "{version}" "{name}" "{pipeline} recipes" .SH NAME {name} - {synopsis} .SH SYNOPSIS esorex .B {name} [OPTIONS] FILE.sof .SH DESCRIPTION {description} .SH OPTIONS {options} .PP Note that it is possible to create a configuration file containing these options, along with suitable default values. Please refer to the details provided by the 'esorex --help' command. .SH SEE ALSO The full documentation for the {pipeline} pipeline can be downloaded as a PDF file using the following URL: .IP .B ftp://ftp.eso.org/pub/dfs/pipelines/{pipeline}/{pipeline}-pipeline-manual-{version}.pdf .PP An overview over the existing ESO pipelines can be found on the web page \\fBhttp://www.eso.org/sci/software/pipelines/\\fR. .PP Basic documentation about the EsoRex program can be found at the esorex (1) man page. .PP It is possible to call the pipelines from python using the python-cpl package. See \\fBhttp://packages.python.org/python-cpl/index.html\\fR for further information. .PP The other recipes of the {pipeline} pipeline are {seealso} .SH VERSION {name} {version} .SH AUTHOR {author} <{email}> .SH BUG REPORTS Please report any problems to {email}. Alternatively, you may send a report to the ESO User Support Department . .SH LICENSE {license} ''' par_template = '''.TP \\fB--{name}\\fR \\fI<{type}>\\fR {description}. The full name of this option for the EsoRex configuration file is \\fB{fullname}\\fR [default = \\fI{default}\\fR]. ''' seealso_template = ".IR {name} ({section})" fname_template ="{name}.{section}" section = 7 pipeline = sys.argv[1] cpl.Recipe.path = "recipes" recipes = cpl.Recipe.list() def param(recipe, template): return "".join(template.format(name = p.name, fullname = p.fullname, type = p.type.__name__, description = p.__doc__.replace("'", "\\'"), default = p.default) for p in recipe.param) def seealso(recipe, template): return ",\n".join(template.format(name = name, section=section) for name,v in recipes if (name != recipe.__name__)) def manpage(recipe): description = recipe.description[1] description = re.sub("-"*40+"+", "", description) \ .replace(".\n", ".\n.PP\n").replace("'", "\\'") description = re.sub("\n([A-Z][A-Z 0-9]+):?\n----+", "\n.SS \\1", description) return man_template.format(name = recipe.__name__, NAME = recipe.__name__.upper(), section = section, version = recipe.__version__, synopsis = recipe.description[0], description = description, seealso = seealso(recipe, seealso_template), email = recipe.__email__, author = recipe.__author__, license = recipe.__copyright__, pipeline = pipeline, options = param(recipe, par_template)) for name, version in recipes: recipe = cpl.Recipe(name) f = open(os.path.join("man", fname_template.format(name = name, section=section)), "w") f.write(manpage(recipe).replace('-', '\\-')) f.close() debian/control0000644000000000000000000000421112260545160010570 0ustar Source: cpl-plugin-amber Section: science Priority: optional Maintainer: Debian Science Maintainers Uploaders: Ole Streicher Build-Depends: debhelper (>= 9), dh-autoreconf, libcpl-dev (>= 5.3.1), libfftw3-dev, python, python-cpl, python-pyfits, python-sphinx Standards-Version: 3.9.5 Homepage: http://www.eso.org/sci/software/pipelines/amber Vcs-Git: git://anonscm.debian.org/debian-science/packages/cpl-plugin-amber.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/cpl-plugin-amber.git Package: cpl-plugin-amber Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Recommends: esorex|python-cpl, cpl-plugin-amber-doc Suggests: cpl-plugin-amber-calib (= ${binary:Version}) Multi-Arch: same Description: ESO data reduction pipeline for AMBER This is the data reduction pipeline for the AMBER instrument of the Very Large Telescope (VLT) from the European Southern Observatory (ESO). . AMBER is a near-infrared, multi-beam interferometric instrument, combining simultaneously up to 3 telescopes. AMBER can be used in Period 82 and following with UTs or ATs (see below for current performance specifications). All possible triplets of UTs are available, and a number of selected AT combinations. Package: cpl-plugin-amber-doc Architecture: all Multi-Arch: foreign Depends: ${misc:Depends} Section: doc Description: ESO data reduction pipeline documentation for AMBER This package contains the HTML documentation and manpages for the data reduction pipeline for the AMBER instrument of the Very Large Telescope (VLT) from the European Southern Observatory (ESO). Package: cpl-plugin-amber-calib Architecture: all Depends: ${misc:Depends}, cpl-plugin-amber, wget Multi-Arch: foreign Section: contrib/science Description: ESO data reduction pipeline calibration data downloader for AMBER This package downloads calibration data of the data reduction pipeline for the AMBER instrument of the Very Large Telescope (VLT) from the European Southern Observatory (ESO). debian/README.Source0000644000000000000000000000053512260545160011311 0ustar The original -kit tar file contains a number of additional components which are not DFSG-free (namely gasgano), or already included in Debian (like cpl, esorex, and additional libraries). Only the pipeline sources and calibration files are extracted from this -kit tar file. -- Ole Streicher Tue, 01 Dec 2013 09:18:46 +0100 debian/repackage.sh0000755000000000000000000000376112260545160011457 0ustar #!/bin/sh # # The ESO pipeline packages come in the form of a "kit" containing all # packages needed to build the pipeline. This also includes some non-free # packages like Gasgano. # To allow the pipelines to be put to Debian "main", and to have a more # convienient build process, we extract just the source package. # # Debian package name ("cpl-plugin-fors") DEBIAN_PACKAGE=$(echo $(basename $3) | cut -d_ -f1) # Pipeline name ("fors") PIPELINE=$(echo ${DEBIAN_PACKAGE} | cut -d- -f3-) # Version number ("4.9.4") VERSION=$2 # Include full calibration set? # If not, the "calib" package will act as a "downloader" package for the # calibration files. INCLUDE_CALIB="no" #INCLUDE_CALIB="yes" # Include test data? # If not, the test (fits) data are removed from the source package. # In this case, also the tests need to be adjusted. #INCLUDE_TEST_DATA="no" INCLUDE_TEST_DATA="yes" BASEDIR=$(dirname $3) FILENAME=${BASEDIR}/${PIPELINE}-kit-${VERSION}.tar.gz tar xf ${FILENAME} -C ${BASEDIR} rm -f ${BASEDIR}/${DEBIAN_PACKAGE}_${VERSION}.orig*.tar.* ${FILENAME} TAREXCLUDE="--exclude ${PIPELINE}-${VERSION}/html" if [ $INCLUDE_TEST_DATA = "no" ] ; then TAREXCLUDE=${TAREXCLUDE}" --exclude ${PIPELINE}-${VERSION}/*/tests/ref_data" fi tar xf ${BASEDIR}/${PIPELINE}-kit-${VERSION}/${PIPELINE}-${VERSION}.tar.gz\ -C ${BASEDIR} ${TAREXCLUDE} tar xf ${BASEDIR}/${PIPELINE}-kit-${VERSION}/${PIPELINE}-calib-${VERSION}.tar.gz\ -C ${BASEDIR}/${PIPELINE}-${VERSION}/ mv ${BASEDIR}/${PIPELINE}-${VERSION}/${PIPELINE}-calib-${VERSION}/ \ ${BASEDIR}/${PIPELINE}-${VERSION}/calib/ if [ $INCLUDE_CALIB = "no" ] ; then du -s ${BASEDIR}/${PIPELINE}-${VERSION}/calib/cal | cut -f1 \ > ${BASEDIR}/${PIPELINE}-${VERSION}/calib/cal_size rm -rf ${BASEDIR}/${PIPELINE}-${VERSION}/calib/cal fi tar cJf ${BASEDIR}/${DEBIAN_PACKAGE}_${VERSION}+dfsg.orig.tar.xz \ -C ${BASEDIR} ${PIPELINE}-${VERSION}/ rm -rf ${BASEDIR}/${PIPELINE}-${VERSION}/ rm -rf ${BASEDIR}/${PIPELINE}-kit-${VERSION}/ exec uupdate --no-symlink "$@" debian/cpl-plugin-doc.manpages.in0000644000000000000000000000001112260545160014116 0ustar man/*.7 debian/README.Debian.in0000644000000000000000000000034612260545160011640 0ustar Due to their size, static calibration files are not included. Installing the "calib" subpackage will download the corresponding files from the ESO archive. -- Ole Streicher Fri, 13 Sep 2013 18:50:00 +0200 debian/compat0000644000000000000000000000000212260545160010365 0ustar 9 debian/cpl-plugin-calib.lintian-overrides.in0000644000000000000000000000016512260545160016300 0ustar # The calibration file installer is an empty package on purpose. cpl-plugin-__PIPELINE__-calib: empty-binary-package debian/watch0000644000000000000000000000022012260545160010212 0ustar version=3 opts=dversionmangle=s/\+dfsg// \ http://www.eso.org/sci/software/pipelines/ \ .*/amber-kit-(.*).tar.gz \ debian debian/repackage.sh debian/cpl-plugin-calib.postinst.in0000644000000000000000000000075112260545160014526 0ustar #!/bin/sh set -e PIPELINE=__PIPELINE__ VERSION=__VERSION__ KIT=${PIPELINE}-kit-${VERSION} CALIB=${PIPELINE}-calib-${VERSION} URL=ftp://ftp.eso.org/pub/dfs/pipelines/${PIPELINE}/${KIT}.tar.gz TAR=${KIT}/${CALIB}.tar.gz COMPONENTS="${CALIB}/cal" TARGETDIR="/usr/share/cpl-plugins/${PIPELINE}-${VERSION}" if [ "$1" = "configure" ] ; then mkdir -p ${TARGETDIR} wget -O- ${URL} | \ tar xzO ${TAR} | \ tar xzC ${TARGETDIR} ${COMPONENTS} --strip-components=1 fi #DEBHELPER# debian/cpl-plugin.install.in0000644000000000000000000000020012260545160013226 0ustar usr/lib/* calib/dic usr/share/cpl-plugins/__PIPELINE__-__VERSION__ calib/gasgano usr/share/cpl-plugins/__PIPELINE__-__VERSION__ debian/cpl-plugin-calib.install.in0000644000000000000000000000007112260545160014304 0ustar calib/cal usr/share/cpl-plugins/__PIPELINE__-__VERSION__ debian/copyright0000644000000000000000000000202012260545160011114 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: amber Upstream-Contact: ESO User Support Department Source: ftp://ftp.eso.org/pub/dfs/pipelines/amber/ Files: * Copyright: Copyright (C) 2001-2012 European Southern Observatory, Copyright (C) Centre National de la Recherche Scientifique (CNRS), 2013 Ole Streicher (Debian packaging) License: GPL-v2+ 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 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. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/patches/0000755000000000000000000000000012260545160010616 5ustar debian/patches/propagate_cppflags.patch0000644000000000000000000000055612260545160015506 0ustar Author: Ole Streicher Description: Propagate CPPFLAGS to allow hardening --- a/amber/Makefile.am +++ b/amber/Makefile.am @@ -41,7 +41,7 @@ #LIBFFTW3=/home/agabasch/cpl/lib/libfftw3.la -CPPFLAGS = -DCX_LOG_DOMAIN=\"AmberLib\" +AM_CPPFLAGS = -DCX_LOG_DOMAIN=\"AmberLib\" INCLUDES = $(CFITSIO_INCLUDES) $(FFTW_INCLUDES) $(all_includes) debian/patches/series0000644000000000000000000000017512260545160012036 0ustar libadd_cpl.patch set_plugindir.patch use-std-paths-for-cpl.patch format_security.patch propagate_cppflags.patch serial-tests debian/patches/set_plugindir.patch0000644000000000000000000000062512260545160014512 0ustar Author: Ole Streicher Description: Set the plugin directory so that esorex and python-cpl can find it. --- a/acinclude.m4 +++ b/acinclude.m4 @@ -91,7 +91,7 @@ [ if test -z "$plugindir"; then - plugindir='${libdir}/esopipes-plugins/${PACKAGE}-${VERSION}' + plugindir='${libdir}/cpl/plugins/${PACKAGE}-${VERSION}' fi if test -z "$privatelibdir"; then debian/patches/libadd_cpl.patch0000644000000000000000000000721312260545160013717 0ustar Author: Ole Streicher Description: Add the cpl libraries to the recips.so and the test program --- a/recipes/Makefile.am +++ b/recipes/Makefile.am @@ -40,74 +40,74 @@ amber_p2vm_la_SOURCES = amber_p2vm.c -amber_p2vm_la_LIBADD = $(LIBAMBER) +amber_p2vm_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_p2vm_la_LDFLAGS = -module -avoid-version amber_p2vm_la_DEPENDENCIES = $(LIBAMBER) amber_spectral_calibration_la_SOURCES = amber_spectral_calibration.c -amber_spectral_calibration_la_LIBADD = $(LIBAMBER) +amber_spectral_calibration_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_spectral_calibration_la_LDFLAGS = -module -avoid-version amber_spectral_calibration_la_DEPENDENCIES = $(LIBAMBER) amber_raw_to_fitsimage_la_SOURCES = amber_raw_to_fitsimage.c -amber_raw_to_fitsimage_la_LIBADD = $(LIBAMBER) +amber_raw_to_fitsimage_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_raw_to_fitsimage_la_LDFLAGS = -module -avoid-version amber_raw_to_fitsimage_la_DEPENDENCIES = $(LIBAMBER) amber_SciCal_la_SOURCES = amber_SciCal.c -amber_SciCal_la_LIBADD = $(LIBAMBER) +amber_SciCal_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_SciCal_la_LDFLAGS = -module -avoid-version amber_SciCal_la_DEPENDENCIES = $(LIBAMBER) amber_selector_la_SOURCES = amber_selector.c -amber_selector_la_LIBADD = $(LIBAMBER) +amber_selector_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_selector_la_LDFLAGS = -module -avoid-version amber_selector_la_DEPENDENCIES = $(LIBAMBER) #amber_divider_la_SOURCES = amber_divider.c # -#amber_divider_la_LIBADD = $(LIBAMBER) +#amber_divider_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) #amber_divider_la_LDFLAGS = -module -avoid-version #amber_divider_la_DEPENDENCIES = $(LIBAMBER) amber_detector_la_SOURCES = amber_detector.c -amber_detector_la_LIBADD = $(LIBAMBER) +amber_detector_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_detector_la_LDFLAGS = -module -avoid-version amber_detector_la_DEPENDENCIES = $(LIBAMBER) amber_BeamPos_la_SOURCES = amber_BeamPos.c -amber_BeamPos_la_LIBADD = $(LIBAMBER) +amber_BeamPos_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_BeamPos_la_LDFLAGS = -module -avoid-version amber_BeamPos_la_DEPENDENCIES = $(LIBAMBER) amber_ascii_export_la_SOURCES = amber_ascii_export.c -amber_ascii_export_la_LIBADD = $(LIBAMBER) +amber_ascii_export_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_ascii_export_la_LDFLAGS = -module -avoid-version amber_ascii_export_la_DEPENDENCIES = $(LIBAMBER) amber_trf_la_SOURCES = amber_trf.c -amber_trf_la_LIBADD = $(LIBAMBER) +amber_trf_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_trf_la_LDFLAGS = -module -avoid-version amber_trf_la_DEPENDENCIES = $(LIBAMBER) amber_calibrate_la_SOURCES = amber_calibrate.c -amber_calibrate_la_LIBADD = $(LIBAMBER) +amber_calibrate_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) amber_calibrate_la_LDFLAGS = -module -avoid-version amber_calibrate_la_DEPENDENCIES = $(LIBAMBER) amber_oimerge_la_SOURCES = amber_oimerge.c -amber_oimerge_la_LIBADD = $(LIBAMBER) +amber_oimerge_la_LIBADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI) $(LIBCFITSIO) amber_oimerge_la_LDFLAGS = -module -avoid-version amber_oimerge_la_DEPENDENCIES = $(LIBAMBER) --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -32,7 +32,7 @@ LIBAMBER = $(top_builddir)/amber/libamber.la INCLUDES = -I$(top_builddir)/amber -LDADD = $(LIBAMBER) +LDADD = $(LIBAMBER) $(LIBCPLCORE) $(LIBCPLUI) check_PROGRAMS = debian/patches/use-std-paths-for-cpl.patch0000644000000000000000000000514112260545160015701 0ustar Author: Ole Streicher Description: Use standard path and name for cpl --- a/m4macros/cpl.m4 +++ b/m4macros/cpl.m4 @@ -9,7 +9,7 @@ cpl_cfitsio_check_version="$1" cpl_cfitsio_check_header="fitsio.h" - cpl_cfitsio_check_lib="libcfitsio.a" + cpl_cfitsio_check_lib="libcfitsio.so" cpl_cfitsio_incdirs="" cpl_cfitsio_libdirs="" @@ -110,7 +110,7 @@ cpl_cfitsio_libdirs="$cpl_cfitsio_libdirs /usr/lib64" cpl_cfitsio_libdirs="$cpl_cfitsio_libdirs /usr/lib" cpl_cfitsio_libdirs="$cpl_cfitsio_libdirs /usr/lib32" - + cpl_cfitsio_libdirs="$cpl_cfitsio_libdirs /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" test -n "$CFITSIODIR" && \ cpl_cfitsio_libdirs="$CFITSIODIR/lib64 $CFITSIODIR/lib \ $CFITSIODIR/lib32 $cpl_cfitsio_libdirs" @@ -492,6 +492,7 @@ cpl_cext_libdirs="$cpl_cext_libdirs /usr/lib64" cpl_cext_libdirs="$cpl_cext_libdirs /usr/lib" cpl_cext_libdirs="$cpl_cext_libdirs /usr/lib32" + cpl_cext_libdirs="$cpl_cext_libdirs /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" test -n "$CPLDIR" && \ cpl_cext_libdirs="$CPLDIR/lib64 \ @@ -678,6 +679,7 @@ cpl_wcs_libdirs="$cpl_wcs_libdirs /usr/lib64" cpl_wcs_libdirs="$cpl_wcs_libdirs /usr/lib" cpl_wcs_libdirs="$cpl_wcs_libdirs /usr/lib32" + cpl_wcs_libdirs="$cpl_wcs_libdirs /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" test -n "$WCSDIR" && \ cpl_wcs_libdirs="$WCSDIR/lib64 \ @@ -912,6 +914,7 @@ cpl_fftw_libdirs="$cpl_fftw_libdirs /usr/lib64" cpl_fftw_libdirs="$cpl_fftw_libdirs /usr/lib" cpl_fftw_libdirs="$cpl_fftw_libdirs /usr/lib32" + cpl_fftw_libdirs="$cpl_fftw_libdirs /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" test -n "$FFTWDIR" && \ cpl_fftw_libdirs="$FFTWDIR/lib64 \ @@ -1250,7 +1253,7 @@ AC_MSG_CHECKING([for CPL]) cpl_check_cpl_header="cpl.h" - cpl_check_cpl_lib="libcplcore.a" + cpl_check_cpl_lib="libcplcore.so" cpl_incdirs="" cpl_libdirs="" @@ -1327,6 +1330,7 @@ cpl_libdirs="$cpl_libdirs /usr/lib64" cpl_libdirs="$cpl_libdirs /usr/lib" cpl_libdirs="$cpl_libdirs /usr/lib32" + cpl_libdirs="$cpl_libdirs /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" test -n "$CPLDIR" && \ cpl_libdirs="$CPLDIR/lib64 $CPLDIR/lib $CPLDIR/lib32 \ debian/patches/serial-tests0000644000000000000000000000143112260545160013157 0ustar Author: Ole Streicher Description: Force serial-tests to get better verbose output Bug: http://bugs.debian.org/715204 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,7 +17,7 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -AUTOMAKE_OPTIONS = 1.8 foreign +AUTOMAKE_OPTIONS = 1.13 foreign serial-tests DISTCLEANFILES = *~ --- a/regtests/tests/Makefile.am +++ b/regtests/tests/Makefile.am @@ -17,7 +17,7 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA -AUTOMAKE_OPTIONS = 1.8 foreign +AUTOMAKE_OPTIONS = 1.13 foreign serial-tests DISTCLEANFILES = *~ debian/patches/format_security.patch0000644000000000000000000020032212260545160015055 0ustar Author: Ole Streicher Description: Fix a number of non-static format strings --- a/amber/esolibSelector.c +++ b/amber/esolibSelector.c @@ -2128,7 +2128,7 @@ /* sprintf( szMessage, "cpl_frame_set (\"%s\")", cpl_frame_get_filename(pframeSCIENCE[iProductNumber]) ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ /* @@ -2152,7 +2152,7 @@ /* sprintf( szMessage, "Extracting product header from file %s.", szRawFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ pHeader = cpl_propertylist_load( szRawFile, 0 ); @@ -2173,7 +2173,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } #else @@ -2188,7 +2188,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } #endif @@ -2217,7 +2217,7 @@ /* sprintf( szMessage, "Creating product file %s...", szFilenameProduct ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ /* @@ -2407,7 +2407,7 @@ } /*sprintf( szMessage, "%d", iStatus ); - cpl_msg_info( fctid, szMessage );*/ + cpl_msg_info( fctid, "%s", szMessage );*/ /* 1 seems to be a warning ?!? */ if( iStatus == amdlibSUCCESS /* || iStatus == 1*/ ) @@ -2418,17 +2418,17 @@ sprintf ( szMessage, "Status: %d for input file %s [%s]", iStatus, szFilnameOI, errMsg ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Count number of frames */ iTotal = vis.nbFrames * vis.nbBases; sprintf( szMessage, "Number of Frames = %d giving %d Visibilities", iTotal / vis.nbBases, iTotal ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Count frames for Photometry and Piston */ sprintf( szMessage, "Photometry: %d / Piston: %d", photometry.nbFrames, pst.nbFrames ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Count Frames with Fringe SNR greater than xxx */ @@ -2466,7 +2466,7 @@ if (amdlibGetBand(wave.wlen[wave.nbWlen-1]) != band) { sprintf ( szMessage, "Sorry, frame selection is only possible for one band. This data contains more than one band" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 666; } */ @@ -2522,7 +2522,7 @@ /* Frame selection */ { sprintf( szMessage, "Now selecting ..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdlibAllocateSelection( &selectedFrames, vis.nbFrames,vis.nbBases,errMsg ); @@ -2534,7 +2534,7 @@ SetupSelected( iInclude, &selectedFrames, &vis , band); sprintf( szMessage, "All frames have been selected for testing purpose." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Method 2 */ @@ -2547,7 +2547,7 @@ iStatus = 5; sprintf( szMessage, "This method does not allow thresholds less or equal to zero." ); - cpl_msg_error( fctid, szMessage ); + cpl_msg_error( fctid, "%s", szMessage ); } if( !iStatus ) @@ -2607,7 +2607,7 @@ iStatus = 5; sprintf( szMessage, "This method does not allow thresholds less to zero or larger than 100" ); - cpl_msg_error( fctid, szMessage ); + cpl_msg_error( fctid, "%s", szMessage ); } if( !iStatus ) @@ -2982,7 +2982,7 @@ SetupSelected( iInclude, &selectedFrames, &vis ,band); sprintf( szMessage, "All frames have been selected for testing purpose." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Method 1 */ @@ -2995,7 +2995,7 @@ iStatus = 5; sprintf( szMessage, "This method does not allow thresholds less or equal to zero." ); - cpl_msg_error( fctid, szMessage ); + cpl_msg_error( fctid, "%s", szMessage ); } if( fThreshold[0] > vis.nbFrames ) @@ -3004,7 +3004,7 @@ iStatus = 6; sprintf( szMessage, "This method does not allow thresholds greater than the total number of frames." ); - cpl_msg_error( fctid, szMessage ); + cpl_msg_error( fctid, "%s", szMessage ); } if( !iStatus ) @@ -3042,7 +3042,7 @@ SetupSelected( iInclude, &selectedFrames, &vis, band ); sprintf( szMessage, "Default selection for ASCII file done..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Open the ASCII file */ fp = fopen( szASCII, "rt" ); @@ -3062,7 +3062,7 @@ { /* sprintf( szMessage, "Found Frame %d in File %s.", iSelFrame, szASCII ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ for( base = 0; base < vis.nbBases; base++ ) @@ -3076,7 +3076,7 @@ else { sprintf( szMessage, "Warning: Frame %d is out of Range and has been ignored.", iSelFrame ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } } /* end of file ? */ @@ -3086,7 +3086,7 @@ else { sprintf( szMessage, "Error: The File %s has not been found.", szASCII ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 1; } @@ -3108,7 +3108,7 @@ iStatus = 5; sprintf( szMessage, "This method does not allow thresholds less to zero." ); - cpl_msg_error( fctid, szMessage ); + cpl_msg_error( fctid, "%s", szMessage ); } if( !iStatus ) @@ -3173,7 +3173,7 @@ iStatus = 5; sprintf( szMessage, "This method does not allow thresholds less than zero or larger than 100" ); - cpl_msg_error( fctid, szMessage ); + cpl_msg_error( fctid, "%s", szMessage ); } if( !iStatus ) @@ -3303,7 +3303,7 @@ /*----------------------------------------------------------------------------------------*/ /* Loop through frames and count good ones */ sprintf( szMessage, "Counting the frames that passed the filtering..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iFittingFrame = 0; for (iFrame = 0; iFrame < vis.nbFrames && !iStatus; iFrame++) { @@ -3329,7 +3329,7 @@ if( !iStatus && iFittingFrame && iAverage ) { sprintf( szMessage, "Averaging the remaining %d frames...", iFittingFrame ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibAverageVisibilities( &photometry, &vis, &vis2, &vis3, @@ -3345,11 +3345,11 @@ strcpy( szMessage, "----------------------------------------------------------------------------" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); sprintf( szMessage, "%d Frames = %d Visibilities passed the Filter = %.02f Percent", iFramesLeft, iFittingFrame, 100.0 * (float)iFittingFrame / (float)iTotal ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); strcpy( szMessage, "----------------------------------------------------------------------------" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( iStatus == 0 ) @@ -3359,7 +3359,7 @@ if( iFittingFrame == 0 ) { sprintf( szMessage, "No Frames passed! Please check the filtering Criteria!!" ); - cpl_msg_warning( fctid, szMessage ); + cpl_msg_warning( fctid, "%s", szMessage ); iStatus = 4; } @@ -3368,7 +3368,7 @@ if( strcmp( szMethod, selMethod1 ) ) { sprintf( szMessage, "For all frames: lowest Fringe SNR is %0.4f and highest is %0.4f", dLowSNR, dHighSNR ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } #endif @@ -3437,7 +3437,7 @@ /* sprintf ( szMessage, "Now writing filtered Scientific Data to %s...", szProductfile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ @@ -3450,7 +3450,7 @@ { iStatus = 3; sprintf ( szMessage, "ERROR saving Scientific Data to %s. [%s]", szProductfile, errMsg ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } @@ -3540,7 +3540,7 @@ /* not an AMBER file */ iStatus = 2; sprintf ( szMessage, "ERROR: Cannot read [%s]. OI table structure is not from AMBER or the file has been corrupted. [%s]", szFilnameOI, errMsg ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } } else /* found fitting frame ? */ @@ -3548,7 +3548,7 @@ /* no fitting frame */ iStatus = 1; sprintf ( szMessage, "ERROR: Please input one file with either SCIENCE_REDUCED or CALIB_REDUCED." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } @@ -3556,7 +3556,7 @@ { /* sprintf( szMessage, "cpl_frame_insert [%s]", cpl_frame_get_filename(pFrame ) ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ cpl_frameset_insert( framelist, pFrame ); @@ -3571,7 +3571,7 @@ } /* sprintf ( szMessage, "Status: %d for %s", iStatus, szProductfile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ cpl_msg_info( fctid, "End of DataReduction"); --- a/recipes/amber_p2vm.c +++ b/recipes/amber_p2vm.c @@ -287,7 +287,7 @@ sprintf( szMessage, "Extracting Header from file %s.", szRawFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); @@ -311,7 +311,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_msg_error(cpl_func,"Error in cpl_dfs_setup_product_header: %s %s", cpl_error_get_message(),cpl_error_get_where()); iStatus = 16; @@ -328,7 +328,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_msg_error(cpl_func,"Error in cpl_dfs_setup_product_header: %s %s", cpl_error_get_message(),cpl_error_get_where()); iStatus = 16; @@ -351,7 +351,7 @@ */ sprintf( szMessage, "Creating Product %s...", szFilenameProduct ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* * Workaround: @@ -389,7 +389,7 @@ sprintf( szMessage, "Writing Product Header..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 0; if (CPL_ERROR_NONE != cpl_image_save(NULL, szFilenameProduct, @@ -442,7 +442,7 @@ /* If a bad pixel file has been specified */ sprintf( szMessage, "Loading BAD PIXEL MAP %s ...", badPixelFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if ((badPixelFile != NULL) && (strlen(badPixelFile) != 0)) { /* Load it */ @@ -456,7 +456,7 @@ /* Load flat field map */ sprintf( szMessage, "Loading FLAT FIELD %s ...", flatFieldFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( (flatFieldFile != NULL) && (strlen(flatFieldFile) != 0)) { @@ -488,7 +488,7 @@ /* Load raw data */ sprintf( szMessage, "Loading P2VM file %s ...", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibLoadRawData(inputFiles[i], &rawData, errMsg) != amdlibSUCCESS) { printf ("Could not load raw data file '%s'\n", inputFiles[i]); @@ -507,7 +507,7 @@ { sprintf( szMessage, "Computing Pixel Bias Map for P2VM file %s ...", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Compute pixel bias map */ if (amdlibGenerateDarkData(&rawData, &dark, errMsg) @@ -524,7 +524,7 @@ int p; sprintf( szMessage, "Equalizing P2VM file %s ...", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Equalize raw data */ if( amdlibCalibrateRawData( &dark, &rawData, errMsg) @@ -541,7 +541,7 @@ { sprintf( szMessage, "Data in file %s is saturated!", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Get wave data from the first given file ??? check this - @@ -568,14 +568,14 @@ } sprintf( szMessage, "Set new spectral Calibration." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); waveDataLoaded = amdlibTRUE; } /* Store calibrated data into P2VM data structure */ sprintf( szMessage, "Adding P2VM file %s ...", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibAddToP2vmData( &rawData, &waveData, &p2vmData, errMsg) != amdlibSUCCESS) { @@ -595,7 +595,7 @@ /* Compute P2VM */ sprintf( szMessage, "Computing P2VM ..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibComputeP2VM( &p2vmData, amdlibP2VM_3T, &waveData, &p2vm, errMsg) == amdlibFAILURE) @@ -609,7 +609,7 @@ amdlibReleaseP2vmData(&p2vmData); sprintf( szMessage, "Saving P2VM %s...", p2vmFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibSaveP2VM( p2vmFile, &p2vm, amdlibP2VM_UNKNOWN_ACC, errMsg) == amdlibFAILURE ) @@ -652,7 +652,7 @@ /* If a bad pixel file has been specified */ sprintf( szMessage, "Loading BAD PIXEL MAP %s ...", badPixelFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if ((badPixelFile != NULL) && (strlen(badPixelFile) != 0)) { /* Load it */ @@ -666,7 +666,7 @@ /* Load flat field map */ sprintf( szMessage, "Loading FLAT FIELD %s ...", flatFieldFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( (flatFieldFile != NULL) && (strlen(flatFieldFile) != 0)) { @@ -698,7 +698,7 @@ /* Load raw data */ sprintf( szMessage, "Loading P2VM file %s ...", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibLoadRawData(inputFiles[i], &rawData, errMsg) != amdlibSUCCESS) { printf ("Could not load raw data file '%s'\n", inputFiles[i]); @@ -717,7 +717,7 @@ { sprintf( szMessage, "Computing Pixel Bias Map for P2VM file %s ...", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Compute pixel bias map */ if (amdlibGenerateDarkData(&rawData, &dark, errMsg) @@ -734,7 +734,7 @@ int p; sprintf( szMessage, "Equalizing P2VM file %s ...", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Equalize raw data */ if( amdlibCalibrateRawData( &dark, &rawData, errMsg) @@ -751,7 +751,7 @@ { sprintf( szMessage, "Data in file %s is saturated!", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Get wave data from the first given file ??? check this @@ -778,14 +778,14 @@ } sprintf( szMessage, "Set new spectral Calibration." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); waveDataLoaded = amdlibTRUE; } /* Store calibrated data into P2VM data structure */ sprintf( szMessage, "Adding P2VM file %s ...", inputFiles[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibAddToP2vmData( &rawData, &waveData, &p2vmData, errMsg) != amdlibSUCCESS) { @@ -805,7 +805,7 @@ /* Compute P2VM */ sprintf( szMessage, "Computing P2VM ..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibComputeP2VM( &p2vmData, amdlibP2VM_2T, &waveData, &p2vm, errMsg) == amdlibFAILURE) @@ -819,7 +819,7 @@ amdlibReleaseP2vmData(&p2vmData); sprintf( szMessage, "Saving P2VM %s...", p2vmFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibSaveP2VM( p2vmFile, &p2vm, amdlibP2VM_UNKNOWN_ACC, errMsg) == amdlibFAILURE ) @@ -1214,7 +1214,7 @@ strcpy( szFilenameFlat, pszFilename ); sprintf ( szMessage, "FLAT FIELD identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } cur_frame = cpl_frameset_find( framelist, "AMBER_BADPIX" ); @@ -1228,7 +1228,7 @@ strcpy( szFilenameBadPix, pszFilename ); sprintf ( szMessage, "BAD PIXEL MAP identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Do not continue without BADPIX and FALTFIELD */ @@ -1237,7 +1237,7 @@ iStatus = 2; sprintf ( szMessage, "Support Frames needed: AMBER_BADPIX and " "AMBER_FLAT." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Close the amdlib logfile */ //if( fp ) @@ -1257,7 +1257,7 @@ { sprintf (szMessage, "Error: 10 Frames of type AMBER_3P2V are needed" " or 5 Frames of type AMBER_2P2V are needed", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 666; } @@ -1274,7 +1274,7 @@ */ sprintf ( szMessage, "Searching for Spectral Calibration (WAVE) Files... " "(current status = %d)", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cur_frame = cpl_frameset_get_first( framelist ); @@ -1293,7 +1293,7 @@ /* Add to Framelist */ sprintf ( szMessage, "%d. 3WAVE identified %s", i3TelFrames+1, pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); strcpy( szFilenameInWAVE[i3TelFrames], pszFilename ); i3TelFrames++; } @@ -1308,7 +1308,7 @@ /* Add to Framelist */ sprintf ( szMessage, "%d. 2WAVE identified %s", i2TelFrames+1, pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); strcpy( szFilenameInWAVE[i2TelFrames], pszFilename ); i2TelFrames++; } @@ -1324,12 +1324,12 @@ if( i3TelFrames == 4 && !iStatus ) { sprintf (szMessage, "Computing new Spectral Calibration for 3 Telecopes"); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /*sprintf ( szMessage, "[%s][%s][%s][%s][%s][%s]", * szFilenameBadPix, szFilenameFlat, szFilenameInWAVE[0], * szFilenameInWAVE[1], szFilenameInWAVE[2], szFilenameInWAVE[3] ); - cpl_msg_info( fctid, szMessage ); */ + cpl_msg_info( fctid, "%s", szMessage ); */ if (amdlibComputeSpectralCalibration3T(szFilenameBadPix, szFilenameFlat, @@ -1339,7 +1339,7 @@ { iStatus = 5; sprintf ( szMessage, "Could not compute Spectral Calibration" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } else { @@ -1363,7 +1363,7 @@ { sprintf ( szMessage, "Computing new Spectral Calibration for 2 " "Telecopes (%s)...", szFilenameWave ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibComputeSpectralCalibration2T(szFilenameBadPix, szFilenameFlat, szFilenameInWAVE[0], szFilenameInWAVE[1], szFilenameInWAVE[2], @@ -1395,7 +1395,7 @@ sprintf ( szMessage, "No new Spectral Calibration computed " "(no 4 AMBER_WAVE files!). " "Using Calibration from DET1-Key in Header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* @@ -1405,7 +1405,7 @@ */ sprintf ( szMessage, "Searching for 3P2V and 2P2V Files..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); i3TelFrames = 0; i2TelFrames = 0; @@ -1425,7 +1425,7 @@ { /* Add to Framelist */ sprintf ( szMessage, "3P2V identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); strcpy( szFilenameInP2VM[i3TelFrames], pszFilename ); i3TelFrames++; } @@ -1439,7 +1439,7 @@ { /* Add to Framelist */ sprintf ( szMessage, "2P2V identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); strcpy( szFilenameInP2VM[i2TelFrames], pszFilename ); i2TelFrames++; } @@ -1459,11 +1459,11 @@ /* Now make a DMD Product */ sprintf ( szMessage, "Create file and write header..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); CreateProduct(fctid,szFilenameInP2VM[0],szFilenameP2VM,zeroframes); sprintf ( szMessage, "Now computing P2VM for 3 Telescopes..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if(amdlibComputeP2vm3T_ESO(szFilenameBadPix, szFilenameFlat, szFilenameInP2VM[0],szFilenameInP2VM[1],szFilenameInP2VM[2], @@ -1475,13 +1475,13 @@ ) { sprintf ( szMessage, "P2VM not computed due to errors." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 4; } else { sprintf ( szMessage, "P2VM produced: %s.", szFilenameP2VM ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 0; iWriteQC = 1; @@ -1493,7 +1493,7 @@ { iStatus = 3; sprintf ( szMessage, "10 Frames of type AMBER_3P2V are needed." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } if( i2TelFrames == 5 ) @@ -1502,11 +1502,11 @@ /* Now make a DMD Product */ sprintf ( szMessage, "Create file and write header..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); CreateProduct(fctid,szFilenameInP2VM[0],szFilenameP2VM,zeroframes); sprintf ( szMessage, "Now computing P2VM for 2 Telescopes..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibComputeP2vm2T_ESO( szFilenameBadPix, szFilenameFlat, szFilenameInP2VM[0],szFilenameInP2VM[1],szFilenameInP2VM[2], szFilenameInP2VM[3],szFilenameInP2VM[4], @@ -1516,13 +1516,13 @@ ) { sprintf ( szMessage, "P2VM not computed due to errors." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 4; } else { sprintf ( szMessage, "P2VM produced: %s.", szFilenameP2VM ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 0; iWriteQC = 1; @@ -1535,7 +1535,7 @@ { iStatus = 3; sprintf ( szMessage, "5 Frames of type AMBER_2P2V are needed." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } } @@ -1544,7 +1544,7 @@ iStatus = 2; sprintf (szMessage,"Support Frames needed: " "AMBER_BADPIX and AMBER_FLAT." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* No Flat of BadPix */ /* Close the amdlib logfile */ @@ -1571,7 +1571,7 @@ if( iWriteQC ) { sprintf ( szMessage, "Writing QC log file." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Reload the file to get the header */ @@ -1611,7 +1611,7 @@ else { sprintf ( szMessage, "Error: Could not write QC log file." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 1; } --- a/recipes/amber_raw_to_fitsimage.c +++ b/recipes/amber_raw_to_fitsimage.c @@ -363,7 +363,7 @@ */ sprintf( szMessage, "Extracted Header from file %s.", pszInfile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Create a set of frames with just this frame, so header will be correct */ /* frameSetTmp = cpl_frameset_new(); */ @@ -409,7 +409,7 @@ sprintf( szMessage, "Warning: problem with product header. [%s]", cpl_error_get_where() ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* cpl_msg_info(cpl_func, cpl_error_get_message()); */ iStatus = 16; } @@ -426,7 +426,7 @@ /* Error */ sprintf( szMessage, "Warning: problem with product header. [%s]", cpl_error_get_where() ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } #endif @@ -461,7 +461,7 @@ ----------- */ sprintf ( szMessage, "Status: %d for %s", iStatus, szProduct ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_msg_info( fctid, "End of DataReduction"); --- a/recipes/amber_SciCal.c +++ b/recipes/amber_SciCal.c @@ -303,7 +303,7 @@ /* sprintf( szMessage, "cpl_frame_set (\"%s\")", cpl_frame_get_filename(pframeSCIENCE[iProductNumber]) ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ /* @@ -326,7 +326,7 @@ */ pHeader = cpl_propertylist_load( szRawFile, 0 ); sprintf( szMessage, "Extracting product header from file %s for target named %s [%s].", szRawFile, cpl_propertylist_get_string( pHeader, "ESO OBS NAME" ), cpl_error_get_message() ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /*The ARCFILE is needed for the paf file in the selector and trf products*/ if (cpl_propertylist_has(pHeader, "ARCFILE") == 1) @@ -366,7 +366,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } #else @@ -381,7 +381,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } #endif @@ -389,7 +389,7 @@ sprintf( szMessage, "Header from file %s for target named %s [%s].", szRawFile, cpl_propertylist_get_string( pHeader, "ESO OBS NAME" ), cpl_error_get_message() ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Destroy tmpFrameset and implicitly its contents */ cpl_frameset_delete( frameSetTmp ); @@ -403,7 +403,7 @@ iError = CPL_ERROR_NONE; sprintf( szMessage, "Creating product file%s...", szFilenameProduct ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* * Workaround: @@ -462,34 +462,34 @@ /* Load bad pixel map */ sprintf( szMessage, "Loading BAD PIXEL MAP %s ...", badPixelFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibLoadBadPixelMap( badPixelFile, errMsg) != amdlibSUCCESS) { printf ("Could not load bad pixel map '%s'\n", badPixelFile); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } /* Load flat field map */ sprintf( szMessage, "Loading FLAT FIELD %s ...", flatFieldFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibLoadFlatFieldMap( flatFieldFile, errMsg)!=amdlibSUCCESS) { printf ("Could not load Flat Field file '%s'n", flatFieldFile); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } /* Load P2VM */ sprintf( szMessage, "Loading P2VM %s ...", p2vmFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( amdlibLoadP2VM( p2vmFile, &p2vm, errMsg) == amdlibFAILURE) { printf ("Could not load P2VM file '%s'\n", p2vmFile); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } @@ -497,7 +497,7 @@ if( amdlibGetWaveDataFromP2vm( &p2vm, &waveData, errMsg ) != amdlibSUCCESS) { printf ("Could not get wave data from P2VM file '%s'\n", p2vmFile); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } @@ -505,7 +505,7 @@ if (strlen(darkFile) != 0) { sprintf( szMessage, "Loading DARK (BIAS) %s ...\n", darkFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibLoadRawData(darkFile, &rawData, errMsg) != amdlibSUCCESS) { @@ -514,13 +514,13 @@ } /* Compute pixel bias map */ sprintf( szMessage, "Computing PIXEL BIAS MAP..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibGenerateDarkData(&rawData, &dark, errMsg) != amdlibSUCCESS) { printf ("Could not generate pixel bias map\n"); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } amdlibReleaseRawData(&rawData); @@ -528,16 +528,16 @@ else { sprintf( szMessage, "No PIXEL BIAS MAP available due to no DARK file." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Load data file so that the false bias mimics its structure */ i=6; sprintf( szMessage, "Getting PIXEL BIAS MAP from raw %s ...", inputFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibLoadRawData(inputFile, &rawData, errMsg) != amdlibSUCCESS) { sprintf( szMessage, "Could not load raw data file '%s'", inputFile); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } amdlibSetDarkData( &rawData, &dark, 0.0, amdlibTYPICAL_RON , errMsg); @@ -551,13 +551,13 @@ if (amdlibLoadRawData(skyFile, &rawData, errMsg) != amdlibSUCCESS) { printf ("Could not load sky file '%s'\n", skyFile); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } /* Equalize raw data */ if( amdlibCalibrateRawData( &dark, &rawData, errMsg) !=amdlibSUCCESS ) { - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } @@ -565,7 +565,7 @@ if (amdlibRawData2ScienceData(&rawData, &waveData, &sky, amdlibTRUE, errMsg) != amdlibSUCCESS) { printf ("Could not get science data\n"); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } /* if in JHK Mode, split Science Data in rows accordingly */ @@ -576,26 +576,26 @@ else { sprintf( szMessage, "No SKY will be used...\n" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); skyPtr = NULL; } /* Load data file */ sprintf( szMessage, "Loading RawData %s ...", inputFile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibLoadRawData(inputFile, &rawData, errMsg) != amdlibSUCCESS) { sprintf( szMessage, "Could not load raw data file '%s'", inputFile ); - cpl_msg_info( fctid, szMessage ); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", szMessage ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } /* Equalize raw data */ sprintf( szMessage, "Equalizing Raw Data." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibCalibrateRawData(&dark, &rawData, errMsg) !=amdlibSUCCESS) { - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } @@ -603,7 +603,7 @@ if (amdlibGetOiArrayFromRawData(&rawData, &array, errMsg) != amdlibSUCCESS) { sprintf( szMessage, "Warning -- Unable to retrieve OI_ARRAY information from input file"); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdlibReleaseOiArray(&array); } @@ -611,26 +611,26 @@ if (amdlibAllocateOiTarget(&target, 1) != amdlibSUCCESS) { printf ("Could not Allocate Target Structure\n"); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); return (amdlibFAILURE); } if (amdlibGetOiTargetFromRawData(&rawData,&target) != amdlibSUCCESS) { printf ("Could not Add to Target Structure\n"); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); return (amdlibFAILURE); } /* Produce science data */ sprintf( szMessage, "Producing Science Data..." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (amdlibRawData2ScienceData(&rawData, &waveData, &scienceData, amdlibFALSE, errMsg) != amdlibSUCCESS) { printf ("Could not get science data"); - cpl_msg_info( fctid, errMsg ); + cpl_msg_info( fctid, "%s", errMsg ); return (amdlibFAILURE); } @@ -644,7 +644,7 @@ int nbChannels; sprintf( szMessage, "Working on '%c' band", amdlibBandNumToStr(band)); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Compute visibilities */ nbChannels = amdlibComputeVisibilities @@ -656,41 +656,41 @@ if (nbChannels == -1) { sprintf( szMessage, "Could NOT extract visibilities for '%c' band !", amdlibBandNumToStr(band)); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); return (amdlibFAILURE); } else if (nbChannels == 0) { sprintf( szMessage, "There is no channel for '%c' band", amdlibBandNumToStr(band)); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } else { /* Print results */ sprintf( szMessage, "Band: %c", amdlibBandNumToStr(band) ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if (vis2.nbBases == 1) { sprintf( szMessage, " VIS (err)"); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); sprintf( szMessage, "%12.3f (%8.03g)\n", imdVis2.vis12, imdVis2.sigmaVis12 ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } else { sprintf( szMessage, "Global Averaged Visibilities Squared (using all Frames):"); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); sprintf( szMessage, " VIS 12 (err) VIS 23 (err) VIS 31 (err)"); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); sprintf( szMessage, "%12.3f(%8.03g) %12.3f(%8.03g) %12.3f(%8.03g)", imdVis2.vis12, imdVis2.sigmaVis12, imdVis2.vis12, imdVis2.sigmaVis12, imdVis2.vis31, imdVis2.sigmaVis31 ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); sprintf( szMessage, "AverageClosurePhase (deg)= %8.03g (%8.03g)", imdVis3.averageClosure,imdVis3.averageClosureError ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* 2 Tel or 3 Tel */ #ifdef NEVER_PERFORM_FRAME_SELECTION_USE_AMBER_SELECTOR_AFTERWARDS @@ -758,7 +758,7 @@ fFrame_GT_SNR2_Percent = 0.F; sprintf( szMessage, "Number of Frames = %d", imdVis.nbFrames ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Count Frames with Fringe SNR greater than 2 */ for(iFrame = 0; iFrame < imdVis.nbFrames; iFrame++) @@ -769,7 +769,7 @@ fFrame_GT_SNR2_Percent = (float)iFrame_GT_SNR2 / (float)imdVis.nbFrames; sprintf( szMessage, "QC: %d of %d Frames having SNR greater than 2 = %0.2f percent", iFrame_GT_SNR2, imdVis.nbFrames, fFrame_GT_SNR2_Percent*100.0 ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_long( qc_properties, "ESO QC FRAMES SELECTED SNRGT2", iFrame_GT_SNR2 ); cpl_propertylist_set_comment( qc_properties, "ESO QC FRAMES SELECTED SNRGT2", "Frames selected with SNR greater than 2 "); @@ -810,7 +810,7 @@ if (strlen(szFilenameProduct) != 0) { sprintf ( szMessage, "Now writing Scientific Data to %s...", szFilenameProduct ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); @@ -828,13 +828,13 @@ { Status = amdlibFAILURE; sprintf ( szMessage, "ERROR saving Scientific Data to %s.", szFilenameProduct ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } else { sprintf ( szMessage, "Scientific Data %s saved successfully.", szFilenameProduct ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Now copy the file to tmp to be able to plot the files after the originals are renamed by ESOREX @@ -1258,13 +1258,13 @@ iBinningOfFrames = 99999; /* Binning of all Frames */ sprintf ( szMessage, "BINNING of %d frames will be used", iBinningOfFrames ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( iBinningOfFrames == 1 ) { errorType = amdlibTHEORETICAL_ERROR; sprintf ( szMessage, "ERROR BAR calculation with amdlibTHEORETICAL_ERROR will be used for BINNING of 1 frame." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } @@ -1280,7 +1280,7 @@ strcpy( szFilenameFLAT, pszFilename ); sprintf ( szMessage, "FLAT FIELD identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } cur_frame = cpl_frameset_find( framelist, "AMBER_BADPIX" ); @@ -1294,7 +1294,7 @@ strcpy( szFilenameBADPIX, pszFilename ); sprintf ( szMessage, "BAD PIXEL MAP identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Try to load the optional SKY frame */ @@ -1317,7 +1317,7 @@ strcpy( szFilenameSKY, pszFilename ); sprintf ( szMessage, "SKY identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } @@ -1334,7 +1334,7 @@ strcpy( szFilenameP2VM, pszFilename ); sprintf ( szMessage, "P2VM identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } else @@ -1350,7 +1350,7 @@ strcpy( szFilenameP2VM, pszFilename ); sprintf ( szMessage, "P2VM identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } } @@ -1369,7 +1369,7 @@ { fclose( fpTmp ); sprintf ( szMessage, "latest pipeline P2VM identified %s", szFilenameP2VM ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } } @@ -1396,7 +1396,7 @@ if( pszFilename && pszFileTag ) { sprintf( szMessage, "Frame #%d [Current execution status=%d]", iFrameCount, iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* SCIENCE / CALIB DARK */ if(!strcmp( pszFileTag, "AMBER_DARK" ) || @@ -1407,7 +1407,7 @@ strcpy( szFilenameDARK, pszFilename ); sprintf ( szMessage, "DARK identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iLoadedFrameCount++; } @@ -1433,7 +1433,7 @@ strcpy( szFilenameSCIENCE[iReduction], pszFilename ); isFrameScience[iReduction] = 1; sprintf ( szMessage, "SCIENCE identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iReduction++; iLoadedFrameCount++; } /* Status still OK */ @@ -1447,7 +1447,7 @@ strcpy( szFilenameSCIENCE[iReduction], pszFilename ); isFrameScience[iReduction] = 0; sprintf ( szMessage, "CALIB identified %s", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iReduction++; iLoadedFrameCount++; } /* Status still OK */ @@ -1458,7 +1458,7 @@ else { sprintf( szMessage, "Missing FileName or Tag for Frame #%d", iFrameCount ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Filename and Tag present */ cur_frame = cpl_frameset_get_next( framelist ); @@ -1471,7 +1471,7 @@ { /* This is a science object frame we can reduce the data now */ sprintf( szMessage, "Reducing %s now... [Status=%d]", szFilenameSCIENCE[i], iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_msg_info( fctid, "Now calling high level data reduction amdlibExtractVisESO..." ); if( amdlibExtractVisESO( szFilenameBADPIX, szFilenameFLAT, szFilenameP2VM, szFilenameDARK, szFilenameSKY, @@ -1480,7 +1480,7 @@ ) { sprintf( szMessage, "Error in Extracting Visibilities." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 2; } else @@ -1503,7 +1503,7 @@ if( pframeSCIENCE[i] ) { sprintf( szMessage, "cpl_frame_insert (\"%s\")", cpl_frame_get_filename(pframeSCIENCE[i]) ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_frameset_insert( framelist, pframeSCIENCE[i] ); } } --- a/recipes/amber_detector.c +++ b/recipes/amber_detector.c @@ -268,7 +268,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } #else @@ -283,7 +283,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } #endif @@ -487,7 +487,7 @@ sprintf( szMessage, "Using frames from %d to %d", iFrom, iTo ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* @@ -516,7 +516,7 @@ iFrameCountFlat++; sprintf( szMessage, "DETECTOR_FFM %d %s", iFrameCountFlat, pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* DETECTOR_DARK */ @@ -527,7 +527,7 @@ iFrameCountDark++; sprintf( szMessage, "DETECTOR_DARK %d %s", iFrameCountDark, pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } } @@ -541,9 +541,9 @@ iStatus = 1; sprintf( szMessage, "Found %d of DARK and %d of FLAT frames.", iFrameCountDark, iFrameCountFlat ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); sprintf( szMessage, "Error: Please input 7 of each." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } if( !iStatus ) @@ -553,7 +553,7 @@ for( i=0; i<7 && !iStatus; i++ ) { sprintf( szMessage, "amdmsCreateStatisticsAlgo for Darks #%d", i+1 ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateStatisticsAlgo( &statEnv ); @@ -582,7 +582,7 @@ statEnv->env.filter.aoiHeight = 512; sprintf( szMessage, "amdmsAddFileToList: %s", szInputDark[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Prepare Input */ flags.content = amdmsIMAGING_DATA_CONTENT; @@ -616,13 +616,13 @@ amdmsAddFileToList( &(statEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoPixelStatistics" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoPixelStatistics( statEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; sprintf( szMessage, "Generating particle event maps: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyStatisticsAlgo( &statEnv ); } /* All 7 darks */ @@ -633,7 +633,7 @@ for( i=0; i<7 && !iStatus; i++ ) { sprintf( szMessage, "amdmsCreateStatisticsAlgo for Flats #%d", i+1 ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateStatisticsAlgo( &statEnv ); @@ -663,7 +663,7 @@ statEnv->env.filter.aoiHeight = 512; sprintf( szMessage, "amdmsAddFileToList: %s", szInputFlat[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Prepare Input */ flags.content = amdmsIMAGING_DATA_CONTENT; @@ -707,7 +707,7 @@ amdmsAddFileToList( &(statEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoPixelStatistics" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoPixelStatistics( statEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -715,7 +715,7 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating particle event maps: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyStatisticsAlgo( &statEnv ); } /* All 7 flats */ @@ -726,7 +726,7 @@ if( !iStatus ) { sprintf( szMessage, "amdmsCreatePropertiesAlgo dark current maps for dark" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreatePropertiesAlgo( &ppEnv ); @@ -765,7 +765,7 @@ amdmsAddFileToList( &(ppEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoProperties" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoProperties( ppEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -773,7 +773,7 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating dark current maps for dark: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyPropertiesAlgo( &ppEnv ); } /* Status still OK */ @@ -785,7 +785,7 @@ { /* a) Darks --------------------------------------------------------------------*/ sprintf( szMessage, " amdmsCreateBadPixelAlgo bad pixel map 1 of 6" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateBadPixelAlgo( &badpixelEnv ); @@ -858,7 +858,7 @@ amdmsAddFileToList( &(badpixelEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoBadPixel" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoBadPixel( badpixelEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -866,13 +866,13 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating bad pixel maps for dark: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyBadPixelAlgo( &badpixelEnv ); /* b) Flats --------------------------------------------------------------------*/ sprintf( szMessage, " amdmsCreateBadPixelAlgo bad pixel map 2 of 6" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateBadPixelAlgo( &badpixelEnv ); @@ -946,7 +946,7 @@ amdmsAddFileToList( &(badpixelEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoBadPixel" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoBadPixel( badpixelEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -954,13 +954,13 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating bad pixel maps for flat: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyBadPixelAlgo( &badpixelEnv ); /* c) ---------------------------------------------------------------------*/ sprintf( szMessage, " amdmsCreateBadPixelAlgo bad pixel map 3 of 6" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateBadPixelAlgo( &badpixelEnv ); @@ -1059,7 +1059,7 @@ amdmsAddFileToList( &(badpixelEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoBadPixel" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoBadPixel( badpixelEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -1067,13 +1067,13 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating bad pixel maps for flat: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyBadPixelAlgo( &badpixelEnv ); /* d) -----------------------------------------------------------------------*/ sprintf( szMessage, " amdmsCreateBadPixelAlgo bad pixel map 4 of 6" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateBadPixelAlgo( &badpixelEnv ); @@ -1143,7 +1143,7 @@ amdmsAddFileToList( &(badpixelEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoBadPixel" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoBadPixel( badpixelEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -1151,13 +1151,13 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating bad pixel maps for flat: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyBadPixelAlgo( &badpixelEnv ); /* e) -----------------------------------------------------------------------*/ sprintf( szMessage, " amdmsCreateBadPixelAlgo bad pixel map 5 of 6" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateBadPixelAlgo( &badpixelEnv ); @@ -1224,7 +1224,7 @@ amdmsAddFileToList( &(badpixelEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoBadPixel" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoBadPixel( badpixelEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -1232,13 +1232,13 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating bad pixel maps for flat: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyBadPixelAlgo( &badpixelEnv ); /* f) Finish --------------------------------------------------------------------*/ sprintf( szMessage, " amdmsCreateBadPixelAlgo bad pixel map 6 of 6" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateBadPixelAlgo( &badpixelEnv ); @@ -1347,7 +1347,7 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Final stage -> Generating bad pixel maps for flat: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); @@ -1361,7 +1361,7 @@ for( i=0; i<7 && !iStatus; i++ ) { sprintf( szMessage, "amdmsCreateStatisticsAlgo for Flats #%d", i+1 ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreateStatisticsAlgo( &statEnv ); @@ -1384,7 +1384,7 @@ sprintf( szMessage, "amdmsAddFileToList: %s", szInputFlat[i] ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Prepare Input */ flags.content = amdmsIMAGING_DATA_CONTENT; @@ -1434,7 +1434,7 @@ amdmsAddFileToList( &(statEnv->env.outFiles), szTemp, flags); sprintf( szMessage, "amdmsDoPixelStatistics" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoPixelStatistics( statEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -1442,7 +1442,7 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating pixel statistics: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyStatisticsAlgo( &statEnv ); } /* All 7 flats */ @@ -1452,7 +1452,7 @@ if( !iStatus ) { sprintf( szMessage, "amdmsCreatePropertiesAlgo flatfield map" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsCreatePropertiesAlgo( &ppEnv ); @@ -1544,7 +1544,7 @@ sprintf( szMessage, "amdmsDoProperties" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = amdmsDoProperties( ppEnv ); if( iStatus == amdmsSUCCESS ) iStatus = 0; @@ -1552,7 +1552,7 @@ iStatus = 666; /* Error from amdmslib */ sprintf( szMessage, "Generating flat field map: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); amdmsDestroyPropertiesAlgo( &ppEnv ); } @@ -1586,11 +1586,11 @@ /* Add QC parameters */ sprintf( szMessage, "ESO QC BADPIX = %d", iBadPix ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_int( qc_properties, "ESO QC BADPIX", iBadPix ); sprintf( szMessage, "ESO QC GOODPIX = %d", iGoodPix ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_int( qc_properties, "ESO QC GOODPIX", iGoodPix ); @@ -1600,7 +1600,7 @@ } sprintf( szMessage, "ESO QC BADRATIO = %.2f", dBadRatio ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, "ESO QC BADRATIO", dBadRatio ); cpl_propertylist_set_comment( qc_properties, "ESO QC BADRATIO", "Percentage of bad Pixels vs all Pixels"); @@ -1644,7 +1644,7 @@ cpl_propertylist_delete( qcFromRawfile); sprintf( szMessage, "First product is Bad Pixel Map: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /*---------------------------------------------------------*/ strcpy( szProduct, "amber_eso_ffm.fits" ); @@ -1665,7 +1665,7 @@ cpl_propertylist_delete( qc_properties); sprintf( szMessage, "Second product is Flat Field Map: Status = %d", iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* STatus still OK */ --- a/recipes/amber_BeamPos.c +++ b/recipes/amber_BeamPos.c @@ -314,7 +314,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } #else @@ -329,7 +329,7 @@ { /* Error */ sprintf( szMessage, "Error in setting up the product header." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 16; } @@ -1116,7 +1116,7 @@ iFrameCount++; /* Count BEAMPOS-frames only */ sprintf( szMessage, "Frame #%d of 22 [Current execution status=%d]", iFrameCount, iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); if( iStatus == 0 ) { @@ -1124,7 +1124,7 @@ if( amdlibLoadRawData(pszFilename, &rawData, errMsg) != amdlibSUCCESS ) { sprintf ( szMessage, "Could not load raw data file '%s'", pszFilename ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 20; } else @@ -1144,7 +1144,7 @@ if( CalculateQCParams( pImage, &dPosX, &dPosY, &dSizeX, &dSizeY, &dFlux, &dAngle, &dPeakFlux) != 0 ) { sprintf( szMessage, "Beam localization failed!" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); dPosX = 0; dPosY = 0; dSizeX = 0; @@ -1170,7 +1170,7 @@ sprintf( szProduct, "amber_beampos_%04d.fits", iFrameCount ); sprintf( szMessage, "%s %s", szProduct, szPrefix ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); pFrameProduct = cpl_frame_new(); cpl_frame_set_filename( pFrameProduct, szProduct ); @@ -1184,60 +1184,60 @@ sprintf( szQCParameter, "%sX", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dPosX ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dPosX ); sprintf( szQCParameter, "%sY", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dPosY ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dPosY ); sprintf( szQCParameter, "%sSHX", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dOffsetX ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dOffsetX ); sprintf( szQCParameter, "%sSHY", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dOffsetY ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dOffsetY ); sprintf( szQCParameter, "%sSIZX", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dSizeX ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dSizeX ); sprintf( szQCParameter, "%sSIZY", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dSizeY ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dSizeY ); sprintf( szQCParameter, "%sFLUX", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dFlux ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dFlux ); sprintf( szQCParameter, "%sPEAKFLUX", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dPeakFlux ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dPeakFlux ); sprintf( szQCParameter, "%sANGLE", szPrefix ); sprintf( szMessage, "%s = %.2f", szQCParameter, dAngle ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_propertylist_append_float( qc_properties, szQCParameter, dAngle ); /* Save Product */ /*sprintf( szMessage, "Saving Product %s %s...", szProduct, szPrefix ); - cpl_msg_info( fctid, szMessage );*/ + cpl_msg_info( fctid, "%s", szMessage );*/ /*Adding the JMMC acknowledgements*/ amber_JMMC_acknowledgement(qc_properties); cpl_image_save( pImage, szProduct, CPL_BPP_IEEE_FLOAT, qc_properties, CPL_IO_DEFAULT ); /*sprintf( szMessage, "cpl_frame_insert (\"%s\")", cpl_frame_get_filename(pFrameProduct) ); */ - /*cpl_msg_info( fctid, szMessage ); */ + /*cpl_msg_info( fctid, "%s", szMessage ); */ cpl_frameset_insert( framelist, pFrameProduct ); @@ -1282,7 +1282,7 @@ else { sprintf( szMessage, "Missing FileName or Tag for Frame #%d", iFrameCount ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Filename and Tag present */ cur_frame = cpl_frameset_get_next( framelist ); @@ -1291,7 +1291,7 @@ if( iFrameCount != 22 ) { sprintf( szMessage, "Error: Please input 22 raw files of type AMBER_BEAMPOS", iFrameCount ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 1; } --- a/recipes/amber_ascii_export.c +++ b/recipes/amber_ascii_export.c @@ -296,7 +296,7 @@ strcpy( szMethod, cpl_parameter_get_string( cur_param ) ); sprintf ( szMessage, "Using Method: %s", szMethod ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); cpl_msg_info( fctid, "Start of DataReduction"); @@ -318,7 +318,7 @@ if( pszFilename && pszFileTag ) { sprintf( szMessage, "Frame #%d [Current execution status=%d]", iFrameCount, iStatus ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); @@ -395,7 +395,7 @@ iStatus = amdlibLoadOiFile( szFilnameOI, &insCfg, &array, &target, &photometry, &vis, &vis2, &vis3, &wave, &pst, &spectrum, errMsg ); /*sprintf( szMessage, "%d", iStatus ); - cpl_msg_info( fctid, szMessage );*/ + cpl_msg_info( fctid, "%s", szMessage );*/ @@ -427,10 +427,10 @@ pHeader = cpl_propertylist_load( szFilnameOI, 0 ); sprintf( szMessage, "Extracting product header from file %s for target named %s [%s].", szFilnameOI, cpl_propertylist_get_string( pHeader, "ESO OBS NAME" ), cpl_error_get_message() ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); sprintf( szMessage, "Target observed on %s [%s].", cpl_propertylist_get_string( pHeader, "DATE-OBS" ), cpl_error_get_message() ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); @@ -443,17 +443,17 @@ sprintf ( szMessage, "Status: %d for input file %s [%s]", iStatus, szFilnameOI, errMsg ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Count number of frames */ int iTotal = vis.nbFrames * vis.nbBases; sprintf( szMessage, "Number of Frames = %d giving %d Visibilities", iTotal / vis.nbBases, iTotal ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Count frames for Photometry and Piston */ sprintf( szMessage, "Photometry: %d / Piston: %d", photometry.nbFrames, pst.nbFrames ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); /* Count Frames with Fringe SNR greater than xxx */ @@ -479,7 +479,7 @@ if (amdlibGetBand(wave.wlen[wave.nbWlen-1]) != band) { sprintf ( szMessage, "Sorry, frame selection is only possible for one band. This data contains more than one band" ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); iStatus = 666; } */ @@ -507,7 +507,7 @@ } sprintf ( szMessage, "New datetime format: %s", szFDATE); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); while (szFileName[iFName] != '\0') @@ -518,7 +518,7 @@ } sprintf ( szMessage, "New filename format: %s", szFileName); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); @@ -538,7 +538,7 @@ strcpy( szASCII1, szBuffer ); sprintf ( szMessage, "Yorick filename format: %s", szBuffer); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); @@ -569,7 +569,7 @@ fp1 = fopen( szASCII1, "wt" ); sprintf ( szMessage, "Yorick file %s opened", szASCII1); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } @@ -860,7 +860,7 @@ /* not an AMBER file */ iStatus = 2; sprintf ( szMessage, "ERROR: Cannot read [%s]. OI table structure is not from AMBER or the file has been corrupted. [%s]", szFilnameOI, errMsg ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } } else /* found fitting frame ? */ @@ -868,7 +868,7 @@ /* no fitting frame */ iStatus = 1; sprintf ( szMessage, "ERROR: Current file doesn't contain SCIENCE_REDUCED or CALIB_REDUCED." ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } @@ -877,7 +877,7 @@ else { sprintf( szMessage, "Missing FileName or Tag for Frame #%d", iFrameCount ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); } /* Filename and Tag present */ /* release memory */ @@ -902,14 +902,14 @@ // { /* sprintf( szMessage, "cpl_frame_insert [%s]", cpl_frame_get_filename(pFrame ) ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ // cpl_frameset_insert( framelist, pFrame ); // } /* sprintf ( szMessage, "Status: %d for %s", iStatus, szProductfile ); - cpl_msg_info( fctid, szMessage ); + cpl_msg_info( fctid, "%s", szMessage ); */ cpl_msg_info( fctid, "End of DataReduction");