Debian Codegraph @

dune/uggrid/low/initlow.cc

raw
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LGPL-2.1-or-later
3 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 // vi: set et ts=4 sw=2 sts=2:
5 /*! \file initlow.c
6 * \ingroup low
7 */
8
9 /** \addtogroup low
10 *
11 * @{
12 */
13
14 /****************************************************************************/
15 /* */
16 /* File: initlow.c */
17 /* */
18 /* Purpose: call the init routines of the low module */
19 /* */
20 /* Author: Henrik Rentz-Reichert */
21 /* Institut fuer Computeranwendungen III */
22 /* Universitaet Stuttgart */
23 /* Pfaffenwaldring 27 */
24 /* 70569 Stuttgart */
25 /* email: [email protected] */
26 /* */
27 /* History: 27.02.95 begin, ug version 3.0 */
28 /* */
29 /* Remarks: */
30 /* */
31 /****************************************************************************/
32
33
34 /****************************************************************************/
35 /* */
36 /* include files */
37 /* system include files */
38 /* application include files */
39 /* */
40 /****************************************************************************/
41
42 /* ANSI-C includes */
43 #include <config.h>
44 #include <cstdio>
45
46 /* low module */
47 #include "ugtypes.h"
48 #include "misc.h"
49 #include "heaps.h"
50 #include "ugenv.h"
51 #include "fileopen.h"
52
53 /* own header */
54 #include "initlow.h"
55
56 USING_UG_NAMESPACE
57
58 /****************************************************************************/
59 /* */
60 /* definition of variables global to this source file only (static!) */
61 /* */
62 /****************************************************************************/
63
64
65
66
67 #ifdef ModelP
68 #define DEFAULTENVSIZE 512000 /* size of environment if no default value */
69 #else
70 #define DEFAULTENVSIZE 128000 /* size of environment if no default value */
71 #endif
72
73 /****************************************************************************/
74 /** \brief Call the inits for the low module
75 *
76 * This function calls the inits for the low module.
77 *
78 * @return <ul>
79 * <li> 0 if ok </li>
80 * <li> 1 if error occurred </li>
81 * </ul>
82 */
83 /****************************************************************************/
84 INT NS_PREFIX InitLow ()
85 {
86 INT err;
87
88 /* init ugenv.c */
89 if ((err=InitUgEnv())!=0)
90 {
91 SetHiWrd(err,__LINE__);
92 return (err);
93 }
94
95 /* init fileopen */
96 if ((err=InitFileOpen())!=0)
97 {
98 SetHiWrd(err,__LINE__);
99 return (err);
100 }
101
102 return (0);
103 }
104
105
106
107 /****************************************************************************/
108 /** \brief Call the exits for the low module
109 *
110 * This function calls the exit methods for the low module.
111 *
112 * @return <ul>
113 * <li> 0 if ok </li>
114 * <li> 1 if error occurred </li>
115 * </ul>
116 */
117 /****************************************************************************/
118 INT NS_PREFIX ExitLow ()
119 {
120 INT err;
121
122 /* exit env */
123 if ((err=ExitUgEnv())!=0)
124 {
125 SetHiWrd(err,__LINE__);
126 return (err);
127 }
128
129 return (0);
130 }
131
132 /** @} */