include "mkw.h" #--------------------------------------------------------------------------- .help mkw 11Apr95 source .ih NAME .nf mkw_alloc -- Create the MKW structure. mkw_free -- Deallocate the MKW structure. .fi .ih DESCRIPTION The following is a description of the routine calls. .ls mkw_alloc Create the MKW memory structure and initialize the values. .ls RETURNS A pointer to the newly created memory structure. .le .ls ERRORS Errors generated by the memory allocation routine 'calloc'. .le .le .ls mkw_free (mkw) Free the memory structure created by mkw_alloc. .ls ARGUMENTS .ls mkw (io: pointer) On input, the pointer to the memory structure to be deallocated. On return, the value will be NULL. .le .ls ERRORS Errors generated by the routine mfree. .le .le .endhelp #--------------------------------------------------------------------------- pointer procedure mkw_alloc() pointer mkw # MKW object. errchk calloc begin call calloc (mkw, MKW_SZ, TY_STRUCT) MKW_WAVE_PTR(mkw) = NULL MKW_SPEC_PTR(mkw) = NULL MKW_LINES_PTR(mkw) = NULL MKW_INT_PTR(mkw) = NULL MKW_FWHM_PTR(mkw) = NULL MKW_FNU(mkw) = NO MKW_SUBSAMPLE(mkw) = 0.1d0 MKW_PEAK(mkw) = -0.5D0 MKW_SIGMA(mkw) = 10.D0 MKW_NSIGMA(mkw) = 3.d0 MKW_Z(mkw) = 1.d0 # That's all folks. return (mkw) end #--------------------------------------------------------------------------- # End of mkw_alloc #--------------------------------------------------------------------------- procedure mkw_free (mkw) pointer mkw # IO: MKW object, NULL on return. errchk mfree begin call mfree (mkw, TY_STRUCT) end #--------------------------------------------------------------------------- # End of mkw_free #---------------------------------------------------------------------------