1 | /* Copyright Jérémie Burgalat (2010-2015,2017) |
---|
2 | * |
---|
3 | * jeremie.burgalat@univ-reims.fr |
---|
4 | * |
---|
5 | * This software is a computer program whose purpose is to provide configuration |
---|
6 | * file and command line arguments parsing features to Fortran programs. |
---|
7 | * |
---|
8 | * This software is governed by the CeCILL-B license under French law and |
---|
9 | * abiding by the rules of distribution of free software. You can use, |
---|
10 | * modify and/ or redistribute the software under the terms of the CeCILL-B |
---|
11 | * license as circulated by CEA, CNRS and INRIA at the following URL |
---|
12 | * "http://www.cecill.info". |
---|
13 | * |
---|
14 | * As a counterpart to the access to the source code and rights to copy, |
---|
15 | * modify and redistribute granted by the license, users are provided only |
---|
16 | * with a limited warranty and the software's author, the holder of the |
---|
17 | * economic rights, and the successive licensors have only limited |
---|
18 | * liability. |
---|
19 | * |
---|
20 | * In this respect, the user's attention is drawn to the risks associated |
---|
21 | * with loading, using, modifying and/or developing or reproducing the |
---|
22 | * software by the user in light of its specific status of free software, |
---|
23 | * that may mean that it is complicated to manipulate, and that also |
---|
24 | * therefore means that it is reserved for developers and experienced |
---|
25 | * professionals having in-depth computer knowledge. Users are therefore |
---|
26 | * encouraged to load and test the software's suitability as regards their |
---|
27 | * requirements in conditions enabling the security of their systems and/or |
---|
28 | * data to be ensured and, more generally, to use and operate it in the |
---|
29 | * same conditions as regards security. |
---|
30 | * |
---|
31 | * The fact that you are presently reading this means that you have had |
---|
32 | * knowledge of the CeCILL-B license and that you accept its terms. |
---|
33 | */ |
---|
34 | |
---|
35 | /** |
---|
36 | * @file defined.h |
---|
37 | * @brief CPP macro definitions files |
---|
38 | * @details This header defines few CPP symbols and macros that are used |
---|
39 | * in the library source code. |
---|
40 | */ |
---|
41 | |
---|
42 | #ifdef HAVE_CONFIG_H |
---|
43 | #include "config.h" |
---|
44 | #endif |
---|
45 | |
---|
46 | /** @def ASSIGN_DTSTR(in,out) |
---|
47 | * Performs string assignment |
---|
48 | * |
---|
49 | * This macro definition depends on compiler's support for allocatable string |
---|
50 | * in derived type: |
---|
51 | * - If it actually supports this feature, the macro defines an allocation |
---|
52 | * statement. |
---|
53 | * - Otherwise it defines a simple assignment statement. |
---|
54 | */ |
---|
55 | #if ! HAVE_FTNDTSTR |
---|
56 | #define ASSIGN_DTSTR(in,out) out = in |
---|
57 | #else |
---|
58 | #define ASSIGN_DTSTR(in,out) ALLOCATE(out,source=in) |
---|
59 | #endif |
---|
60 | |
---|
61 | /** @def OBJECT(name) |
---|
62 | * Derived type declaration |
---|
63 | * |
---|
64 | * This macro definition depends on compiler's support for Bounded procedures |
---|
65 | * in derived type (more precisely, Fortran 2003 PROCEDURE keyword support): |
---|
66 | * - If it actually supports this feature, the macro defines derived type |
---|
67 | * declaration as dummy argument of subroutine/function using CLASS keyword. |
---|
68 | * - Otherwise, derived type dummy argument are declared using TYPE keyword. |
---|
69 | */ |
---|
70 | #if ! HAVE_FTNPROC |
---|
71 | #define OBJECT(name) TYPE(name) |
---|
72 | #else |
---|
73 | #define OBJECT(name) CLASS(name) |
---|
74 | #endif |
---|
75 | |
---|
76 | /* Defines SSLEN if needed */ |
---|
77 | #ifndef SSLEN |
---|
78 | #define SSLEN 250 |
---|
79 | #endif |
---|
80 | |
---|
81 | /* Defines SLLEN if needed */ |
---|
82 | #ifndef SLLEN |
---|
83 | #define SLLEN 2500 |
---|
84 | #endif |
---|