00001
00002 /*---------------------------------------------------------------------------
00003
00004 File name : flat_cfg.c
00005 Author : Juergen Schreiber
00006 Created on : March 2002
00007 Description : prepare flatfield frames configuration handling tools
00008
00009 *--------------------------------------------------------------------------*/
00010
00011 /*---------------------------------------------------------------------------
00012 Includes
00013 ---------------------------------------------------------------------------*/
00014
00015 #include "flat_cfg.h"
00016
00017 /*---------------------------------------------------------------------------
00018 Function codes
00019 ---------------------------------------------------------------------------*/
00020
00021 /*---------------------------------------------------------------------------
00022 Function : flat_cfg_create()
00023 In : void
00024 Out : pointer to allocated base flat_config structure
00025 Job : allocate memory for a flat_config struct
00026 Notice : only the main (base) structure is allocated
00027 ---------------------------------------------------------------------------*/
00028
00029 flat_config * flat_cfg_create(void)
00030 {
00031 return calloc(1, sizeof(flat_config));
00032 }
00033
00034
00035 /*---------------------------------------------------------------------------
00036 Function : flat_cfg_destroy()
00037 In : flat_config to deallocate
00038 Out : void
00039 Job : deallocate all memory associated with a flat_config data structure
00040 Notice :
00041 ---------------------------------------------------------------------------*/
00042
00043 void flat_cfg_destroy(flat_config * sc)
00044 {
00045 if (sc==NULL) return ;
00046
00047 /* Free list of frame types */
00048 /*free(sc->frametype);*/
00049 /* Free positions */
00050 /*free(sc->frameposition);*/
00051
00052 /* Free main struct */
00053 free(sc);
00054
00055 return ;
00056 }
00057
00058
00059
00060
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001