~ubuntu-branches/ubuntu/vivid/esorex/vivid-proposed

« back to all changes in this revision

Viewing changes to src/er_params.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-12 13:16:28 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20140412131628-6xq7unx2r6o0mavy
Tags: 3.10.2-1
* New upstream version
* Change maintainer and VCS location to debian-astro
* Push standards version to 3.9.5. No changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: er_params.c,v 1.64 2013/01/03 17:55:39 cgarcia Exp $
 
1
/* $Id: er_params.c,v 1.64 2013-01-03 17:55:39 cgarcia Exp $
2
2
 *
3
3
 *   This file is part of the ESO Common Pipeline Library
4
4
 *   Copyright (C) 2001-2009 European Southern Observatory
15
15
 *
16
16
 *   You should have received a copy of the GNU General Public License
17
17
 *   along with this program; if not, write to the Free Software
18
 
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
21
/*
22
22
 * $Author: cgarcia $
23
 
 * $Date: 2013/01/03 17:55:39 $
 
23
 * $Date: 2013-01-03 17:55:39 $
24
24
 * $Revision: 1.64 $
25
 
 * $Name: esorex-3_10 $
 
25
 * $Name: not supported by cvs2svn $
26
26
 */
27
27
 
28
28
#ifdef HAVE_CONFIG_H
1546
1546
 
1547
1547
er_paramutils_tilde_convert (caller_parameter_list);
1548
1548
 
1549
 
 
1550
 
/* If an explicitly specified configuration file is given, then parse that */
1551
 
 
1552
 
if ((p = cpl_parameterlist_find (caller_parameter_list, PACKAGE_RESOURCE ".config")))
1553
 
   {
1554
 
   const char   *explicit_conf_file;
1555
 
 
1556
 
   /* a config file was explicitly specified - parse it */
1557
 
   
1558
 
   explicit_conf_file = cpl_parameter_get_string (p);
1559
 
   if ((explicit_conf_file != NULL) && (*explicit_conf_file != '\0'))
1560
 
      {
1561
 
      m = (int) strlen(explicit_conf_file);
1562
 
      (void) sprintf(trace_msg,"len of explicit_conf_file = %d, 1st char = %c] \n",
1563
 
              m,explicit_conf_file[0]);
1564
 
      ER_TRACEX(trace_msg)
1565
 
      err2 = params_parse_config_file (caller_parameter_list, explicit_conf_file);
1566
 
 
1567
 
      /* Derek didn't check for this error - why? We do, now. */
1568
 
      if (err2 == -5) return err;
1569
 
      }
1570
 
 
1571
 
   }
1572
 
 
1573
 
 
1574
 
/* Parse the command line again, overwriting the explicit config-file */
1575
 
 
1576
 
err = params_parse_config_commandline (caller_parameter_list,
1577
 
                             plugin_name, set_of_frames_filenames,
1578
 
                             argc, argv, 1);
1579
 
 
1580
 
(void) sprintf(trace_msg,"params_process_configuration(2): err = %d",err);
1581
 
ER_TRACEX(trace_msg)
1582
 
 
1583
 
if (err != 0) return err;
1584
 
 
1585
 
 
1586
 
er_paramutils_tilde_convert (caller_parameter_list);
1587
 
 
1588
1549
params_parse_config_postprocess (caller_parameter_list);
1589
1550
er_paramutils_tilde_convert (caller_parameter_list);
1590
1551