gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-anastasis] 01/02: add missing #includes


From: gnunet
Subject: [GNUnet-SVN] [taler-anastasis] 01/02: add missing #includes
Date: Thu, 24 Oct 2019 09:52:59 +0200

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

grothoff pushed a commit to branch master
in repository anastasis.

commit 7fb1f136d9d9ee2f1a8885f273b51c17455d49ef
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Oct 24 09:52:07 2019 +0200

    add missing #includes
---
 contrib/uncrustify.cfg                    | 78 +++++++++++++++++++++++++++++++
 contrib/uncrustify_precommit              | 35 ++++++++++++++
 src/backup-db/plugin_anastasis_postgres.c |  1 +
 src/include/anastasis_database_plugin.h   |  3 +-
 4 files changed, 115 insertions(+), 2 deletions(-)

diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg
new file mode 100644
index 0000000..f56c8e7
--- /dev/null
+++ b/contrib/uncrustify.cfg
@@ -0,0 +1,78 @@
+input_tab_size = 2
+output_tab_size = 2
+
+indent_columns = 2
+indent_with_tabs = 0
+indent_case_brace = 2
+indent_label=-16
+
+code_width=80
+#cmd_width=80
+
+# Leave most comments alone for now
+cmt_indent_multi=false
+sp_cmt_cpp_start=add
+
+sp_not=add
+
+sp_func_call_user_paren_paren=remove
+sp_inside_fparen=remove
+sp_after_cast=add
+
+ls_for_split_full=true
+ls_func_split_full=true
+ls_code_width=true
+
+# Arithmetic operations in wrapped expressions should be at the start
+# of the line.
+pos_arith=lead
+
+# Fully parenthesize boolean exprs
+mod_full_paren_if_bool=true
+
+# Braces should be on their own line
+nl_fdef_brace=add
+nl_enum_brace=add
+nl_struct_brace=add
+nl_union_brace=add
+nl_if_brace=add
+nl_brace_else=add
+nl_elseif_brace=add
+nl_while_brace=add
+nl_switch_brace=add
+
+# no newline between "else" and "if"
+nl_else_if=remove
+
+nl_func_paren=remove
+nl_assign_brace=remove
+
+# No extra newlines that cause noisy diffs
+nl_start_of_file=remove
+# If there's no new line, it's not a text file!
+nl_end_of_file=add
+
+sp_inside_paren = remove
+
+sp_arith = add
+sp_arith_additive = add
+
+# We want spaces before and after "="
+sp_before_assign = add
+sp_after_assign = add
+
+# we want "char *foo;"
+sp_after_ptr_star = remove
+sp_between_ptr_star = remove
+
+# we want "if (foo) { ... }"
+sp_before_sparen = add
+
+sp_inside_fparen = remove
+
+# add space before function call and decl: "foo (x)"
+sp_func_call_paren = add
+sp_func_proto_paren = add
+sp_func_proto_paren_empty = add
+sp_func_def_paren = add
+sp_func_def_paren_empty = add
diff --git a/contrib/uncrustify_precommit b/contrib/uncrustify_precommit
new file mode 100755
index 0000000..fd29998
--- /dev/null
+++ b/contrib/uncrustify_precommit
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# use as .git/hooks/pre-commit
+
+exec 1>&2
+
+RET=0
+changed=$(git diff --cached --name-only)
+crustified=""
+
+for f in $changed;
+do
+ if echo $f | grep \\.[c,h]\$ > /dev/null
+ then
+    # compare result of uncrustify with changes
+    #
+    # only change any of the invocations here if
+    # they are portable across all cmp and shell
+    # implementations !
+    uncrustify -q -c uncrustify.cfg -f $f | cmp -s $f -
+    if test $? = 1 ;
+    then
+      crustified=" $crustified $f"
+      RET=1
+    fi
+  fi
+done
+
+if [ $RET = 1 ];
+then
+  echo "Run"
+  echo "uncrustify --no-backup -c uncrustify.cfg ${crustified}"
+  echo "before commiting."
+fi
+exit $RET
diff --git a/src/backup-db/plugin_anastasis_postgres.c 
b/src/backup-db/plugin_anastasis_postgres.c
index f0b5a87..c93448f 100644
--- a/src/backup-db/plugin_anastasis_postgres.c
+++ b/src/backup-db/plugin_anastasis_postgres.c
@@ -23,6 +23,7 @@
 #include "platform.h"
 #include <gnunet/gnunet_util_lib.h>
 #include <gnunet/gnunet_pq_lib.h>
+#include <taler/taler_pq_lib.h>
 #include "anastasis_database_plugin.h"
 
 /**
diff --git a/src/include/anastasis_database_plugin.h 
b/src/include/anastasis_database_plugin.h
index 43e0573..187dce0 100644
--- a/src/include/anastasis_database_plugin.h
+++ b/src/include/anastasis_database_plugin.h
@@ -26,13 +26,12 @@
 #include <jansson.h>
 #include <taler/taler_util.h>
 
-
 /**
  * An EdDSA public key that is used to identify a user's account.
  */
 struct ANASTASIS_AccountPubP
 {
-  struct GNUNET_EddsaPublicKey pub;
+  struct GNUNET_CRYPTO_EddsaPublicKey pub;
 };
 
 /**

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



reply via email to

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