commit 6d2af93ffb9ebdae7d4712923e50f858574c7714
parent 0aaf3fcc7bb84fe97b8d75c9d5d14305d54d4dfd
Author: Laslo Hunhold <dev@frign.de>
Date: Fri, 17 Jun 2022 00:02:19 +0200
Remove some testing residue
The fragment in src/line.c was the untailored-number-break-check,
which sadly wasn't the one the test-cases were assuming. As mentioned
previously, this check would've in fact allowed to implement a
grapheme_is_line_break()-function.
Signed-off-by: Laslo Hunhold <dev@frign.de>
Diffstat:
2 files changed, 1 insertion(+), 38 deletions(-)
diff --git a/Makefile b/Makefile
@@ -213,7 +213,7 @@ dist:
cp $(MAN3) $(MAN7) "libgrapheme-$(VERSION)/man"
cp $(SRC:=.c) src/util.h "libgrapheme-$(VERSION)/src"
cp $(TEST:=.c) test/util.c test/util.h "libgrapheme-$(VERSION)/test"
- tar -cf - "libgrapheme-$(VERSION)" | gzip -c > "libgrapheme-$(VERSION).tar.bz2"
+ tar -cf - "libgrapheme-$(VERSION)" | gzip -c > "libgrapheme-$(VERSION).tar.gz"
rm -rf "libgrapheme-$(VERSION)"
.PHONY: all benchmark test install uninstall clean clean-data dist
diff --git a/src/line.c b/src/line.c
@@ -439,43 +439,6 @@ next_line_break(const void *str, size_t len, size_t (*get_codepoint)
continue;
}
-#if 0
- if ((last_non_cm_or_zwj_prop == LINE_BREAK_PROP_CL &&
- cp1_prop == LINE_BREAK_PROP_PO) ||
- ((last_non_cm_or_zwj_prop == LINE_BREAK_PROP_CP_WITHOUT_EAW_HWF ||
- last_non_cm_or_zwj_prop == LINE_BREAK_PROP_CP_WITH_EAW_HWF) &&
- cp1_prop == LINE_BREAK_PROP_PO) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_CL &&
- cp1_prop == LINE_BREAK_PROP_PR) ||
- ((last_non_cm_or_zwj_prop == LINE_BREAK_PROP_CP_WITHOUT_EAW_HWF ||
- last_non_cm_or_zwj_prop == LINE_BREAK_PROP_CP_WITH_EAW_HWF) &&
- cp1_prop == LINE_BREAK_PROP_PR) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_NU &&
- cp1_prop == LINE_BREAK_PROP_PO) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_NU &&
- cp1_prop == LINE_BREAK_PROP_PR) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_PO &&
- (cp1_prop == LINE_BREAK_PROP_OP_WITHOUT_EAW_HWF ||
- cp1_prop == LINE_BREAK_PROP_OP_WITH_EAW_HWF)) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_PO &&
- cp1_prop == LINE_BREAK_PROP_NU) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_PR &&
- (cp1_prop == LINE_BREAK_PROP_OP_WITHOUT_EAW_HWF ||
- cp1_prop == LINE_BREAK_PROP_OP_WITH_EAW_HWF)) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_PR &&
- cp1_prop == LINE_BREAK_PROP_NU) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_HY &&
- cp1_prop == LINE_BREAK_PROP_NU) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_IS &&
- cp1_prop == LINE_BREAK_PROP_NU) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_NU &&
- cp1_prop == LINE_BREAK_PROP_NU) ||
- (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_SY &&
- cp1_prop == LINE_BREAK_PROP_NU)) {
- continue;
- }
-#endif
-
/* LB26 */
if (last_non_cm_or_zwj_prop == LINE_BREAK_PROP_JL &&
(cp1_prop == LINE_BREAK_PROP_JL ||