From 3e4e8c467296a958ff97c9ab646e84571eab9e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Thu, 15 Jun 2023 14:35:11 +0200 Subject: [PATCH] Fixup for compiling new table module. --- src/Makefile | 2 +- src/sgr-state.scm | 2 +- src/table-processor.scm | 2 +- src/util-utf8.scm | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index 83a5756..be6d7c8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -400,7 +400,7 @@ TABLE-SOURCES=table.scm sgr-list.import.scm sgr-block.import.scm \ table.o: table.import.scm table.import.scm: $(TABLE-SOURCES) -SGR-LIST-SOURCES=sgr-list.scm raket-kwargs.import.scm \ +SGR-LIST-SOURCES=sgr-list.scm racket-kwargs.import.scm \ sgr-state.import.scm testing.import.scm util-utf8.import.scm sgr-list.o: sgr-list.import.scm diff --git a/src/sgr-state.scm b/src/sgr-state.scm index 27dbf06..4f4ba03 100644 --- a/src/sgr-state.scm +++ b/src/sgr-state.scm @@ -117,7 +117,7 @@ (= (bitwise-and v (bitwise-not sgr-state-bit-mask)) 0)) (and (pair? v) (fixnum? (car v)) - (= (bitwise-and v (bitwise-not sgr-state-bit-mask)) 0) + (= (bitwise-and (car v) (bitwise-not sgr-state-bit-mask)) 0) (pair? (cdr v)) (or (not (cadr v)) (and (fixnum? (cadr v)) diff --git a/src/table-processor.scm b/src/table-processor.scm index 53eb8d2..2a80979 100644 --- a/src/table-processor.scm +++ b/src/table-processor.scm @@ -173,7 +173,7 @@ (define (table-prepare tbl width-arg widths-spec) (if (or (null? tbl) (null? (car tbl))) - '() + (values '() '()) (let* ((ptbl (table-prepare-cells tbl)) ;;(_ (print ptbl)) (num-columns (length (car ptbl))) diff --git a/src/util-utf8.scm b/src/util-utf8.scm index ed08f6c..b647c13 100644 --- a/src/util-utf8.scm +++ b/src/util-utf8.scm @@ -163,7 +163,10 @@ 3)) ((= (bitwise-and byte #b11110000) #b11110000) (values (bitwise-and byte #b111) - 4))))) + 4)) + (else + ;; Should not happen + (values 0 0))))) (loop (cdr bytes) (list byte) (arithmetic-shift first-byte 6)