"Fossies" - the Fresh Open Source Software Archive

Member "udunits-2.2.28/lib/ut_free_system.c" (7 Dec 2020, 801 Bytes) of package /linux/privat/udunits-2.2.28.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ut_free_system.c" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.2.26_vs_2.2.28.

    1 /*
    2  * Copyright 2020 University Corporation for Atmospheric Research
    3  *
    4  * This file is part of the UDUNITS-2 package.  See the file COPYRIGHT
    5  * in the top-level source-directory of the package for copying and
    6  * redistribution conditions.
    7  */
    8 
    9 /*LINTLIBRARY*/
   10 
   11 #include "config.h"
   12 
   13 #include "udunits2.h"
   14 #include "idToUnitMap.h"
   15 #include "unitToIdMap.h"
   16 
   17 extern void coreFreeSystem(ut_system* system);
   18 
   19 
   20 /*
   21  * Frees a unit-system.  All unit-to-identifier and identifier-to-unit mappings
   22  * will be removed.
   23  *
   24  * Arguments:
   25  *  system      Pointer to the unit-system to be freed.  Use of "system"
   26  *          upon return results in undefined behavior.
   27  */
   28 void
   29 ut_free_system(
   30     ut_system*  system)
   31 {
   32     if (system != NULL) {
   33     itumFreeSystem(system);
   34     utimFreeSystem(system);
   35     coreFreeSystem(system);
   36     }
   37 }