| 1 |
/* |
| 2 |
* Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 3 |
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 4 |
* NTESS, the U.S. Government retains certain rights in this software. |
| 5 |
* |
| 6 |
* See packages/seacas/LICENSE for details |
| 7 |
*/ |
| 8 |
|
| 9 |
#include "exodusII.h" |
| 10 |
#include "exodusII_int.h" |
| 11 |
|
| 12 |
/*! \cond INTERNAL */ |
| 13 |
int exi_default_max_name_length = 32; /* For default compatibility with older clients */ |
| 14 |
|
| 15 |
#if defined(VERBOSE) |
| 16 |
int exoptval = EX_VERBOSE; /* loud mode: set EX_VERBOSE */ |
| 17 |
#else |
| 18 |
#if defined(DEBUG) |
| 19 |
int exoptval = EX_VERBOSE | EX_DEBUG; /* debug mode: set EX_VERBOSE & EX_DEBUG */ |
| 20 |
#else |
| 21 |
int exoptval = EX_DEFAULT; /* set default global options value to NOT print error msgs*/ |
| 22 |
#endif |
| 23 |
#endif |
| 24 |
/*! \endcond */ |
| 25 |
|
| 26 |
/*! |
| 27 |
The function ex_opts() is used to set message reporting options. |
| 28 |
|
| 29 |
\return Returns previous value for the message reporting option. |
| 30 |
|
| 31 |
\param[in] options Integer option value. Current options are shown in the |
| 32 |
table below. |
| 33 |
|
| 34 |
<table> |
| 35 |
<tr><td> #EX_ABORT </td><td> Causes fatal errors to force program |
| 36 |
exit. (Default is false.) </td></tr> |
| 37 |
<tr><td> #EX_DEBUG </td><td> Causes certain messages to print |
| 38 |
for debug use. (Default is false.)</td></tr> |
| 39 |
<tr><td> #EX_VERBOSE</td><td> Causes all error messages to print when true, |
| 40 |
otherwise no error messages will print. (Default |
| 41 |
is false.)</td></tr> |
| 42 |
</table> |
| 43 |
|
| 44 |
\note Values may be OR'ed together to provide any combination |
| 45 |
of these capabilities. |
| 46 |
|
| 47 |
For example, the following will cause all messages to print |
| 48 |
and will cause the program to exit upon receipt of fatal error: |
| 49 |
|
| 50 |
~~~{.c} |
| 51 |
#include "exodusII.h" |
| 52 |
ex_opts(EX_ABORT|EX_VERBOSE); |
| 53 |
~~~ |
| 54 |
|
| 55 |
*/ |
| 56 |
int ex_opts(int options) |
| 57 |
{ |
| 58 |
EX_FUNC_ENTER(); |
| 59 |
int oldval = exoptval; |
| 60 |
exoptval = options; |
| 61 |
EX_FUNC_LEAVE(oldval); |
| 62 |
} |