From a6b3fe7812a120d03df3b3329f570fe7b6dcafe0 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 23 Sep 2014 12:39:23 -0400 Subject: [PATCH] Shorten the name of the linkable module and headeer file. --- Makefile | 18 ++++++++++-------- example1.c | 2 +- example2.c | 2 +- example3.c | 2 +- microjson.asc | 6 +++--- microjson.c => mjson.c | 4 ++-- microjson.h => mjson.h | 0 test_microjson.c | 4 ++-- 8 files changed, 20 insertions(+), 18 deletions(-) rename microjson.c => mjson.c (99%) rename microjson.h => mjson.h (100%) diff --git a/Makefile b/Makefile index addfc82..57cf3c5 100644 --- a/Makefile +++ b/Makefile @@ -7,19 +7,21 @@ CFLAGS = -O # Add DEBUG_ENABLE for the tracing code CFLAGS += -DDEBUG_ENABLE -g -microjson.o: microjson.c microjson.h +mjson.o: mjson.c mjson.h -test_microjson: test_microjson.o microjson.o - $(CC) $(CFLAGS) -o test_microjson test_microjson.o microjson.o +test_microjson: test_microjson.o mjson.o + $(CC) $(CFLAGS) -o test_microjson test_microjson.o mjson.o # Regression test check: test_microjson test_microjson -# Worked examples -example1: example1.c microjson.c -example2: example2.c microjson.c -example3: example3.c microjson.c +make testbuild: mjson.o test_microjson example1 example2 example3 + +# Worked examples. These are essentially subsets of the regresion test. +example1: example1.c mjson.c +example2: example2.c mjson.c +example3: example3.c mjson.c clean: rm -f microjson.o test_microjson.o test_microjson example[123] @@ -36,5 +38,5 @@ microjson-$(VERSION).tar.gz: $(ALL) dist: microjson-$(VERSION).tar.gz -release: microjson-$(VERS).tar.gz microjson.html +release: microjson-$(VERS).tar.gz mjson.html shipper version=$(VERS) | sh -e -x diff --git a/example1.c b/example1.c index 81d370a..949b2f4 100644 --- a/example1.c +++ b/example1.c @@ -8,7 +8,7 @@ #include #include -#include "microjson.h" +#include "mjson.h" static bool flag1, flag2; static int count; diff --git a/example2.c b/example2.c index 8780619..bfff422 100644 --- a/example2.c +++ b/example2.c @@ -6,7 +6,7 @@ #include #include -#include "microjson.h" +#include "mjson.h" #define MAXCHANNELS 72 diff --git a/example3.c b/example3.c index 9b4c8e1..6c2c786 100644 --- a/example3.c +++ b/example3.c @@ -9,7 +9,7 @@ #include #include -#include "microjson.h" +#include "mjson.h" #define MAXUSERDEVS 4 diff --git a/microjson.asc b/microjson.asc index d8551ba..61de65e 100644 --- a/microjson.asc +++ b/microjson.asc @@ -45,7 +45,7 @@ Here is nearly the simplest possible example: #include #include -#include "microjson.h" +#include "mjson.h" static bool flag1, flag2; static int count; @@ -181,7 +181,7 @@ in this example: #include #include -#include "microjson.h" +#include "mjson.h" #define MAXCHANNELS 72 @@ -255,7 +255,7 @@ array of JSON objects directly into an array of C structs. #include #include -#include "microjson.h" +#include "mjson.h" #define MAXUSERDEVS 4 diff --git a/microjson.c b/mjson.c similarity index 99% rename from microjson.c rename to mjson.c index 921c815..0bcef5e 100644 --- a/microjson.c +++ b/mjson.c @@ -1,7 +1,7 @@ /**************************************************************************** NAME - microjson.c - parse JSON into fixed-extent data structures + mjson.c - parse JSON into fixed-extent data structures DESCRIPTION This module parses a large subset of JSON (JavaScript Object @@ -74,7 +74,7 @@ PERMISSIONS #include #include -#include "microjson.h" +#include "mjson.h" #ifdef DEBUG_ENABLE static int debuglevel = 0; diff --git a/microjson.h b/mjson.h similarity index 100% rename from microjson.h rename to mjson.h diff --git a/test_microjson.c b/test_microjson.c index 70c9cb2..5b73ec6 100644 --- a/test_microjson.c +++ b/test_microjson.c @@ -1,4 +1,4 @@ -/* test_microjson.c - unit test for JSON parsing into fixed-extent structures +/* test_mjson.c - unit test for JSON parsing into fixed-extent structures * * This file is Copyright (c) 2010 by the GPSD project * BSD terms apply: see the file COPYING in the distribution root for details. @@ -17,7 +17,7 @@ #include #include -#include "microjson.h" +#include "mjson.h" /* * Many of these structures and examples were dissected out of the GPSD code. -- 2.43.0