]> granicus.if.org Git - graphviz/commitdiff
gvcolor: squash -Wmissing-prototypes warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 15 Jan 2023 21:38:55 +0000 (13:38 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 21 Jan 2023 04:48:33 +0000 (20:48 -0800)
cmd/tools/Makefile.am
cmd/tools/colorxlate.h [new file with mode: 0644]
cmd/tools/colxlate.c
cmd/tools/gvcolor.c

index 1233149650f8cee6a679e1aa139d64f02ac34866..56003449483fd0056384f45c44ace9376fea979a 100644 (file)
@@ -10,7 +10,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/lib/common \
        $(EXPAT_INCLUDES)
 
-noinst_HEADERS = colortbl.h convert.h mmio.h matrix_market.h \
+noinst_HEADERS = colortbl.h colorxlate.h convert.h mmio.h matrix_market.h \
        graph_generator.h gml2gv.h gmlparse.h openFile.h
 if ENABLE_STATIC
 bin_PROGRAMS = gc gvcolor gxl2gv acyclic nop ccomps sccmap tred \
@@ -118,7 +118,7 @@ nop_LDADD = \
        $(top_builddir)/lib/cgraph/libcgraph.la
 
 
-gvcolor_SOURCES = gvcolor.c colxlate.c colortbl.h
+gvcolor_SOURCES = gvcolor.c colxlate.c colortbl.h colorxlate.h
 
 gvcolor_LDADD = \
        $(top_builddir)/lib/ingraphs/libingraphs_C.la \
diff --git a/cmd/tools/colorxlate.h b/cmd/tools/colorxlate.h
new file mode 100644 (file)
index 0000000..92bef47
--- /dev/null
@@ -0,0 +1,3 @@
+#pragma once
+
+void colorxlate(char *str, char *buf);
index f0d5538b27b1705bfbac05cd49476c81ab0426ba..99232dcd773c8e591c7ada451077e03d74f98a02 100644 (file)
@@ -26,6 +26,7 @@ typedef struct hsbcolor_t {
 } hsbcolor_t;
 
 #include "colortbl.h"
+#include "colorxlate.h"
 
 static char *canoncolor(const char *orig, char *out)
 {
index 87eedeaa523edb39c230dc01ef0b52a28e6544ad..2f66e6831d78cb1d816fe58d5de1013b88925de0 100644 (file)
@@ -26,6 +26,7 @@
 #include <cgraph/alloc.h>
 #include <cgraph/cgraph.h>
 #include <cgraph/exit.h>
+#include "colorxlate.h"
 #include <math.h>
 #include <stdlib.h>
 typedef struct Agnodeinfo_t {
@@ -50,8 +51,6 @@ int AdjustSaturation;
 double MinRankSaturation;
 double MaxRankSaturation;
 
-extern void colorxlate(char *str, char *buf);
-
 static int cmpf(Agnode_t ** n0, Agnode_t ** n1)
 {
     double relrank0 = ND_relrank(*n0);