libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit ab8b6d0e849bcff7649464618f929be4b7410cee
parent 23aaecdc80342f105c348279fa64f204251480b0
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 26 Dec 2017 00:41:51 +0100

Move drawchar() to its own file

Diffstat:
MCMakeLists.txt | 2+-
Msrc/ansilove.h | 6+-----
Rsrc/ansilove.c -> src/drawchar.c | 0
Asrc/drawchar.h | 25+++++++++++++++++++++++++
4 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -22,7 +22,7 @@ find_path(GD_INCLUDE_DIRS gd.h) find_library(GD_LIBRARIES NAMES gd REQUIRED) include_directories(${GD_INCLUDE_DIRS}) -set(SRC src/fonts.c src/ansilove.c src/explode.c src/strtolower.c src/output.c) +set(SRC src/drawchar.c src/fonts.c src/explode.c src/strtolower.c src/output.c) set(LOADERS src/loaders/ansi.c src/loaders/artworx.c src/loaders/binary.c src/loaders/icedraw.c src/loaders/pcboard.c src/loaders/tundra.c src/loaders/xbin.c) if(NOT HAVE_STRTONUM) diff --git a/src/ansilove.h b/src/ansilove.h @@ -10,6 +10,7 @@ // #include "config.h" +#include "drawchar.h" #include "explode.h" #include "fonts.h" #include "output.h" @@ -28,9 +29,4 @@ #ifndef ansilove_h #define ansilove_h -// prototypes -void drawchar(gdImagePtr im, const unsigned char *font_data, int32_t bits, - int32_t height, int32_t column, int32_t row, - int32_t background, int32_t foreground, unsigned char character); - #endif diff --git a/src/ansilove.c b/src/drawchar.c diff --git a/src/drawchar.h b/src/drawchar.h @@ -0,0 +1,25 @@ +// +// ansilove.h +// AnsiLove/C +// +// Copyright (C) 2011-2017 Stefan Vogt, Brian Cassidy, and Frederic Cambus. +// All rights reserved. +// +// This source code is licensed under the BSD 2-Clause License. +// See the LICENSE file for details. +// + +#include <gd.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> + +#ifndef drawchar_h +#define drawchar_h + +// prototypes +void drawchar(gdImagePtr im, const unsigned char *font_data, int32_t bits, + int32_t height, int32_t column, int32_t row, + int32_t background, int32_t foreground, unsigned char character); + +#endif