[hackers] [libgrapheme] Remove some testing residue || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Fri, 17 Jun 2022 00:03:46 +0200 (CEST)

commit 6d2af93ffb9ebdae7d4712923e50f858574c7714
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Fri Jun 17 00:02:19 2022 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Fri Jun 17 00:02:19 2022 +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_AT_frign.de>

diff --git a/Makefile b/Makefile
index 84694e6..f6ebe06 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -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
index 3dcd271..2a5623d 100644
--- a/src/line.c
+++ b/src/line.c
_AT_@ -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 ||
Received on Fri Jun 17 2022 - 00:03:46 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 17 2022 - 00:12:29 CEST