diff --git a/libguile/init.c b/libguile/init.c index 408e15334..38712b647 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -444,7 +444,7 @@ scm_i_init_guile (struct gc_stack_addr base) scm_init_read (); scm_init_strorder (); scm_init_srfi_13 (); - scm_init_srfi_14 (); /* Requires smob_prehistory */ + scm_boot_srfi_14 (); /* Requires smob_prehistory */ scm_init_exceptions (); scm_init_throw (); /* Requires smob_prehistory */ scm_init_version (); diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c index 7b11bc9f4..f38e305a9 100644 --- a/libguile/srfi-14.c +++ b/libguile/srfi-14.c @@ -29,6 +29,7 @@ #include "bytevectors-internal.h" #include "chars.h" #include "eval.h" +#include "extensions.h" #include "gsubr.h" #include "list.h" #include "modules.h" @@ -40,6 +41,7 @@ #include "strings.h" #include "symbols.h" #include "values.h" +#include "version.h" #include "srfi-14.h" @@ -1971,35 +1973,11 @@ SCM_DEFINE (scm_char_set_diff_plus_intersection_x, -/* Standard character sets. */ - -SCM scm_char_set_lower_case; -SCM scm_char_set_upper_case; -SCM scm_char_set_title_case; -SCM scm_char_set_letter; -SCM scm_char_set_digit; -SCM scm_char_set_letter_and_digit; -SCM scm_char_set_graphic; -SCM scm_char_set_printing; -SCM scm_char_set_whitespace; -SCM scm_char_set_iso_control; -SCM scm_char_set_punctuation; -SCM scm_char_set_symbol; -SCM scm_char_set_hex_digit; -SCM scm_char_set_blank; -SCM scm_char_set_ascii; -SCM scm_char_set_empty; -SCM scm_char_set_designated; -SCM scm_char_set_full; - - /* Create an empty character set and return it after binding it to NAME. */ static inline SCM -define_charset (const char *name, size_t len, const scm_t_char_range *ranges) +define_charset (size_t len, const scm_t_char_range *ranges) { - SCM cs = scm_from_charset (make_static_charset (len, ranges)); - scm_c_define (name, cs); - return cs; + return scm_from_charset (make_static_charset (len, ranges)); } SCM_DEFINE (scm_sys_char_set_dump, "%char-set-dump", 1, 0, 0, (SCM charset), @@ -2058,11 +2036,45 @@ SCM_DEFINE (scm_sys_char_set_dump, "%char-set-dump", 1, 0, 0, (SCM charset), -#define DEFINE_CHARSET(name, stem) \ - define_charset ("char-set:" name, cs_##stem##_len, cs_##stem##_ranges) +#define DECLARE_C_CHARSET(name, stem) \ + SCM scm_char_set_##stem; +#define DEFINE_C_CHARSET(name, stem) \ + scm_char_set_##stem = define_charset (cs_##stem##_len, cs_##stem##_ranges); +#define DEFINE_SCM_CHARSET(name, stem) \ + scm_c_define ("char-set:" name, scm_char_set_##stem); + +#define FOR_EACH_STANDARD_CHARSET(M) \ + M ("upper-case", upper_case) \ + M ("lower-case", lower_case) \ + M ("title-case", title_case) \ + M ("letter", letter) \ + M ("digit", digit) \ + M ("letter+digit", letter_and_digit) \ + M ("graphic", graphic) \ + M ("printing", printing) \ + M ("whitespace", whitespace) \ + M ("iso-control", iso_control) \ + M ("punctuation", punctuation) \ + M ("symbol", symbol) \ + M ("hex-digit", hex_digit) \ + M ("blank", blank) \ + M ("ascii", ascii) \ + M ("empty", empty) \ + M ("designated", designated) \ + M ("full", full) + +FOR_EACH_STANDARD_CHARSET(DECLARE_C_CHARSET) + +static void +scm_init_srfi_14 (void) +{ + FOR_EACH_STANDARD_CHARSET (DEFINE_SCM_CHARSET); + +#include "srfi-14.x" +} void -scm_init_srfi_14 (void) +scm_boot_srfi_14 (void) { empty_charset_ranges = scm_i_make_typed_bytevector (0, SCM_ARRAY_ELEMENT_TYPE_U32); @@ -2070,27 +2082,12 @@ scm_init_srfi_14 (void) scm_tc16_charset_cursor = scm_make_smob_type ("char-set-cursor", 0); scm_set_smob_print (scm_tc16_charset_cursor, charset_cursor_print); - scm_char_set_upper_case = DEFINE_CHARSET ("upper-case", upper_case); - scm_char_set_lower_case = DEFINE_CHARSET ("lower-case", lower_case); - scm_char_set_title_case = DEFINE_CHARSET ("title-case", title_case); - scm_char_set_letter = DEFINE_CHARSET ("letter", letter); - scm_char_set_digit = DEFINE_CHARSET ("digit", digit); - scm_char_set_letter_and_digit = DEFINE_CHARSET ("letter+digit", - letter_plus_digit); - scm_char_set_graphic = DEFINE_CHARSET ("graphic", graphic); - scm_char_set_printing = DEFINE_CHARSET ("printing", printing); - scm_char_set_whitespace = DEFINE_CHARSET ("whitespace", whitespace); - scm_char_set_iso_control = DEFINE_CHARSET ("iso-control", iso_control); - scm_char_set_punctuation = DEFINE_CHARSET ("punctuation", punctuation); - scm_char_set_symbol = DEFINE_CHARSET ("symbol", symbol); - scm_char_set_hex_digit = DEFINE_CHARSET ("hex-digit", hex_digit); - scm_char_set_blank = DEFINE_CHARSET ("blank", blank); - scm_char_set_ascii = DEFINE_CHARSET ("ascii", ascii); - scm_char_set_empty = DEFINE_CHARSET ("empty", empty); - scm_char_set_designated = DEFINE_CHARSET ("designated", designated); - scm_char_set_full = DEFINE_CHARSET ("full", full); + FOR_EACH_STANDARD_CHARSET (DEFINE_C_CHARSET); -#include "srfi-14.x" + scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION, + "scm_init_srfi_14", + (scm_t_extension_init_func) scm_init_srfi_14, + NULL); } /* End of srfi-14.c. */ diff --git a/libguile/srfi-14.h b/libguile/srfi-14.h index c3cb8f427..2cc5aa8f5 100644 --- a/libguile/srfi-14.h +++ b/libguile/srfi-14.h @@ -101,6 +101,6 @@ SCM_API SCM scm_char_set_full; SCM_INTERNAL int scm_i_char_sets_equal (SCM a, SCM b); SCM_INTERNAL int scm_i_print_char_set (SCM charset, SCM port, scm_print_state *pstate); -SCM_INTERNAL void scm_init_srfi_14 (void); +SCM_INTERNAL void scm_boot_srfi_14 (void); #endif /* SCM_SRFI_14_H */ diff --git a/libguile/unidata_to_charset.awk b/libguile/unidata_to_charset.awk index 13692797a..848dfcb99 100644 --- a/libguile/unidata_to_charset.awk +++ b/libguile/unidata_to_charset.awk @@ -1,6 +1,6 @@ # unidata_to_charset.awk --- Compute SRFI-14 charsets from UnicodeData.txt # -# Copyright (C) 2009, 2010, 2022 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010, 2022, 2025 Free Software Foundation, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -79,7 +79,7 @@ BEGIN { all_charsets[all_charsets_count++] = "letter"; all_charsets[all_charsets_count++] = "digit"; all_charsets[all_charsets_count++] = "hex_digit"; - all_charsets[all_charsets_count++] = "letter_plus_digit"; + all_charsets[all_charsets_count++] = "letter_and_digit"; all_charsets[all_charsets_count++] = "graphic"; all_charsets[all_charsets_count++] = "whitespace"; all_charsets[all_charsets_count++] = "printing"; @@ -203,7 +203,7 @@ category == "Lt" || category == "Lm" || category == "Lo" { charsets[charset_count++] = "letter"; - charsets[charset_count++] = "letter_plus_digit"; + charsets[charset_count++] = "letter_and_digit"; } ## The digit character set @@ -216,7 +216,7 @@ category == "Lo" { category == "Nd" { charsets[charset_count++] = "digit"; - charsets[charset_count++] = "letter_plus_digit"; + charsets[charset_count++] = "letter_and_digit"; } ## The hex_digit character set @@ -327,9 +327,9 @@ category !~ /Cs/ { ## Other character sets ####################### -# Note that the "letter_plus_digit" and "printing" character sets, which +# Note that the "letter_and_digit" and "printing" character sets, which # are unions of other character sets, are included in the patterns -# matching their constituent parts (i.e., the "letter_plus_digit" +# matching their constituent parts (i.e., the "letter_and_digit" # character set is included as part of the "letter" and "digit" # patterns). # diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm index bb0beab5d..c67cfa1e6 100644 --- a/module/ice-9/deprecated.scm +++ b/module/ice-9/deprecated.scm @@ -21,6 +21,7 @@ #:use-module (ice-9 source-properties) #:use-module (ice-9 weak-tables) #:use-module (ice-9 arrays) + #:use-module (srfi srfi-14) #:export ((make-guardian* . make-guardian) module-observe-weak (make-object-property* . make-object-property) @@ -44,17 +45,87 @@ (array-index-map!* . array-index-map!) (array-equal?* . array-equal?) (array-slice-for-each* . array-slice-for-each) - (array-slice-for-each-in-order* . array-slice-for-each-in-order))) + (array-slice-for-each-in-order* . array-slice-for-each-in-order) + (char-set?* . char-set?) + (char-set=* . char-set=) + (char-set<=* . char-set<=) + (char-set-hash* . char-set-hash) + (char-set-cursor* . char-set-cursor) + (char-set-ref* . char-set-ref) + (char-set-cursor-next* . char-set-cursor-next) + (end-of-char-set?* . end-of-char-set?) + (char-set-fold* . char-set-fold) + (char-set-unfold* . char-set-unfold) char-set-unfold! + (char-set-for-each* . char-set-for-each) + (char-set-map* . char-set-map) + (char-set-copy* . char-set-copy) + (char-set* . char-set) + (list->char-set* . list->char-set) + (list->char-set!* . list->char-set!) + (string->char-set* . string->char-set) + (string->char-set!* . string->char-set!) + (char-set-filter* . char-set-filter) + (char-set-filter!* . char-set-filter!) + (ucs-range->char-set* . ucs-range->char-set) + (ucs-range->char-set!* . ucs-range->char-set!) + (->char-set* . ->char-set) + (char-set-size* . char-set-size) + (char-set-count* . char-set-count) + (char-set->list* . char-set->list) + (char-set->string* . char-set->string) + (char-set-contains?* . char-set-contains?) + (char-set-every* . char-set-every) + (char-set-any* . char-set-any) + (char-set-adjoin* . char-set-adjoin) + (char-set-adjoin!* . char-set-adjoin!) + (char-set-delete* . char-set-delete) + (char-set-delete!* . char-set-delete!) + (char-set-complement* . char-set-complement) + (char-set-union* . char-set-union) + (char-set-intersection* . char-set-intersection) + (char-set-difference* . char-set-difference) + (char-set-xor* . char-set-xor) + (char-set-diff+intersection* . char-set-diff+intersection) + (char-set-complement!* . char-set-complement!) + (char-set-union!* . char-set-union!) + (char-set-intersection!* . char-set-intersection!) + (char-set-difference!* . char-set-difference!) + (char-set-xor!* . char-set-xor!) + (char-set-diff+intersection!* . char-set-diff+intersection!) + (char-set:lower-case* . char-set:lower-case) + (char-set:upper-case* . char-set:upper-case) + (char-set:title-case* . char-set:title-case) + (char-set:letter* . char-set:letter) + (char-set:digit* . char-set:digit) + (char-set:letter+digit* . char-set:letter+digit) + (char-set:graphic* . char-set:graphic) + (char-set:printing* . char-set:printing) + (char-set:whitespace* . char-set:whitespace) + (char-set:iso-control* . char-set:iso-control) + (char-set:punctuation* . char-set:punctuation) + (char-set:symbol* . char-set:symbol) + (char-set:hex-digit* . char-set:hex-digit) + (char-set:blank* . char-set:blank) + (char-set:ascii* . char-set:ascii) + (char-set:empty* . char-set:empty) + (char-set:full* . char-set:full))) -#; -(define-syntax-rule (define-deprecated name message exp) - (begin - (define-syntax rule - (identifier-syntax - (begin - (issue-deprecation-warning message) - exp))) - (export rule))) +(define-syntax define-deprecated/stx + (lambda (stx) + (syntax-case stx () + ((_ mod id) + (let* ((id* (datum->syntax #'id + (symbol-append (syntax->datum #'id) '*))) + (msg (string-append + (symbol->string (syntax->datum #'id)) + " in the default environment is deprecated.\n" + "Import it from " (object->string (syntax->datum #'mod)) + " instead."))) + #`(define-syntax #,id* + (identifier-syntax + (begin + (issue-deprecation-warning #,msg) + #,#'id)))))))) (define-syntax define-deprecated-trampoline (lambda (stx) @@ -138,3 +209,102 @@ (apply array-cell-ref array indices)) (define-deprecated-trampoline (((ice-9 arrays) array-cell-set!) array val . indices) (apply array-cell-set! array val indices)) + +(define-deprecated-trampolines (ice-9 arrays) + (array-fill! array fill) + (array-copy! src dst) + (array-copy-in-order! src dst) + (array-index-map! array proc)) + +(define-deprecated-trampoline (((srfi srfi-14) char-set=) . char-sets) + (apply char-set= char-sets)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-hash) cs #:optional (bound 871)) + (char-set-hash cs bound)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-unfold) p f g seed #:optional (base-cs (char-set))) + (char-set-unfold p f g seed base-cs)) +(define-deprecated-trampoline (((srfi srfi-14) char-set) . chars) + (list->char-set chars)) +(define-deprecated-trampoline (((srfi srfi-14) list->char-set) list #:optional (base-cs (char-set))) + (list->char-set list base-cs)) +(define-deprecated-trampoline (((srfi srfi-14) string->char-set) string #:optional (base-cs (char-set))) + (string->char-set string base-cs)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-filter) pred cs #:optional (base-cs (char-set))) + (char-set-filter pred cs base-cs)) +(define-deprecated-trampoline (((srfi srfi-14) ucs-range->char-set) lower upper + #:optional error (base-cs (char-set))) + (ucs-range->char-set lower upper error base-cs)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-adjoin) cs . rest) + (apply char-set-adjoin cs rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-delete) cs . rest) + (apply char-set-delete cs rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-adjoin!) cs . rest) + (apply char-set-adjoin! cs rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-delete!) cs . rest) + (apply char-set-delete! cs rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-union) . rest) + (apply char-set-union rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-intersection) . rest) + (apply char-set-intersection rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-difference) cs . rest) + (apply char-set-difference cs rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-xor) . rest) + (apply char-set-xor rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-diff+intersection) cs . rest) + (apply char-set-diff+intersection cs rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-union!) . rest) + (apply char-set-union! rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-intersection!) . rest) + (apply char-set-intersection! rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-difference!) cs . rest) + (apply char-set-difference! cs rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-xor!) . rest) + (apply char-set-xor! rest)) +(define-deprecated-trampoline (((srfi srfi-14) char-set-diff+intersection!) cs . rest) + (apply char-set-diff+intersection! cs rest)) +(define-deprecated-trampolines (srfi srfi-14) + (char-set? x) + (char-set-cursor cs) + (char-set-ref cs cursor) + (char-set-cursor-next cs cursor) + (end-of-char-set? cursor) + (char-set-fold kons knil cs) + (char-set-unfold! p f g seed base-cs) + (char-set-for-each proc cs) + (char-set-map proc cs) + (char-set-copy cs) + (list->char-set! list base-cs) + (string->char-set! str base-cs) + (char-set-filter! pred cs base-cs) + (ucs-range->char-set! lower upper error base-cs) + (->char-set x) + (char-set-size cs) + (char-set-count pred cs) + (char-set->list cs) + (char-set->string cs) + (char-set-contains? cs ch) + (char-set-every pred cs) + (char-set-complement cs)) + +(define-syntax-rule (define-deprecated*/stx mod id ...) + (begin + (define-deprecated/stx mod id) + ...)) +(define-deprecated*/stx (srfi srfi-14) + ;; Standard character sets + char-set:lower-case + char-set:upper-case + char-set:title-case + char-set:letter + char-set:digit + char-set:letter+digit + char-set:graphic + char-set:printing + char-set:whitespace + char-set:iso-control + char-set:punctuation + char-set:symbol + char-set:hex-digit + char-set:blank + char-set:ascii + char-set:empty + char-set:full) diff --git a/module/ice-9/sandbox.scm b/module/ice-9/sandbox.scm index c17e53282..7a2a7f1de 100644 --- a/module/ice-9/sandbox.scm +++ b/module/ice-9/sandbox.scm @@ -724,7 +724,7 @@ allocation limit is exceeded, an exception will be thrown to the string->number))) (define char-set-bindings - '(((guile) + '(((srfi srfi-14) ->char-set char-set char-set->list diff --git a/module/language/elisp/lexer.scm b/module/language/elisp/lexer.scm index f77f0c1c2..0394c4e03 100644 --- a/module/language/elisp/lexer.scm +++ b/module/language/elisp/lexer.scm @@ -21,6 +21,7 @@ (define-module (language elisp lexer) #:use-module (ice-9 regex) #:use-module (ice-9 source-properties) + #:use-module (srfi srfi-14) #:export (get-lexer get-lexer/1)) ;;; This is the lexical analyzer for the elisp reader. It is diff --git a/module/language/scheme/decompile-tree-il.scm b/module/language/scheme/decompile-tree-il.scm index 99edee44c..6bb199e8c 100644 --- a/module/language/scheme/decompile-tree-il.scm +++ b/module/language/scheme/decompile-tree-il.scm @@ -1,6 +1,6 @@ ;;; Guile VM code converters -;; Copyright (C) 2001, 2009, 2012, 2013 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2009, 2012, 2013, 2025 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -21,6 +21,7 @@ (define-module (language scheme decompile-tree-il) #:use-module (language tree-il) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-14) #:use-module (srfi srfi-26) #:use-module (ice-9 receive) #:use-module (ice-9 vlist) diff --git a/module/rnrs/unicode.scm b/module/rnrs/unicode.scm index 09140b6bf..ebcb1e571 100644 --- a/module/rnrs/unicode.scm +++ b/module/rnrs/unicode.scm @@ -1,6 +1,6 @@ ;;; unicode.scm --- The R6RS Unicode library -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010, 2025 Free Software Foundation, Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -69,9 +69,6 @@ char-upper-case? char-lower-case? - char-set-contains? - char-set:title-case - char-general-category char-upcase @@ -92,6 +89,9 @@ string-normalize-nfkd string-normalize-nfc string-normalize-nfkc) + (only (srfi srfi-14) + char-set-contains? + char-set:title-case) (rnrs base (6))) (define (char-foldcase char) diff --git a/module/srfi/srfi-14.scm b/module/srfi/srfi-14.scm index ecc21e52e..97dcdf328 100644 --- a/module/srfi/srfi-14.scm +++ b/module/srfi/srfi-14.scm @@ -1,6 +1,6 @@ ;;; srfi-14.scm --- Character-set Library -;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2004, 2006, 2025 Free Software Foundation, Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -22,77 +22,81 @@ ;;; Code: -(define-module (srfi srfi-14)) +(define-module (srfi srfi-14) + ;; FIXME: Use #:export instead of #:replace once deprecated bindings + ;; are removed. + #:replace (;; General procedures + char-set? + char-set= + char-set<= + char-set-hash -(re-export -;;; General procedures - char-set? - char-set= - char-set<= - char-set-hash + ;; Iterating over character sets + char-set-cursor + char-set-ref + char-set-cursor-next + end-of-char-set? + char-set-fold + char-set-unfold char-set-unfold! + char-set-for-each + char-set-map -;;; Iterating over character sets - char-set-cursor - char-set-ref - char-set-cursor-next - end-of-char-set? - char-set-fold - char-set-unfold char-set-unfold! - char-set-for-each - char-set-map + ;; Creating character sets + char-set-copy + char-set + list->char-set list->char-set! + string->char-set string->char-set! + char-set-filter char-set-filter! + ucs-range->char-set ucs-range->char-set! + ->char-set -;;; Creating character sets - char-set-copy - char-set - list->char-set list->char-set! - string->char-set string->char-set! - char-set-filter char-set-filter! - ucs-range->char-set ucs-range->char-set! - ->char-set + ;; Querying character sets + char-set-size + char-set-count + char-set->list + char-set->string + char-set-contains? + char-set-every + char-set-any -;;; Querying character sets - char-set-size - char-set-count - char-set->list - char-set->string - char-set-contains? - char-set-every - char-set-any + ;; Character set algebra + char-set-adjoin char-set-adjoin! + char-set-delete char-set-delete! + char-set-complement + char-set-union + char-set-intersection + char-set-difference + char-set-xor + char-set-diff+intersection + char-set-complement! + char-set-union! + char-set-intersection! + char-set-difference! + char-set-xor! + char-set-diff+intersection! -;;; Character set algebra - char-set-adjoin char-set-adjoin! - char-set-delete char-set-delete! - char-set-complement - char-set-union - char-set-intersection - char-set-difference - char-set-xor - char-set-diff+intersection - char-set-complement! - char-set-union! - char-set-intersection! - char-set-difference! - char-set-xor! - char-set-diff+intersection! + ;; Standard character sets + char-set:lower-case + char-set:upper-case + char-set:title-case + char-set:letter + char-set:digit + char-set:letter+digit + char-set:graphic + char-set:printing + char-set:whitespace + char-set:iso-control + char-set:punctuation + char-set:symbol + char-set:hex-digit + char-set:blank + char-set:ascii + char-set:empty + char-set:full)) -;;; Standard character sets - char-set:lower-case - char-set:upper-case - char-set:title-case - char-set:letter - char-set:digit - char-set:letter+digit - char-set:graphic - char-set:printing - char-set:whitespace - char-set:iso-control - char-set:punctuation - char-set:symbol - char-set:hex-digit - char-set:blank - char-set:ascii - char-set:empty - char-set:full) +(eval-when (expand load eval) + (load-extension (string-append "libguile-" (effective-version)) + "scm_init_srfi_14")) (cond-expand-provide (current-module) '(srfi-14)) diff --git a/module/sxml/simple.scm b/module/sxml/simple.scm index 57fccbc9c..9142852e5 100644 --- a/module/sxml/simple.scm +++ b/module/sxml/simple.scm @@ -1,6 +1,6 @@ ;;;; (sxml simple) -- a simple interface to the SSAX parser ;;;; -;;;; Copyright (C) 2009, 2010, 2013 Free Software Foundation, Inc. +;;;; Copyright (C) 2009, 2010, 2013, 2025 Free Software Foundation, Inc. ;;;; Modified 2004 by Andy Wingo . ;;;; Originally written by Oleg Kiselyov as SXML-to-HTML.scm. ;;;; @@ -30,6 +30,7 @@ #:use-module (sxml ssax) #:use-module (sxml transform) #:use-module (ice-9 match) + #:use-module (srfi srfi-14) #:export (xml->sxml sxml->xml sxml->string)) ;; Helpers from upstream/SSAX.scm. diff --git a/module/system/base/syntax.scm b/module/system/base/syntax.scm index 9d4be1aa9..0b40287aa 100644 --- a/module/system/base/syntax.scm +++ b/module/system/base/syntax.scm @@ -1,6 +1,6 @@ ;;; Guile VM specific syntaxes and utilities -;; Copyright (C) 2001, 2009, 2016, 2019 Free Software Foundation, Inc +;; Copyright (C) 2001, 2009, 2016, 2019, 2025 Free Software Foundation, Inc ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public @@ -19,6 +19,7 @@ ;;; Code: (define-module (system base syntax) + #:use-module (srfi srfi-14) #:export (%compute-initargs) #:export-syntax (define-type define-record define-record/keywords record-case transform-record)) diff --git a/module/system/repl/server.scm b/module/system/repl/server.scm index 9a8f51c5b..af6c67fd7 100644 --- a/module/system/repl/server.scm +++ b/module/system/repl/server.scm @@ -1,6 +1,6 @@ ;;; Repl server -;; Copyright (C) 2003,2010,2011,2014,2016,2019,2021 Free Software Foundation, Inc. +;; Copyright (C) 2003,2010,2011,2014,2016,2019,2021,2025 Free Software Foundation, Inc. ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -27,6 +27,7 @@ #:use-module (ice-9 iconv) #:use-module (rnrs bytevectors) #:use-module (ice-9 binary-ports) + #:use-module (srfi srfi-14) #:use-module (srfi srfi-26) ; cut #:export (make-tcp-server-socket make-unix-domain-server-socket diff --git a/module/texinfo/serialize.scm b/module/texinfo/serialize.scm index 05d3facae..da246a1e1 100644 --- a/module/texinfo/serialize.scm +++ b/module/texinfo/serialize.scm @@ -1,6 +1,6 @@ ;;;; (texinfo serialize) -- rendering stexinfo as texinfo ;;;; -;;;; Copyright (C) 2009, 2012, 2013 Free Software Foundation, Inc. +;;;; Copyright (C) 2009, 2012, 2013, 2025 Free Software Foundation, Inc. ;;;; Copyright (C) 2003,2004,2009 Andy Wingo ;;;; ;;;; This library is free software; you can redistribute it and/or @@ -31,6 +31,7 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-13) + #:use-module (srfi srfi-14) #:export (stexi->texi)) (define (list-intersperse src-l elem) diff --git a/module/texinfo/string-utils.scm b/module/texinfo/string-utils.scm index 4b860fe74..937db7058 100644 --- a/module/texinfo/string-utils.scm +++ b/module/texinfo/string-utils.scm @@ -1,6 +1,6 @@ ;;;; (texinfo string-utils) -- text filling and wrapping ;;;; -;;;; Copyright (C) 2009, 2013 Free Software Foundation, Inc. +;;;; Copyright (C) 2009, 2013, 2025 Free Software Foundation, Inc. ;;;; Copyright (C) 2003 Richard Todd ;;;; ;;;; This library is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ ;;; Code: (define-module (texinfo string-utils) + #:use-module (srfi srfi-14) #:export (escape-special-chars transform-string expand-tabs diff --git a/module/web/http.scm b/module/web/http.scm index 9270cd0f9..567066bfc 100644 --- a/module/web/http.scm +++ b/module/web/http.scm @@ -36,8 +36,9 @@ #:use-module (ice-9 object-properties) #:use-module (ice-9 rdelim) #:use-module (ice-9 textual-ports) - #:use-module (srfi srfi-19) #:use-module (srfi srfi-9) + #:use-module (srfi srfi-14) + #:use-module (srfi srfi-19) #:use-module (web uri) #:export (string->header header->string diff --git a/module/web/uri.scm b/module/web/uri.scm index 8c5c0d6f0..d57f4159e 100644 --- a/module/web/uri.scm +++ b/module/web/uri.scm @@ -1,6 +1,6 @@ ;;;; (web uri) --- URI manipulation tools ;;;; -;;;; Copyright (C) 1997,2001,2002,2010,2011,2012,2013,2014,2019-2021 Free Software Foundation, Inc. +;;;; Copyright (C) 1997,2001,2002,2010,2011,2012,2013,2014,2019-2021,2025 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -26,6 +26,7 @@ (define-module (web uri) #:use-module (srfi srfi-9) + #:use-module (srfi srfi-14) #:use-module (ice-9 iconv) #:use-module (ice-9 regex) #:use-module (ice-9 rdelim) diff --git a/test-suite/tests/strings.test b/test-suite/tests/strings.test index c6df15844..0ffa51d6a 100644 --- a/test-suite/tests/strings.test +++ b/test-suite/tests/strings.test @@ -1,7 +1,7 @@ ;;;; strings.test --- test suite for Guile's string functions -*- scheme -*- ;;;; Jim Blandy --- August 1999 ;;;; -;;;; Copyright (C) 1999,2001,2004-2006,2008-2011,2013,2015,2018,2020,2023 +;;;; Copyright (C) 1999,2001,2004-2006,2008-2011,2013,2015,2018,2020,2023,2025 ;;;; Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ (define-module (test-strings) #:use-module ((system base compile) #:select (compile)) #:use-module (test-suite lib) + #:use-module (srfi srfi-14) #:use-module (ice-9 string-fun)) (define exception:read-only-string diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test index 2ec41864a..98343504e 100644 --- a/test-suite/tests/tree-il.test +++ b/test-suite/tests/tree-il.test @@ -27,7 +27,8 @@ #:use-module (language tree-il optimize) #:use-module (ice-9 match) #:use-module (ice-9 regex) - #:use-module (srfi srfi-13)) + #:use-module (srfi srfi-13) + #:use-module (srfi srfi-14)) (define-syntax-rule (pass-if-primitives-resolved in expected) (pass-if (format #f "primitives-resolved in ~s" 'in)