1 /*********************************************************************
2 Arithmetic -- Preform arithmetic operations on datasets.
3 This is part of GNU Astronomy Utilities (Gnuastro) package.
4 
5 Original author:
6      Mohammad Akhlaghi <mohammad@akhlaghi.org>
7 Contributing author(s):
8 Copyright (C) 2017-2021, Free Software Foundation, Inc.
9 
10 Gnuastro is free software: you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by the
12 Free Software Foundation, either version 3 of the License, or (at your
13 option) any later version.
14 
15 Gnuastro is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
22 **********************************************************************/
23 #ifndef __GAL_ARITHMETIC_INTERNAL_H__
24 #define __GAL_ARITHMETIC_INTERNAL_H__
25 
26 /* Include other headers if necessary here. Note that other header files
27    must be included before the C++ preparations below */
28 #include <gnuastro/data.h>
29 
30 
31 /* When we are within Gnuastro's building process, 'IN_GNUASTRO_BUILD' is
32    defined. In the build process, installation information (in particular
33    'GAL_CONFIG_ARITH_CHAR' and the rest of the types that we needed in the
34    arithmetic function) is kept in 'config.h'. When building a user's
35    programs, this information is kept in 'gnuastro/config.h'. Note that all
36    '.c' files must start with the inclusion of 'config.h' and that
37    'gnuastro/config.h' is only created at installation time (not present
38    during the building of Gnuastro).*/
39 #ifndef IN_GNUASTRO_BUILD
40 #include <gnuastro/config.h>
41 #endif
42 
43 
44 /* C++ Preparations */
45 #undef __BEGIN_C_DECLS
46 #undef __END_C_DECLS
47 #ifdef __cplusplus
48 # define __BEGIN_C_DECLS extern "C" {
49 # define __END_C_DECLS }
50 #else
51 # define __BEGIN_C_DECLS                /* empty */
52 # define __END_C_DECLS                  /* empty */
53 #endif
54 /* End of C++ preparations */
55 
56 
57 
58 /* Actual header contants (the above were for the Pre-processor). */
59 __BEGIN_C_DECLS  /* From C++ preparations */
60 
61 int
62 gal_arithmetic_binary_checkblank(gal_data_t *l, gal_data_t *r);
63 
64 char *
65 gal_arithmetic_operator_string(int operator);
66 
67 gal_data_t *
68 gal_arithmetic_convert_to_compiled_type(gal_data_t *in, int flags);
69 
70 
71 
72 __END_C_DECLS    /* From C++ preparations */
73 
74 #endif           /* __GAL_ARITHMETIC_INTERNAL_H__ */
75