gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1291 - in GNUnet: contrib m4 src/applications/fs/tools src


From: grothoff
Subject: [GNUnet-SVN] r1291 - in GNUnet: contrib m4 src/applications/fs/tools src/include src/util
Date: Tue, 5 Jul 2005 20:58:23 -0700 (PDT)

Author: grothoff
Date: 2005-07-05 20:58:14 -0700 (Tue, 05 Jul 2005)
New Revision: 1291

Modified:
   GNUnet/contrib/config-client.in
   GNUnet/m4/Makefile.in
   GNUnet/src/applications/fs/tools/gnunet-insert.c
   GNUnet/src/include/gnunet_util.h
   GNUnet/src/util/dso.c
   GNUnet/src/util/timer.c
Log:
update

Modified: GNUnet/contrib/config-client.in
===================================================================
--- GNUnet/contrib/config-client.in     2005-07-06 03:51:07 UTC (rev 1290)
+++ GNUnet/contrib/config-client.in     2005-07-06 03:58:14 UTC (rev 1291)
@@ -166,6 +166,19 @@
        help
                Path to the gnunet.conf file for gnunetd (for
                forking gnunetd by gnunet-gtk)
+
+
+        config PLUGINS
+        string "Which plugins should gnunet-gtk load?"
+        default "about daemon fs"
+        depends on Meta::ADVANCED
+        help
+               Currently, the available applications are:
+               about: the about dialog
+               daemon: starting and stopping gnunetd           
+               fs: file sharing
+               Default: PLUGINS = "about daemon fs"  
+
 endmenu
 
 menu "Defaults for gnunet-chat" GNUNET-CHAT

Modified: GNUnet/m4/Makefile.in
===================================================================
--- GNUnet/m4/Makefile.in       2005-07-06 03:51:07 UTC (rev 1290)
+++ GNUnet/m4/Makefile.in       2005-07-06 03:58:14 UTC (rev 1291)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.8.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  Free Software Foundation, Inc.
+# 2003, 2004, 2005  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -33,6 +33,7 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
 subdir = m4
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
@@ -183,6 +184,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -349,7 +352,7 @@
 clean-generic:
 
 distclean-generic:
-       -rm -f $(CONFIG_CLEAN_FILES)
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"

Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c    2005-07-06 03:51:07 UTC 
(rev 1290)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c    2005-07-06 03:58:14 UTC 
(rev 1291)
@@ -123,31 +123,16 @@
   switch(event->type) {
   case FSUI_upload_progress:
     if (*verboselevel == YES) {
-      const char * unit = _(/* time unit */ "ms");
+      char * ret;
 
       delta = event->data.UploadProgress.main_eta - cronTime(NULL);
-      if (delta > 5 * 1000) {
-       delta = delta / 1000;
-       unit = _(/* time unit */ "s");
-       if (delta > 5 * 60) {
-         delta = delta / 60;
-         unit = _(/* time unit */ "m");
-         if (delta > 5 * 60) {
-           delta = delta / 60;
-           unit = _(/* time unit */ "h");
-           if (delta > 5 * 24) {
-             delta = delta / 24;
-             unit = _(/* time unit */ " days");              
-           }       
-         }             
-       }       
-      }        
+      ret = timeIntervalToFancyString(delta);
       PRINTF(_("%16llu of %16llu bytes inserted "
-              "(estimating %llu%s to completion)\n"),
+              "(estimating %s to completion)\n"),
             event->data.UploadProgress.main_completed,
             event->data.UploadProgress.main_total,
-            delta,
-            unit);
+            ret);
+      FREE(ret);
     }
     break;
   case FSUI_upload_complete:

Modified: GNUnet/src/include/gnunet_util.h
===================================================================
--- GNUnet/src/include/gnunet_util.h    2005-07-06 03:51:07 UTC (rev 1290)
+++ GNUnet/src/include/gnunet_util.h    2005-07-06 03:58:14 UTC (rev 1291)
@@ -1199,6 +1199,11 @@
 char * GN_CTIME(const TIME_T * t);
 
 /**
+ * Give relative time in human-readable fancy format.
+ */
+char * timeIntervalToFancyString(cron_t delta);
+
+/**
  * Create a new Session key.
  */
 void makeSessionkey(SESSIONKEY * key);

Modified: GNUnet/src/util/dso.c
===================================================================
--- GNUnet/src/util/dso.c       2005-07-06 03:51:07 UTC (rev 1290)
+++ GNUnet/src/util/dso.c       2005-07-06 03:58:14 UTC (rev 1291)
@@ -1,5 +1,6 @@
 /*
      This file is part of GNUnet
+     (C) 2002, 2003, 2004, 2005 Christian Grothoff (and other contributing 
authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published

Modified: GNUnet/src/util/timer.c
===================================================================
--- GNUnet/src/util/timer.c     2005-07-06 03:51:07 UTC (rev 1290)
+++ GNUnet/src/util/timer.c     2005-07-06 03:58:14 UTC (rev 1291)
@@ -181,5 +181,36 @@
 #endif
 }
 
+/**
+ * Give relative time in human-readable fancy format.
+ */
+char * timeIntervalToFancyString(cron_t delta) {
+  const char * unit = _(/* time unit */ "ms");
+  char * ret;
 
+  if (delta > 5 * 1000) {
+    delta = delta / 1000;
+    unit = _(/* time unit */ "s");
+    if (delta > 5 * 60) {
+      delta = delta / 60;
+      unit = _(/* time unit */ "m");
+      if (delta > 5 * 60) {
+       delta = delta / 60;
+       unit = _(/* time unit */ "h");
+       if (delta > 5 * 24) {
+         delta = delta / 24;
+         unit = _(/* time unit */ " days");          
+       }           
+      }                
+    }  
+  }    
+  ret = MALLOC(32);
+  SNPRINTF(ret, 
+          32, 
+          "%llu%s",
+          delta, 
+          unit);
+  return ret;
+}
+
 /* end of timer.c */





reply via email to

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