From fe9c40e6fa10c5e2c8b9774de3f2894dbcb52de2 Mon Sep 17 00:00:00 2001 From: MrDave Date: Sun, 29 Sep 2019 22:37:50 -0600 Subject: [PATCH] Add header file for draw.c --- src/alg.c | 1 + src/draw.c | 1 + src/draw.h | 33 +++++++++++++++++++++++++++++++++ src/motion.c | 1 + src/motion.h | 7 ------- 5 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 src/draw.h diff --git a/src/alg.c b/src/alg.c index 192dbc01..d3d5dfcf 100644 --- a/src/alg.c +++ b/src/alg.c @@ -8,6 +8,7 @@ */ #include "motion.h" #include "alg.h" +#include "draw.h" #define MAX2(x, y) ((x) > (y) ? (x) : (y)) #define MAX3(x, y, z) ((x) > (y) ? ((x) > (z) ? (x) : (z)) : ((y) > (z) ? (y) : (z))) diff --git a/src/draw.c b/src/draw.c index a7cb9861..0b67ff20 100644 --- a/src/draw.c +++ b/src/draw.c @@ -11,6 +11,7 @@ #include #include "motion.h" +#include "draw.h" /* Highest ascii value is 126 (~) */ #define ASCII_MAX 127 diff --git a/src/draw.h b/src/draw.h new file mode 100644 index 00000000..ac6936b6 --- /dev/null +++ b/src/draw.h @@ -0,0 +1,33 @@ +/* dbse.h + * + * This file is part of the Motion application + * Copyright (C) 2019 Motion-Project Developers(motion-project.github.io) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + +#ifndef _INCLUDE_DRAW_H_ +#define _INCLUDE_DRAQ_H_ + +/* date/time drawing, draw.c */ +int draw_text(unsigned char *image, + int width, int height, + int startx, int starty, + const char *text, int factor); +int initialize_chars(void); + + +#endif \ No newline at end of file diff --git a/src/motion.c b/src/motion.c index 16864259..c8a3fe13 100644 --- a/src/motion.c +++ b/src/motion.c @@ -19,6 +19,7 @@ #include "rotate.h" #include "webu.h" #include "dbse.h" +#include "draw.h" #define IMAGE_BUFFER_FLUSH ((unsigned int)-1) diff --git a/src/motion.h b/src/motion.h index d2137d8c..4d7b387c 100644 --- a/src/motion.h +++ b/src/motion.h @@ -282,13 +282,6 @@ struct stream_data { * These values are set in rotate_init. */ -/* date/time drawing, draw.c */ -int draw_text(unsigned char *image, - int width, int height, - int startx, int starty, - const char *text, int factor); -int initialize_chars(void); - struct images { struct ctx_image_data *image_ring; /* The base address of the image ring buffer */ int image_ring_size;