gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated (1a94233ae -> a09769079)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (1a94233ae -> a09769079)
Date: Fri, 26 Apr 2019 00:30:24 +0200

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

ng0 pushed a change to branch master
in repository gnunet.

    from 1a94233ae NAMESTORE/REST: fix add record
     new 87ec5f76b test_gnunet_prefix: format
     new d039e8099 src/template: format
     new a09769079 Merge branch 'master' of gnunet.org:gnunet

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 contrib/test_gnunet_prefix.c           | 31 +++++++++++++++----------------
 src/template/gnunet-service-template.c | 28 +++++++++++++---------------
 src/template/gnunet-template.c         | 27 +++++++++++++--------------
 src/template/test_template_api.c       |  2 +-
 4 files changed, 42 insertions(+), 46 deletions(-)

diff --git a/contrib/test_gnunet_prefix.c b/contrib/test_gnunet_prefix.c
index 1a3c9a7ba..b27ef0b2d 100644
--- a/contrib/test_gnunet_prefix.c
+++ b/contrib/test_gnunet_prefix.c
@@ -11,7 +11,7 @@
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -28,8 +28,7 @@
 
 
 int
-main (int argc,
-      char **argv)
+main (int argc, char **argv)
 {
   const char *basename;
   const char *dirname;
@@ -37,27 +36,27 @@ main (int argc,
   basename = getenv ("GNUNET_PREFIX");
   if (NULL == basename)
   {
-    fprintf (stderr,
-            _("Environment variable GNUNET_PREFIX not set\n"));
-    fprintf (stderr,
-            _("Testcases will not work!\n"));
+    fprintf (stderr, _ ("Environment variable GNUNET_PREFIX not set\n"));
+    fprintf (stderr, _ ("Testcases will not work!\n"));
     return 1;
   }
-  dirname = DIR_SEPARATOR_STR ".." DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR 
"gnunet" DIR_SEPARATOR_STR "config.d";
+  dirname = DIR_SEPARATOR_STR ".." DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR
+                              "gnunet" DIR_SEPARATOR_STR "config.d";
   {
     char tmp[strlen (basename) + strlen (dirname) + 1];
     sprintf (tmp, "%s%s", basename, dirname);
     if (0 != access (tmp, R_OK))
     {
       fprintf (stderr,
-              _("Failed to access `%s': %s\n"),
-              tmp,
-              STRERROR (errno));
-      fprintf (stderr,
-              _("Check that you did run `make install' and that 
GNUNET_PREFIX='%s' is the correct prefix.\n"),
-              basename);
-      fprintf (stderr,
-              _("Testcases will not work!\n"));
+               _ ("Failed to access `%s': %s\n"),
+               tmp,
+               STRERROR (errno));
+      fprintf (
+        stderr,
+        _ (
+          "Check that you did run `make install' and that GNUNET_PREFIX='%s' 
is the correct prefix.\n"),
+        basename);
+      fprintf (stderr, _ ("Testcases will not work!\n"));
       return 2;
     }
   }
diff --git a/src/template/gnunet-service-template.c 
b/src/template/gnunet-service-template.c
index 7c6575163..92fd9754f 100644
--- a/src/template/gnunet-service-template.c
+++ b/src/template/gnunet-service-template.c
@@ -11,7 +11,7 @@
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -49,8 +49,8 @@ cleanup_task (void *cls)
  */
 static void *
 client_connect_cb (void *cls,
-                  struct GNUNET_SERVICE_Client *c,
-                  struct GNUNET_MQ_Handle *mq)
+                   struct GNUNET_SERVICE_Client *c,
+                   struct GNUNET_MQ_Handle *mq)
 {
   return c;
 }
@@ -65,8 +65,8 @@ client_connect_cb (void *cls,
  */
 static void
 client_disconnect_cb (void *cls,
-                     struct GNUNET_SERVICE_Client *c,
-                     void *internal_cls)
+                      struct GNUNET_SERVICE_Client *c,
+                      void *internal_cls)
 {
   GNUNET_assert (c == internal_cls);
 }
@@ -85,22 +85,20 @@ run (void *cls,
      struct GNUNET_SERVICE_Handle *service)
 {
   /* FIXME: do setup here */
-  GNUNET_SCHEDULER_add_shutdown (&cleanup_task,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&cleanup_task, NULL);
 }
 
 
 /**
  * Define "main" method using service macro.
  */
-GNUNET_SERVICE_MAIN
-("template",
- GNUNET_SERVICE_OPTION_NONE,
- &run,
- &client_connect_cb,
- &client_disconnect_cb,
- NULL,
- GNUNET_MQ_handler_end ());
+GNUNET_SERVICE_MAIN ("template",
+                     GNUNET_SERVICE_OPTION_NONE,
+                     &run,
+                     &client_connect_cb,
+                     &client_disconnect_cb,
+                     NULL,
+                     GNUNET_MQ_handler_end ());
 
 
 /* end of gnunet-service-template.c */
diff --git a/src/template/gnunet-template.c b/src/template/gnunet-template.c
index ec2c8f624..44dec992b 100644
--- a/src/template/gnunet-template.c
+++ b/src/template/gnunet-template.c
@@ -11,7 +11,7 @@
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -63,21 +63,20 @@ main (int argc, char *const *argv)
 {
   static const struct GNUNET_GETOPT_CommandLineOption options[] = {
     /* FIMXE: add options here */
-    GNUNET_GETOPT_OPTION_END
-  };
-  if (GNUNET_OK !=
-      GNUNET_STRINGS_get_utf8_args (argc, argv,
-                                   &argc, &argv))
+    GNUNET_GETOPT_OPTION_END};
+  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  ret = (GNUNET_OK ==
-        GNUNET_PROGRAM_run (argc, argv,
-                            "gnunet-template",
-                            gettext_noop ("help text"),
-                            options,
-                            &run,
-                            NULL)) ? ret : 1;
-  GNUNET_free ((void*) argv);
+  ret = (GNUNET_OK == GNUNET_PROGRAM_run (argc,
+                                          argv,
+                                          "gnunet-template",
+                                          gettext_noop ("help text"),
+                                          options,
+                                          &run,
+                                          NULL))
+          ? ret
+          : 1;
+  GNUNET_free ((void *) argv);
   return ret;
 }
 
diff --git a/src/template/test_template_api.c b/src/template/test_template_api.c
index 9a588cf8f..7956a4d29 100644
--- a/src/template/test_template_api.c
+++ b/src/template/test_template_api.c
@@ -11,7 +11,7 @@
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 

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



reply via email to

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