aboutsummaryrefslogtreecommitdiff
path: root/gnu/gnunet/message/protocols.scm
blob: 5b6074401339f972c26b7c49b99375cf638f586f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
;#!r6rs
;; -*- scheme -*- Constants for network protocols
;; This file is part of scheme-GNUnet.
;; Copyright (C) 2001--2021 GNUnet e.V.
;; SPDX-License-Identifier: AGPL-3.0-or-later
;;
;; scheme-GNUnet is free software: you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by the
;; Free Software Foundation, either version 3 of the License, or (at your
;; option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
;; for more details.
;;
;; You should have received a copy of the GNU General Public License along with
;; this program. If not, see <https://www.gnu.org/licenses/>.

(let-syntax ((the-library-form
	      (lambda (s)
		(let ()
		  (define (include/sexp name)
		    (define file
		      (search-path %load-path
				   (string-append "gnu/gnunet/message/" name)))
		    (call-with-input-file file
		      (lambda (port)
			(let loop ()
			  (let ((obj (read port)))
			    (if (eof-object? obj)
				'()
				(cons obj (loop))))))))
		  ;; Do this instead of (include "protocols.scmgen") to placate
		  ;; "make distcheck".
		  (include-from-path "gnu/gnunet/message/protocols.scmgen")
		  (datum->syntax s result)))))
  the-library-form)