commit eee3a6e193f42bc9cb98e85920d194b800435ab8
Author:     Laslo Hunhold <[email protected]>
AuthorDate: Tue Oct 20 23:52:17 2020 +0200
Commit:     Laslo Hunhold <[email protected]>
CommitDate: Tue Oct 20 23:52:17 2020 +0200

    Rename datafiles and tests
    
    Unicode talks about "breaks" and has its datafiles still named after
    them, but the standards have long changed to call the "breaks"
    boundaries. I have already adapted this in the API, but the internal
    files kept it for no reason other than being inspired by the Unicode
    data directory.
    
    When Unicode can't fix its names for backwards compatibility, we will do
    it.
    
    While at it, fix the order in the makefile.
    
    Signed-off-by: Laslo Hunhold <[email protected]>

diff --git a/Makefile b/Makefile
index 808e7e7..38487d8 100644
--- a/Makefile
+++ b/Makefile
@@ -5,43 +5,43 @@
 include config.mk
 
 LIB = src/boundary src/codepoint src/grapheme
-TEST = test/grapheme_break test/utf8-decode test/utf8-encode
-DATA = data/gbp data/emo data/gbt
+TEST = test/grapheme_boundary test/utf8-decode test/utf8-encode
+DATA = data/emoji data/grapheme_boundary data/grapheme_boundary_test
 
 MAN3 = man/grapheme_bytelen.3
 MAN7 = man/libgrapheme.7
 
 all: libgrapheme.a libgrapheme.so
 
-data/gbp.h: data/gbp.txt data/gbp
-data/emo.h: data/emo.txt data/emo
-data/gbt.h: data/gbt.txt data/gbt
+data/emoji.h: data/emoji.txt data/emoji
+data/grapheme_boundary.h: data/grapheme_boundary.txt data/grapheme_boundary
+data/grapheme_boundary_test.h: data/grapheme_boundary_test.txt 
data/grapheme_boundary_test
 
-data/gbp.o: data/gbp.c config.mk data/util.h
-data/emo.o: data/emo.c config.mk data/util.h
-data/gbt.o: data/gbt.c config.mk data/util.h
+data/emoji.o: data/emoji.c config.mk data/util.h
+data/grapheme_boundary.o: data/grapheme_boundary.c config.mk data/util.h
+data/grapheme_boundary_test.o: data/grapheme_boundary_test.c config.mk 
data/util.h
 data/util.o: data/util.c config.mk data/util.h
-src/boundary.o: src/boundary.c config.mk data/emo.h data/gbp.h grapheme.h
+src/boundary.o: src/boundary.c config.mk data/emoji.h data/grapheme_boundary.h 
grapheme.h
 src/codepoint.o: src/codepoint.c config.mk grapheme.h
 src/grapheme.o: src/grapheme.c config.mk grapheme.h
-test/grapheme_break.o: test/grapheme_break.c config.mk data/gbt.h grapheme.h
+test/grapheme_boundary.o: test/grapheme_boundary.c config.mk 
data/grapheme_boundary_test.h grapheme.h
 test/utf8-encode.o: test/utf8-encode.c config.mk grapheme.h
 test/utf8-decode.o: test/utf8-decode.c config.mk grapheme.h
 
-data/gbp: data/gbp.o data/util.o
-data/emo: data/emo.o data/util.o
-data/gbt: data/gbt.o data/util.o
-test/grapheme_break: test/grapheme_break.o libgrapheme.a
+data/emoji: data/emoji.o data/util.o
+data/grapheme_boundary: data/grapheme_boundary.o data/util.o
+data/grapheme_boundary_test: data/grapheme_boundary_test.o data/util.o
+test/grapheme_boundary: test/grapheme_boundary.o libgrapheme.a
 test/utf8-encode: test/utf8-encode.o libgrapheme.a
 test/utf8-decode: test/utf8-decode.o libgrapheme.a
 
-data/gbp.txt:
-       wget -O $@ 
https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakProperty.txt
-
-data/emo.txt:
+data/emoji.txt:
        wget -O $@ 
https://www.unicode.org/Public/13.0.0/ucd/emoji/emoji-data.txt
 
-data/gbt.txt:
+data/grapheme_boundary.txt:
+       wget -O $@ 
https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakProperty.txt
+
+data/grapheme_boundary_test.txt:
        wget -O $@ 
https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakTest.txt
 
 $(DATA:=.h):
diff --git a/data/emo.c b/data/emoji.c
similarity index 100%
rename from data/emo.c
rename to data/emoji.c
diff --git a/data/emo.txt b/data/emoji.txt
similarity index 100%
rename from data/emo.txt
rename to data/emoji.txt
diff --git a/data/gbp.c b/data/grapheme_boundary.c
similarity index 100%
rename from data/gbp.c
rename to data/grapheme_boundary.c
diff --git a/data/gbp.txt b/data/grapheme_boundary.txt
similarity index 100%
rename from data/gbp.txt
rename to data/grapheme_boundary.txt
diff --git a/data/gbt.c b/data/grapheme_boundary_test.c
similarity index 100%
rename from data/gbt.c
rename to data/grapheme_boundary_test.c
diff --git a/data/gbt.txt b/data/grapheme_boundary_test.txt
similarity index 100%
rename from data/gbt.txt
rename to data/grapheme_boundary_test.txt
diff --git a/src/boundary.c b/src/boundary.c
index 01724b6..b2d67d3 100644
--- a/src/boundary.c
+++ b/src/boundary.c
@@ -3,8 +3,8 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "../data/emo.h"
-#include "../data/gbp.h"
+#include "../data/emoji.h"
+#include "../data/grapheme_boundary.h"
 
 #define LEN(x) (sizeof(x) / sizeof(*x))
 
diff --git a/test/grapheme_break.c b/test/grapheme_boundary.c
similarity index 95%
rename from test/grapheme_break.c
rename to test/grapheme_boundary.c
index 3bd48a5..09f5971 100644
--- a/test/grapheme_break.c
+++ b/test/grapheme_boundary.c
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include "../grapheme.h"
-#include "../data/gbt.h"
+#include "../data/grapheme_boundary_test.h"
 
 #define LEN(x) (sizeof(x) / sizeof(*x))
 

Reply via email to