From 24e355c2078fe2041b48015e346fd7ab42914348 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 19 Aug 2022 20:42:52 -0700 Subject: [PATCH] GD plugin: squash -Wmissing-prototypes warning --- plugin/gd/CMakeLists.txt | 1 + plugin/gd/Makefile.am | 2 +- plugin/gd/gdgen_text.h | 8 ++++++++ plugin/gd/gvplugin_gd.vcxproj | 3 +++ plugin/gd/gvplugin_gd.vcxproj.filters | 3 +++ plugin/gd/gvrender_gd.c | 2 +- plugin/gd/gvrender_gd_vrml.c | 4 +--- 7 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 plugin/gd/gdgen_text.h diff --git a/plugin/gd/CMakeLists.txt b/plugin/gd/CMakeLists.txt index 047f29b15..cb826694a 100644 --- a/plugin/gd/CMakeLists.txt +++ b/plugin/gd/CMakeLists.txt @@ -3,6 +3,7 @@ if(GD_FOUND) add_library(gvplugin_gd SHARED # Source files gdioctx_wrapper.h + gdgen_text.h gvdevice_gd.c gvloadimage_gd.c gvplugin_gd.c diff --git a/plugin/gd/Makefile.am b/plugin/gd/Makefile.am index 300995edd..c2b74eecb 100644 --- a/plugin/gd/Makefile.am +++ b/plugin/gd/Makefile.am @@ -19,7 +19,7 @@ pkglib_LTLIBRARIES = libgvplugin_gd.la endif endif -noinst_HEADERS = gdioctx_wrapper.h +noinst_HEADERS = gdioctx_wrapper.h gdgen_text.h libgvplugin_gd_C_la_SOURCES = \ gvplugin_gd.c \ gvrender_gd.c \ diff --git a/plugin/gd/gdgen_text.h b/plugin/gd/gdgen_text.h new file mode 100644 index 000000000..039cb2245 --- /dev/null +++ b/plugin/gd/gdgen_text.h @@ -0,0 +1,8 @@ +#pragma once + +#include +#include + +void gdgen_text(gdImagePtr im, pointf spf, pointf epf, int fontcolor, + double fontsize, int fontdpi, double fontangle, char *fontname, + char *str); diff --git a/plugin/gd/gvplugin_gd.vcxproj b/plugin/gd/gvplugin_gd.vcxproj index dc81bf2bb..4be0133ef 100644 --- a/plugin/gd/gvplugin_gd.vcxproj +++ b/plugin/gd/gvplugin_gd.vcxproj @@ -105,6 +105,9 @@ copy $(SolutionDir)windows\dependencies\libraries\x86\bin\fontconfig.dll $(OutDi copy $(SolutionDir)windows\dependencies\libraries\x86\bin\pixman-1.dll $(OutDir)pixman-1.dll + + + diff --git a/plugin/gd/gvplugin_gd.vcxproj.filters b/plugin/gd/gvplugin_gd.vcxproj.filters index 2df710527..448c1e82a 100644 --- a/plugin/gd/gvplugin_gd.vcxproj.filters +++ b/plugin/gd/gvplugin_gd.vcxproj.filters @@ -14,6 +14,9 @@ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + Source Files diff --git a/plugin/gd/gvrender_gd.c b/plugin/gd/gvrender_gd.c index b4d5923f5..138a73393 100644 --- a/plugin/gd/gvrender_gd.c +++ b/plugin/gd/gvrender_gd.c @@ -10,7 +10,7 @@ #include "config.h" #include "gdioctx_wrapper.h" - +#include "gdgen_text.h" #include #include #include diff --git a/plugin/gd/gvrender_gd_vrml.c b/plugin/gd/gvrender_gd_vrml.c index 6db0ccb27..96e4dcd34 100644 --- a/plugin/gd/gvrender_gd_vrml.c +++ b/plugin/gd/gvrender_gd_vrml.c @@ -10,7 +10,7 @@ #include "config.h" - +#include "gdgen_text.h" #include #include #include @@ -339,8 +339,6 @@ static void vrml_end_edge(GVJ_t *job) gvputs(job, "] }\n"); } -extern void gdgen_text(gdImagePtr im, pointf spf, pointf epf, int fontcolor, double fontsize, int fontdpi, double fontangle, char *fontname, char *str); - static void vrml_textspan(GVJ_t *job, pointf p, textspan_t * span) { obj_state_t *obj = job->obj; -- 2.40.0