Debian Codegraph @

guile/modules/gnutls/build/utils.scm

raw
1 ;;; GnuTLS --- Guile bindings for GnuTLS.
2 ;;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
3 ;;;
4 ;;; This file is part of Guile-GnuTLS.
5 ;;;
6 ;;; This library is free software; you can redistribute it and/or
7 ;;; modify it under the terms of the GNU Lesser General Public
8 ;;; License as published by the Free Software Foundation; either
9 ;;; version 2.1 of the License, or (at your option) any later version.
10 ;;;
11 ;;; This library is distributed in the hope that it will be useful,
12 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;;; Lesser General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU Lesser General Public
17 ;;; License along with this library; if not, see <https://www.gnu.org/licenses/>.
18
19 ;;; Written by Ludovic Courtès <[email protected]>
20
21 (define-module (gnutls build utils)
22 :use-module (srfi srfi-13)
23 :export (scheme-symbol->c-name))
24
25 ;;;
26 ;;; Common utilities for the binding generation code.
27 ;;;
28
29
30 ;;;
31 ;;; Utilities.
32 ;;;
33
34 (define (scheme-symbol->c-name sym)
35 ;; Turn SYM, a symbol denoting a Scheme name, into a string denoting a C
36 ;; name.
37 (string-map (lambda (chr)
38 (if (eq? chr #\-) #\_ chr))
39 (symbol->string sym)))
40
41
42 ;;; Local Variables:
43 ;;; mode: scheme
44 ;;; coding: utf-8
45 ;;; End:
46
47 ;;; arch-tag: 56919ee1-7cce-46b9-b90f-ae6fbcfe4159