Debian Codegraph @

packages/seacas/applications/nem_spread/rf_util.C

raw
1 /*
2 * Copyright(C) 1999-2020, 2024 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 <cstdio> // for stderr
10 #include <cstdlib> // for exit
11 #include <fmt/ostream.h>
12
13 /*************************************************************************/
14 /*************************************************************************/
15 /*************************************************************************/
16 void check_exodus_error(int error, const char *function_name)
17 {
18
19 if (error == -1) {
20 fmt::print(stderr, "ERROR returned from {}!\n", function_name);
21 exit(1);
22 }
23
24 } /* check_exodus_error */
25
26 /*****************************************************************************/
27 /*****************************************************************************/
28 /*****************************************************************************/
29
30 void print_line(const char *charstr, int ntimes)
31
32 {
33 for (int i = 0; i < ntimes; i++) {
34 fmt::print("{}", *charstr);
35 }
36 fmt::print("\n");
37 }
38
39 /*****************************************************************************/
40 /* END OF FILE rf_util.c */
41 /*****************************************************************************/