Commit d02cc62e authored by denis's avatar denis

added include guard #ifndef for all headers

parent ba2eca50
Pipeline #2451557 skipped
......@@ -13,6 +13,6 @@ ichinscratchy: $(OBJPATH)
build/%.o: src/%.c
$(CC) $(CFLAGS) -g -c $(INCLUDES) -o $@ $<
clean:
clean:
rm -f $(OBJPATH)
rm -f ichinscratchy
......@@ -15,6 +15,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ARRAYS_H
#define ARRAYS_H
#include "bstrlib.h"
......@@ -31,4 +33,5 @@ void free_1d_array_float(float *array);
void free_1d_array_char(char **array, int N);
void free_1d_array_bstring(bstring *array, int N);
#endif //ARRAYS_H
/* End of file */
......@@ -16,9 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONSTANTS_H
#define CONSTANTS_H
#define COL_QUOTES_DAILY_OPEN 0
#define COL_QUOTES_DAILY_HIGH 1
#define COL_QUOTES_DAILY_LOW 2
#define COL_QUOTES_DAILY_CLOSE 3
#endif // CONSTANTS_H
/* End of file */
......@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DATABASE_H
#define DATABASE_H
#include "bstrlib.h"
void check_mysql_error();
......@@ -28,4 +31,6 @@ void mysql_updatequotes(bstring symbol);
void mysql_get_lagged_dates(bstring symbol, int days, bstring *lagged_dates);
void mysql_update_indicator(bstring indicator, bstring tablename, \
bstring symbol, int days, bstring *dates, float **quotes, int quote_field);
#endif // DATABASE_H
/* End of file */
......@@ -16,11 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <math.h>
#ifndef INDICATORS_H
#define INDICATORS_H
void highest_high(int period, int nr_days, float **quotes, float *highest_highs);
void lowest_low(int period, int nr_days, float **quotes, float *lowest_lows);
void ichimoku_tenkan(int nr_days, float *hh_short, float *ll_short, float *tenkan_sen);
void ichimoku_kijun(int nr_days, float *hh_mid, float *ll_mid, float *kijun_sen);
#endif // INDICATORS_H
/* End of file */
......@@ -18,6 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef READCONF_H
#define READCONF_H
#include "bstrlib.h"
#define MAXLEN 80
......@@ -46,4 +49,5 @@ typedef struct parameters parameter;
void init_parameters (parameter *parms);
int parse_config (parameter * parms);
#endif // READCONF_H
/* End of file */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment