]> granicus.if.org Git - graphviz/commitdiff
GD plugin: squash -Wmissing-prototypes warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 20 Aug 2022 03:42:52 +0000 (20:42 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Aug 2022 17:53:19 +0000 (10:53 -0700)
plugin/gd/CMakeLists.txt
plugin/gd/Makefile.am
plugin/gd/gdgen_text.h [new file with mode: 0644]
plugin/gd/gvplugin_gd.vcxproj
plugin/gd/gvplugin_gd.vcxproj.filters
plugin/gd/gvrender_gd.c
plugin/gd/gvrender_gd_vrml.c

index 047f29b15709703d1f2443c14f60f7c162187251..cb826694a629fe27781dd1bea6f032e59be41a9a 100644 (file)
@@ -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
index 300995eddbd3f42cd24a804475cf6509d179b295..c2b74eecbee5483695f30316b07112758c798c90 100644 (file)
@@ -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 (file)
index 0000000..039cb22
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+#include <common/geom.h>
+#include <gd.h>
+
+void gdgen_text(gdImagePtr im, pointf spf, pointf epf, int fontcolor,
+                double fontsize, int fontdpi, double fontangle, char *fontname,
+                char *str);
index dc81bf2bbb37436112236b16aedc07fe747acf62..4be0133eff02b25c6e4781ca43a0066cade88877 100644 (file)
@@ -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</Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="gdgen_text.h" />
+  </ItemGroup>
   <ItemGroup>
     <ClCompile Include="gvdevice_gd.c" />
     <ClCompile Include="gvloadimage_gd.c" />
index 2df710527f432cdca9f53734660aae572825b74c..448c1e82a5c2128095643af6949de0a9c7a4e4cd 100644 (file)
@@ -14,6 +14,9 @@
       <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
     </Filter>
   </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="gdgen_text.h" />
+  </ItemGroup>
   <ItemGroup>
     <ClCompile Include="gvdevice_gd.c">
       <Filter>Source Files</Filter>
index b4d5923f512f5e81ea43ad45299f4f059c0b822c..138a733933ea4d613066767e905863011589062f 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "config.h"
 #include "gdioctx_wrapper.h"
-
+#include "gdgen_text.h"
 #include <stdbool.h>
 #include <stdlib.h>
 #include <stdint.h>
index 6db0ccb275d54d37ed42198a3cc88285b30f21d9..96e4dcd34df95578b422f9b09410c8042a350d6c 100644 (file)
@@ -10,7 +10,7 @@
 
 
 #include "config.h"
-
+#include "gdgen_text.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>
@@ -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;