Debian Codegraph @

guile/src/make-smob-header.scm

raw
1 ;;; Help produce Guile wrappers for GnuTLS types.
2 ;;;
3 ;;; GnuTLS --- Guile bindings for GnuTLS.
4 ;;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
5 ;;;
6 ;;; This file is part of Guile-GnuTLS.
7 ;;;
8 ;;; This library is free software; you can redistribute it and/or
9 ;;; modify it under the terms of the GNU Lesser General Public
10 ;;; License as published by the Free Software Foundation; either
11 ;;; version 2.1 of the License, or (at your option) any later version.
12 ;;;
13 ;;; This library is distributed in the hope that it will be useful,
14 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ;;; Lesser General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU Lesser General Public
19 ;;; License along with this library; if not, see <https://www.gnu.org/licenses/>.
20
21 ;;; Written by Ludovic Courtès <[email protected]>.
22
23
24 (use-modules (gnutls build smobs))
25
26
27 ;;;
28 ;;; The program.
29 ;;;
30
31 (define (main . args)
32 (let ((port (current-output-port))
33 (enums %gnutls-smobs))
34 (format port "/* Automatically generated, do not edit. */~%~%")
35 (format port "#ifndef GUILE_GNUTLS_SMOBS_H~%")
36 (format port "#define GUILE_GNUTLS_SMOBS_H~%")
37 (for-each (lambda (type)
38 (output-smob-type-declaration type port)
39 (output-c->smob-converter type port)
40 (output-smob->c-converter type port))
41 enums)
42 (format port "#endif~%")))
43
44 (apply main (cdr (command-line)))
45
46 ;;; Local Variables:
47 ;;; mode: scheme
48 ;;; coding: utf-8
49 ;;; End:
50
51 ;;; arch-tag: 7ae9c82f-a423-4251-9a58-6e2581267567