From 27ecf50ca5d4525721ff9d9fdec2aff4805a79e9 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sat, 31 Oct 2015 11:25:04 +0100 Subject: [PATCH] moved JSON functionality to occtl/ as it was the only user --- src/occtl/Makefile.am | 2 +- src/{common-json.c => occtl/json.c} | 0 src/{common-json.h => occtl/json.h} | 4 ++-- src/occtl/print.c | 2 +- tests/Makefile.am | 2 +- tests/json-escape.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename src/{common-json.c => occtl/json.c} (100%) rename src/{common-json.h => occtl/json.h} (94%) diff --git a/src/occtl/Makefile.am b/src/occtl/Makefile.am index 80ae5300..49f2fce3 100644 --- a/src/occtl/Makefile.am +++ b/src/occtl/Makefile.am @@ -10,7 +10,7 @@ COMMON_SOURCES=../common.c ../common.h ../system.c ../system.h occtl_SOURCES = occtl.c pager.c occtl.h time.c cache.c ip-cache.c \ nl.c ctl.h ../ctl.pb-c.c ../ctl.pb-c.h $(CCAN_SOURCES) $(COMMON_SOURCES) \ - print.c ../common-json.c ../common-json.h $(PROTOBUF_SOURCES) + print.c json.c json.h $(PROTOBUF_SOURCES) occtl_LDADD = ../../gl/libgnu.a $(LIBREADLINE_LIBS) \ $(LIBNL3_LIBS) $(LIBPROTOBUF_C_LIBS) $(LIBTALLOC_LIBS) diff --git a/src/common-json.c b/src/occtl/json.c similarity index 100% rename from src/common-json.c rename to src/occtl/json.c diff --git a/src/common-json.h b/src/occtl/json.h similarity index 94% rename from src/common-json.h rename to src/occtl/json.h index 81605726..f228f65c 100644 --- a/src/common-json.h +++ b/src/occtl/json.h @@ -19,8 +19,8 @@ * along with this program. If not, see . */ -#ifndef COMMON_JSON_H -# define COMMON_JSON_H +#ifndef JSON_H +# define JSON_H char *json_escape_val(char *tmp, unsigned tmp_size, const char *val); #endif diff --git a/src/occtl/print.c b/src/occtl/print.c index 12041fb6..e5ef68d2 100644 --- a/src/occtl/print.c +++ b/src/occtl/print.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #define MAX_STR_SIZE 512 diff --git a/tests/Makefile.am b/tests/Makefile.am index 2e1a7f13..9d0fbeab 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -34,7 +34,7 @@ AM_CPPFLAGS = \ kkdcp_parsing_SOURCES = ../src/config-kkdcp.c kkdcp-parsing.c kkdcp_parsing_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) -json_escape_SOURCES = ../src/common-json.c json-escape.c +json_escape_SOURCES = ../src/occtl/json.c json-escape.c json_escape_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) ipv4_prefix_SOURCES = ../src/ip-util.c ../src/ip-util.h ipv4-prefix.c diff --git a/tests/json-escape.c b/tests/json-escape.c index f72a2ba0..c91aacf0 100644 --- a/tests/json-escape.c +++ b/tests/json-escape.c @@ -23,7 +23,7 @@ #include #include #include -#include "../src/common-json.h" +#include "../src/occtl/json.h" static char *strings[] = {