gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libfints] branch master updated: Fix compilation errors.


From: gnunet
Subject: [GNUnet-SVN] [libfints] branch master updated: Fix compilation errors.
Date: Wed, 10 Oct 2018 15:14:12 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository libfints.

The following commit(s) were added to refs/heads/master by this push:
     new 0d26809  Fix compilation errors.
0d26809 is described below

commit 0d2680987c3037c4ef0b92888fce09a7d50170d1
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Oct 10 15:13:54 2018 +0200

    Fix compilation errors.
---
 configure.ac        | 30 +++++-----------------
 contrib/Makefile.am | 34 ++++++++++++++++---------
 src/Makefile.am     |  4 ++-
 src/xmlmessages.c   | 71 ++++++++++++++++++++++++++++++++++++-----------------
 src/xmlproto.c      |  6 ++---
 5 files changed, 83 insertions(+), 62 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6174443..9f98a86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,32 +1,15 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-#
-#  This file is part of libfints
-#
-#  libfints 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.
-#
-#  libfints 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
-#  libfints; see the file COPYING.  If not, If not, see 
<http://www.gnu.org/license>
-#
-
+# I'm in the public domain.
 
 AC_PREREQ([2.69])
-AC_INIT([libfints], [0.1], address@hidden)
-AC_CONFIG_SRCDIR([src/libfints_messages.c])
-AM_INIT_AUTOMAKE([-Wall subdir-objects])
+AC_INIT([libebics], [0.1], address@hidden)
+AC_CONFIG_SRCDIR([src/libebics.c])
 AC_CONFIG_HEADERS([config.h])
-#AM_PATH_CHECK([0.9.0],[],[AC_MSG_ERROR([check is missing])])
+AM_INIT_AUTOMAKE([subdir-objects 1.9 tar-pax])
 
 # Checks for programs.
 AC_PROG_CC
-AC_PROG_CC_STDC
-#LT_INIT
+AC_PROG_CC_C99
+LT_INIT
 
 # Checks for libraries.
 AC_CONFIG_MACRO_DIR([m4])
@@ -165,7 +148,6 @@ AC_SUBST(GNUTLS_CFLAGS)
 AC_SUBST(GNUTLS_LIBS)
 AC_SUBST(GNUTLS_MIN_VERSION)
 
-
 CPPFLAGS="$XML_CPPFLAGS $CPPFLAGS $LIBCURL $LIBCURL_CPPFLAGS $XMLSEC1_CFLAGS 
$LIBGNUTLS_CFLAGS $ZLIB_CFLAGS"
 
 AC_CONFIG_FILES([Makefile
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 1da7f5a..008ccda 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,16 +1,28 @@
 SUBDIRS = .
 
-CLEANFILES = ebicsRequest.xml \
-               ebicsUnsecuredRequest,xml \
-               HIARequestOrderData.xml \
-               SignaturePubKeyOrderData.xml
+xml_templates = \
+  ebicsRequest.xml \
+  ebicsUnsecuredRequest.xml \
+  HIARequestOrderData.xml \
+  SignaturePubKeyOrderData.xml \
+  ebicsNoPubKeyDigestsRequest.xml
 
-all: xsdparser
+$(xml_templates):
+       ./genex.py ebics_schema/ebics_request_H004.xsd \
+          ebicsRequest -o ebicsRequest.xml
+       ./genex.py ebics_schema/ebics_orders_H004.xsd \
+          HIARequestOrderData -o HIARequestOrderData.xml
+       ./genex.py ebics_schema/ebics_signature.xsd \
+          SignaturePubKeyOrderData -o SignaturePubKeyOrderData.xml
+       ./genex.py ebics_schema/ebics_keymgmt_request_H004.xsd \
+          ebicsUnsecuredRequest -o ebicsUnsecuredRequest.xml
+       ./genex.py ebics_schema/ebics_keymgmt_request_H004.xsd \
+          ebicsNoPubKeyDigestsRequest -o ebicsNoPubKeyDigestsRequest.xml
+
+pkgdata_DATA = $(xml_templates)
+
+CLEANFILES = $(xml_templates)
+
+all: $(xml_templates)
        echo "Generating genex xml files"
 
-xsdparser:
-       ./genex.py ebics_schema/ebics_request_H004.xsd ebicsRequest -o 
ebicsRequest.xml
-       ./genex.py ebics_schema/ebics_orders_H004.xsd HIARequestOrderData -o 
HIARequestOrderData.xml
-       ./genex.py ebics_schema/ebics_signature.xsd SignaturePubKeyOrderData -o 
SignaturePubKeyOrderData.xml
-       ./genex.py ebics_schema/ebics_keymgmt_request_H004.xsd 
ebicsUnsecuredRequest -o ebicsUnsecuredRequest.xml
-       ./genex.py ebics_schema/ebics_keymgmt_request_H004.xsd 
ebicsNoPubKeyDigestsRequest -o ebicsNoPubKeyDigestsRequest.xml
diff --git a/src/Makefile.am b/src/Makefile.am
index 14c42eb..affdf42 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,7 +10,9 @@ libebics_la_LDFLAGS = \
   -no-undefined
 
 libebics_la_SOURCES = \
-  libebics.c
+  libebics.c \
+  xmlproto.c \
+  xmlmessages.c
 
 libebics_la_LIBADD = \
   $(XML_LIBS) \
diff --git a/src/xmlmessages.c b/src/xmlmessages.c
index 0699277..765eabf 100644
--- a/src/xmlmessages.c
+++ b/src/xmlmessages.c
@@ -51,12 +51,24 @@ tools_get_nonce(char *nonce)
   uint8_t index;
   unsigned char data[EBICS_NONCE_BINARY_SIZE];
   gcry_create_nonce (data, EBICS_NONCE_BINARY_SIZE);
-  for ( index = 0; index < EBICS_NONCE_BINARY_SIZE; index ++ )
+
+  for (index = 0;
+       index < EBICS_NONCE_BINARY_SIZE;
+       index ++ )
   {
-    LOG(EBICS_LOGLEVEL_DEBUG, "data[%u]: %02X", index, data[index] );
-    snprintf(&nonce[index*2], 3, "%02X", data[index]);
+    LOG (EBICS_LOGLEVEL_DEBUG,
+         "data[%u]: %02X\n",
+         index,
+         data[index]);
+    snprintf (&nonce[index*2],
+              3,
+              "%02X",
+              data[index]);
   }
-  LOG(EBICS_LOGLEVEL_DEBUG, "Nonce: %s", nonce);
+
+  LOG (EBICS_LOGLEVEL_DEBUG,
+       "Nonce: %s",
+       nonce);
   return nonce;
 }
 
@@ -124,19 +136,29 @@ EBICS_build_header_generic (void *cls,
 }
 
 void
-EBICS_build_header_ebicsRequest (void *cls, struct EBICS_genex_document 
*document)
+EBICS_build_header_ebicsRequest (void *cls,
+                                 struct EBICS_genex_document *document)
 {
   char nonce[EBICS_NONCE_STRING_SIZE];
   char date[DATE_STR_SIZE];
   struct EBICS_MSG_Spec header[] = {
-    EBICS_MSG_op_subcommand(EBICS_build_header_generic ,cls, NULL),
-    EBICS_MSG_op_set_string("//ebics:static//ebics:Nonce", 
tools_get_nonce(nonce)),
-    EBICS_MSG_op_set_string("//ebics:static//ebics:Timestamp", 
tools_get_timestamp(date)),
+
+    EBICS_MSG_op_subcommand (EBICS_build_header_generic,
+                             cls),
+
+    EBICS_MSG_op_set_string ("//ebics:static//ebics:Nonce",
+                             tools_get_nonce (nonce)),
+
+    EBICS_MSG_op_set_string ("//ebics:static//ebics:Timestamp",
+                             tools_get_timestamp (date)),
+
     /* TODO: test if header should be initializing or not */
-    EBICS_MSG_op_set_string("ebics:TransactionPhase", "Initialisation"),
-    EBICS_MSG_op_end()
+    EBICS_MSG_op_set_string ("ebics:TransactionPhase",
+                             "Initialisation"),
+    EBICS_MSG_op_end ()
   };
-  EBICS_MSG_parse_spec(header, document);
+
+  EBICS_MSG_parse_spec (header, document);
 }
 
 
@@ -149,26 +171,31 @@ EBICS_build_header_ebicsUnsecuredRequest (void *cls,
                                           struct EBICS_genex_document 
*document)
 {
   struct EBICS_MSG_Spec header[] = {
-    EBICS_MSG_op_subcommand(EBICS_build_header_generic,
-                            cls,
-                            NULL),
-    EBICS_MSG_op_end()
+    EBICS_MSG_op_subcommand (EBICS_build_header_generic,
+                             cls),
+    EBICS_MSG_op_end ()
   };
-  EBICS_MSG_parse_spec(header, document);
+
+  EBICS_MSG_parse_spec (header, document);
 }
 
 void
-EBICS_build_header_ebicsNoPubKeyDigestsRequest (void *cls, struct 
EBICS_genex_document *document)
+EBICS_build_header_ebicsNoPubKeyDigestsRequest (void *cls,
+                                                struct EBICS_genex_document 
*document)
 {
   char nonce[EBICS_NONCE_STRING_SIZE];
   char date[DATE_STR_SIZE];
   struct EBICS_MSG_Spec header[] = {
-    EBICS_MSG_op_subcommand(EBICS_build_header_generic ,cls, NULL),
-    EBICS_MSG_op_set_string("//ebics:static//ebics:Nonce", 
tools_get_nonce(nonce)),
-    EBICS_MSG_op_set_string("//ebics:static//ebics:Timestamp", 
tools_get_timestamp(date)),
-    EBICS_MSG_op_end()
+    EBICS_MSG_op_subcommand (EBICS_build_header_generic,
+                             cls),
+    EBICS_MSG_op_set_string ("//ebics:static//ebics:Nonce",
+                             tools_get_nonce (nonce)),
+    EBICS_MSG_op_set_string ("//ebics:static//ebics:Timestamp",
+                             tools_get_timestamp (date)),
+    EBICS_MSG_op_end ()
   };
-  EBICS_MSG_parse_spec(header, document);
+
+  EBICS_MSG_parse_spec (header, document);
 }
 
 void
diff --git a/src/xmlproto.c b/src/xmlproto.c
index 04f5ebc..4521f5f 100644
--- a/src/xmlproto.c
+++ b/src/xmlproto.c
@@ -258,13 +258,11 @@ EBICS_MSG_op_del_node (const char *xpath)
  */
 struct EBICS_MSG_Spec
 EBICS_MSG_op_subcommand (EBICS_MSG_subcommand_fn subcmd,
-                         void *cls,
-                         struct EBICS_genex_document *target) 
+                         void *cls)
 {
   struct EBICS_MSG_Spec result = {
     .operation = EBICS_MSG_OP_SUBCOMMAND,
     .data.subcommand.function = subcmd,
-    .data.subcommand.target = target,
     .data.subcommand.cls = cls
   };
 
@@ -916,7 +914,7 @@ process_subcommand (const struct EBICS_MSG_Spec *operation,
 {
   operation->data.subcommand.function
     (operation->data.subcommand.cls,
-     document)
+     document);
 }
 
 /**

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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