1 | /* |
---|
2 | * Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). |
---|
3 | * |
---|
4 | * This file is part of SWIFT |
---|
5 | * |
---|
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of |
---|
7 | * this software and associated documentation files (the "Software"), to deal in |
---|
8 | * the Software without restriction, including without limitation the rights to |
---|
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
---|
10 | * the Software, and to permit persons to whom the Software is furnished to do so, |
---|
11 | * subject to the following conditions: |
---|
12 | * |
---|
13 | * The above copyright notice and this permission notice shall be included in all |
---|
14 | * copies or substantial portions of the Software. |
---|
15 | * |
---|
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
---|
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
---|
18 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
---|
19 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
---|
20 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
---|
21 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
---|
22 | */ |
---|
23 | |
---|
24 | /** |
---|
25 | * @file defined.h |
---|
26 | * @brief CPP macro definitions files |
---|
27 | * @details This header defines few CPP symbols and macros that are used |
---|
28 | * in the library source code. |
---|
29 | */ |
---|
30 | |
---|
31 | #ifdef HAVE_CONFIG_H |
---|
32 | #include "config.h" |
---|
33 | #endif |
---|
34 | |
---|
35 | /** @def ASSIGN_DTSTR(in,out) |
---|
36 | * Performs string assignment |
---|
37 | * |
---|
38 | * This macro definition depends on compiler's support for allocatable string |
---|
39 | * in derived type: |
---|
40 | * - If it actually supports this feature, the macro defines an allocation |
---|
41 | * statement. |
---|
42 | * - Otherwise it defines a simple assignment statement. |
---|
43 | */ |
---|
44 | #if ! HAVE_FTNDTSTR |
---|
45 | #define ASSIGN_DTSTR(in,out) out = in |
---|
46 | #else |
---|
47 | #define ASSIGN_DTSTR(in,out) ALLOCATE(out,source=in) |
---|
48 | #endif |
---|
49 | |
---|
50 | /** @def OBJECT(name) |
---|
51 | * Derived type declaration |
---|
52 | * |
---|
53 | * This macro definition depends on compiler's support for Bounded procedures |
---|
54 | * in derived type (more precisely, Fortran 2003 PROCEDURE keyword support): |
---|
55 | * - If it actually supports this feature, the macro defines derived type |
---|
56 | * declaration as dummy argument of subroutine/function using CLASS keyword. |
---|
57 | * - Otherwise, derived type dummy argument are declared using TYPE keyword. |
---|
58 | */ |
---|
59 | #if ! HAVE_FTNPROC |
---|
60 | #define OBJECT(name) TYPE(name) |
---|
61 | #else |
---|
62 | #define OBJECT(name) CLASS(name) |
---|
63 | #endif |
---|
64 | |
---|
65 | /* Defines SSLEN if needed */ |
---|
66 | #ifndef SSLEN |
---|
67 | #define SSLEN 250 |
---|
68 | #endif |
---|
69 | |
---|
70 | /* Defines SLLEN if needed */ |
---|
71 | #ifndef SLLEN |
---|
72 | #define SLLEN 2500 |
---|
73 | #endif |
---|