SINFONI Pipeline Reference Manual  2.6.0
sinfo_wavecal_cfg.c
1 /*
2  * This file is part of the ESO SINFONI Pipeline
3  * Copyright (C) 2004,2005 European Southern Observatory
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18  */
19 
20 /*---------------------------------------------------------------------------
21 
22  File name : sinfo_wavecal_cfg.c
23  Author : Juergen Schreiber
24  Created on : September 2001
25  Description : wavelength calibration configuration handling tools
26 
27  *--------------------------------------------------------------------------*/
28 
29 #ifdef HAVE_CONFIG_H
30 # include <config.h>
31 #endif
32 
33 /*---------------------------------------------------------------------------
34  Includes
35  ---------------------------------------------------------------------------*/
36 
37 #include "sinfo_wavecal_cfg.h"
38 
46 /*---------------------------------------------------------------------------
47  Function codes
48  ---------------------------------------------------------------------------*/
49 
50 /*---------------------------------------------------------------------------
51  Function : sinfo_wave_cfg_create()
52  In : void
53  Out : pointer to allocated base wave_config structure
54  Job : allocate memory for a wave_config struct
55  Notice : only the main (base) structure is allocated
56  ---------------------------------------------------------------------------*/
57 
58 wave_config *
59 sinfo_wave_cfg_create(void)
60 {
61  return cpl_calloc(1, sizeof(wave_config));
62 }
63 
64 /*---------------------------------------------------------------------------
65  Function : sinfo_wave_cfg_destroy()
66  In : wave_config to deallocate
67  Out : void
68  Job : deallocate all memory associated with a wave_config
69  Notice :
70  ---------------------------------------------------------------------------*/
71 
72 void
73 sinfo_wave_cfg_destroy(wave_config * wc)
74 {
75  if (wc == NULL )
76  return;
77 
78  /* Free main struct */
79  cpl_free(wc);
80 
81  return;
82 }