[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 10/324: Define a few libextractor metaformats
From: |
gnunet |
Subject: |
[gnunet-scheme] 10/324: Define a few libextractor metaformats |
Date: |
Tue, 21 Sep 2021 13:20:50 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit 4b19c9de292027775caa3d3485c2f7fdc486f889
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Thu Nov 5 20:08:25 2020 +0000
Define a few libextractor metaformats
---
gnu/extractor/metaformats.scm | 48 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/extractor/metaformats.scm b/gnu/extractor/metaformats.scm
new file mode 100644
index 0000000..3b99c45
--- /dev/null
+++ b/gnu/extractor/metaformats.scm
@@ -0,0 +1,48 @@
+;; This file is part of scheme-extractor.
+;; scheme-extractor is a partial Scheme port of libextractor.
+;; A previous iteration of this file is part of libextractor.
+;; Copyright (C) 2002-2017 Vidyut Samanta and Christian Grothoff
+;; Copyright (C) 2020 Maxime Devos
+;;
+;; libextractor 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, or (at your
+;; option) any later version.
+;;
+;; libextractor 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 libextractor; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;; SPDX-License-Identifier: GPL-3.0-or-later
+;; Upstream source: src/include/extractor.h
+
+(library (gnu extractor metaformat)
+ (export meta-format?
+ meta-format->integer
+ integer->meta-format
+ METAFORMAT_UNKNOWN
+ METAFORMAT_UTF8
+ METAFORMAT_BINARY
+ METAFORMAT_C_STRING)
+ (import (gnu extractor enum))
+
+ (define-wrapped-enum (<meta-format> meta-format? integer->meta-format
+ meta-format->integer)
+ (#:max 255) ;; TODO: figure out actual maximum
+ (#:known
+ ;; Format is unknown.
+ (METAFORMAT_UNKNOWN 0)
+ ;; 0-terminated, UTF-8 encoded string. "data_len"
+ ;; is strlen(data)+1.
+ (METAFORMAT_UTF8 1)
+ ;; Some kind of binary format, see given Mime type.
+ (METAFORMAT_BINARY 2)
+ ;; 0-terminated string. The specific encoding is unknown.
+ ;; "data_len" is strlen (data)+1.
+ (METAFORMAT_C_STRING 3))))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] branch master created (now 3c91acb), gnunet, 2021/09/21
- [gnunet-scheme] 02/324: Define hashcodes, gnunet, 2021/09/21
- [gnunet-scheme] 04/324: Define CHK URIs and parsing, gnunet, 2021/09/21
- [gnunet-scheme] 03/324: Define (de-)ASCIIification procedures for hash codes, gnunet, 2021/09/21
- [gnunet-scheme] 07/324: Fix some exports and imports, gnunet, 2021/09/21
- [gnunet-scheme] 01/324: New module: (gnu gnunet directory), gnunet, 2021/09/21
- [gnunet-scheme] 10/324: Define a few libextractor metaformats,
gnunet <=
- [gnunet-scheme] 13/324: Include the plugin name in item meta-data, gnunet, 2021/09/21
- [gnunet-scheme] 08/324: Define libextractor metatypes, gnunet, 2021/09/21
- [gnunet-scheme] 06/324: Begin defining (gnu gnunet metadata), gnunet, 2021/09/21
- [gnunet-scheme] 14/324: Define a new binding construct, gnunet, 2021/09/21
- [gnunet-scheme] 18/324: Fix variable references, gnunet, 2021/09/21
- [gnunet-scheme] 16/324: Define relevant serialised structures for metadata, gnunet, 2021/09/21
- [gnunet-scheme] 05/324: Correct dependencies in (gnu gnunet directory), gnunet, 2021/09/21
- [gnunet-scheme] 15/324: Define a meta data deserialisation procedure, gnunet, 2021/09/21
- [gnunet-scheme] 12/324: [guile-zlib] Bind the uncompress function, gnunet, 2021/09/21
- [gnunet-scheme] 22/324: Don't forget to pass the plugin name, gnunet, 2021/09/21