guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/07: base32: Export the base32 charsets.


From: Ludovic Courtès
Subject: 03/07: base32: Export the base32 charsets.
Date: Fri, 21 Jul 2017 11:04:13 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 0a94dc63964c88903079c0a040162439fe07a306
Author: Ludovic Courtès <address@hidden>
Date:   Fri Jul 21 14:32:24 2017 +0200

    base32: Export the base32 charsets.
    
    * guix/base32.scm (%nix-base32-charset, %rfc4648-base32-charset): New
    variables.
---
 guix/base32.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/guix/base32.scm b/guix/base32.scm
index 7b2e2a6..49f191b 100644
--- a/guix/base32.scm
+++ b/guix/base32.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2015, 2017 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +28,8 @@
             bytevector->nix-base32-string
             base32-string->bytevector
             nix-base32-string->bytevector
+            %nix-base32-charset
+            %rfc4648-base32-charset
             &invalid-base32-character
             invalid-base32-character?
             invalid-base32-character-value
@@ -152,11 +154,17 @@ the previous application or INIT."
     #\a #\b #\c #\d #\f #\g #\h #\i #\j #\k #\l #\m #\n
     #\p #\q #\r #\s #\v #\w #\x #\y #\z))
 
+(define %nix-base32-charset
+  (list->char-set (vector->list %nix-base32-chars)))
+
 (define %rfc4648-base32-chars
   #(#\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m
     #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z
     #\2 #\3 #\4 #\5 #\6 #\7))
 
+(define %rfc4648-base32-charset
+  (list->char-set (vector->list %rfc4648-base32-chars)))
+
 (define bytevector->base32-string
   (make-bytevector->base32-string bytevector-quintet-fold
                                   %rfc4648-base32-chars))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]